Frontend chat view — message rendering & input #15
Labels
No labels
area:config
area:contracts
area:engine
area:eventsourcing
area:frontend
area:git
area:ipc
area:persistence
area:provider
area:scaffold
area:terminal
type:user-story
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/peon#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
User story
As a user chatting with an AI agent, I want the chat view to render messages with Markdown formatting and syntax-highlighted code blocks, stream assistant responses in real-time, display tool calls as collapsible widgets, and provide a text input area with send functionality, so that I have a rich, responsive chat experience.
Acceptance criteria
ChatViewModel (RELM4 component,
components/chat_view.rs)Message rendering
MessageContent::Text— parsed as Markdown:gtk::Labelwith Pango markup (markdown_to_pango()helper)sourceview5::Viewwith syntax highlighting (language detection from fence)sourceview5::Viewis read-only with line numbers enabledMessageContent::ToolCall— collapsible widget showing tool name and JSON inputMessageContent::ToolResult— shown inline, errors highlighted in redMessageContent::ThinkingBlock— rendered in a distinct visual style (muted, collapsible)Streaming
MessageChunkReceivedevents append text to the current assistant message in real-timeMessage input
GtkTextView(multi-line) at the bottom of the chat viewCtrl+Returnsends the message (dispatchesStartTurncommand)Returninserts a newline (multi-line input)Supervised mode
ThreadStatus::AwaitingApproval: show Approve/Reject buttonsApprovePendingAction, Reject dispatchesRejectPendingActionTests
Out of scope
References
Dependencies
issue-13-app-shell