From 72a0a335ed8feb5199cd7dde4b2373a81e06e960 Mon Sep 17 00:00:00 2001 From: Zhiming Ma Date: Thu, 23 Jan 2025 10:19:37 +0800 Subject: [PATCH] fix(vscode): do not set default context to null when active editor is output panel. --- clients/vscode/src/chat/webview.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clients/vscode/src/chat/webview.ts b/clients/vscode/src/chat/webview.ts index b5e58f0ff28c..46f6ef5569fd 100644 --- a/clients/vscode/src/chat/webview.ts +++ b/clients/vscode/src/chat/webview.ts @@ -739,6 +739,11 @@ export class ChatWebview { } private async notifyActiveEditorSelectionChange(editor: TextEditor | undefined) { + if (editor && editor.document.uri.scheme === "output") { + // do not update when the active editor is an output channel + return; + } + if (!editor || !isValidForSyncActiveEditorSelection(editor)) { await this.client?.updateActiveSelection(null); return;