feat: 更新工具列表,支持 .ccw 目录的安装和升级,调整相关路径

This commit is contained in:
catlog22
2026-02-07 23:51:26 +08:00
parent 50570a9820
commit b22298d868
11 changed files with 100 additions and 30 deletions

View File

@@ -948,10 +948,10 @@ export function updateCodeIndexMcp(
// Only update global CLAUDE.md (consistent with Chinese response / Windows platform)
const globalClaudeMdPath = path.join(os.homedir(), '.claude', 'CLAUDE.md');
// Define patterns for all formats
const codexlensPattern = /@~\/\.claude\/workflows\/context-tools\.md/g;
const acePattern = /@~\/\.claude\/workflows\/context-tools-ace\.md/g;
const nonePattern = /@~\/\.claude\/workflows\/context-tools-none\.md/g;
// Define patterns for all formats (match both old .claude and new .ccw paths)
const codexlensPattern = /@~\/\.(?:claude|ccw)\/workflows\/context-tools\.md/g;
const acePattern = /@~\/\.(?:claude|ccw)\/workflows\/context-tools-ace\.md/g;
const nonePattern = /@~\/\.(?:claude|ccw)\/workflows\/context-tools-none\.md/g;
// Determine target file based on provider
const targetFile = provider === 'ace'