From d4cc35ddb86ef9d0165e4d61323fa9a0920f2ba7 Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Thu, 15 Jan 2026 18:08:03 +0100 Subject: [PATCH] Remove clipboard reading from chat autocomplete --- .changeset/remove-clipboard-reading.md | 5 +++++ .../ChatTextAreaAutocomplete.ts | 19 ------------------- 2 files changed, 5 insertions(+), 19 deletions(-) create mode 100644 .changeset/remove-clipboard-reading.md diff --git a/.changeset/remove-clipboard-reading.md b/.changeset/remove-clipboard-reading.md new file mode 100644 index 00000000000..f180eb44157 --- /dev/null +++ b/.changeset/remove-clipboard-reading.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Remove clipboard reading from chat autocomplete diff --git a/src/services/ghost/chat-autocomplete/ChatTextAreaAutocomplete.ts b/src/services/ghost/chat-autocomplete/ChatTextAreaAutocomplete.ts index 4e961d959b8..a81c6d17951 100644 --- a/src/services/ghost/chat-autocomplete/ChatTextAreaAutocomplete.ts +++ b/src/services/ghost/chat-autocomplete/ChatTextAreaAutocomplete.ts @@ -153,31 +153,12 @@ TASK: Complete the user's message naturally. } } - const clipboardContent = await this.getClipboardContext() - if (clipboardContent) { - contextParts.push("\n// Clipboard content:") - contextParts.push(clipboardContent) - } - contextParts.push("\n// User's message:") contextParts.push(userText) return contextParts.join("\n") } - private async getClipboardContext(): Promise { - try { - const text = await vscode.env.clipboard.readText() - // Only include if it's reasonable size and looks like code - if (text && text.length > 5 && text.length < 500) { - return text - } - } catch { - // Silently ignore clipboard errors - } - return null - } - public cleanSuggestion(suggestion: string, userText: string): string { let cleaned = postprocessGhostSuggestion({ suggestion: removePrefixOverlap(suggestion, userText),