feat: Refactor CLI tool configuration management and introduce skill context loader

- Updated `claude-cli-tools.ts` to support new model configurations and migration from older versions.
- Added `getPredefinedModels` and `getAllPredefinedModels` functions for better model management.
- Deprecated `cli-config-manager.ts` in favor of `claude-cli-tools.ts`, maintaining backward compatibility.
- Introduced `skill-context-loader.ts` to handle skill context loading based on user prompts and keywords.
- Enhanced tool configuration functions to include secondary models and improved migration logic.
- Updated index file to register the new skill context loader tool.
This commit is contained in:
catlog22
2026-01-11 13:56:20 +08:00
parent 2c11392848
commit 16083130f8
11 changed files with 1959 additions and 420 deletions

View File

@@ -1,42 +1,53 @@
{
"$schema": "./cli-tools.schema.json",
"version": "2.0.0",
"version": "3.0.0",
"models": {
"gemini": ["gemini-2.5-pro", "gemini-2.5-flash" ],
"qwen": ["coder-model", "vision-model" ],
"codex": ["gpt-5.2"],
"claude": ["sonnet", "opus", "haiku"],
"opencode": [
"opencode/glm-4.7-free",
"opencode/gpt-5-nano",
"opencode/grok-code",
"opencode/minimax-m2.1-free",
"anthropic/claude-sonnet-4-20250514",
"anthropic/claude-opus-4-20250514",
"openai/gpt-4.1",
"openai/o3",
"google/gemini-2.5-pro",
"google/gemini-2.5-flash"
]
},
"tools": {
"gemini": {
"enabled": true,
"isBuiltin": true,
"command": "gemini",
"description": "Google AI for code analysis",
"primaryModel": "gemini-2.5-pro",
"secondaryModel": "gemini-2.5-flash",
"tags": []
},
"qwen": {
"enabled": true,
"isBuiltin": true,
"command": "qwen",
"description": "Alibaba AI assistant",
"primaryModel": "coder-model",
"secondaryModel": "coder-model",
"tags": []
},
"codex": {
"enabled": true,
"isBuiltin": true,
"command": "codex",
"description": "OpenAI code generation",
"primaryModel": "gpt-5.2",
"secondaryModel": "gpt-5.2",
"tags": []
},
"claude": {
"enabled": true,
"isBuiltin": true,
"command": "claude",
"description": "Anthropic AI assistant",
"primaryModel": "sonnet",
"secondaryModel": "haiku",
"tags": []
},
"opencode": {
"enabled": true,
"isBuiltin": true,
"command": "opencode",
"description": "OpenCode AI assistant",
"primaryModel": "opencode/glm-4.7-free",
"tags": []
"secondaryModel": "opencode/glm-4.7-free",
"tags": ["分析"]
}
},
"customEndpoints": [
@@ -46,5 +57,6 @@
"enabled": true,
"tags": []
}
]
],
"$schema": "./cli-tools.schema.json"
}