forked from agents/opencode
merge upstream
This commit is contained in:
+4
-1
@@ -1,7 +1,10 @@
|
|||||||
node_modules
|
node_modules
|
||||||
package.json
|
package.json
|
||||||
|
package-lock.json
|
||||||
bun.lock
|
bun.lock
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
.env
|
|
||||||
|
oh-my-openagent.json
|
||||||
|
oh-my-openagent.jsonc
|
||||||
|
|||||||
@@ -28,4 +28,21 @@
|
|||||||
| `CONTEXT7_API_KEY` | 否 | [Context7](https://context7.com) 文档查询,提供库文档检索,不配则使用默认额度 |
|
| `CONTEXT7_API_KEY` | 否 | [Context7](https://context7.com) 文档查询,提供库文档检索,不配则使用默认额度 |
|
||||||
| `OPENCODE_GIT_BASH_PATH` | 否 | Windows 用户需指定 Git Bash 路径,否则工具调用可能异常 |
|
| `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`
|
||||||
|
|||||||
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
-21
@@ -53,27 +53,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"google": {
|
// "google": {
|
||||||
"npm": "@ai-sdk/google",
|
// "npm": "@ai-sdk/google",
|
||||||
"options": {
|
// "options": {
|
||||||
"baseURL": "{env:AI_GATEWAY_BASE_URL}/v1beta",
|
// "baseURL": "{env:AI_GATEWAY_BASE_URL}/v1beta",
|
||||||
"apiKey": "{env:AI_GATEWAY_API_KEY}"
|
// "apiKey": "{env:AI_GATEWAY_API_KEY}"
|
||||||
},
|
// },
|
||||||
"models": {
|
// "models": {
|
||||||
"gemini-3.1-pro-preview": {
|
// "gemini-3.1-pro-preview": {
|
||||||
"name": "Gemini 3.1 Pro",
|
// "name": "Gemini 3.1 Pro",
|
||||||
"reasoning": true,
|
// "reasoning": true,
|
||||||
"modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] },
|
// "modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] },
|
||||||
"limit": { "context": 1048576, "output": 65536 }
|
// "limit": { "context": 1048576, "output": 65536 }
|
||||||
},
|
// },
|
||||||
"gemini-3-flash-preview": {
|
// "gemini-3-flash-preview": {
|
||||||
"name": "Gemini 3 Flash",
|
// "name": "Gemini 3 Flash",
|
||||||
"reasoning": true,
|
// "reasoning": true,
|
||||||
"modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] },
|
// "modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] },
|
||||||
"limit": { "context": 1048576, "output": 65536 }
|
// "limit": { "context": 1048576, "output": 65536 }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
"ai-gateway": {
|
"ai-gateway": {
|
||||||
"name": "AI Gateway",
|
"name": "AI Gateway",
|
||||||
"npm": "@ai-sdk/openai-compatible",
|
"npm": "@ai-sdk/openai-compatible",
|
||||||
|
|||||||
Reference in New Issue
Block a user