Skip to content
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

feat(SourcesCard): Add support for external links #499

Merged
merged 2 commits into from
Apr 9, 2025

Conversation

rebeccaalpert
Copy link
Member

@rebeccaalpert rebeccaalpert commented Mar 28, 2025

Added new prop to handle whether link is external or not. Went with link level to allow for greater level of control. (Sources level would make them all external or not.)

Docs: https://chatbot-pr-chatbot-499.surge.sh/patternfly-ai/chatbot/messages#messages-with-sources

Added new prop to handle whether link is external or not
@rebeccaalpert rebeccaalpert linked an issue Mar 28, 2025 that may be closed by this pull request
@patternfly-build
Copy link

patternfly-build commented Mar 28, 2025

@edonehoo
Copy link
Contributor

Looks great! Could you add this line to the existing example doc (bolding here just for visibility)

If you are using Retrieval-Augmented Generation, you may want to display sources in a message. Passing sources to <Message> allows you to paginate between the sources you provide.

If a source will open outside of the ChatBot window, add an external link icon via isExternal.

The API for a source requires a link at minimum, but we strongly recommend providing a more descriptive title and body description so users have enough context. The title is limited to 1 line and the body is limited to 2 lines.

@rebeccaalpert
Copy link
Member Author

Should be all set @edonehoo!

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.

👍

@rebeccaalpert rebeccaalpert merged commit f1399cb into patternfly:main Apr 9, 2025
5 checks passed
Copy link

github-actions bot commented Apr 9, 2025

🎉 This PR is included in version 2.2.0-prerelease.40 🎉

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.

Allow bot message sources to open in a new tab
5 participants