From ebe3b67239de222d1c8b728f94a35ea3ba4a35c3 Mon Sep 17 00:00:00 2001 From: aliang Date: Thu, 2 Jan 2025 16:41:35 +0800 Subject: [PATCH] Update clients/vscode/src/chat/webview.ts Co-authored-by: Zhiming Ma --- clients/vscode/src/chat/webview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/vscode/src/chat/webview.ts b/clients/vscode/src/chat/webview.ts index 278c852f901b..e15c917bf9cc 100644 --- a/clients/vscode/src/chat/webview.ts +++ b/clients/vscode/src/chat/webview.ts @@ -451,7 +451,7 @@ export class ChatWebview { getActiveEditorSelection: async (): Promise => { const editor = window.activeTextEditor; - if (!editor) { + if (!editor || !isValidForSyncActiveEditorSelection(editor)) { return null; }