Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

fix(coding-agent): remove spacing artifacts for suppressed custom tool renders#1719

Merged
badlogic merged 2 commits intobadlogic:mainfrom
alasano:fix/coding-agent-tool-render-empty-spacing
Mar 2, 2026
Merged

fix(coding-agent): remove spacing artifacts for suppressed custom tool renders#1719
badlogic merged 2 commits intobadlogic:mainfrom
alasano:fix/coding-agent-tool-render-empty-spacing

Conversation

@alasano
Copy link
Contributor

@alasano alasano commented Mar 2, 2026

Summary

This PR fixes interactive transcript spacing when custom tool renderers intentionally suppress per-call output.

Use case: extensions that group contiguous tool calls into a single UI block (for example grouped file reads) should be able to hide individual tool entries without leaving empty rows or extra spacing.

Related to #1715 (approval issue, now closed).

Changes

  • Allow custom tool renderers to explicitly render nothing:
    • renderCall?: (...) => Component | undefined
    • renderResult?: (...) => Component | undefined
  • Remove the injected blank spacer before streaming tool blocks in interactive mode.
  • Update ToolExecutionComponent so suppressed custom tool output can render as true zero-height (no leftover transcript footprint).
  • Update HTML custom tool renderer handling to safely fall back when custom renderers return undefined.
  • Add tests for:
    • suppressed custom renderer output (renders nothing)
    • built-in tool rendering remains visible
    • custom renderer output remains visible when a component is returned

Scope

This is an intentionally minimal, non-breaking fix for extension-driven grouped tool UIs.
A fuller transcript-level grouping/coalescing API can be done separately.

Validation

  • npm run check
  • ./test.sh

@badlogic badlogic merged commit 7b7b967 into badlogic:main Mar 2, 2026
1 check passed
@badlogic
Copy link
Owner

badlogic commented Mar 2, 2026

Cheers!

@alasano
Copy link
Contributor Author

alasano commented Mar 4, 2026

Cheers!

@badlogic my pleasure! thanks for merging this :)

here's what it enabled me to do as an extension now FYI

image

prior to this fix it was appending 5 empty new lines below the component (one per file read) which made the UI much worse.

@alasano alasano deleted the fix/coding-agent-tool-render-empty-spacing branch March 4, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants