-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Show arguments in tool call response renderer #14424
Conversation
fixed #14423 Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
33cdef9
to
114e7a9
Compare
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.
Great idea to show the arguments! Thank you!
However, there are a few things I observed, which I'd like to clarify:
-
The arguments are shown again beneath the tool call result (see line 60). Is this on purpose? I found it a bit surprising:
-
I think it'd be more clear that
>
is an expandable if we rather use a colored icon instead of the plain>
, similar to the triangle we use for the entire tool call. The mouse pointer config doesn't really help a lot, because we already set this topointer
.
- The JSON of the arguments is not really nicely formatted for me.
- Just a matter of taste, and I don't have a strong opinion on this aspect, but I find those surrounding
[
...]
a bit superfluous. Imho there should be as few clutter as possible and it should be as close as possible to normal language without extra technical characters. Only if people are interested in looking into details, those technical details should appear. Which leads me also to the suggestion to show the arguments just as a section of the tool call result if the user unfolded them and not with the rather technical(>)
? Background is also that this is likely to be used in non-IDE products.
packages/ai-chat-ui/src/browser/chat-response-renderer/toolcall-part-renderer.tsx
Outdated
Show resolved
Hide resolved
packages/ai-chat-ui/src/browser/chat-response-renderer/toolcall-part-renderer.tsx
Outdated
Show resolved
Hide resolved
packages/ai-chat-ui/src/browser/chat-response-renderer/toolcall-part-renderer.tsx
Outdated
Show resolved
Hide resolved
Sorry, one more thing: It would probably be clearer if we move the |
Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
i decided to leav the "()" in. It looks very weird without them. In a non-technical context, I believe you would need a custom renderer anyways TBH. |
c72deb5
to
7b02641
Compare
Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
7b02641
to
41cf63d
Compare
@planger Ping :-) |
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 for the revision. However, for me this is now how it looks like (see line break after ...):
Also, if you don't put this in a pre
element, the pretty printing of the JSON gets lost (see here).
This drives me mad. Somehow, I am almost certain, this was not the case when I committed this, and I literally do not find the reason for this. I will continue to search.
This was actually on purpose. I you add pre then the argument is shown as multiple lines. However, I am fine with this, too. |
@JonasHelming Thanks!
Ah ok, I was just wondering, because we stringify the JSON with 2 spaces ( |
@planger Looks wonderful now, thank you so much! |
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, looks good to me! 👍
fixed #14423
What it does
Shows a expandable ">" on tool functions in the hat if they have arguments
How to test
run a tool call and look at the chat. E.g.: "How to build this project".
Use a long-running to see the arguments while progress is shown, e.g. "how many files are in the workspace" on a big project such as theia
Review checklist
Reminder for reviewers