Skip to content

JSON Viewer Updates#28

Merged
declan-scale merged 4 commits into
mainfrom
declan-scale/json-viewer-update
Oct 31, 2025
Merged

JSON Viewer Updates#28
declan-scale merged 4 commits into
mainfrom
declan-scale/json-viewer-update

Conversation

@declan-scale
Copy link
Copy Markdown
Collaborator

@declan-scale declan-scale commented Oct 31, 2025

Changes

  • Use our custom JSON viewer for all json formatting
    • user-input data
    • spans
    • tool calls and results
  • Add collapse all and expand all to the json viewer
  • Make urls links in json viewer
  • Make json viewer default open be a level rather than boolean
  • Show tool call as error with an icon
  • Removed ai-elements tool
Screen.Recording.2025-10-31.at.1.44.33.PM.mov
image

Copilot AI review requested due to automatic review settings October 31, 2025 17:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors JSON rendering to use a custom JsonViewer component consistently across the application, replacing the previous CodeBlock component for JSON display. It also removes the ai-elements/tool module, improves the JSON viewer with expand/collapse controls, URL linking, and adjustable depth levels, and enhances tool call display with error indication.

  • Consolidated JSON rendering to use JsonViewer component for all JSON content
  • Enhanced JsonViewer with expand/collapse all controls, URL linking, and configurable default open depth
  • Improved tool call UI with error state indicators

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
agentex-ui/components/ai-elements/tool.tsx Removed legacy tool component and its helper functions
agentex-ui/components/agentex/traces-sidebar.tsx Updated to use defaultOpenDepth parameter instead of defaultExpanded
agentex-ui/components/agentex/task-messages.tsx Updated imports and removed unnecessary comments
agentex-ui/components/agentex/task-message-tool-pair.tsx Refactored to use JsonViewer directly and added error state indication
agentex-ui/components/agentex/task-message-data-content.tsx Replaced CodeBlock with JsonViewer for data content rendering
agentex-ui/components/agentex/json-viewer.tsx Enhanced with expand/collapse controls, URL linking, and depth-based expansion

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agentex-ui/components/agentex/task-message-tool-pair.tsx Outdated
Comment thread agentex-ui/components/agentex/json-viewer.tsx Outdated
Comment thread agentex-ui/components/agentex/json-viewer.tsx
Copy link
Copy Markdown
Contributor

@MichaelSun48 MichaelSun48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@declan-scale declan-scale merged commit 10c94a0 into main Oct 31, 2025
3 checks passed
@declan-scale declan-scale deleted the declan-scale/json-viewer-update branch October 31, 2025 19:02
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.

3 participants