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