Skip to content

Conversation

@spencrmartin
Copy link
Collaborator

@spencrmartin spencrmartin commented Aug 22, 2025

🔗 Tool Call Chaining
Consecutive tool calls are now visually grouped into chains
Reduces visual clutter by combining related tool executions
Smart chain detection that works during streaming
Preserves individual tool call functionality for non-chained calls

🎨 Tool Call Icons & Status Indicators
13 new custom icons for different tool types (Terminal, FileEdit, Globe, Camera, etc.)
Dynamic icon mapping based on tool names and functions
Status indicators showing tool execution state
Enhanced visual hierarchy for better UX

🧠 Preserved Core Functionality
Chain of Thought (CoT) with `` blocks maintained
GooseResponseForm integration preserved (currently disabled but available)
Metadata handling and parameter usage restored
Tool confirmations and error handling intact

🔧 Technical Changes
New Components
ToolCallChain.tsx - Handles rendering of chained tool calls
ToolCallStatusIndicator.tsx - Visual status indicators for tools
13 new icon components in icons/toolcalls/

Enhanced Components
GooseMessage.tsx - Integrated chaining logic while preserving CoT
ToolCallWithResponse.tsx - Enhanced with status indicators

New Utilities
toolCallChaining.ts - Chain detection and management logic
toolIconMapping.tsx - Dynamic icon assignment system

Screenshot 2025-08-22 at 10 56 12 AM

Original prework PR #4248

spencrmartin and others added 4 commits August 22, 2025 10:43
- Add 17 custom tool call icon components (Terminal, FileEdit, Globe, etc.)
- Create comprehensive tool-to-icon mapping system
- Implement status indicator overlay system (success/error/loading/pending)
- Replace old green dot status with integrated icon+status display
- Remove redundant LoaderCircle and Dot components from tool calls
- Maintain all existing functionality (tooltips, expansion, etc.)

Visual improvements:
- Each tool call now shows specific icon (11x11px matching design system)
- Status indicators: green (success), red (error), yellow pulsing (loading), gray (pending)
- Cleaner layout with single status indicator per tool
- Better visual hierarchy and user experience

Files added:
- ui/desktop/src/components/icons/toolcalls/ (17 icon components)
- ui/desktop/src/utils/toolIconMapping.tsx (mapping logic)
- ui/desktop/src/components/ToolCallStatusIndicator.tsx (status system)

Files modified:
- ui/desktop/src/components/ToolCallWithResponse.tsx (integration)
Co-authored-by: dianed-square <73617011+dianed-square@users.noreply.github.com>
Co-authored-by: Zane <75694352+zanesq@users.noreply.github.com>
Co-authored-by: dianed-square <73617011+dianed-square@users.noreply.github.com>
Co-authored-by: Zane <75694352+zanesq@users.noreply.github.com>
@spencrmartin spencrmartin changed the base branch from spence/toolcalls to main August 22, 2025 14:51
@spencrmartin spencrmartin changed the title Pr 4248 rebased feat: integrate tool call icons with status indicators and daisy chaining Aug 22, 2025
@spencrmartin
Copy link
Collaborator Author

Followed up with @chaitanyarahalkar around Chain-Of-Thought code block

it is only served if you are using local models with something like Ollama. Those models emit their cot in the tags which gets wrapped in this UI

for context. Moving to ready for review

@spencrmartin spencrmartin marked this pull request as ready for review August 22, 2025 18:40
@michaelneale
Copy link
Collaborator

this looks much nicer - not reviewed the code but love the functionality

const cotRaw = match[1].trim();
const visible = text.replace(match[0], '').trim();
return { visibleText: visible, cotText: cotRaw.length > 0 ? cotRaw : null };
const visibleText = text.replace(regex, '').trim();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change part of this, a little lost as to what the functional change is

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No function change

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it needed though?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vibes - will revert

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh I see regex was used within the chain logic and kept consistent @zanesq


// Extract image paths from the visible part of the message (exclude CoT)
const imagePaths = extractImagePaths(textWithoutCot);
// Extract image paths from the message content
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this doing same as before but unrelated/stylistic changes?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess needed as below uses visibleText as what was textWithoutCot?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit of a simplified variable as opposed to continuing the train of textWithoutX textWithoutY rabbit hole.

@michaelneale
Copy link
Collaborator

nice - LGTM - didn't get a chance to try it yet though

Copy link
Collaborator

