feat(chat): rich message bubbles with reasoning, code, clarify, subagent cards (#659 #660 #661 #662 #663 #664) (#671)

* feat(chat): rich message bubbles with reasoning, code, clarify, subagent cards (#659 #660 #661 #662 #663 #664)

* fix(chat): render ClarifyBubble at bottom of message list, not as inline SYSTEM message

Fixes two on-device bugs:
1. ClarifyBubble now renders at the very bottom of the LazyColumn
   (after all messages, streaming message, typing indicator, and subagent
   indicators) instead of inline among regular messages.
2. Bubble disappears when an option is selected or dismissed — the
   ClarifyBubble is driven by state.clarifyRequest instead of a
   persisted ChatMessage.clarifyInfo, so clearing the request state
   removes it from the list entirely.

* fix(chat): add text input field to ClarifyBubble for custom typed answers

* fix(chat): render ReasoningCard at list level with stable key, not inside AssistantBubble

* fix(chat): address agy review — hoist regex, fix a11y, cache anim specs, disable animateContentSize while streaming

* fix(chat): replace hardcoded Color() with theme constants to pass CI checkColorLiterals

---------

Co-authored-by: M57 <Hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-07-22 02:04:55 +03:00
1 parent bb4149eb0d
commit c43904b2b8
9 files changed
+641 -443

No files matched your search

@@ -87,3 +87,19 @@ val SkeletonBase = Color(0xFF1C1C26)
val SkeletonHighlight = Color(0xFF2F2F3D)
val SkeletonBaseLight = Color(0xFFE6E3EE)
val SkeletonHighlightLight = Color(0xFFEFEDF4)
// ── Syntax highlighting tokens (code blocks) ─────────────────────────────
// VS Code Dark+ palette — good general readability across all presets.
// These are consumed exclusively by CodeBlockCard (MessageCards.kt).
val CodeKeyword = Color(0xFF569CD6) // blue — for val, fun, class, etc.
val CodeString = Color(0xFFCE9178) // orange — for "string literals"
val CodeComment = Color(0xFF6A9955) // green — for // comments
val CodeNumber = Color(0xFFB5CEA8) // light green — for 42, 0xFF
val CodePunctuation = Color(0xFFD4D4D4) // gray — for {, (, ;, etc.
// ── Code block / terminal surface colours (issue #659) ───────────────
val CodeTerminalBg = Color(0xFF1E1E1E)
val CodeTerminalBorder = Color(0xFF333333)
val CodeTerminalText = Color(0xFFD4D4D4)
val CodeTerminalMuted = Color(0xFF808080)