Format streaming chat message to Markdown

This commit is contained in:
Claudio Ortolina
2026-02-23 14:29:41 +00:00
parent 913e27cd3d
commit e58888bbc7
+3 -1
View File
@@ -101,7 +101,9 @@ defmodule MusicLibraryWeb.Components.Chat do
:if={@current_response != ""} :if={@current_response != ""}
class="max-w-[85%] rounded-lg px-4 py-2 text-sm bg-zinc-100 dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100" class="max-w-[85%] rounded-lg px-4 py-2 text-sm bg-zinc-100 dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100"
> >
<p class="whitespace-pre-wrap">{@current_response}</p> <div class="prose prose-sm dark:prose-invert">
{raw(Markdown.to_html(@current_response))}
</div>
</div> </div>
<div <div