Skip to content

Conversation

@spencrmartin
Copy link
Collaborator

  • Add tool call chaining logic to group consecutive tool-only messages
  • Create ToolCallChain component to render chained tool calls with single timestamp
  • Skip tool response messages when detecting chains to avoid breaking sequences
  • Hide intermediate messages in chains, show only first message with all tool calls
  • Disable chaining during streaming to prevent flickering
  • Maintain all existing functionality (status indicators, expansion, notifications)

Visual improvements:

  • Multiple consecutive tool calls now show as a single grouped section
  • Single timestamp displayed for the entire chain instead of individual timestamps
  • Reduces visual clutter when LLM makes multiple tool calls in sequence
  • Preserves individual display for mixed content (text + tool calls)

Files added:

  • ui/desktop/src/utils/toolCallChaining.ts (chain detection logic)
  • ui/desktop/src/components/ToolCallChain.tsx (chain rendering component)

Files modified:

  • ui/desktop/src/components/GooseMessage.tsx (integrated chaining logic)

- Add tool call chaining logic to group consecutive tool-only messages
- Create ToolCallChain component to render chained tool calls with single timestamp
- Skip tool response messages when detecting chains to avoid breaking sequences
- Hide intermediate messages in chains, show only first message with all tool calls
- Disable chaining during streaming to prevent flickering
- Maintain all existing functionality (status indicators, expansion, notifications)

Visual improvements:
- Multiple consecutive tool calls now show as a single grouped section
- Single timestamp displayed for the entire chain instead of individual timestamps
- Reduces visual clutter when LLM makes multiple tool calls in sequence
- Preserves individual display for mixed content (text + tool calls)

Files added:
- ui/desktop/src/utils/toolCallChaining.ts (chain detection logic)
- ui/desktop/src/components/ToolCallChain.tsx (chain rendering component)

Files modified:
- ui/desktop/src/components/GooseMessage.tsx (integrated chaining logic)
- Enhanced chain detection to work properly during streaming
- Streaming tool calls can now dynamically extend existing chains
- Fixed issue where messages with text+tools would break chain sequences
- Pure tool call messages now properly chain even when following mixed content messages
- Removed streaming skip logic that was causing inconsistent chaining behavior

Visual improvements:
- Consecutive tool calls now chain together immediately, even during streaming
- No more flickering between individual and chained display
- Better handling of mixed content messages in tool call sequences
- Maintains proper chain detection for both streaming and completed messages
- Messages with text+tools now chain with subsequent pure tool calls
- Mixed content messages show text first, then all tool calls chain together
- Pure text messages continue to show individually
- Enhanced chain detection to start chains from mixed content messages
- Improved streaming logic to extend chains from any message with tool calls

Chaining behavior:
- Text+tools → Pure tools → Pure tools = Single chained display
- Text only → Text only = Individual displays
- Maintains single timestamp for entire chain including mixed content

Visual improvements:
- Better grouping of related tool call sequences
- Reduced visual separation between related LLM reasoning and tool execution
- Cleaner presentation when LLM explains then executes multiple tools
- Preserves individual display for pure conversational messages
@spencrmartin spencrmartin marked this pull request as ready for review August 21, 2025 18:55
@spencrmartin spencrmartin merged commit e3bc5a8 into spence/toolcalls Aug 21, 2025
4 checks passed
@spencrmartin spencrmartin deleted the pr-4248-clean branch August 21, 2025 18:55
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.

2 participants