feat(tui, coding-agent): add pasteToEditor to ExtensionUIContext#1351
Merged
badlogic merged 1 commit intobadlogic:mainfrom Feb 7, 2026
Merged
feat(tui, coding-agent): add pasteToEditor to ExtensionUIContext#1351badlogic merged 1 commit intobadlogic:mainfrom
badlogic merged 1 commit intobadlogic:mainfrom
Conversation
Add pasteToEditor(text) method that pastes text into the editor via bracketed paste sequences, triggering paste handling (including collapse for large content). Unlike setEditorText which directly replaces content, pasteToEditor routes through handleInput on the active editor component. - Add pasteToEditor to ExtensionUIContext interface - Add handleInput to EditorComponent interface (was missing, all concrete implementations already had it) - Implement in interactive mode via bracketed paste sequence - Add fallback in RPC mode (delegates to setEditorText) - Document in extensions.md
Contributor
Author
|
Debating with the clanker here if the escaping sequence for the paste should actually be encapsulated in a method |
Owner
|
Fine as is for now, cheers! |
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.
I think this looks fine and simple enough. I did have to add
handleInputto theEditorComponentinterface, but as far I could tell, all concrete implementations should have it anyways, e.g. the custom editor examples likemodalandrainbowinherit fromCustomEditorand they implement it.Tested by making my fzf extension use it and got the bracketed paste text for larger text.
Clanker summary
Add pasteToEditor(text) method that pastes text into the editor via bracketed paste sequences, triggering paste handling (including collapse for large content). Unlike setEditorText which directly replaces content, pasteToEditor routes through handleInput on the active editor component.