mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-15 05:08:15 -04:00
Release reusable chat components #85
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marcusschiesser on GitHub (Oct 17, 2024).
Why?
What?
Similar to the https://github.com/run-llama/pdf-viewer, we're extracting out reusable chat components. I started that already some time ago with https://ui.marcusschiesser.de/docs/components/chat. These components have been rarely updated though as they were not released to npm (we had to copy the components usually for usage).
How to cut the components
https://ui.marcusschiesser.de/docs/components/chat is just providing
ChatInputandChatMessages. For greater flexibility, we will export more components:ChatMessageContent:artifactVersion- move it intotoolDataand retrieve it from thereclipboardproperty that shows the copy clipboard button (move it fromChatMessagetoChatMessageContent)ChatMessageContentdirectly for flexibility (e.g. change rendering the avatar), but we provideChatAvatarandChatMessagefor convenience to the NPM package user tooChatActionsuseFile,FileUploader,UploadImagePreview(rename toImagePreview), andDocumentPreviewChatInput(convenience - won't be used in our templates)Don't export:
LlamaCloudSelector- we either keep that in our templates or release a separate packageTBD: We probably can merge
ImagePreviewandDocumentPreviewtoFilePreview