Restore API-based comments and remove unstable live sync integration

This commit is contained in:
CREDO23 2026-01-22 15:05:00 +02:00
parent f346726294
commit 3ab9cc8485
5 changed files with 22 additions and 55 deletions

View file

@ -55,10 +55,15 @@ export function useChatMessagesLive(threadId: number | null) {
// Transform raw messages to MessageRecord with author info
return [...messagesData].map((msg): MessageRecord => {
const author = msg.author_id ? memberMap.get(msg.author_id) : null;
const role = (typeof msg.role === "string" ? msg.role.toLowerCase() : msg.role) as
| "user"
| "assistant"
| "system";
return {
id: msg.id,
thread_id: msg.thread_id,
role: msg.role,
role,
content: msg.content,
created_at: msg.created_at,
author_id: msg.author_id,