Try cleaning up api around acquiring/loading/creating sessions

We have a number of methods that have fairly similar names (get, load, acquire, start). This change tries to align these names a bit more so it's easier to understand which one to use
This commit is contained in:
Matt Bierner
2026-02-20 13:07:09 -08:00
parent bf4419c4c3
commit cfd0d61d66
23 changed files with 125 additions and 112 deletions

View File

@@ -687,7 +687,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);
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
const chatModel = chatModelRef.object as ChatModel;
chatModel.startEditingSession(true);
@@ -739,7 +739,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);
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
const chatModel = chatModelRef.object as ChatModel;
chatModel.startEditingSession(true);