From 5b6a981851664cb0c86335340878ca5a50498397 Mon Sep 17 00:00:00 2001 From: Sim Pi Agent Date: Tue, 28 Jul 2026 21:53:48 +0000 Subject: [PATCH] Pi: You are the senior engineer who opened PR #6020 on simstudioai/sim (... --- .../[workspaceId]/w/[workflowId]/components/panel/panel.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx index 1a997731fd8..03ccb9c975c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx @@ -116,6 +116,7 @@ export const Panel = memo(function Panel() { const router = useRouter() const params = useParams() const workspaceId = params.workspaceId as string + const workflowId = params.workflowId as string const posthog = usePostHog() const posthogRef = useRef(posthog) @@ -378,6 +379,9 @@ export const Panel = memo(function Panel() { }) ) + const copilotDraftScopeKey = + `${workspaceId}:copilot:${workflowId}:${copilotChatId ?? copilotResolvedChatId ?? 'new'}` + const handleCopilotNewChat = useCallback(() => { if (!activeWorkflowId || !workspaceId) return requestJson(createWorkflowCopilotChatContract, { @@ -898,6 +902,7 @@ export const Panel = memo(function Panel() { onCancelQueueEdit={copilotCancelQueueEdit} userId={session?.user?.id} chatId={copilotResolvedChatId} + draftScopeKey={copilotDraftScopeKey} layout='copilot-view' />