Chat tools UI#1301
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe PR introduces a tool-specific UI component system for the chat interface with specialized renderers for various tool types, refactors tool call rendering to use a dispatch-based architecture, groups consecutive exploring tool-calls, and integrates a text-segment enrichment pipeline into stream processing. Changes
Sequence Diagram(s)sequenceDiagram
participant ChatUI as Chat Interface
participant GroupLogic as Group/Render Logic
participant ToolRegistry as Tool Registry
participant SpecializedBlock as Specialized Block
participant ToolComponent as Tool Component
ChatUI->>GroupLogic: Process message parts
GroupLogic->>GroupLogic: Identify consecutive exploring tools
alt 3+ exploring tools in sequence
GroupLogic->>ToolRegistry: getToolMeta for each
GroupLogic->>GroupLogic: Build ExploringGroup items
GroupLogic->>ToolComponent: Render ExploringGroup
else Single/scattered tools
GroupLogic->>ToolCallBlock: Render individual tool
ToolCallBlock->>ToolRegistry: getToolMeta & getToolStatus
ToolCallBlock->>SpecializedBlock: Dispatch based on tool name
SpecializedBlock->>ToolComponent: Render BashTool/FileDiffTool/etc
ToolComponent->>ToolComponent: Format output, handle state
ToolComponent-->>ChatUI: Rendered tool UI
end
sequenceDiagram
participant StreamProc as Stream Processor
participant Enricher as TextSegmentEnricher
participant Materialize as Materialize
StreamProc->>StreamProc: Convert message to chunks
StreamProc->>Enricher: Create enrichChunk instance
loop For each streamed chunk
StreamProc->>Enricher: Pass chunk through enrichChunk
Enricher->>Enricher: Accumulate text for segment
Enricher->>Enricher: Inject content field if missing
Enricher->>Enricher: Reset on tool call
Enricher-->>StreamProc: Return enriched chunk
StreamProc->>Materialize: Process enriched chunk
Materialize->>Materialize: Apply enrichment if needed
Materialize-->>StreamProc: Processed result
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Preview Deployment🔗 Preview Links
Preview updates automatically with new commits |
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
UI/UX Improvements
Chores