Skip to content

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Sep 20, 2025

Summary

Removed the complex and bloated Tool Generic Renderer system and replaced it with a clean, terminal-style renderer using CodeEditor. This addresses the issue where the fallback renderer was visually unappealing and contained excessive code.

Before

image

After

image

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

@netlify
Copy link

netlify bot commented Sep 20, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit 2066089
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68d3ed66b57a7600084f69f1
😎 Deploy Preview https://deploy-preview-1594--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Sep 20, 2025

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit 2066089
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/68d3ed66d1efeb00071fa7ef
😎 Deploy Preview https://deploy-preview-1594--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ulivz ulivz changed the title feat(tarko-agent-ui): remove tool generic renderer and replace with terminal-style CodeEditor feat(tarko-agent-ui): replaced generic tool renderer with terminal-style renderer Sep 20, 2025
@ulivz ulivz force-pushed the feat/remove-tool-generic-renderer branch 4 times, most recently from 660d8f8 to 511bfef Compare September 24, 2025 12:39
…erminal-style CodeEditor

- Remove entire generic renderer directory and complex components
- Replace GenericResultRenderer with simple TerminalRenderer using CodeEditor
- Move still-used components (MessageContent, ToggleSwitch) to shared directory
- Update all import statements to use new shared components
- Simplify fallback rendering to clean terminal-like display
…and JSON highlighting

- Replace CodeEditor with TerminalOutput component for consistent styling
- Add syntax highlighting for tool commands and arguments
- Improve dark mode visibility with proper terminal colors
- Add JSON highlighting for structured data display
- Align styling with CommandResultRenderer for consistency
…nd single block layout

- Merge arguments and output into single terminal block
- Remove redundant Tool Arguments/Tool Output labels
- Add proper JSON syntax highlighting with color coding
- Ensure JSON formatting with stringify null 2
- Maintain consistent terminal styling with CommandResultRenderer
…minal renderer

- Replace custom JSON highlighting with existing CodeEditor component
- Remove redundant JsonHighlight component and use project's standard solution
- Maintain terminal styling while leveraging highlight.js for proper JSON syntax highlighting
- Hide CodeEditor header and status bar to preserve terminal appearance
- Ensure transparent background integration with terminal theme
- Add JSON parsing and re-formatting for string outputs
- Apply JSON.stringify(data, null, 2) to both arguments and output
- Maintain proper indentation for better readability
- Handle both object and string-based JSON data consistently
…ghting

- Remove conditional JSON detection to ensure all tool outputs use CodeEditor
- Guarantee proper JSON formatting and syntax highlighting for all content
- Maintain consistent terminal appearance across all tool renderers
- Fix issue where some valid JSON content wasn't being highlighted
…JSON detection

- Remove isValidJson function and conditional logic completely
- Always use CodeEditor with JSON highlighting for consistent formatting
- Eliminate TerminalOutput fallback path for cleaner codebase
- Reduce complexity while ensuring all tool outputs get proper formatting
- Parse and reformat JSON strings found in item.text fields
- Apply JSON.stringify(data, null, 2) to ensure proper indentation
- Handle both JSON and non-JSON text content gracefully
- Fix issue where JSON output was displayed as single line
…eEditor sections

- Split combined output into separate Arguments and Output sections
- Add section headers with clear visual separation
- Set appropriate height limits: 200px for arguments, flexible for output
- Improve readability by clearly distinguishing input vs output data
- Remove debugger statement and unused combinedOutput logic
…Editor containers

- Remove 'Arguments:' and 'Output:' header labels for cleaner appearance
- Add p-3 padding to CodeEditor containers for better spacing
- Simplify layout by removing border separators between sections
- Maintain clear visual separation through natural content flow
- Created standalone CodeHighlight component for syntax highlighting
- Updated TerminalRenderer to use CodeHighlight instead of full CodeEditor
- Resolves styling issues when using CodeEditor in terminal context
- Removed redundant nested div wrapper
- Merged layout styles to outer div for cleaner structure
@ulivz ulivz force-pushed the feat/remove-tool-generic-renderer branch from 511bfef to f3daf7e Compare September 24, 2025 13:07
@ulivz ulivz merged commit 6367f5a into main Sep 24, 2025
10 checks passed
@ulivz ulivz deleted the feat/remove-tool-generic-renderer branch September 24, 2025 13:33
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