Skip to content

Commit f336395

Browse files
committed
Temp
1 parent 81cbfe7 commit f336395

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
@@ -1412,7 +1412,8 @@ export function ToolCall({ toolCall: toolCallProp, toolCallId, onStateChange }:
14121412
if (
14131413
toolCall.name === 'checkoff_todo' ||
14141414
toolCall.name === 'mark_todo_in_progress' ||
1415-
toolCall.name === 'tool_search_tool_regex'
1415+
toolCall.name === 'tool_search_tool_regex' ||
1416+
toolCall.name === 'user_memory'
14161417
)
14171418
return null
14181419

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)