MCPcopy Index your code
hub / github.com/admineral/OpenAI-Assistant-API-Chat / ChatState

Interface ChatState

app/services/ChatManager.ts:18–32  ·  view source on GitHub ↗

* Interface for the state of the chat

Source from the content-addressed store, hash-verified

16 * Interface for the state of the chat
17 */
18interface ChatState {
19 assistantId: string | null; // ID of the assistant
20 threadId: string | null; // ID of the chat thread
21 messages: any[]; // Array of messages
22 isLoading: boolean; // Loading state
23 error: Error | null; // Any error that occurred
24 runId: string | null; // ID of the assistant run
25 assistantResponseReceived: boolean; // Whether the assistant's response has been received
26 isSending: boolean; // Whether a message is being sent
27 setChatMessages: (messages: any[]) => void; // Function to set the chat messages
28 setStatusMessage: (message: string) => void; // Function to set the status message
29 statusMessage:string; // Status message
30 setProgress: (progress: number) => void; // Function to set the progress
31 setIsLoadingFirstMessage: (isLoading: boolean) => void;
32}
33
34/**
35 * Class to manage the state and operations of the chat

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected