-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: persist Copilot drafts per workflow #6017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -151,6 +151,9 @@ export const Panel = memo(function Panel() { | |||||||||||
| const { data: workflows = {} } = useWorkflowMap(workspaceId) | ||||||||||||
| const { data: folders = {} } = useFolderMap(workspaceId) | ||||||||||||
| const activeWorkflowId = useWorkflowRegistry((state) => state.activeWorkflowId) | ||||||||||||
| const copilotDraftScopeKey = activeWorkflowId | ||||||||||||
| ? `${workspaceId}:copilot:${activeWorkflowId}` | ||||||||||||
| : undefined | ||||||||||||
| const { handleAutoLayout: autoLayoutWithFitView } = useAutoLayout(activeWorkflowId || null) | ||||||||||||
|
|
||||||||||||
| // Check for locked blocks (disables auto-layout) | ||||||||||||
|
|
@@ -883,6 +886,7 @@ export const Panel = memo(function Panel() { | |||||||||||
| </div> | ||||||||||||
|
|
||||||||||||
| <MothershipChat | ||||||||||||
| key={copilotDraftScopeKey} | ||||||||||||
| className='min-h-0 flex-1' | ||||||||||||
| messages={copilotMessages} | ||||||||||||
| isSending={copilotIsSending} | ||||||||||||
|
|
@@ -898,6 +902,7 @@ export const Panel = memo(function Panel() { | |||||||||||
| onCancelQueueEdit={copilotCancelQueueEdit} | ||||||||||||
| userId={session?.user?.id} | ||||||||||||
| chatId={copilotResolvedChatId} | ||||||||||||
| draftScopeKey={copilotDraftScopeKey} | ||||||||||||
| layout='copilot-view' | ||||||||||||
|
Comment on lines
+905
to
906
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When soft-navigating between workflows,
Suggested change
|
||||||||||||
| /> | ||||||||||||
| </div> | ||||||||||||
|
|
||||||||||||
Uh oh!
There was an error while loading. Please reload this page.