feat(Messages): allowed more composable structures#785
Merged
Conversation
|
Preview: https://chatbot-pr-chatbot-785.surge.sh A11y report: https://chatbot-pr-chatbot-785-a11y.surge.sh |
edonehoo
suggested changes
Dec 9, 2025
Contributor
edonehoo
left a comment
There was a problem hiding this comment.
couple of small tweaks, but looks pretty good as it is!
Comment on lines
+294
to
+298
| When creating custom message structures, you must follow an intended composable structure: | ||
|
|
||
| 1. **Message content and actions** must be wrapped in `<MessageAndActions>`. This includes, but is not limited to: | ||
|
|
||
| - `<MarkdownContent>` - For rendering markdown or plain text content |
Contributor
There was a problem hiding this comment.
Suggested change
| When creating custom message structures, you must follow an intended composable structure: | |
| 1. **Message content and actions** must be wrapped in `<MessageAndActions>`. This includes, but is not limited to: | |
| - `<MarkdownContent>` - For rendering markdown or plain text content | |
| When creating custom message structures, you must follow an intended composable structure. | |
| 1. **Message content and actions:** Wrap in `<MessageAndActions>`. This includes, but is not limited to: | |
| - `<MarkdownContent>`: For rendering markdown or plain text content |
formatting changes - might look a little funky, but is technically consistent with other docs
Comment on lines
+311
to
+313
| 2. **File attachments** must be placed outside `<MessageAndActions>`, wrapped in attachment containers: | ||
| - `<MessageAttachmentsContainer>` - Container for all attachments | ||
| - `<MessageAttachmentItem>` - Individual attachment wrapper (contains `<FileDetailsLabel>` or other attachment components) |
Contributor
There was a problem hiding this comment.
Suggested change
| 2. **File attachments** must be placed outside `<MessageAndActions>`, wrapped in attachment containers: | |
| - `<MessageAttachmentsContainer>` - Container for all attachments | |
| - `<MessageAttachmentItem>` - Individual attachment wrapper (contains `<FileDetailsLabel>` or other attachment components) | |
| 2. **File attachments:** Placed outside `<MessageAndActions>` and wrapped in attachment containers: | |
| - `<MessageAttachmentsContainer>`: Container for all attachments | |
| - `<MessageAttachmentItem>`: Individual attachment wrapper (contains `<FileDetailsLabel>` or other attachment components) |
| /> | ||
| <ToolCall titleText="Calling 'more_awesome_tool'" loadingText="Loading 'more_awesome_tool'" isLoading={true} /> | ||
| <ToolCall titleText="Calling 'even_more_awesome_tool'" loadingText="Loading 'even_more_awesome_tool'" /> | ||
| <MessageLoading loadingWord="Loading something in the middle of a custom structured message" /> |
Contributor
There was a problem hiding this comment.
Suggested change
| <MessageLoading loadingWord="Loading something in the middle of a custom structured message" /> |
Comment on lines
+61
to
+62
| content={`You can even place a message loading state in the middle of a message, as seen above.`} | ||
| /> |
Contributor
There was a problem hiding this comment.
Suggested change
| content={`You can even place a message loading state in the middle of a message, as seen above.`} | |
| /> | |
| content={`You can even place a message loading state in the middle of a message:`} | |
| /> | |
| <MessageLoading loadingWord="Loading something in the middle of a custom structured message" /> |
could we reorder this to place the loading thing after this line, so that we can avoid saying "above"?
28674f6 to
ccb4163
Compare
nicolethoen
approved these changes
Dec 17, 2025
|
🎉 This PR is included in version 6.5.0-prerelease.28 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
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.
Closes #679 and closes #678
New custom message structure example