docs(coding-agent): document tool expansion UI methods
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user