From daa5aaf0a13e82821f8139aa80ec3cf1d49f6e01 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 14 Apr 2026 13:28:16 +0200 Subject: [PATCH] =?UTF-8?q?fix(brain):=20companion=20chat=20=E2=80=94=20ma?= =?UTF-8?q?rkdown=20rendering,=20loading=20status,=20streaming=20feedback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three UX fixes for the Companion Chat: 1. Markdown rendering: assistant messages now render as HTML via marked (gfm + breaks). **bold**, _italic_, lists, code blocks, links all work. Custom CSS for Mana theme integration. 2. Loading status: while the local Gemma model downloads/loads (first use is ~500MB), the placeholder bubble shows "Modell wird geladen... 42%" with a spinning icon instead of just a blank "thinking" state. 3. Streaming feedback: the placeholder bubble appears immediately when sending and shows tokens as they stream from the LLM, rendered as markdown in real-time. Auto-scrolls on each chunk. The pulse animation on the streaming markdown gives a subtle "this is generating" hint. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../companion/components/CompanionChat.svelte | 127 +++++++++++++++++- 1 file changed, 122 insertions(+), 5 deletions(-) diff --git a/apps/mana/apps/web/src/lib/modules/companion/components/CompanionChat.svelte b/apps/mana/apps/web/src/lib/modules/companion/components/CompanionChat.svelte index 9b4e76f52..0f0d486a2 100644 --- a/apps/mana/apps/web/src/lib/modules/companion/components/CompanionChat.svelte +++ b/apps/mana/apps/web/src/lib/modules/companion/components/CompanionChat.svelte @@ -5,14 +5,16 @@ responses, and shows tool execution results inline. -->