Skip to content

Commit 197e765

Browse files
author
Sim Pi Agent
committed
fix: scope Copilot drafts by workflow
1 parent b69fdbd commit 197e765

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ const EMPTY_COPILOT_CHATS: readonly CopilotChatListItem[] = []
114114
*/
115115
export const Panel = memo(function Panel() {
116116
const router = useRouter()
117-
const params = useParams()
118-
const workspaceId = params.workspaceId as string
117+
const { workspaceId, workflowId } = useParams<{ workspaceId: string; workflowId: string }>()
119118

120119
const posthog = usePostHog()
121120
const posthogRef = useRef(posthog)
@@ -898,6 +897,7 @@ export const Panel = memo(function Panel() {
898897
onCancelQueueEdit={copilotCancelQueueEdit}
899898
userId={session?.user?.id}
900899
chatId={copilotResolvedChatId}
900+
draftScopeKey={`${workspaceId}:workflow:${workflowId}`}
901901
layout='copilot-view'
902902
/>
903903
</div>

0 commit comments

Comments
 (0)