mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 06:04:40 +00:00
feat(tui, coding-agent): add pasteToEditor to ExtensionUIContext (#1351)
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
This commit is contained in:
parent
828c40cf68
commit
6a3d6fe944
6 changed files with 16 additions and 0 deletions
|
|
@ -1556,6 +1556,9 @@ ctx.ui.setTitle("pi - my-project");
|
|||
ctx.ui.setEditorText("Prefill text");
|
||||
const current = ctx.ui.getEditorText();
|
||||
|
||||
// Paste into editor (triggers paste handling, including collapse for large content)
|
||||
ctx.ui.pasteToEditor("pasted content");
|
||||
|
||||
// Tool output expansion
|
||||
const wasExpanded = ctx.ui.getToolsExpanded();
|
||||
ctx.ui.setToolsExpanded(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue