export interface ToolCall {
  id: string;
  type?: string;
  function?: {
    name: string;
    arguments: string;
  };
  name: string;
}
export interface MsgResult {
  type?: string;
  text?: string;
  image_url?: MsgResultDict;
}
export interface MsgResultDict {
  url: string;
}

export interface MessageContent {
  text?: string;
  reasoning_content?: string;
  tool_calls?: ToolCall[];
  tool_name?: string;
  result?: string | MsgResult[];
}

export interface Message {
  id?: string;
  message_id?: string;
  goal_id?: string;
  role?: string;
  content?: string | MessageContent;
  description?: string;
  tokens?: number | null;
  parent_sequence?: number | null;
  sequence?: number | null;
}

export interface Edge {
  id: string;
  source: string;
  target: string;
  label?: string;
  content?: EdgeContent;
}

export interface EdgeContent {
  id: string;
  title: string;
  children?: EdgeContent[];
  data: Record<string, unknown>;
}
