import type { Message } from "@/ipc/ipc_types"; import { atom } from "jotai"; import type { ChatSummary } from "@/lib/schemas"; // Atom to hold the chat history export const chatMessagesAtom = atom([]); export const chatErrorAtom = atom(null); // Atom to hold the currently selected chat ID export const selectedChatIdAtom = atom(null); export const isStreamingAtom = atom(false); export const chatInputValueAtom = atom(""); export const homeChatInputValueAtom = atom(""); // Atoms for chat list management export const chatsAtom = atom([]); export const chatsLoadingAtom = atom(false); // Used for scrolling to the bottom of the chat messages export const chatStreamCountAtom = atom(0);