Skip to content

feat(desktop): improve chat tool mapping and expandable tool rows#1820

Merged
Kitenite merged 3 commits into
superset-sh:mainfrom
Kitenite:kitenite/tools
Feb 26, 2026
Merged

feat(desktop): improve chat tool mapping and expandable tool rows#1820
Kitenite merged 3 commits into
superset-sh:mainfrom
Kitenite:kitenite/tools

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 26, 2026

Improve tool-name mapping, add dev raw-copy action, and align tool rows to expandable compact styling with better command output parsing.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added development-mode chat snapshot export functionality with one-click copying.
    • Introduced collapsible tool call UI for expanded view of tool details and results.
  • Improvements

    • Standardized tool display names for clarity and consistency.
    • Enhanced tool output handling with improved error messaging and result extraction.
    • Refined visual presentation of tool interactions and status indicators.
  • Style

    • Updated tool interface styling with improved spacing and visual hierarchy.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8bb84f and 7c6e826.

📒 Files selected for processing (10)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatMastraPane/ChatMastraInterface/ChatMastraInterface.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatMastraPane/ChatMastraInterface/components/ChatMastraMessageList/ChatMastraMessageList.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatMastraPane/ChatMastraInterface/types.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatMastraPane/ChatMastraPane.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GenericToolCall/GenericToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MessagePartsRenderer/MessagePartsRenderer.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/ReadOnlyToolCall/ReadOnlyToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/utils/tool-helpers.ts
  • packages/ui/src/components/ai-elements/bash-tool.tsx

📝 Walkthrough

Walkthrough

This pull request introduces a new chat state snapshot feature and comprehensively refactors tool call rendering components throughout the desktop app. The snapshot feature exposes live chat state via a callback, while the tool refactoring replaces Tool-based UI structures with new GenericToolCall and MastraToolCallBlock components, adds tool name normalization utilities, and updates styling in bash-tool UI elements.

Changes

Cohort / File(s) Summary
Chat State Snapshot Feature
apps/desktop/src/.../ChatMastraInterface/types.ts, apps/desktop/src/.../ChatMastraInterface/ChatMastraInterface.tsx, apps/desktop/src/.../ChatMastraPane.tsx
Added ChatMastraRawSnapshot type and onRawSnapshotChange callback to expose session state (sessionId, isRunning, currentMessage, messages, error) via useEffect. Implemented dev-only UI with copy-to-clipboard functionality for dumping raw chat snapshots in ChatMastraPane.
Tool Call Rendering Refactoring
apps/desktop/src/.../ChatMastraMessageList.tsx, apps/desktop/src/.../MastraToolCallBlock.tsx, apps/desktop/src/.../GenericToolCall.tsx, apps/desktop/src/.../ReadOnlyToolCall.tsx
Replaced Tool-based rendering with new MastraToolCallBlock and GenericToolCall components. Introduced helper functions (toToolPartFromCall, toToolPartFromResult) to construct ToolParts. GenericToolCall now uses collapsible UI with optional icon prop and dynamic status indicators (loader, error, success icons).
Tool Utilities and Message Rendering
apps/desktop/src/.../tool-helpers.ts, apps/desktop/src/.../MessagePartsRenderer.tsx
Added normalizeToolName utility with alias mapping for tool name standardization. Enhanced MessagePartsRenderer to use normalized names in grouping and subtitle extraction; expanded argument field coverage (file_path, directory_path, root, cwd, regex, etc.) for various workspace tools.
UI Styling Updates
packages/ui/src/components/ai-elements/bash-tool.tsx
Updated collapsible styling (rounded-md, adjusted hover background), consolidated status rendering (single compact area with Loader/XIcon/CheckIcon), and added margin adjustments to content wrapper.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~23 minutes

Possibly related PRs

  • Chat tools UI #1301 — Both PRs refactor tool UI components (BashTool, ToolCall/ToolCallBlock) and add shared tool normalization utilities at the code level.
  • Chat UI rehaul + animation #1693 — Both PRs modify the same chat tool UI components (bash-tool.tsx, MessagePartsRenderer, tool-call UI) with overlapping collapsible and shimmer refactors.

Poem

🐰 The snapshot hops along its merry way,
While tools now wear collapsible displays,
A wrenchy icon grins at every call,
With normalized names and statuses for all,
The chat doth evolve in its UI ballet! 🎭✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kitenite Kitenite merged commit bd1f0d7 into superset-sh:main Feb 26, 2026
4 of 7 checks passed
@Kitenite Kitenite deleted the kitenite/tools branch February 26, 2026 00:44
@coderabbitai coderabbitai Bot mentioned this pull request Apr 14, 2026
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.

1 participant