Some chat service cleanup (#280105)

* Clean up unused cancel token

* Simplify shouldBeInHistory

* Use real DisposableResourceMap
This commit is contained in:
Rob Lourens
2025-11-29 18:58:18 -08:00
committed by GitHub
parent ceeabb7a13
commit 8ccd1dae54
15 changed files with 45 additions and 97 deletions

View File

@@ -1662,7 +1662,7 @@ export async function reviewEdits(accessor: ServicesAccessor, editor: ICodeEdito
const chatService = accessor.get(IChatService);
const uri = editor.getModel().uri;
const chatModelRef = chatService.startSession(ChatAgentLocation.EditorInline, token);
const chatModelRef = chatService.startSession(ChatAgentLocation.EditorInline);
const chatModel = chatModelRef.object as ChatModel;
chatModel.startEditingSession(true);
@@ -1714,7 +1714,7 @@ export async function reviewNotebookEdits(accessor: ServicesAccessor, uri: URI,
const chatService = accessor.get(IChatService);
const notebookService = accessor.get(INotebookService);
const isNotebook = notebookService.hasSupportedNotebooks(uri);
const chatModelRef = chatService.startSession(ChatAgentLocation.EditorInline, token);
const chatModelRef = chatService.startSession(ChatAgentLocation.EditorInline);
const chatModel = chatModelRef.object as ChatModel;
chatModel.startEditingSession(true);