UNPKG

terminal-chat-ui

Version:

Shared UI components for terminal-based chat interfaces using Theater actors

34 lines (33 loc) 978 B
/** * Core types for terminal-chat-ui components */ export interface Message { role: 'user' | 'assistant' | 'system' | 'tool' | 'error'; content: string; timestamp: Date; status: 'complete'; toolName?: string; toolArgs?: string[]; } export type SetupStatus = 'connecting' | 'starting_actor' | 'opening_channel' | 'loading_actor' | 'ready' | 'error'; export type ToolDisplayMode = 'hidden' | 'minimal' | 'full'; export type InputMode = 'simple' | 'multiline' | 'auto'; export type UIVariant = 'default' | 'git' | 'chat' | 'custom'; export interface ChatSession { domainActor: any; chatActorId: string; } export interface ChannelStream { channelId: string; onMessage(handler: (message: any) => void): () => void; sendMessage(message: string): Promise<void>; close(): void; } export interface TheaterConfig { server?: string; actor?: { manifest_path: string; initial_state?: any; }; config?: any; }