feat(omo): add i18n support and tooltips for agent/category descriptions

This commit is contained in:
YoVinchen
2026-02-11 16:36:10 +08:00
parent 300abc31a7
commit d9f380d0fd
5 changed files with 196 additions and 50 deletions
@@ -21,6 +21,7 @@ import {
Settings,
FolderInput,
Loader2,
HelpCircle,
} from "lucide-react";
import { cn } from "@/lib/utils";
import { toast } from "sonner";
@@ -56,7 +57,7 @@ interface OmoFormFieldsProps {
type CustomModelItem = { key: string; model: string };
type BuiltinModelDef = Pick<
OmoAgentDef | OmoCategoryDef,
"key" | "display" | "descZh" | "descEn" | "recommended"
"key" | "display" | "descKey" | "recommended" | "tooltipKey"
>;
type ModelOption = { value: string; label: string };
@@ -119,8 +120,7 @@ export function OmoFormFields({
otherFieldsStr,
onOtherFieldsStrChange,
}: OmoFormFieldsProps) {
const { t, i18n } = useTranslation();
const isZh = i18n.language?.startsWith("zh");
const { t } = useTranslation();
const [mainAgentsOpen, setMainAgentsOpen] = useState(true);
const [subAgentsOpen, setSubAgentsOpen] = useState(true);
@@ -641,9 +641,17 @@ export function OmoFormFields({
<div key={key} className="border-b border-border/30 last:border-b-0">
<div className="flex items-center gap-2 py-1.5">
<div className="w-32 shrink-0">
<div className="text-sm font-medium">{def.display}</div>
<div className="flex items-center gap-1 text-sm font-medium">
{def.display}
<span className="relative inline-flex group/tip">
<HelpCircle className="h-3.5 w-3.5 text-muted-foreground/60 hover:text-muted-foreground cursor-help shrink-0" />
<span className="invisible opacity-0 group-hover/tip:visible group-hover/tip:opacity-100 transition-opacity duration-150 absolute left-0 top-full mt-1 z-50 w-[260px] rounded-md bg-popover text-popover-foreground border border-border shadow-md px-3 py-2 text-xs leading-relaxed font-normal pointer-events-none">
{t(def.tooltipKey)}
</span>
</span>
</div>
<div className="text-xs text-muted-foreground truncate">
{isZh ? def.descZh : def.descEn}
{t(def.descKey)}
</div>
</div>
{renderModelSelect(
+47 -1
View File
@@ -1618,6 +1618,52 @@
"advancedExperimental": "Experimental Features",
"advancedBackgroundTask": "Background Tasks",
"advancedBrowserAutomation": "Browser Automation",
"advancedClaudeCode": "Claude Code"
"advancedClaudeCode": "Claude Code",
"agentDesc": {
"sisyphus": "Main orchestrator",
"hephaestus": "Autonomous deep worker",
"prometheus": "Strategic planner",
"atlas": "Task manager",
"oracle": "Strategic advisor",
"librarian": "Multi-repo researcher",
"explore": "Fast code search",
"multimodalLooker": "Media analyzer",
"metis": "Pre-plan analysis advisor",
"momus": "Plan reviewer",
"sisyphusJunior": "Delegated task executor"
},
"agentTooltip": {
"sisyphus": "Main orchestrator responsible for task planning, delegation and parallel execution. Uses extended thinking (32k budget) and drives workflows through TODO lists to ensure task completion.",
"atlas": "Main orchestrator (holds TODO list) responsible for task distribution and coordination during execution phase. Delegates to specialized agents rather than completing all work directly.",
"prometheus": "Strategic planner that collects requirements through interview mode and creates detailed work plans. Can only read/write Markdown files in .sisyphus/ directory, never writes code directly.",
"hephaestus": "Autonomous deep worker (\"legitimate craftsman\") inspired by AmpCode deep mode. Goal-oriented execution that launches 2-5 explore/librarian agents in parallel for research before taking action.",
"oracle": "Architecture decision and debugging advisor. Read-only consulting agent providing excellent logical reasoning and deep analysis. Cannot write files or delegate tasks.",
"librarian": "Multi-repository analysis and documentation retrieval expert. Deeply understands codebases and provides evidence-based answers. Excels at finding official documentation and open-source implementation examples.",
"explore": "Fast codebase exploration and context grep expert. Uses lightweight models for high-speed search. The scout for understanding code structure.",
"multimodalLooker": "Visual content expert that analyzes PDFs, images, charts and other non-text media, extracting information and insights from them.",
"metis": "Plan consultant that performs pre-analysis before planning. Identifies hidden intents, ambiguities and AI failure points to prevent over-engineering.",
"momus": "Plan reviewer that validates plan clarity, verifiability and completeness with high precision. Rejects and requests revisions until plans are perfect.",
"sisyphusJunior": "Category-generated executor, automatically created via category parameters. Focuses on executing assigned tasks and cannot re-delegate, preventing infinite delegation loops."
},
"categoryDesc": {
"visualEngineering": "Visual/frontend engineering",
"ultrabrain": "Ultra thinking",
"deep": "Deep work",
"artistry": "Creative/artistic",
"quick": "Quick response",
"unspecifiedLow": "General low tier",
"unspecifiedHigh": "General high tier",
"writing": "Writing"
},
"categoryTooltip": {
"visualEngineering": "Frontend and visual engineering category for UI/UX design, styling, animation and interface implementation. Defaults to Gemini 3 Pro model.",
"ultrabrain": "Deep logical reasoning category for complex architectural decisions requiring extensive analysis. Defaults to GPT-5.3 Codex ultra-high reasoning variant.",
"deep": "Deep autonomous problem-solving category with goal-oriented execution. Conducts thorough research before action, suitable for difficult problems requiring deep understanding.",
"artistry": "Highly creative and artistic task category that inspires novel ideas and creative solutions. Defaults to Gemini 3 Pro max variant.",
"quick": "Lightweight task category for single-file modifications, typo fixes, and simple adjustments. Defaults to Claude Haiku 4.5 fast model.",
"unspecifiedLow": "Uncategorized low-effort task category for tasks that don't fit other categories with small workload. Defaults to Claude Sonnet 4.5.",
"unspecifiedHigh": "Uncategorized high-effort task category for tasks that don't fit other categories with large workload. Defaults to Claude Opus 4.6 max variant.",
"writing": "Writing category for documentation, prose and technical writing. Defaults to Gemini 3 Flash fast generation model."
}
}
}
+47 -1
View File
@@ -1599,6 +1599,52 @@
"advancedExperimental": "実験的機能",
"advancedBackgroundTask": "バックグラウンドタスク",
"advancedBrowserAutomation": "ブラウザ自動化",
"advancedClaudeCode": "Claude Code"
"advancedClaudeCode": "Claude Code",
"agentDesc": {
"sisyphus": "メインオーケストレーター",
"hephaestus": "自律型ディープワーカー",
"prometheus": "戦略プランナー",
"atlas": "タスクマネージャー",
"oracle": "戦略アドバイザー",
"librarian": "マルチリポジトリ研究員",
"explore": "高速コード検索",
"multimodalLooker": "メディアアナライザー",
"metis": "計画前分析アドバイザー",
"momus": "プランレビュアー",
"sisyphusJunior": "委任タスクエグゼキューター"
},
"agentTooltip": {
"sisyphus": "メインオーケストレーター。タスクの計画、委任、並列実行を担当。拡張思考(32k バジェット)を使用し、TODO リストでワークフローを駆動してタスク完了を確保します。",
"atlas": "メインオーケストレーター(TODO リスト保持)。実行フェーズでのタスク配分と調整を担当。すべての作業を直接行うのではなく、専門エージェントに委任します。",
"prometheus": "戦略プランナー。インタビューモードで要件を収集し、詳細な作業計画を策定。.sisyphus/ ディレクトリ内の Markdown ファイルの読み書きのみ可能で、直接コードを書くことはありません。",
"hephaestus": "自律型ディープワーカー(「正当な職人」)。AmpCode ディープモードに着想を得た目標指向の実行を行い、行動前に 2-5 個の探索/ライブラリアンエージェントを並列起動して調査します。",
"oracle": "アーキテクチャ決定とデバッグのアドバイザー。読み取り専用のコンサルティングエージェントで、優れた論理的推論と深い分析を提供。ファイルの書き込みやタスクの委任はできません。",
"librarian": "マルチリポジトリ分析とドキュメント検索の専門家。コードベースを深く理解し、エビデンスに基づく回答を提供。公式ドキュメントやオープンソース実装例の検索に長けています。",
"explore": "高速コードベース探索とコンテキスト grep の専門家。軽量モデルを使用した高速検索で、コード構造を理解するための先鋒です。",
"multimodalLooker": "ビジュアルコンテンツの専門家。PDF、画像、グラフなどの非テキストメディアを分析し、情報とインサイトを抽出します。",
"metis": "プランコンサルタント。計画前に事前分析を行い、隠れた意図、曖昧な点、AI の失敗ポイントを特定して、過剰エンジニアリングを防止します。",
"momus": "プランレビュアー。計画の明確さ、検証可能性、完全性を高精度で検証。計画が完璧になるまで却下と修正を要求します。",
"sisyphusJunior": "カテゴリ生成のエグゼキューター。category パラメータにより自動生成され、割り当てられたタスクの実行に専念し、再委任はできません。無限委任ループを防止します。"
},
"categoryDesc": {
"visualEngineering": "ビジュアル/フロントエンド工学",
"ultrabrain": "超深度思考",
"deep": "ディープワーク",
"artistry": "クリエイティブ/芸術",
"quick": "クイックレスポンス",
"unspecifiedLow": "汎用ロースペック",
"unspecifiedHigh": "汎用ハイスペック",
"writing": "ライティング"
},
"categoryTooltip": {
"visualEngineering": "フロントエンドとビジュアルエンジニアリングカテゴリ。UI/UX デザイン、スタイリング、アニメーション、インターフェース実装に特化。デフォルトで Gemini 3 Pro モデルを使用。",
"ultrabrain": "ディープロジック推論カテゴリ。広範な分析が必要な複雑なアーキテクチャ決定に使用。デフォルトで GPT-5.3 Codex の超高推論バリアントを使用。",
"deep": "ディープ自律問題解決カテゴリ。目標指向の実行で、行動前に徹底的な調査を実施。深い理解が必要な難問に適しています。",
"artistry": "高度にクリエイティブで芸術的なタスクカテゴリ。斬新なアイデアとクリエイティブなソリューションを促進。デフォルトで Gemini 3 Pro の max バリアントを使用。",
"quick": "軽量タスクカテゴリ。単一ファイルの修正、タイポ修正、簡単な調整などの些細な作業に使用。デフォルトで Claude Haiku 4.5 高速モデルを使用。",
"unspecifiedLow": "未分類の低作業量タスクカテゴリ。他のカテゴリに該当せず作業量が小さいタスクに適用。デフォルトで Claude Sonnet 4.5 を使用。",
"unspecifiedHigh": "未分類の高作業量タスクカテゴリ。他のカテゴリに該当せず作業量が大きいタスクに適用。デフォルトで Claude Opus 4.6 の max バリアントを使用。",
"writing": "ライティングカテゴリ。ドキュメント、散文、技術文書に特化。デフォルトで Gemini 3 Flash 高速生成モデルを使用。"
}
}
}
+47 -1
View File
@@ -1618,6 +1618,52 @@
"advancedExperimental": "实验性功能",
"advancedBackgroundTask": "后台任务",
"advancedBrowserAutomation": "浏览器自动化",
"advancedClaudeCode": "Claude Code"
"advancedClaudeCode": "Claude Code",
"agentDesc": {
"sisyphus": "主编排者",
"hephaestus": "自主深度工作者",
"prometheus": "战略规划者",
"atlas": "任务管理者",
"oracle": "战略顾问",
"librarian": "多仓库研究员",
"explore": "快速代码搜索",
"multimodalLooker": "媒体分析器",
"metis": "规划前分析顾问",
"momus": "计划审查者",
"sisyphusJunior": "委托任务执行器"
},
"agentTooltip": {
"sisyphus": "主编排器,负责任务规划、委派与并行执行,使用扩展思考(32k 预算),通过 TODO 驱动工作流确保任务完成。",
"atlas": "主编排器(持有 TODO 列表),负责执行阶段的任务分发与协调,不直接完成所有工作而是委派给专业代理。",
"prometheus": "战略规划师,通过访谈模式收集需求并制定详细工作计划,仅能在 .sisyphus/ 目录读写 Markdown 文件,从不直接写代码。",
"hephaestus": "自主深度工作者(「合法工匠」),受 AmpCode 深度模式启发,目标导向执行,行动前会并行启动 2-5 个探索/图书管理员代理进行研究。",
"oracle": "架构决策与调试顾问,只读咨询代理,提供出色的逻辑推理和深度分析,不能写文件或委派任务。",
"librarian": "多仓库分析与文档检索专家,深度理解代码库并提供基于证据的答案,擅长查找官方文档和开源实现示例。",
"explore": "快速代码库探索与上下文 grep 专家,使用轻量级模型进行高速搜索,是理解代码结构的先锋。",
"multimodalLooker": "视觉内容专家,分析 PDF、图片、图表等非文本媒体,提取其中的信息与洞察。",
"metis": "计划顾问,在规划前进行预分析,识别隐藏意图、模糊点和 AI 失败点,防止过度工程化。",
"momus": "计划评审员,高精度验证计划的清晰度、可验证性和完整性,拒绝并要求修订直到计划完美。",
"sisyphusJunior": "类别生成的执行器,由 category 参数自动生成,专注于执行分配的任务且不能再委派,防止无限委派循环。"
},
"categoryDesc": {
"visualEngineering": "视觉/前端工程",
"ultrabrain": "超级思考",
"deep": "深度工作",
"artistry": "创意/文艺",
"quick": "快速响应",
"unspecifiedLow": "通用低配",
"unspecifiedHigh": "通用高配",
"writing": "写作"
},
"categoryTooltip": {
"visualEngineering": "前端与视觉工程类别,专注于 UI/UX 设计、样式、动画和界面实现,默认使用 Gemini 3 Pro 模型。",
"ultrabrain": "深度逻辑推理类别,用于需要广泛分析的复杂架构决策,默认使用 GPT-5.3 Codex 的超高推理变体。",
"deep": "深度自主问题解决类别,目标导向执行,行动前进行彻底研究,适用于需要深度理解的棘手问题。",
"artistry": "高度创意与艺术性任务类别,激发新颖想法和创造性解决方案,默认使用 Gemini 3 Pro 的最大变体。",
"quick": "轻量任务类别,用于单文件修改、错别字修复、简单调整等琐碎工作,默认使用 Claude Haiku 4.5 快速模型。",
"unspecifiedLow": "未归类低工作量任务类别,适用于不适合其他类别且工作量较小的任务,默认使用 Claude Sonnet 4.5。",
"unspecifiedHigh": "未归类高工作量任务类别,适用于不适合其他类别且工作量较大的任务,默认使用 Claude Opus 4.6 的最大变体。",
"writing": "写作类别,专注于文档、散文和技术写作,默认使用 Gemini 3 Flash 快速生成模型。"
}
}
}
+42 -42
View File
@@ -27,8 +27,8 @@ export interface OmoLocalFileData {
export interface OmoAgentDef {
key: string;
display: string;
descZh: string;
descEn: string;
descKey: string;
tooltipKey: string;
recommended?: string;
group: "main" | "sub";
}
@@ -36,8 +36,8 @@ export interface OmoAgentDef {
export interface OmoCategoryDef {
key: string;
display: string;
descZh: string;
descEn: string;
descKey: string;
tooltipKey: string;
recommended?: string;
}
@@ -45,88 +45,88 @@ export const OMO_BUILTIN_AGENTS: OmoAgentDef[] = [
{
key: "sisyphus",
display: "Sisyphus",
descZh: "主编排者",
descEn: "Main orchestrator",
descKey: "omo.agentDesc.sisyphus",
tooltipKey: "omo.agentTooltip.sisyphus",
recommended: "claude-opus-4-6",
group: "main",
},
{
key: "hephaestus",
display: "Hephaestus",
descZh: "自主深度工作者",
descEn: "Autonomous deep worker",
descKey: "omo.agentDesc.hephaestus",
tooltipKey: "omo.agentTooltip.hephaestus",
recommended: "gpt-5.3-codex",
group: "main",
},
{
key: "prometheus",
display: "Prometheus",
descZh: "战略规划者",
descEn: "Strategic planner",
descKey: "omo.agentDesc.prometheus",
tooltipKey: "omo.agentTooltip.prometheus",
recommended: "claude-opus-4-6",
group: "main",
},
{
key: "atlas",
display: "Atlas",
descZh: "任务管理者",
descEn: "Task manager",
descKey: "omo.agentDesc.atlas",
tooltipKey: "omo.agentTooltip.atlas",
recommended: "kimi-k2.5",
group: "main",
},
{
key: "oracle",
display: "Oracle",
descZh: "战略顾问",
descEn: "Strategic advisor",
descKey: "omo.agentDesc.oracle",
tooltipKey: "omo.agentTooltip.oracle",
recommended: "gpt-5.3",
group: "sub",
},
{
key: "librarian",
display: "Librarian",
descZh: "多仓库研究员",
descEn: "Multi-repo researcher",
descKey: "omo.agentDesc.librarian",
tooltipKey: "omo.agentTooltip.librarian",
recommended: "glm-4.7",
group: "sub",
},
{
key: "explore",
display: "Explore",
descZh: "快速代码搜索",
descEn: "Fast code search",
descKey: "omo.agentDesc.explore",
tooltipKey: "omo.agentTooltip.explore",
recommended: "grok-code-fast-1",
group: "sub",
},
{
key: "multimodal-looker",
display: "Multimodal-Looker",
descZh: "媒体分析器",
descEn: "Media analyzer",
descKey: "omo.agentDesc.multimodalLooker",
tooltipKey: "omo.agentTooltip.multimodalLooker",
recommended: "gemini-3-flash",
group: "sub",
},
{
key: "metis",
display: "Metis",
descZh: "规划前分析顾问",
descEn: "Pre-plan analysis advisor",
descKey: "omo.agentDesc.metis",
tooltipKey: "omo.agentTooltip.metis",
recommended: "claude-opus-4-6",
group: "sub",
},
{
key: "momus",
display: "Momus",
descZh: "计划审查者",
descEn: "Plan reviewer",
descKey: "omo.agentDesc.momus",
tooltipKey: "omo.agentTooltip.momus",
recommended: "gpt-5.3",
group: "sub",
},
{
key: "sisyphus-junior",
display: "Sisyphus-Junior",
descZh: "委托任务执行器",
descEn: "Delegated task executor",
descKey: "omo.agentDesc.sisyphusJunior",
tooltipKey: "omo.agentTooltip.sisyphusJunior",
group: "sub",
},
];
@@ -135,57 +135,57 @@ export const OMO_BUILTIN_CATEGORIES: OmoCategoryDef[] = [
{
key: "visual-engineering",
display: "Visual Engineering",
descZh: "视觉/前端工程",
descEn: "Visual/frontend engineering",
descKey: "omo.categoryDesc.visualEngineering",
tooltipKey: "omo.categoryTooltip.visualEngineering",
recommended: "gemini-3-pro",
},
{
key: "ultrabrain",
display: "Ultrabrain",
descZh: "超级思考",
descEn: "Ultra thinking",
descKey: "omo.categoryDesc.ultrabrain",
tooltipKey: "omo.categoryTooltip.ultrabrain",
recommended: "claude-opus-4-6",
},
{
key: "deep",
display: "Deep",
descZh: "深度工作",
descEn: "Deep work",
descKey: "omo.categoryDesc.deep",
tooltipKey: "omo.categoryTooltip.deep",
recommended: "gpt-5.3-codex",
},
{
key: "artistry",
display: "Artistry",
descZh: "创意/文艺",
descEn: "Creative/artistic",
descKey: "omo.categoryDesc.artistry",
tooltipKey: "omo.categoryTooltip.artistry",
recommended: "claude-opus-4-6",
},
{
key: "quick",
display: "Quick",
descZh: "快速响应",
descEn: "Quick response",
descKey: "omo.categoryDesc.quick",
tooltipKey: "omo.categoryTooltip.quick",
recommended: "gemini-3-flash",
},
{
key: "unspecified-low",
display: "Unspecified Low",
descZh: "通用低配",
descEn: "General low tier",
descKey: "omo.categoryDesc.unspecifiedLow",
tooltipKey: "omo.categoryTooltip.unspecifiedLow",
recommended: "gemini-3-flash",
},
{
key: "unspecified-high",
display: "Unspecified High",
descZh: "通用高配",
descEn: "General high tier",
descKey: "omo.categoryDesc.unspecifiedHigh",
tooltipKey: "omo.categoryTooltip.unspecifiedHigh",
recommended: "gpt-5.3-codex",
},
{
key: "writing",
display: "Writing",
descZh: "写作",
descEn: "Writing",
descKey: "omo.categoryDesc.writing",
tooltipKey: "omo.categoryTooltip.writing",
recommended: "claude-opus-4-6",
},
];