We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ace8779 commit 8329f1cCopy full SHA for 8329f1c
1 file changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx
@@ -410,6 +410,17 @@ export const Panel = memo(function Panel({ workspaceId: propWorkspaceId }: Panel
410
setHasHydrated(true)
411
}, [setHasHydrated])
412
413
+ useEffect(() => {
414
+ const handler = (e: Event) => {
415
+ const message = (e as CustomEvent<{ message: string }>).detail?.message
416
+ if (!message) return
417
+ setActiveTab('copilot')
418
+ setCopilotEditingInputValue(message)
419
+ }
420
+ window.addEventListener('mothership-send-message', handler)
421
+ return () => window.removeEventListener('mothership-send-message', handler)
422
+ }, [setActiveTab])
423
+
424
/**
425
* Handles tab click events
426
*/
0 commit comments