make sure inline chat shows again after switching tabs (#275534)

* fix https://github.com/microsoft/vscode/issues/275250

* make sure inline chat shows again after switching tabs
This commit is contained in:
Johannes Rieken
2025-11-05 12:31:47 +01:00
committed by GitHub
parent ecc1670c33
commit b855dad790
2 changed files with 4 additions and 14 deletions

View File

@@ -1244,7 +1244,6 @@ export class InlineChatController2 implements IEditorContribution {
}
private readonly _store = new DisposableStore();
private readonly _showWidgetOverrideObs = observableValue(this, false);
private readonly _isActiveController = observableValue(this, false);
private readonly _zone: Lazy<InlineChatZoneWidget>;
@@ -1291,7 +1290,7 @@ export class InlineChatController2 implements IEditorContribution {
selection: this._editor.getSelection(),
document,
wholeRange,
close: () => this._showWidgetOverrideObs.set(false, undefined),
close: () => { /* TODO@jrieken */ },
delegateSessionResource: chatService.editingSessions.find(session =>
session.entries.get().some(e => e.hasModificationAt({
range: wholeRange,
@@ -1382,17 +1381,8 @@ export class InlineChatController2 implements IEditorContribution {
if (!session || !isActive || !model) {
visibleSessionObs.set(undefined, undefined);
return;
}
const { chatModel } = session;
const showShowUntil = this._showWidgetOverrideObs.read(r);
const hasNoRequests = chatModel.getRequests().length === 0;
if (showShowUntil || hasNoRequests) {
visibleSessionObs.set(session, undefined);
} else {
visibleSessionObs.set(undefined, undefined);
visibleSessionObs.set(session, undefined);
}
}));