Fix double-disposing edit session (#244395)

And fix inline chat 2
This is complicated. The way that I expect it to work now
- The ChatModel creates the editing session for the right locations and based on the isGlobalEditingSession flag passed in
- stop doesn't dispose the editing session, so it doesn't get disposed twice, but it gets disposed when the ChatModel is disposed
This commit is contained in:
Rob Lourens
2025-03-23 14:09:21 -07:00
committed by GitHub
parent 1a6fb8ba40
commit 77ee3930c6
8 changed files with 49 additions and 50 deletions

View File

@@ -1422,7 +1422,7 @@ export async function reviewEdits(accessor: ServicesAccessor, editor: ICodeEdito
const chatEditingService = accessor.get(IChatEditingService);
const uri = editor.getModel().uri;
const chatModel = chatService.startSession(ChatAgentLocation.Editor, token);
const chatModel = chatService.startSession(ChatAgentLocation.Editor, token, false);
const editSession = await chatEditingService.createEditingSession(chatModel);