docs: Document how to compose MessageInput with modular upload for file attachments#5474
Open
docs: Document how to compose MessageInput with modular upload for file attachments#5474
Conversation
…le attachments Add a File Attachments section to the MessageInput docs with a live example showing how to compose UploadManager, UploadButton, and UploadFileList with MessageInput for a chat-with-attachments experience. Add a Chat Input with Attachments section to the Modular Upload docs with the same example. Add cross-links between MessageInput, MessageList, Modular Upload, and AI file-attachments pages so users can discover the integration regardless of which page they start from.
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-5474.fly.dev Built from 0e281c2 |
Contributor
There was a problem hiding this comment.
The example doesn't work, upload button and the file list are not rendered / registered as custom components.
| // Add pending files as attachments | ||
| for (var entry : pendingFiles.entrySet()) { | ||
| message.addAttachment(new MessageListItem.Attachment( | ||
| entry.getKey(), "#", "application/octet-stream")); |
Contributor
There was a problem hiding this comment.
This part doesn't look helpful. It's not clear how to convert something received from the upload handler into a URL that you can provide here. Also the mime type doesn't match what was uploaded.
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.
Add a File Attachments section to the MessageInput docs with a live example showing how to compose UploadManager, UploadButton, and UploadFileList with MessageInput for a chat-with-attachments experience.
Add a Chat Input with Attachments section to the Modular Upload docs with the same example. Add cross-links between MessageInput, MessageList, Modular Upload, and AI file-attachments pages so users can discover the integration regardless of which page they start from.