-
Notifications
You must be signed in to change notification settings - Fork 250
Description
A few feature requests for the starter to make it a more complete chat experience:
1. Markdown rendering for user messages
Priority: quick win
Currently user messages are rendered as plain text, while assistant messages use Streamdown for markdown rendering. If a user types a message with backticks, bold, links, or lists, it renders as raw text.
Suggestion: wrap user message text in <Streamdown> (with isAnimating={false} and controls={false}) so formatting is consistent on both sides of the conversation.
2. Multimodal input (file/image attachments)
Priority: medium
Support attaching files and images to messages. The AI SDK supports multimodal content parts (image, file), and Workers AI models like Llama support image input. The UI would need:
- A file/image upload button next to the send button
- Rendering attached images inline in user messages
- Passing the attachment as a content part to
sendMessage
This would make the starter useful for image analysis, document Q&A, and other multimodal use cases.
3. Generative UI / artifacts via data parts
Priority: future
The Agents SDK now supports data-* stream parts — typed JSON blobs attached to messages alongside text. This opens the door for artifact-style UIs:
- Code artifacts — a data part with
type: "data-code"that renders in a split-pane code editor - Table/sheet artifacts — structured data rendered as an interactive table
- Document artifacts — rich text content with versioning
The data parts infrastructure (reconciliation, transient, persistence) is already in @cloudflare/ai-chat. The starter could demonstrate a simple artifact pattern — e.g., a tool that generates code and attaches it as a data part, rendered in a collapsible code block with copy/run buttons.