docs(coding-agent): document tool expansion UI methods

This commit is contained in:
Mario Zechner 2026-02-03 01:15:45 +01:00
parent 6909f61884
commit 90b18218bd
3 changed files with 11 additions and 1 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased]
### Added
- Added ExtensionUIContext getToolsExpanded and setToolsExpanded for controlling tool output expansion ([#1199](https://github.com/badlogic/pi-mono/pull/1199) by [@academo](https://github.com/academo))
### Fixed
- Fixed Kitty key release events leaking to parent shell over slow SSH connections by draining stdin for up to 1s on exit ([#1204](https://github.com/badlogic/pi-mono/issues/1204))

View file

@ -1526,6 +1526,11 @@ ctx.ui.setTitle("pi - my-project");
ctx.ui.setEditorText("Prefill text");
const current = ctx.ui.getEditorText();
// Tool output expansion
const wasExpanded = ctx.ui.getToolsExpanded();
ctx.ui.setToolsExpanded(true);
ctx.ui.setToolsExpanded(wasExpanded);
// Custom editor (vim mode, emacs mode, etc.)
ctx.ui.setEditorComponent((tui, theme, keybindings) => new VimEditor(tui, theme, keybindings));
ctx.ui.setEditorComponent(undefined); // Restore default editor

View file

@ -916,8 +916,9 @@ If a dialog method includes a `timeout` field, the agent-side will auto-resolve
Some `ExtensionUIContext` methods are not supported in RPC mode because they require direct TUI access:
- `custom()` returns `undefined`
- `setWorkingMessage()`, `setFooter()`, `setHeader()`, `setEditorComponent()` are no-ops
- `setWorkingMessage()`, `setFooter()`, `setHeader()`, `setEditorComponent()`, `setToolsExpanded()` are no-ops
- `getEditorText()` returns `""`
- `getToolsExpanded()` returns `false`
### Extension UI Requests (stdout)