terminal-chat-ui
Version:
Shared UI components for terminal-based chat interfaces using Theater actors
16 lines (15 loc) • 606 B
TypeScript
/**
* useMessageState - simplified message state management
*/
import type { Message } from '../types/common.js';
/**
* Simplified hook for managing message state in Theater chat interfaces
*/
export declare function useMessageState(): {
messages: Message[];
addMessage: (role: Message["role"], content: string, toolName?: string, toolArgs?: string[]) => void;
addToolMessage: (toolName: string, toolArgs?: string[]) => void;
clearMessages: () => void;
removeMessage: (index: number) => void;
setMessages: import("react").Dispatch<import("react").SetStateAction<Message[]>>;
};