mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user