We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd9908d commit 494f20eCopy full SHA for 494f20e
apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts
@@ -657,11 +657,15 @@ export function useChat(
657
: useWorkflowRegistry.getState().activeWorkflowId
658
if (targetWorkflowId) {
659
const meta = useWorkflowRegistry.getState().workflows[targetWorkflowId]
660
- addResource({
661
- type: 'workflow',
662
- id: targetWorkflowId,
663
- title: meta?.name ?? 'Workflow',
664
- })
+ if (
+ addResource({
+ type: 'workflow',
+ id: targetWorkflowId,
+ title: meta?.name ?? 'Workflow',
665
+ })
666
+ ) {
667
+ onResourceEventRef.current?.()
668
+ }
669
}
670
executeRunToolOnClient(id, name, args as Record<string, unknown>)
671
0 commit comments