MCPcopy Index your code
hub / github.com/enowdev/enowX-Coder / ChatState

Interface ChatState

src/stores/useChatStore.ts:4–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import { Message, TokenUsage } from '@/types';
3
4interface ChatState {
5 messages: Message[];
6 streamingText: string;
7 isStreaming: boolean;
8 sessionUsage: Record<string, TokenUsage>;
9 setMessages: (messages: Message[]) => void;
10 addMessage: (message: Message) => void;
11 appendStreamToken: (token: string) => void;
12 setStreaming: (isStreaming: boolean) => void;
13 clearStreaming: () => void;
14 addTokenUsage: (sessionId: string, usage: TokenUsage) => void;
15 clearSessionUsage: (sessionId: string) => void;
16}
17
18export const useChatStore = create<ChatState>((set) => ({
19 messages: [],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected