terminal-chat-ui
Version:
Shared UI components for terminal-based chat interfaces using Theater actors
63 lines (62 loc) • 1.45 kB
TypeScript
/**
* Theater-specific utility functions
*/
import type { TheaterConfig, SetupStatus } from '../types/common.js';
/**
* Validate Theater configuration
*/
export declare function validateTheaterConfig(config: TheaterConfig): {
valid: boolean;
errors: string[];
};
/**
* Get setup status display information
*/
export declare function getSetupStatusInfo(status: SetupStatus): {
message: string;
color: string;
showSpinner: boolean;
} | {
message: string;
color: string;
showSpinner: boolean;
} | {
message: string;
color: string;
showSpinner: boolean;
} | {
message: string;
color: string;
showSpinner: boolean;
} | {
message: string;
color: string;
showSpinner: boolean;
} | {
message: string;
color: string;
showSpinner: boolean;
};
/**
* Parse Theater message from WebSocket
*/
export declare function parseTheaterMessage(rawMessage: any): any;
/**
* Extract message content from Theater message format
*/
export declare function extractMessageContent(parsedMessage: any): {
content: string;
isUserMessage: boolean;
toolBlocks: Array<{
name: string;
input: any;
}>;
};
/**
* Create default Theater configuration
*/
export declare function createDefaultTheaterConfig(overrides?: Partial<TheaterConfig>): TheaterConfig;
/**
* Generate unique actor ID
*/
export declare function generateActorId(prefix?: string): string;