inline chat for notebook cell uses the Notebook chat location (#213385)

* inline chat for notebook cell uses the `Notebook` chat location

* fix tests
This commit is contained in:
Johannes Rieken
2024-05-24 14:10:49 +02:00
committed by GitHub
parent e67cdb56b1
commit a5e41db5c7
5 changed files with 92 additions and 64 deletions

View File

@@ -21,7 +21,7 @@ import { isEqual } from 'vs/base/common/resources';
import { StableEditorBottomScrollState } from 'vs/editor/browser/stableEditorScroll';
import { ScrollType } from 'vs/editor/common/editorCommon';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ChatAgentLocation } from 'vs/workbench/contrib/chat/common/chatAgents';
export class InlineChatZoneWidget extends ZoneWidget {
@@ -32,6 +32,7 @@ export class InlineChatZoneWidget extends ZoneWidget {
private _indentationWidth: number | undefined;
constructor(
location: ChatAgentLocation,
editor: ICodeEditor,
@IInstantiationService private readonly _instaService: IInstantiationService,
@IContextKeyService contextKeyService: IContextKeyService,
@@ -45,7 +46,7 @@ export class InlineChatZoneWidget extends ZoneWidget {
this._ctxCursorPosition.reset();
}));
this.widget = this._instaService.createInstance(EditorBasedInlineChatWidget, this.editor, {
this.widget = this._instaService.createInstance(EditorBasedInlineChatWidget, location, this.editor, {
telemetrySource: 'interactiveEditorWidget-toolbar',
inputMenuId: MenuId.ChatExecute,
widgetMenuId: MENU_INLINE_CHAT_WIDGET,