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