diff --git a/apps/web/src/components/chat/Chat.tsx b/apps/web/src/components/chat/Chat.tsx index 3ccc5f1..64abf8e 100644 --- a/apps/web/src/components/chat/Chat.tsx +++ b/apps/web/src/components/chat/Chat.tsx @@ -66,9 +66,9 @@ export const Chat = forwardRef(function Chat({ clearError, } = useChat({ model: "llama3.2", - projectId: initialProjectId, - onError: (err) => { - console.error("Chat error:", err); + ...(initialProjectId !== undefined && { projectId: initialProjectId }), + onError: (_err) => { + // Error is handled by the useChat hook's state }, }); diff --git a/apps/web/src/components/chat/ConversationSidebar.tsx b/apps/web/src/components/chat/ConversationSidebar.tsx index fe1db0d..3133b19 100644 --- a/apps/web/src/components/chat/ConversationSidebar.tsx +++ b/apps/web/src/components/chat/ConversationSidebar.tsx @@ -54,9 +54,9 @@ export const ConversationSidebar = forwardRef { - return updateIdea(id, { content, title }); + return updateIdea(id, { + content, + ...(title !== undefined && { title }) + }); }