release stashed session on blur (#227071)
* only show secondary toolbar on hover or when container contains focus fixes https://github.com/microsoft/vscode/issues/226997 * release stashed session on blur fixes https://github.com/microsoft/vscode-copilot/issues/7802pull/199021/merge
parent
c2bd93fd92
commit
4443613b98
|
@ -263,7 +263,7 @@ export class StashedSession {
|
|||
// keep session for a little bit, only release when user continues to work (type, move cursor, etc.)
|
||||
this._session = session;
|
||||
this._ctxHasStashedSession.set(true);
|
||||
this._listener = Event.once(Event.any(editor.onDidChangeCursorSelection, editor.onDidChangeModelContent, editor.onDidChangeModel))(() => {
|
||||
this._listener = Event.once(Event.any(editor.onDidChangeCursorSelection, editor.onDidChangeModelContent, editor.onDidChangeModel, editor.onDidBlurEditorWidget))(() => {
|
||||
this._session = undefined;
|
||||
this._sessionService.releaseSession(session);
|
||||
this._ctxHasStashedSession.reset();
|
||||
|
|
|
@ -96,9 +96,9 @@ export class InlineChatWidget {
|
|||
h('div.accessibleViewer@accessibleViewer'),
|
||||
h('div.status@status', [
|
||||
h('div.label.info.hidden@infoLabel'),
|
||||
h('div.actions.button-style.hidden@toolbar1'),
|
||||
h('div.actions.hidden@toolbar1'),
|
||||
h('div.label.status.hidden@statusLabel'),
|
||||
h('div.actions.button-style.hidden@toolbar2'),
|
||||
h('div.actions.secondary.hidden@toolbar2'),
|
||||
]),
|
||||
]
|
||||
);
|
||||
|
|
|
@ -171,6 +171,16 @@
|
|||
gap: 4px;
|
||||
}
|
||||
|
||||
.monaco-workbench .inline-chat .status .actions.secondary {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.monaco-workbench .inline-chat .status:hover .actions.secondary,
|
||||
.monaco-workbench .inline-chat:focus .status .actions.secondary,
|
||||
.monaco-workbench .inline-chat .status:focus-within .actions.secondary {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.monaco-workbench .inline-chat-diff-overlay {
|
||||
|
||||
.monaco-button {
|
||||
|
|
Loading…
Reference in New Issue