mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
use a setting in core and set the location to notebook (#257548)
use a setting in core and set the location from the start
This commit is contained in:
@@ -1240,6 +1240,7 @@ export class InlineChatController2 implements IEditorContribution {
|
||||
@IChatAttachmentResolveService private readonly _chatAttachmentResolveService: IChatAttachmentResolveService,
|
||||
@IEditorService private readonly _editorService: IEditorService,
|
||||
@IInlineChatSessionService inlineChatService: IInlineChatSessionService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
) {
|
||||
|
||||
const ctxInlineChatVisible = CTX_INLINE_CHAT_VISIBLE.bindTo(contextKeyService);
|
||||
@@ -1270,6 +1271,18 @@ export class InlineChatController2 implements IEditorContribution {
|
||||
if (codeEditor === this._editor) {
|
||||
location.location = ChatAgentLocation.Notebook;
|
||||
notebookEditor = editor;
|
||||
// set location2 so that the notebook agent intent is used
|
||||
if (configurationService.getValue(InlineChatConfigKeys.notebookAgent)) {
|
||||
location.resolveData = () => {
|
||||
assertType(this._editor.hasModel());
|
||||
|
||||
return {
|
||||
type: ChatAgentLocation.Notebook,
|
||||
sessionInputUri: this._editor.getModel().uri,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user