mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: 添加对 OpenCode 的支持,更新 CLI 工具配置和会话发现逻辑
This commit is contained in:
@@ -96,7 +96,7 @@ import {
|
||||
|
||||
// Define Zod schema for validation
|
||||
const ParamsSchema = z.object({
|
||||
tool: z.enum(['gemini', 'qwen', 'codex']),
|
||||
tool: z.enum(['gemini', 'qwen', 'codex', 'opencode']),
|
||||
prompt: z.string().min(1, 'Prompt is required'),
|
||||
mode: z.enum(['analysis', 'write', 'auto']).default('analysis'),
|
||||
format: z.enum(['plain', 'yaml', 'json']).default('plain'), // Multi-turn prompt concatenation format
|
||||
@@ -808,7 +808,7 @@ export {
|
||||
* Get status of all CLI tools
|
||||
*/
|
||||
export async function getCliToolsStatus(): Promise<Record<string, ToolAvailability>> {
|
||||
const tools = ['gemini', 'qwen', 'codex', 'claude'];
|
||||
const tools = ['gemini', 'qwen', 'codex', 'claude', 'opencode'];
|
||||
const results: Record<string, ToolAvailability> = {};
|
||||
|
||||
await Promise.all(tools.map(async (tool) => {
|
||||
@@ -823,7 +823,8 @@ const CLI_TOOL_PACKAGES: Record<string, string> = {
|
||||
gemini: '@google/gemini-cli',
|
||||
qwen: '@qwen-code/qwen-code',
|
||||
codex: '@openai/codex',
|
||||
claude: '@anthropic-ai/claude-code'
|
||||
claude: '@anthropic-ai/claude-code',
|
||||
opencode: 'opencode' // https://opencode.ai - installed via npm/pnpm/bun/brew
|
||||
};
|
||||
|
||||
// Disabled tools storage (in-memory fallback, main storage is in cli-config.json)
|
||||
|
||||
Reference in New Issue
Block a user