/** Canned dialogue for the simulation — Claude Code flavoured. */

export const TOOLS = [
  "Read",
  "Grep",
  "Glob",
  "Edit",
  "Write",
  "Bash",
  "WebFetch",
  "WebSearch",
] as const;

export const SUB_TOOLS = ["Read", "Grep", "Glob", "Bash", "WebFetch"] as const;

export const TASK_NAMES = [
  "重構登入流程",
  "修 CI 紅燈",
  "寫整合測試",
  "調查記憶體洩漏",
  "升級依賴套件",
  "優化查詢效能",
  "補齊 API 文件",
  "審查 PR #42",
];

export const DONE_PHRASES = [
  "任務完成 ✓",
  "測試全部通過了",
  "找到問題根源了",
  "PR 已送出審查",
  "重構完成,行為不變",
  "報告整理好了",
  "已修復並驗證",
  "文件更新完畢",
];

export const SUB_DONE_PHRASES = [
  "搜尋結果回報完畢",
  "找到 3 個相關檔案",
  "分析完成,回報中",
  "子任務完成 ✓",
];

export const MEETING_PHRASES = [
  "這個介面要先定好",
  "我來負責前半段",
  "分工沒問題",
  "先對齊資料格式",
  "衝突我來解",
  "就這樣執行吧",
];

export const AGENT_NAMES = ["Fable", "Opus", "Sonnet", "Haiku", "Muse", "Sage"];

export const AGENT_MODELS: Record<string, string> = {
  Fable: "claude-fable-5",
  Opus: "claude-opus-4-8",
  Sonnet: "claude-sonnet-5",
  Haiku: "claude-haiku-4-5",
  Muse: "claude-sonnet-5",
  Sage: "claude-opus-4-8",
};

export const SUB_AGENT_KINDS = ["Explore", "Plan", "Review", "Research", "Test"];

export function pick<T>(arr: readonly T[]): T {
  return arr[Math.floor(Math.random() * arr.length)];
}

export function rand(min: number, max: number): number {
  return min + Math.random() * (max - min);
}
