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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user