Skip to content

feat(ToolResponse): Add component#662

Merged
nicolethoen merged 6 commits intopatternfly:mainfrom
rebeccaalpert:tool-call
Sep 5, 2025
Merged

feat(ToolResponse): Add component#662
nicolethoen merged 6 commits intopatternfly:mainfrom
rebeccaalpert:tool-call

Conversation

@rebeccaalpert
Copy link
Member

@rebeccaalpert rebeccaalpert commented Aug 21, 2025

Added new tool response component with demo and tests.

Here are some screenshots in situ:
Screenshot 2025-08-28 at 9 53 44 AM
Screenshot 2025-08-28 at 9 53 21 AM
Screenshot 2025-08-28 at 9 53 32 AM

Demo: https://chatbot-pr-chatbot-662.surge.sh/patternfly-ai/chatbot/messages#messages-with-tool-responses

@rebeccaalpert rebeccaalpert linked an issue Aug 21, 2025 that may be closed by this pull request
@patternfly-build
Copy link

patternfly-build commented Aug 21, 2025

@rebeccaalpert rebeccaalpert force-pushed the tool-call branch 4 times, most recently from 99697fb to 774181e Compare August 28, 2025 13:23
@rebeccaalpert rebeccaalpert marked this pull request as ready for review August 28, 2025 13:24
@rebeccaalpert rebeccaalpert changed the title WIP: feat(ToolResponse): Add component feat(ToolResponse): Add component Aug 28, 2025
'--pf-v6-c-expandable-section__content--Opacity': '1',
'--pf-v6-c-expandable-section__content--PaddingInlineStart': 0,
'--pf-v6-c-expandable-section__content--TranslateY': 0,
'--pf-v6-c-expandable-section--m-expand-top__content--TranslateY': 0
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

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

feel free to adjust my suggestions based on what's the most accurate! I wasn't sure, but wanted to leave some direction for replacing the lorem ipsum text

@rebeccaalpert rebeccaalpert force-pushed the tool-call branch 2 times, most recently from d706b7b to fc2e132 Compare September 2, 2025 18:50
Copy link
Contributor

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

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

just making the other Tool name instances to be toolName, but if others prefer Tool name we can switch all those back 👍

Copy link

@kaylachumley kaylachumley left a comment

Choose a reason for hiding this comment

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

Comment on lines +20 to +22
collapsedToggleText: string;
/** Toggle text shown on expandable section when it is expanded */
expandedToggleText: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would we want to expose both of these props on this base component, or instead just expose toggleContent and allow consumers to pass in these via the expandableSectionProps? At least in the example above it doesn't make sense to pass both of these in when the text remains the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call-out! All set!

<Card isCompact className="pf-chatbot__tool-response" {...cardProps}>
<CardBody {...cardBodyProps}>
<ExpandableSection
toggleText={isExpanded ? expandedToggleText : collapsedToggleText}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Couple nits:

  • maybe using toggleContent instead? idk if we plan to deprecate toggleText, but toggleContent does what toggleText does but more)
  • if we want to keep the 2 toggle props for expanded and collapsed, any reason to not pass those to the respective expanded/collapsedToggleText props instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Also a good call-out and also all set!

@nicolethoen nicolethoen merged commit 332901d into patternfly:main Sep 5, 2025
7 checks passed
@github-actions
Copy link

github-actions bot commented Sep 5, 2025

🎉 This PR is included in version 6.4.0-prerelease.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tool response component

6 participants