Skip to content

feat: add option to "frame" open tool results - #331

Merged
cpsievert merged 23 commits into
mainfrom
feat/framed-tool-result-presentation
Aug 25, 2026
Merged

feat: add option to "frame" open tool results#331
cpsievert merged 23 commits into
mainfrom
feat/framed-tool-result-presentation

Conversation

@cpsievert

@cpsievert cpsievert commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a new alternative way to style tool results when they are open: tool_result_display(open_style="framed").

The basic idea is to draw a border around the tool result header and contents (when open). This is consistent with how Posit Assistant styles tool results and looks much better for things like querychat where a footer (and full screen button) is involved. Here is a before and after for querychat (posit-dev/querychat#274):

Before

Screenshot 2026-08-21 at 7 28 53 PM

After

Screenshot 2026-08-21 at 6 29 14 PM

Open question

I think the current default styling probably works best when tool results are code block heavy, which is the case for the default display, I believe. That said, maybe this is a better default when a footer is involved, and maybe even more generally for a larger class of custom tool displays? Any thoughts on this @gadenbuie?

@cpsievert
cpsievert requested a lite review from Copilot August 22, 2026 00:46
@cpsievert cpsievert changed the title feat: add framed tool result presentation feat: add option to "frame" open tool results Aug 22, 2026

This comment was marked as resolved.

@cpsievert
cpsievert marked this pull request as ready for review August 22, 2026 00:57
@cpsievert
cpsievert requested a review from gadenbuie August 22, 2026 00:57
@cpsievert cpsievert added this to the Next milestone Aug 24, 2026
Two fixes to multi-call tool group rendering:

- Draw a vertical rule under the group header's glyph running the full
  height of the call list down through the final tool result, matching
  the drill-in rule leaf cards already get under their rows.
- A framed call row no longer shifts left and widens when opened: the
  row indent moves from the summary onto the frame itself, so the
  frame's border box is exactly the box the collapsed row occupied.
…lt-presentation

# Conflicts:
#	js/dist/shinychat.css
#	js/dist/shinychat.css.map
#	js/dist/shinychat.js
#	js/dist/shinychat.js.map
#	pkg-py/src/shinychat/www/GIT_VERSION
#	pkg-py/src/shinychat/www/shinychat.css
#	pkg-py/src/shinychat/www/shinychat.css.map
#	pkg-py/src/shinychat/www/shinychat.js
#	pkg-py/src/shinychat/www/shinychat.js.map
#	pkg-r/inst/lib/shiny/GIT_VERSION
#	pkg-r/inst/lib/shiny/shinychat.css
#	pkg-r/inst/lib/shiny/shinychat.css.map
#	pkg-r/inst/lib/shiny/shinychat.js
#	pkg-r/inst/lib/shiny/shinychat.js.map
@cpsievert
cpsievert merged commit 14f4c2a into main Aug 25, 2026
22 of 23 checks passed
@cpsievert
cpsievert deleted the feat/framed-tool-result-presentation branch August 25, 2026 20:10
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.

2 participants