Skip to content

Commit 44ab750

Browse files
committed
Temp
1 parent b8b2057 commit 44ab750

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,8 @@ export function ToolCall({ toolCall: toolCallProp, toolCallId, onStateChange }:
19571957
if (
19581958
toolCall.name === 'checkoff_todo' ||
19591959
toolCall.name === 'mark_todo_in_progress' ||
1960-
toolCall.name === 'tool_search_tool_regex'
1960+
toolCall.name === 'tool_search_tool_regex' ||
1961+
toolCall.name === 'user_memory'
19611962
)
19621963
return null
19631964

apps/sim/lib/copilot/tools/client/workflow/set-global-workflow-variables.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,17 @@ export class SetGlobalWorkflowVariablesClientTool extends BaseClientTool {
209209
}
210210
}
211211

212-
const variablesArray = Object.values(byName)
212+
// Convert byName (keyed by name) to record keyed by ID for the API
213+
const variablesRecord: Record<string, any> = {}
214+
for (const v of Object.values(byName)) {
215+
variablesRecord[v.id] = v
216+
}
213217

214-
// POST full variables array to persist
218+
// POST full variables record to persist
215219
const res = await fetch(`/api/workflows/${payload.workflowId}/variables`, {
216220
method: 'POST',
217221
headers: { 'Content-Type': 'application/json' },
218-
body: JSON.stringify({ variables: variablesArray }),
222+
body: JSON.stringify({ variables: variablesRecord }),
219223
})
220224
if (!res.ok) {
221225
const txt = await res.text().catch(() => '')

0 commit comments

Comments
 (0)