feat(fake-llm-server): add initial setup for fake LLM server with TypeScript and Express
- Created package.json for dependencies and scripts - Added tsconfig.json for TypeScript configuration - Implemented fake stdio MCP server with basic calculator and environment variable printing tools - Added shell script to run the fake stdio MCP server - Updated root tsconfig.json for project references and path mapping
This commit is contained in:
24
backups/backup-20251218-161645/src/atoms/chatAtoms.ts
Normal file
24
backups/backup-20251218-161645/src/atoms/chatAtoms.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { FileAttachment, Message } from "@/ipc/ipc_types";
|
||||
import { atom } from "jotai";
|
||||
import type { ChatSummary } from "@/lib/schemas";
|
||||
|
||||
// Per-chat atoms implemented with maps keyed by chatId
|
||||
export const chatMessagesByIdAtom = atom<Map<number, Message[]>>(new Map());
|
||||
export const chatErrorByIdAtom = atom<Map<number, string | null>>(new Map());
|
||||
|
||||
// Atom to hold the currently selected chat ID
|
||||
export const selectedChatIdAtom = atom<number | null>(null);
|
||||
|
||||
export const isStreamingByIdAtom = atom<Map<number, boolean>>(new Map());
|
||||
export const chatInputValueAtom = atom<string>("");
|
||||
export const homeChatInputValueAtom = atom<string>("");
|
||||
|
||||
// Atoms for chat list management
|
||||
export const chatsAtom = atom<ChatSummary[]>([]);
|
||||
export const chatsLoadingAtom = atom<boolean>(false);
|
||||
|
||||
// Used for scrolling to the bottom of the chat messages (per chat)
|
||||
export const chatStreamCountByIdAtom = atom<Map<number, number>>(new Map());
|
||||
export const recentStreamChatIdsAtom = atom<Set<number>>(new Set<number>());
|
||||
|
||||
export const attachmentsAtom = atom<FileAttachment[]>([]);
|
||||
Reference in New Issue
Block a user