feat(docs): add full documentation generation phase and related documentation generation phase

- Implement Phase 4: Full Documentation Generation with multi-layered strategy and tool fallback.
- Introduce Phase 5: Related Documentation Generation for incremental updates based on git changes.
- Create new utility components for displaying execution status in the terminal panel.
- Add helper functions for rendering execution status icons and formatting relative time.
- Establish a recent paths configuration for improved path resolution.
This commit is contained in:
catlog22
2026-02-13 21:46:28 +08:00
parent d750290f84
commit 25e27286b4
21 changed files with 692 additions and 498 deletions

View File

@@ -1191,8 +1191,8 @@ export async function handleMcpRoutes(ctx: RouteContext): Promise<boolean> {
return { error: 'projectPath is required', status: 400 };
}
// Check if sandbox should be disabled
const disableSandbox = body.disableSandbox === true;
// Check if sandbox should be enabled
const enableSandbox = body.enableSandbox === true;
// Parse enabled tools from request body
const enabledTools = Array.isArray(body.enabledTools) && body.enabledTools.length > 0
@@ -1207,7 +1207,7 @@ export async function handleMcpRoutes(ctx: RouteContext): Promise<boolean> {
args: isWin ? ["/c", "npx", "-y", "ccw-mcp"] : ["-y", "ccw-mcp"],
env: {
CCW_ENABLED_TOOLS: enabledTools,
...(disableSandbox && { CCW_DISABLE_SANDBOX: "1" })
...(enableSandbox && { CCW_ENABLE_SANDBOX: "1" })
}
};

View File

@@ -12,7 +12,7 @@ import {
} from '@modelcontextprotocol/sdk/types.js';
import { getAllToolSchemas, executeTool, executeToolWithProgress } from '../tools/index.js';
import type { ToolSchema, ToolResult } from '../types/tool.js';
import { getProjectRoot, getAllowedDirectories, isSandboxDisabled } from '../utils/path-validator.js';
import { getProjectRoot, getAllowedDirectories, isSandboxEnabled } from '../utils/path-validator.js';
const SERVER_NAME = 'ccw-tools';
const SERVER_VERSION = '6.2.0';
@@ -178,13 +178,14 @@ async function main(): Promise<void> {
// Log server start (to stderr to not interfere with stdio protocol)
const projectRoot = getProjectRoot();
const allowedDirs = getAllowedDirectories();
const sandboxDisabled = isSandboxDisabled();
const sandboxEnabled = isSandboxEnabled();
console.error(`${SERVER_NAME} v${SERVER_VERSION} started`);
console.error(`Project root: ${projectRoot}`);
if (sandboxDisabled) {
console.error(`Sandbox: DISABLED (CCW_DISABLE_SANDBOX=true)`);
} else {
if (sandboxEnabled) {
console.error(`Sandbox: ENABLED (CCW_ENABLE_SANDBOX=true)`);
console.error(`Allowed directories: ${allowedDirs.join(', ')}`);
} else {
console.error(`Sandbox: DISABLED (default)`);
}
if (!process.env[ENV_PROJECT_ROOT]) {
console.error(`[Warning] ${ENV_PROJECT_ROOT} not set, using process.cwd()`);