diff --git a/.gitignore b/.gitignore index 7e77c63..25ca110 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ node_modules package.json +package-lock.json bun.lock .DS_Store Thumbs.db -.env + +oh-my-openagent.json +oh-my-openagent.jsonc diff --git a/README.md b/README.md index fa7f494..f54a29d 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,21 @@ | `CONTEXT7_API_KEY` | 否 | [Context7](https://context7.com) 文档查询,提供库文档检索,不配则使用默认额度 | | `OPENCODE_GIT_BASH_PATH` | 否 | Windows 用户需指定 Git Bash 路径,否则工具调用可能异常 | -4. 运行 `opencode` +4. 选择 oh-my-openagent 配置 + + 项目提供了多套 [oh-my-openagent](https://github.com/code-yeongyu/oh-my-openagent) 预设配置,通过符号链接切换: + + | 文件 | 说明 | + |------|------| + | `oh-my-openagent.claude.jsonc` | 主力 agent 使用 Claude 系列模型 | + | `oh-my-openagent.gpt.jsonc` | 主力 agent 使用 GPT 系列模型 | + + ```bash + # 使用 Claude 配置(默认) + ln -sf oh-my-openagent.claude.jsonc oh-my-openagent.jsonc + + # 使用 GPT 配置 + ln -sf oh-my-openagent.gpt.jsonc oh-my-openagent.jsonc + ``` + +5. 运行 `opencode` diff --git a/oh-my-openagent.jsonc b/oh-my-openagent.claude.jsonc similarity index 100% rename from oh-my-openagent.jsonc rename to oh-my-openagent.claude.jsonc diff --git a/oh-my-openagent.gpt.jsonc b/oh-my-openagent.gpt.jsonc new file mode 100644 index 0000000..f2df123 --- /dev/null +++ b/oh-my-openagent.gpt.jsonc @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json", + "agents": { + "sisyphus": { "model": "openai/gpt-5.4", "variant": "medium" }, + "hephaestus": { "model": "openai/gpt-5.4", "variant": "medium" }, + "oracle": { "model": "openai/gpt-5.4", "variant": "high" }, + "librarian": { "model": "ai-gateway/minimax-m2.7" }, + "explore": { "model": "ai-gateway/minimax-m2.7" }, + "multimodal-looker": { "model": "openai/gpt-5.4", "variant": "medium" }, + "prometheus": { "model": "openai/gpt-5.4", "variant": "high" }, + "metis": { "model": "openai/gpt-5.4", "variant": "high" }, + "momus": { "model": "openai/gpt-5.4", "variant": "xhigh" }, + "atlas": { "model": "ai-gateway/kimi-k2p5-turbo" }, + "sisyphus-junior": { "model": "ai-gateway/kimi-k2p5-turbo" } + }, + "categories": { + "visual-engineering": { "model": "ai-gateway/gemini-3.1-pro-preview", "variant": "high" }, + "ultrabrain": { "model": "openai/gpt-5.4", "variant": "xhigh" }, + "deep": { "model": "openai/gpt-5.4", "variant": "medium" }, + "artistry": { "model": "ai-gateway/gemini-3.1-pro-preview", "variant": "high" }, + "quick": { "model": "openai/gpt-5.4-mini" }, + "unspecified-low": { "model": "gpt-5.3-codex", "variant": "medium" }, + "unspecified-high": { "model": "openai/gpt-5.4", "variant": "high" }, + "writing": { "model": "ai-gateway/kimi-k2p5-turbo" } + }, + "experimental": { + "disable_omo_env": true, + "dynamic_context_pruning": { + "enabled": true, + "notification": "detailed", + "turn_protection": { + "enabled": true, + "turns": 3 + }, + "protected_tools": [ + "task", + "todowrite", + "todoread", + "lsp_rename", + "session_read", + "session_write", + "session_search" + ], + "strategies": { + "deduplication": { + "enabled": true + }, + "supersede_writes": { + "enabled": true, + "aggressive": false + }, + "purge_errors": { + "enabled": true, + "turns": 5 + } + } + } + }, + "git_master": { + "commit_footer": false, + "include_co_authored_by": false, + "git_env_prefix": "GIT_MASTER=1" + } +} diff --git a/opencode.jsonc b/opencode.jsonc index cde8412..552c8cc 100644 --- a/opencode.jsonc +++ b/opencode.jsonc @@ -53,27 +53,27 @@ } } }, - "google": { - "npm": "@ai-sdk/google", - "options": { - "baseURL": "{env:AI_GATEWAY_BASE_URL}/v1beta", - "apiKey": "{env:AI_GATEWAY_API_KEY}" - }, - "models": { - "gemini-3.1-pro-preview": { - "name": "Gemini 3.1 Pro", - "reasoning": true, - "modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] }, - "limit": { "context": 1048576, "output": 65536 } - }, - "gemini-3-flash-preview": { - "name": "Gemini 3 Flash", - "reasoning": true, - "modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] }, - "limit": { "context": 1048576, "output": 65536 } - } - } - }, + // "google": { + // "npm": "@ai-sdk/google", + // "options": { + // "baseURL": "{env:AI_GATEWAY_BASE_URL}/v1beta", + // "apiKey": "{env:AI_GATEWAY_API_KEY}" + // }, + // "models": { + // "gemini-3.1-pro-preview": { + // "name": "Gemini 3.1 Pro", + // "reasoning": true, + // "modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] }, + // "limit": { "context": 1048576, "output": 65536 } + // }, + // "gemini-3-flash-preview": { + // "name": "Gemini 3 Flash", + // "reasoning": true, + // "modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] }, + // "limit": { "context": 1048576, "output": 65536 } + // } + // } + // }, "ai-gateway": { "name": "AI Gateway", "npm": "@ai-sdk/openai-compatible",