feat: implement tool call chaining for consecutive tool calls#4253
Merged
spencrmartin merged 3 commits intospence/toolcallsfrom Aug 21, 2025
Merged
feat: implement tool call chaining for consecutive tool calls#4253spencrmartin merged 3 commits intospence/toolcallsfrom
spencrmartin merged 3 commits intospence/toolcallsfrom
Conversation
- 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
added a commit
that referenced
this pull request
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Visual improvements:
Files added:
Files modified: