From 87e5b715075fb56343d2d10a6a532d04d8fc615b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 16:55:40 +0100 Subject: feat(assistant): the transcript as chat bubbles with avatars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Questions sit on the right in an accent bubble with the user's avatar (`[assistant] user_avatar`, served at /api/avatar); replies on the left in a surface bubble with the assistant's, a "…" bubble while a reply has no text yet. The assistant's avatar is the background picture itself, zoomed by CSS onto `[assistant] face` ([centre x, centre y, size] in its pixels), so nothing is cropped on the PC; the page loads the picture once for its real size. Unset, both are plain circles. Co-Authored-By: Claude Opus 5.5 --- static/deck.css | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'static/deck.css') diff --git a/static/deck.css b/static/deck.css index e60c732..48ec626 100644 --- a/static/deck.css +++ b/static/deck.css @@ -674,7 +674,27 @@ select { .assistant .as-op, .assistant .as-notice, .assistant .as-note { font-size: 0.857rem; color: var(--udt-subtext0); } .assistant .as-notice:empty { display: none; } .assistant .as-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; } -.assistant .as-q { align-self: flex-end; background: var(--udt-surface1); border-radius: 12px; padding: 8px 12px; white-space: pre-wrap; margin-left: 20%; } +.assistant .as-turn { display: flex; flex-direction: column; gap: 10px; } +.assistant .as-row { display: flex; align-items: flex-end; gap: 10px; } +.assistant .as-row.me { justify-content: flex-end; padding-left: 15%; } +.assistant .as-row.bot { padding-right: 10%; } +.assistant .as-av { + flex: none; width: 40px; height: 40px; border-radius: 20px; + background: var(--udt-surface1) center / cover no-repeat; +} +.assistant .as-av.me { background-image: url("/api/avatar"); } +.assistant.has-face .as-av.bot { background-image: url("/api/bg"); background-size: var(--face-size); background-position: var(--face-pos); } +.assistant .as-q, .assistant .as-bubble { padding: 10px 14px; border-radius: 16px; min-width: 0; } +.assistant .as-q { + white-space: pre-wrap; color: var(--udt-crust); + background: color-mix(in srgb, var(--udt-accent) 85%, var(--udt-text)); border-bottom-right-radius: 4px; +} +.assistant .as-bubble { + background: color-mix(in srgb, var(--udt-surface0) 88%, transparent); + border: 1px solid var(--udt-surface1); border-bottom-left-radius: 4px; +} +.assistant .as-bubble .md > :first-child { margin-top: 0; } +.assistant .as-bubble .md > :last-child { margin-bottom: 0; } .assistant .as-tools { font-size: 0.786rem; color: var(--udt-overlay0); } .assistant .md { line-height: 1.45; overflow-wrap: anywhere; } .assistant .md pre { position: relative; background: var(--udt-crust); border-radius: 8px; padding: 10px; overflow-x: auto; } -- cgit v1.2.3