Remove outdated tests for CodexLens and LiteLLM client, refactor Smart Search MCP usage tests to use new command structure, and clean up unified vector index tests.

This commit is contained in:
catlog22
2026-03-18 11:35:51 +08:00
parent ad9d3f94e0
commit df69f997e4
45 changed files with 64 additions and 11170 deletions

View File

@@ -10,8 +10,8 @@ import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from '@modelcontextprotocol/sdk/types.js';
import { getAllToolSchemas, executeTool, executeToolWithProgress } from '../tools/index.js';
import type { ToolSchema, ToolResult } from '../types/tool.js';
import { getAllToolSchemas, executeTool } from '../tools/index.js';
import type { ToolSchema } from '../types/tool.js';
import { getProjectRoot, getAllowedDirectories, isSandboxEnabled } from '../utils/path-validator.js';
const SERVER_NAME = 'ccw-tools';
@@ -23,7 +23,7 @@ const ENV_ALLOWED_DIRS = 'CCW_ALLOWED_DIRS';
const STDIO_DISCONNECT_ERROR_CODES = new Set(['EPIPE', 'ERR_STREAM_DESTROYED']);
// Default enabled tools (core set - file operations, core memory, and smart search)
const DEFAULT_TOOLS: string[] = ['write_file', 'edit_file', 'read_file', 'read_many_files', 'read_outline', 'core_memory', 'smart_search'];
const DEFAULT_TOOLS: string[] = ['write_file', 'edit_file', 'read_file', 'read_many_files', 'read_outline', 'core_memory'];
/**
* Get list of enabled tools from environment or defaults
@@ -151,19 +151,7 @@ function createServer(): Server {
}
try {
// For smart_search init action, use progress-aware execution
const isInitAction = name === 'smart_search' && args?.action === 'init';
let result: ToolResult;
if (isInitAction) {
// Execute with progress callback that writes to stderr
result = await executeToolWithProgress(name, args || {}, (progress) => {
// Output progress to stderr (visible in terminal, doesn't interfere with JSON-RPC)
console.error(`[Progress] ${progress.percent}% - ${progress.message}`);
});
} else {
result = await executeTool(name, args || {});
}
const result = await executeTool(name, args || {});
if (!result.success) {
return {