feat: 添加规划笔记功能以支持任务生成和约束管理

This commit is contained in:
catlog22
2026-01-27 23:16:01 +08:00
parent a3b303d8e3
commit 1b6ace0447
7 changed files with 274 additions and 28 deletions

View File

@@ -33,6 +33,11 @@ export interface ClaudeCliTool {
enabled: boolean;
primaryModel?: string;
secondaryModel?: string;
/**
* Available models for this tool (shown in UI dropdown)
* If not provided, defaults will be used based on tool type
*/
availableModels?: string[];
tags: string[];
/**
* Tool type determines routing:
@@ -122,12 +127,13 @@ export interface ClaudeCliCombinedConfig extends ClaudeCliToolsConfig {
// ========== Default Config ==========
const DEFAULT_TOOLS_CONFIG: ClaudeCliToolsConfig = {
version: '3.3.0',
version: '3.4.0',
tools: {
gemini: {
enabled: true,
primaryModel: 'gemini-2.5-pro',
secondaryModel: 'gemini-2.5-flash',
availableModels: ['gemini-2.5-pro', 'gemini-2.5-flash', 'gemini-2.0-flash', 'gemini-2.0-flash-thinking', 'gemini-1.5-pro'],
tags: [],
type: 'builtin'
},
@@ -135,6 +141,7 @@ const DEFAULT_TOOLS_CONFIG: ClaudeCliToolsConfig = {
enabled: true,
primaryModel: 'coder-model',
secondaryModel: 'coder-model',
availableModels: ['coder-model', 'vision-model', 'qwen-2.5-coder', 'qwen-2.5-72b'],
tags: [],
type: 'builtin'
},
@@ -142,6 +149,7 @@ const DEFAULT_TOOLS_CONFIG: ClaudeCliToolsConfig = {
enabled: true,
primaryModel: 'gpt-5.2',
secondaryModel: 'gpt-5.2',
availableModels: ['gpt-5.2', 'gpt-5', 'gpt5-codex', 'o3', 'o1'],
tags: [],
type: 'builtin'
},
@@ -149,6 +157,7 @@ const DEFAULT_TOOLS_CONFIG: ClaudeCliToolsConfig = {
enabled: true,
primaryModel: 'sonnet',
secondaryModel: 'haiku',
availableModels: ['opus', 'sonnet', 'haiku'],
tags: [],
type: 'builtin'
},
@@ -156,6 +165,7 @@ const DEFAULT_TOOLS_CONFIG: ClaudeCliToolsConfig = {
enabled: true,
primaryModel: 'opencode/glm-4.7-free',
secondaryModel: 'opencode/glm-4.7-free',
availableModels: ['opencode/glm-4.7-free', 'opencode/deepseek-v3-free'],
tags: [],
type: 'builtin'
}
@@ -1098,6 +1108,7 @@ export function updateToolConfig(
enabled: boolean;
primaryModel: string;
secondaryModel: string;
availableModels: string[];
tags: string[];
envFile: string | null;
}>
@@ -1114,6 +1125,9 @@ export function updateToolConfig(
if (updates.secondaryModel !== undefined) {
config.tools[tool].secondaryModel = updates.secondaryModel;
}
if (updates.availableModels !== undefined) {
config.tools[tool].availableModels = updates.availableModels;
}
if (updates.tags !== undefined) {
config.tools[tool].tags = updates.tags;
}