mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-02 15:23:19 +08:00
Add comprehensive tests for vector/semantic search functionality
- Implement full coverage tests for Embedder model loading and embedding generation - Add CRUD operations and caching tests for VectorStore - Include cosine similarity computation tests - Validate semantic search accuracy and relevance through various queries - Establish performance benchmarks for embedding and search operations - Ensure edge cases and error handling are covered - Test thread safety and concurrent access scenarios - Verify availability of semantic search dependencies
This commit is contained in:
@@ -9,6 +9,7 @@ import { readdirSync, statSync, existsSync, readFileSync, mkdirSync, writeFileSy
|
||||
import { join, resolve, basename, extname, relative } from 'path';
|
||||
import { execSync } from 'child_process';
|
||||
import { tmpdir } from 'os';
|
||||
import { getSecondaryModel } from './cli-config-manager.js';
|
||||
|
||||
// Directories to exclude
|
||||
const EXCLUDE_DIRS = [
|
||||
@@ -266,8 +267,15 @@ export async function handler(params: Record<string, unknown>): Promise<ToolResu
|
||||
return { success: false, error: `Not a directory: ${targetPath}` };
|
||||
}
|
||||
|
||||
// Set model
|
||||
const actualModel = model || DEFAULT_MODELS[tool] || DEFAULT_MODELS.gemini;
|
||||
// Set model (use secondaryModel from config for internal calls)
|
||||
let actualModel = model;
|
||||
if (!actualModel) {
|
||||
try {
|
||||
actualModel = getSecondaryModel(process.cwd(), tool);
|
||||
} catch {
|
||||
actualModel = DEFAULT_MODELS[tool] || DEFAULT_MODELS.gemini;
|
||||
}
|
||||
}
|
||||
|
||||
// Scan directory
|
||||
const { info: structureInfo, folderType } = scanDirectoryStructure(targetPath);
|
||||
|
||||
Reference in New Issue
Block a user