import GooseLogo from './GooseLogo'; import AnimatedIcons from './AnimatedIcons'; import FlyingBird from './FlyingBird'; import { ChatState } from '../types/chatState'; interface LoadingGooseProps { message?: string; chatState?: ChatState; } const STATE_MESSAGES: Record = { [ChatState.LoadingConversation]: 'loading conversation...', [ChatState.Thinking]: 'goose is thinking…', [ChatState.Streaming]: 'goose is working on it…', [ChatState.WaitingForUserInput]: 'goose is waiting…', [ChatState.Compacting]: 'goose is compacting the conversation...', [ChatState.Idle]: 'goose is working on it…', }; const STATE_ICONS: Record = { [ChatState.LoadingConversation]: , [ChatState.Thinking]: , [ChatState.Streaming]: , [ChatState.WaitingForUserInput]: ( ), [ChatState.Compacting]: , [ChatState.Idle]: , }; const LoadingGoose = ({ message, chatState = ChatState.Idle }: LoadingGooseProps) => { const displayMessage = message || STATE_MESSAGES[chatState]; const icon = STATE_ICONS[chatState]; return (
{icon} {displayMessage}
); }; export default LoadingGoose;