-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Restoring chat model if opening changes #281621
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
base: 1.107/sessions
Are you sure you want to change the base?
Conversation
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts
Outdated
Show resolved
Hide resolved
| await session?.editingSession?.show(); | ||
| } else { | ||
| if (!session) { | ||
| await chatService.loadSessionForResource(resource, ChatAgentLocation.Chat, CancellationToken.None); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This returned a reference too, who owns it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the command to show the changes implemented? I assume the session needs to stay alive as long as the diff editor is open, how are those two things associated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it so that we keep a reference and dispose it accordingly.
This command is owned by the chat extension
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts
Outdated
Show resolved
Hide resolved
…into osortega/restoring-model-if-disposed
This change makes sure the model is restored before trying to open the diff changes