@zanesq zanesq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM just some cleanup needed before merging

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove this backup file

const cotRaw = match[1].trim();
const visible = text.replace(match[0], '').trim();
return { visibleText: visible, cotText: cotRaw.length > 0 ? cotRaw : null };
const visibleText = text.replace(regex, '').trim();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it needed though?

// Track which tool confirmations we've already handled to prevent infinite loops
const handledToolConfirmations = useRef<Set<string>>(new Set());

// Extract text content from the message
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove info comments like this if the code is self explanatory

Cleaned up unnecessary comments that just repeat what the code clearly shows:

- Removed obvious helper function comments
- Removed JSDoc blocks that just restate function names
- Removed inline comments explaining self-evident logic
- Kept only comments that explain non-obvious business logic

Code is now cleaner and follows the principle of minimal, meaningful comments.
@spencrmartin spencrmartin requested a review from zanesq August 28, 2025 20:42
Copy link
Collaborator

@zanesq zanesq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Only bit of ui feedback is there is less space under the text and the tool call in the agent response. Not sure if that was intentional or not but looks a bit tight to me.

Before:
Screenshot 2025-08-28 at 2 22 39 PM

After:
Screenshot 2025-08-28 at 2 21 13 PM

@taylorkmho
Copy link
Contributor

image image

Great feedback @zanesq! Jumping in to support @spencrmartin here, made some adjustments so tool calls and their supplemental copy are spaced more consistently.

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@spencrmartin spencrmartin merged commit 69c29a0 into main Aug 29, 2025
11 checks passed
@spencrmartin spencrmartin deleted the pr-4248-rebased branch August 29, 2025 12:39
wpfleger96 added a commit to wpfleger96/goose that referenced this pull request Aug 29, 2025
…tensions-on-resume

* upstream/main: (60 commits)
  [cookbook recipe] Update Wording  (block#4438)
  feat: show enabled extensions at top of extensions page (block#4423)
  test recipe (block#4436)
  Extensions loading indicator on desktop launch (block#4412)
  removing trailing slash (block#4433)
  [recipe cookbook] test recipe (block#4431)
  [recipe cookbook] switching to SHA (block#4429)
  [recipe cookbook] Update url build (block#4427)
  [Recipe Cookbook] test recipe flow (block#4426)
  [Recipe cookbook] Addressing GitHub api format issue (block#4424)
  feat: integrate tool call icons with status indicators and daisy chaining (block#4279)
  new recipe to lint-check my code (block#4416)
  removing a leftover syntax error (block#4415)
  Iand/updating recipe validation workflow (block#4413)
  Iand/updating recipe validation workflow (block#4410)
  Fix (Ollama provider): Unsupported operation: streaming not implemented (block#4303)
  change databricks default to claude sonnet 4 (block#4405)
  Iand/updating recipe validation workflow (block#4406)
  Add metrics for recipe metadata in scheduler, UI, and CLI (block#4399)
  Iand/updating recipe validation workflow (block#4403)
  ...
thisispete pushed a commit that referenced this pull request Aug 30, 2025
…ning (#4279)

Co-authored-by: dianed-square <73617011+dianed-square@users.noreply.github.com>
Co-authored-by: Zane <75694352+zanesq@users.noreply.github.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
michaelneale added a commit that referenced this pull request Sep 1, 2025
* main:
  chore: move list recipes and archive recipe to goose server (#4422)
  deleting a recipe and testing workflow (#4451)
  adding a new recipe (#4449)
  docs: autovisualiser extension (#4380)
  trying to restore functionality for api-key sending after merging a recipe (#4446)
  restoring a deleted recipe (#4445)
  testing recipe removal (#4443)
  updating our 3 workflows to only operate if the PR is adding/editing a recipe (#4441)
  [cookbook recipe] Update Wording  (#4438)
  feat: show enabled extensions at top of extensions page (#4423)
  test recipe (#4436)
  Extensions loading indicator on desktop launch (#4412)
  removing trailing slash (#4433)
  [recipe cookbook] test recipe (#4431)
  [recipe cookbook] switching to SHA (#4429)
  [recipe cookbook] Update url build (#4427)
  [Recipe Cookbook] test recipe flow (#4426)
  [Recipe cookbook] Addressing GitHub api format issue (#4424)
  feat: integrate tool call icons with status indicators and daisy chaining (#4279)
This was referenced Sep 9, 2025
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.

5 participants