Bug Description
The BorderColor and Background fields in ToolRenderConfig are documented and accepted by the API, but they are never actually applied during tool rendering.
Code Flow Analysis
- Extension API (
internal/extensions/api.go:1657-1665): Fields exist with full documentation
- Conversion (
cmd/root.go:488-495): Fields ARE correctly copied from ToolRenderConfig to ui.ToolRendererData
- UI Struct (
internal/ui/model.go:133-139): Fields are defined on ToolRendererData
- Rendering (
internal/ui/messages.go:304-385): Fields are completely ignored - only DisplayName, RenderHeader, RenderBody, and BodyMarkdown are used
Expected Behavior
When a tool renderer specifies BorderColor: #89b4fa or Background: #1e1e2e, the tool result block should render with those colors.
Actual Behavior
The fields are silently ignored. The tool renders with default styling regardless of what values are set.
Example Extension Code
Proposed Fix
The RenderToolMessage function in internal/ui/messages.go needs to:
- Check for
extRd.BorderColor and extRd.Background
- Apply them using the existing
WithBorderColor and WithBackground option functions in block_renderer.go
This may require extending UIMessage to carry styling metadata, or applying the styling during the render phase.
Related Code
internal/ui/block_renderer.go:55-121 - Option functions for border/background
internal/ui/messages.go:304-385 - RenderToolMessage (needs fix)
examples/extensions/tool-renderer-demo.go - Example that tries to use these fields
Bug Description
The
BorderColorandBackgroundfields inToolRenderConfigare documented and accepted by the API, but they are never actually applied during tool rendering.Code Flow Analysis
internal/extensions/api.go:1657-1665): Fields exist with full documentationcmd/root.go:488-495): Fields ARE correctly copied fromToolRenderConfigtoui.ToolRendererDatainternal/ui/model.go:133-139): Fields are defined onToolRendererDatainternal/ui/messages.go:304-385): Fields are completely ignored - onlyDisplayName,RenderHeader,RenderBody, andBodyMarkdownare usedExpected Behavior
When a tool renderer specifies
BorderColor: #89b4faorBackground: #1e1e2e, the tool result block should render with those colors.Actual Behavior
The fields are silently ignored. The tool renders with default styling regardless of what values are set.
Example Extension Code
Proposed Fix
The
RenderToolMessagefunction ininternal/ui/messages.goneeds to:extRd.BorderColorandextRd.BackgroundWithBorderColorandWithBackgroundoption functions inblock_renderer.goThis may require extending
UIMessageto carry styling metadata, or applying the styling during the render phase.Related Code
internal/ui/block_renderer.go:55-121- Option functions for border/backgroundinternal/ui/messages.go:304-385- RenderToolMessage (needs fix)examples/extensions/tool-renderer-demo.go- Example that tries to use these fields