fix(cli): Ctrl+V now pastes text from clipboard#9045
Open
idreesmuhammadqazi-create wants to merge 2 commits intoKilo-Org:mainfrom
Open
Conversation
Ctrl+V was only pasting images, now works for text too
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.4-2026-03-05 · 218,359 tokens |
Contributor
Author
|
@marius-kilocode can you review this? |
alex-alecu
reviewed
Apr 22, 2026
| @@ -951,7 +942,22 @@ export function Prompt(props: PromptProps) { | |||
| }) | |||
| return | |||
| } | |||
| // If no image, let the default paste behavior continue | |||
| // If text in clipboard, paste it | |||
Contributor
There was a problem hiding this comment.
This entire block should be wrapped in // kilocode_change - check root Agents.md for instructions.
Contributor
|
@idreesmuhammadqazi-create please attach an example of this fix working in a terminal without bracketed paste. Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Ctrl+V paste functionality in the Kilo CLI TUI. Previously, Ctrl+V only pasted images from the clipboard. Text paste relied on terminal bracketed paste mode, which doesn't work in all terminal configurations. This fix adds explicit text clipboard handling when Ctrl+V is pressed.
Problem
When users pressed Ctrl+V in the Kilo CLI prompt:
The issue occurred because the
input_pastekeybind handler only checked for images and did nothing for text content.Solution
Extended the
input_pastehandler inpackages/opencode/src/cli/cmd/tui/component/prompt/index.tsxto:Clipboard.read()Modified Files
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx(lines 930-959)Testing
Tested with the following scenarios:
Type of Change
Notes
This is a minimal fix that follows existing patterns in the codebase. The paste summary feature was already implemented and is reused here for consistency.