Johannes Rieken
2025-11-05 11:23:34 +01:00
committed by GitHub
parent da14a6ea3a
commit ec7952e66e
2 changed files with 11 additions and 13 deletions

View File

@@ -1465,11 +1465,6 @@ export class InlineChatController2 implements IEditorContribution {
this._store.dispose();
}
toggleWidgetUntilNextRequest() {
const value = this._showWidgetOverrideObs.get();
this._showWidgetOverrideObs.set(!value, undefined);
}
getWidgetPosition(): Position | undefined {
return this._zone.rawValue?.position;
}
@@ -1485,11 +1480,18 @@ export class InlineChatController2 implements IEditorContribution {
async run(arg?: InlineChatRunOptions): Promise<boolean> {
assertType(this._editor.hasModel());
this.markActiveController();
const uri = this._editor.getModel().uri;
const session = this._inlineChatSessions.getSession2(uri)
?? await this._inlineChatSessions.createSession2(this._editor, uri, CancellationToken.None);
const existingSession = this._inlineChatSessions.getSession2(uri);
if (existingSession) {
await existingSession.editingSession.accept();
existingSession.dispose();
}
this.markActiveController();
const session = await this._inlineChatSessions.createSession2(this._editor, uri, CancellationToken.None);
// ADD diagnostics
const entries: IChatRequestVariableEntry[] = [];