-
Notifications
You must be signed in to change notification settings - Fork 15
Tool calling UI #52
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
Merged
Merged
Tool calling UI #52
Conversation
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
* `display` can be markdown or HTML * `display` can be a list with `html`, `markdown` or `text` used in that order * `display_tool_request` hides the tool request if FALSE
simonpcouch
added a commit
to simonpcouch/predictive
that referenced
this pull request
Jun 27, 2025
cpsievert
reviewed
Aug 5, 2025
cpsievert
reviewed
Aug 5, 2025
cpsievert
reviewed
Aug 5, 2025
cpsievert
reviewed
Aug 5, 2025
`title` is a reserved attribute in HTML and lit elements, so we need to avoid using it. I considered also changing `tool-icon` (and maybe also `tool-intent`), but decided that the minimal change to have tool name and title is enough. If we only change `tool-title`, though, then it's odd that `name` is not `tool-name` as well.
This is required when the tool result display is completely customized by the user, i.e they don't use our `<shiny-tool-result>` component. Without the custom message, we can't hide the tool result. Interestingly we need to remember the message because the tool request and result are being re-rendered frequently while the LLM is streaming output. For now, we store a set of seen tool request IDs and we short-circuit tool request rendering if we've already seen that ID. In the future, if we start new markdown-stream components when we have a switch in content type, we won't need to remember between renders.
…contents_shinychat()` * We now store the data used to create the tool request/result cards but avoid rendering them to tags until required. * This lets someone use `super(content, ContentToolRequest)` to get our default data structure that the can modify before it's rendered to tags. * This let users move some computation from tool result time to tool request time, which can improve perceived performance and reduce storage requirements. I also updated the `contents_shinychat()` docs to explain how to work with this new feature.
It's just simpler and more consistent
cpsievert
reviewed
Aug 7, 2025
cpsievert
approved these changes
Aug 7, 2025
Co-authored-by: Carson Sievert <[email protected]>
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.
TODO
+
or-
depending on state (with a neat animation)