mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 12:03:49 +00:00
feat(coding-agent): use built-in renderers for tool overrides without custom renderers
When overriding a built-in tool (read, bash, edit, write, grep, find, ls) without providing renderCall/renderResult, the built-in renderer is now used automatically. This allows wrapping built-in tools for logging or access control without reimplementing the UI (syntax highlighting, diffs, etc.).
This commit is contained in:
parent
66cbcee347
commit
bbf0d92e8c
2 changed files with 30 additions and 12 deletions
|
|
@ -959,6 +959,8 @@ pi --no-tools -e ./my-extension.ts
|
|||
|
||||
See [examples/extensions/tool-override.ts](../examples/extensions/tool-override.ts) for a complete example that overrides `read` with logging and access control.
|
||||
|
||||
**Rendering:** If your override doesn't provide custom `renderCall`/`renderResult` functions, the built-in renderer is used automatically (syntax highlighting, diffs, etc.). This lets you wrap built-in tools for logging or access control without reimplementing the UI.
|
||||
|
||||
**Your implementation must match the exact result shape**, including the `details` type. The UI and session logic depend on these shapes for rendering and state tracking.
|
||||
|
||||
Built-in tool implementations:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue