First pass at having a chat count in the entity pages

This commit is contained in:
Claudio Ortolina
2026-03-19 12:28:58 +00:00
parent 2ba8aef148
commit 1001610472
6 changed files with 68 additions and 2 deletions
+2
View File
@@ -336,6 +336,7 @@ defmodule MusicLibraryWeb.Components.Chat do
def handle_event("delete_chat", %{"id" => id}, socket) do
chat = Chats.get_chat!(id)
{:ok, _} = Chats.delete_chat(chat)
send(self(), {__MODULE__, :chats_changed})
chats = Chats.list_chats(socket.assigns.entity, socket.assigns.musicbrainz_id)
@@ -418,6 +419,7 @@ defmodule MusicLibraryWeb.Components.Chat do
%{role: user_message.role, content: user_message.content}
)
send(self(), {__MODULE__, :chats_changed})
chat
chat ->