Skip to content

fix(web): format tool-call JSON previews as code - #5

Merged
asfires merged 1 commit into
mainfrom
t3code/format-tool-call-json-as-code
Aug 10, 2026
Merged

asfires merged 1 commit into
mainfrom
t3code/format-tool-call-json-as-code

Conversation

@asfires

@asfires asfires commented Aug 10, 2026

Copy link
Copy Markdown
Owner

What Changed

Format JSON tool-call previews with monospace styling while preserving any leading tool label. Truncated JSON payloads are detected by shape and rendered without affecting ordinary text previews. Added focused tests for labeled, truncated, bare, and non-JSON previews.

Why

Tool-call JSON was difficult to scan in the timeline because it used regular text styling. Rendering payloads as code improves readability while supporting provider summaries that may be truncated before they form valid JSON.

UI Changes

The web timeline now displays tool-call JSON payloads in a monospace font. No screenshots included.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

- Split labeled JSON payloads from tool-call summaries
- Render JSON previews with monospace styling while preserving plain text
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Aug 10, 2026
@asfires
asfires merged commit 05f955d into main Aug 10, 2026
6 of 10 checks passed
@asfires
asfires deleted the t3code/format-tool-call-json-as-code branch August 10, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant