-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: improve tool call parameters rendering #16844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Eugen! The condensed argument logic is a nice improvement and reads well 👍
However, I'm not convinced about the nested <details> approach for displaying the arguments. Having a collapsible <details> inside the <summary> of the outer <details> (which expands to show the tool result) creates two independent expand/collapse interactions stacked together. This can be confusing: clicking the arguments area may also toggle the outer details, and users are unlikely to expect two separate levels of expansion IMO.
I would suggest a simpler approach:
- Show the entire arguments inline in the tool call summary as plain text.
- Add a tooltip on tool hover that shows the full arguments (tool name plus all argument key–value pairs, pretty-printed). We already use the
HoverServicethe prompt variant badge in the chat UI for example which also allows more complex tooltip content.
This could look like this for example:

This example uses a JSON code block for the arguments inside a markdown string for the tooltip.
Overall, this keeps the summary clean and easy to scan, while still making full argument details available on hover, without adding extra interaction complexity to the expand/collapse behavior for the tool result.
WDYT?
|
I agree, nested collapsibles should be avoided. As the arguments are always objects we could also specialize the rendering of it a bit. So it looks less like a JSON and more like a list of attributes. In many cases we could also just not render the With the This can't be solved generically. Each tool needs to have something like "getArgumentsShortLabel" which then returns something like This would improve readability by a lot, often not even requiring the user to expand to see what happened. |
ndoschek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/ai-chat-ui/src/browser/chat-response-renderer/toolcall-part-renderer.tsx
Outdated
Show resolved
Hide resolved
ndoschek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @eneufeld for the updates! LGTM and works great!
I tested with several different functions and arguments and this is a great UX improvement and feels very intuitive now!
|
Also I am not sure about the hover in general. If the mouse is above the chat it sometimes "flows" under the mouse pointer and opens arbitrary hovers then. Finally, we lost the ability to see the actual content of a tool call completly. Sorry for raising these issues, In general i like this improvement a lot and I think is was long outstanding! |
|
@JonasHelming who checks writeFile content ;-) Seriously, good catch. |
|
@JonasHelming Thank you for raising the issues, can you elaborate here: #16988 |


What it does
Change the rendering of the tool call parameters to:
...if there are multiple parameters passedfixes #16029
How to test
Use any agent and let it call a function which expects a parameter.
Follow-ups
Breaking changes
Attribution
Review checklist
nlsservice (for details, please see the Internationalization/Localization section in the Coding Guidelines)Reminder for reviewers