import type {
  AgentStatus,
  FlueConversationMessage,
  FlueConversationPart,
} from "@flue/react";

export interface ChatAgentState {
  error?: Error;
  historyReady: boolean;
  messages: FlueConversationMessage[];
  sendMessage: (message: string) => Promise<void>;
  status: AgentStatus;
}

export interface ChatComposerProps {
  error?: Error;
  onSend: (message: string) => Promise<void>;
  status: AgentStatus;
}

export interface ChatConversationProps {
  historyReady: boolean;
  messages: FlueConversationMessage[];
  onSuggestion: (suggestion: string) => void;
  status: AgentStatus;
}

export interface ChatHeaderProps {
  status: AgentStatus;
}

export interface ChatMessageProps {
  message: FlueConversationMessage;
}

export interface ChatToolCallProps {
  part: Extract<FlueConversationPart, { type: "dynamic-tool" }>;
}

export type AssistantResponseState = "thinking" | "writing";
