Skip to content

Commit 494f20e

Browse files
author
Theodore Li
committed
Refresh events after workflow run
1 parent fd9908d commit 494f20e

File tree

1 file changed

+9
-5
lines changed
  • apps/sim/app/workspace/[workspaceId]/home/hooks

1 file changed

+9
-5
lines changed

apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -657,11 +657,15 @@ export function useChat(
657657
: useWorkflowRegistry.getState().activeWorkflowId
658658
if (targetWorkflowId) {
659659
const meta = useWorkflowRegistry.getState().workflows[targetWorkflowId]
660-
addResource({
661-
type: 'workflow',
662-
id: targetWorkflowId,
663-
title: meta?.name ?? 'Workflow',
664-
})
660+
if (
661+
addResource({
662+
type: 'workflow',
663+
id: targetWorkflowId,
664+
title: meta?.name ?? 'Workflow',
665+
})
666+
) {
667+
onResourceEventRef.current?.()
668+
}
665669
}
666670
executeRunToolOnClient(id, name, args as Record<string, unknown>)
667671
}

0 commit comments

Comments
 (0)