From b41db22d7632ff310c4bc9a771a43b73802216b7 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Sat, 28 Feb 2026 12:34:58 +0100 Subject: [PATCH 1/3] sessions - show command in toast and show it more often (#298409) * sessions - show command in toast and show it more often * Update src/vs/workbench/contrib/chat/browser/chatWindowNotifier.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../browser/configuration.contribution.ts | 2 + .../chat/browser/chatWindowNotifier.ts | 38 ++++++++++++++++--- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts b/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts index dc83de217d11d..50b8be0e52141 100644 --- a/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts +++ b/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { isMacintosh } from '../../../../base/common/platform.js'; import { Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js'; import { Registry } from '../../../../platform/registry/common/platform.js'; @@ -11,6 +12,7 @@ Registry.as(Extensions.Configuration).registerDefaultCon 'chat.agent.maxRequests': 1000, 'chat.customizationsMenu.userStoragePath': '~/.copilot', 'chat.viewSessions.enabled': false, + 'chat.notifyWindowOnConfirmation': isMacintosh ? 'always' : 'windowNotFocused', // macOS can confirm from the toast so we show it always 'chat.implicitContext.suggestedContext': false, 'breadcrumbs.enabled': false, diff --git a/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.ts b/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.ts index abece4b0a87a0..d9fe036dac880 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.ts @@ -17,9 +17,11 @@ import { IWorkbenchContribution } from '../../../common/contributions.js'; import { IHostService } from '../../../services/host/browser/host.js'; import { IChatModel, IChatRequestNeedsInputInfo } from '../common/model/chatModel.js'; import { IChatService } from '../common/chatService/chatService.js'; +import { migrateLegacyTerminalToolSpecificData } from '../common/chat.js'; import { ChatConfiguration, ChatNotificationMode } from '../common/constants.js'; import { IChatWidgetService } from './chat.js'; import { AcceptToolConfirmationActionId, IToolConfirmationActionContext } from './actions/chatToolActions.js'; +import { isMacintosh } from '../../../../base/common/platform.js'; /** * Observes all live chat models and triggers OS notifications when any model @@ -107,15 +109,10 @@ export class ChatWindowNotifier extends Disposable implements IWorkbenchContribu const actionLabel = isQuestionCarousel ? localize('openChatAction', "Open Chat") : localize('allowAction', "Allow"); - const body = info.detail - ? this._sanitizeOSToastText(info.detail) - : isQuestionCarousel - ? localize('questionCarouselDetail', "Questions need your input.") - : localize('notificationDetail', "Approval needed to continue."); const result = await this._hostService.showToast({ title: this._sanitizeOSToastText(notificationTitle), - body, + body: this._getNotificationBody(sessionResource, info, isQuestionCarousel), actions: [actionLabel], }, cts.token); @@ -134,6 +131,35 @@ export class ChatWindowNotifier extends Disposable implements IWorkbenchContribu } } + private _getNotificationBody(sessionResource: URI, info: IChatRequestNeedsInputInfo, isQuestionCarousel: boolean): string { + const terminalCommand = this._getPendingTerminalCommand(sessionResource); + if (isQuestionCarousel) { + return localize('questionCarouselDetail', "Questions need your input."); + } + if (isMacintosh && terminalCommand) { + return this._sanitizeOSToastText(terminalCommand); // prefer full command on macOS where you can approve from the toast + } + if (info.detail) { + return this._sanitizeOSToastText(info.detail); + } + return localize('notificationDetail', "Approval needed to continue."); + } + + private _getPendingTerminalCommand(sessionResource: URI): string | undefined { + const model = this._chatService.getSession(sessionResource); + const lastResponse = model?.lastRequest?.response; + if (!lastResponse?.response?.value) { + return undefined; + } + for (const part of lastResponse.response.value) { + if (part.kind === 'toolInvocation' && part.toolSpecificData?.kind === 'terminal') { + const terminalData = migrateLegacyTerminalToolSpecificData(part.toolSpecificData); + return terminalData.commandLine.forDisplay ?? terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original; + } + } + return undefined; + } + private _isQuestionCarouselPending(sessionResource: URI): boolean { const model = this._chatService.getSession(sessionResource); const lastResponse = model?.lastRequest?.response; From cefe82ccc60bb4c79775c79d87fb1539454a00ed Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Sat, 28 Feb 2026 12:35:13 +0100 Subject: [PATCH 2/3] sessions - tweaks to chat input to make it larger (#298416) * sessions - tweaks to chat input to make it larger * Update src/vs/sessions/browser/media/style.css Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/vs/sessions/browser/media/style.css | 3 ++- src/vs/workbench/contrib/chat/browser/chat.ts | 1 + src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts | 1 + .../contrib/chat/browser/widget/input/chatInputPart.ts | 5 ++++- .../chat/browser/widgetHosts/viewPane/chatViewPane.ts | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/sessions/browser/media/style.css b/src/vs/sessions/browser/media/style.css index 1ba1c29e04b1b..c79f7e8d21179 100644 --- a/src/vs/sessions/browser/media/style.css +++ b/src/vs/sessions/browser/media/style.css @@ -52,5 +52,6 @@ .agent-sessions-workbench .interactive-session .interactive-input-part { margin: 0 8px !important; display: inherit !important; - padding: 4px 0 8px 0px !important; + /* Align with changes view */ + padding: 4px 0 6px 0 !important; } diff --git a/src/vs/workbench/contrib/chat/browser/chat.ts b/src/vs/workbench/contrib/chat/browser/chat.ts index ed040379d2a54..7fa8e87b01e28 100644 --- a/src/vs/workbench/contrib/chat/browser/chat.ts +++ b/src/vs/workbench/contrib/chat/browser/chat.ts @@ -263,6 +263,7 @@ export interface IChatWidgetViewOptions { enableWorkingSet?: 'explicit' | 'implicit'; supportsChangingModes?: boolean; dndContainer?: HTMLElement; + inputEditorMinLines?: number; defaultMode?: IChatMode; /** * Optional delegate for the session target picker. diff --git a/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts index 20bc0e902eb2d..ca969bf7da018 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts @@ -1715,6 +1715,7 @@ export class ChatWidget extends Disposable implements IChatWidget { renderWorkingSet: this.viewOptions.enableWorkingSet === 'explicit', supportsChangingModes: this.viewOptions.supportsChangingModes, dndContainer: this.viewOptions.dndContainer, + inputEditorMinLines: this.viewOptions.inputEditorMinLines, widgetViewKindTag: this.getWidgetViewKindTag(), defaultMode: this.viewOptions.defaultMode, sessionTypePickerDelegate: this.viewOptions.sessionTypePickerDelegate, diff --git a/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts b/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts index 1502fd802342e..44ad592b87206 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts @@ -154,6 +154,7 @@ export interface IChatInputPartOptions { enableImplicitContext?: boolean; supportsChangingModes?: boolean; dndContainer?: HTMLElement; + inputEditorMinLines?: number; widgetViewKindTag: string; /** * Optional delegate for the session target picker. @@ -272,6 +273,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge private readonly _contextResourceLabels: ResourceLabels; private readonly inputEditorMaxHeight: number; + private readonly inputEditorMinHeight: number | undefined; private inputEditorHeight: number = 0; private container!: HTMLElement; @@ -560,6 +562,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge this.dnd = this._register(this.instantiationService.createInstance(ChatDragAndDrop, () => this._widget, this._attachmentModel, styles)); this.inputEditorMaxHeight = this.options.renderStyle === 'compact' ? INPUT_EDITOR_MAX_HEIGHT / 3 : INPUT_EDITOR_MAX_HEIGHT; + this.inputEditorMinHeight = this.options.inputEditorMinLines ? this.options.inputEditorMinLines * 20 + (this.options.renderStyle === 'compact' ? 4 : 16) : undefined; // lineHeight is 20, padding is top+bottom this.inputEditorHasText = ChatContextKeys.inputHasText.bindTo(contextKeyService); this.chatCursorAtTop = ChatContextKeys.inputCursorAtTop.bindTo(contextKeyService); @@ -3004,7 +3007,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge const initialEditorScrollWidth = this._inputEditor.getScrollWidth(); const newEditorWidth = width - data.inputPartHorizontalPadding - data.editorBorder - data.inputPartHorizontalPaddingInside - data.toolbarsWidth - data.sideToolbarWidth; - const inputEditorHeight = Math.min(this._inputEditor.getContentHeight(), this.inputEditorMaxHeight); + const inputEditorHeight = this.inputEditorMinHeight ? Math.max(this.inputEditorMinHeight, Math.min(this._inputEditor.getContentHeight(), this.inputEditorMaxHeight)) : Math.min(this._inputEditor.getContentHeight(), this.inputEditorMaxHeight); const newDimension = { width: newEditorWidth, height: inputEditorHeight }; if (!this.previousInputEditorDimension || (this.previousInputEditorDimension.width !== newDimension.width || this.previousInputEditorDimension.height !== newDimension.height)) { // This layout call has side-effects that are hard to understand. eg if we are calling this inside a onDidChangeContent handler, this can trigger the next onDidChangeContent handler diff --git a/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts b/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts index 096b218471899..4974f0b91ce33 100644 --- a/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts +++ b/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts @@ -539,6 +539,7 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate { : 'explicit', supportsChangingModes: true, dndContainer: parent, + inputEditorMinLines: this.workbenchEnvironmentService.isSessionsWindow ? 2 : undefined, }, { listForeground: SIDE_BAR_FOREGROUND, From 479f1b02bcb1f811e8958bac06a6e8a136fde53e Mon Sep 17 00:00:00 2001 From: Alexandru Dima Date: Sat, 28 Feb 2026 16:11:45 +0100 Subject: [PATCH 3/3] Update Kusto instructions (#298447) --- .github/instructions/kusto.instructions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/instructions/kusto.instructions.md b/.github/instructions/kusto.instructions.md index 2c77e92555d6c..ac247c5772415 100644 --- a/.github/instructions/kusto.instructions.md +++ b/.github/instructions/kusto.instructions.md @@ -6,7 +6,7 @@ description: Kusto exploration and telemetry analysis instructions When performing Kusto queries, telemetry analysis, or data exploration tasks for VS Code, consult the comprehensive Kusto instructions located at: -**[kusto-vscode-instructions.md](../../../vscode-internalbacklog/instructions/kusto/kusto-vscode-instructions.md)** +**[kusto-vscode-instructions.md](../../../vscode-tools/.github/skills/kusto-telemetry/kusto-vscode.instructions.md)** These instructions contain valuable information about: - Available Kusto clusters and databases for VS Code telemetry @@ -16,4 +16,4 @@ These instructions contain valuable information about: Reading these instructions before writing Kusto queries will help you write more accurate and efficient queries, avoid common pitfalls, and leverage existing knowledge about VS Code's telemetry infrastructure. -(Make sure to have the main branch of vscode-internalbacklog up to date in case there are problems). +(Make sure to have the main branch of vscode-tools up to date in case there are problems and the repository cloned from https://github.com/microsoft/vscode-tools).