Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/remove-clipboard-reading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Remove clipboard reading from chat autocomplete
19 changes: 0 additions & 19 deletions src/services/ghost/chat-autocomplete/ChatTextAreaAutocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string | null> {
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),
Expand Down