feat(docs): 添加技能/团队命令对比表和代码审查报告

This commit is contained in:
catlog22
2026-03-01 21:01:26 +08:00
parent 8c953b287d
commit ffe3b427ce
3 changed files with 497 additions and 1 deletions

View File

@@ -96,7 +96,30 @@ export async function handler(params: Record<string, unknown>): Promise<ToolResu
const cwd = getProjectRoot();
// Normalize paths to array
const inputPaths = Array.isArray(paths) ? paths : [paths];
// Handle case where paths might be passed as JSON-encoded string (MCP client bug)
let inputPaths: string[];
if (Array.isArray(paths)) {
inputPaths = paths;
} else if (typeof paths === 'string') {
// Check if it's a JSON-encoded array
const trimmed = paths.trim();
if (trimmed.startsWith('[') && trimmed.endsWith(']')) {
try {
const parsed = JSON.parse(trimmed);
if (Array.isArray(parsed)) {
inputPaths = parsed;
} else {
inputPaths = [paths];
}
} catch {
inputPaths = [paths];
}
} else {
inputPaths = [paths];
}
} else {
inputPaths = [String(paths)];
}
// Collect all files to read
const allFiles: string[] = [];