mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-13 02:41:50 +08:00
Refactor Codex Lens config handling and CLI tools status checks
- Updated Codex Lens config handler to extract embeddings data from the new response structure, including coverage percentage and total files with embeddings. - Enhanced CLI tools status function to handle different tool types (builtin, cli-wrapper, api-endpoint) with improved logic for checking availability based on configuration. - Removed obsolete test files and directories that are no longer needed.
This commit is contained in:
@@ -170,9 +170,13 @@ export async function handleCodexLensConfigRoutes(ctx: RouteContext): Promise<bo
|
||||
const indexedFiles = projectData.total_files || 0; // All indexed files have FTS
|
||||
|
||||
// Get embeddings data from index status
|
||||
const filesWithEmbeddings = embeddingsData?.files_with_embeddings || 0;
|
||||
// The response structure is: { total_indexes, indexes_with_embeddings, total_chunks, indexes: [{coverage_percent, total_files, ...}] }
|
||||
const indexesWithEmbeddings = embeddingsData?.indexes_with_embeddings || 0;
|
||||
const totalChunks = embeddingsData?.total_chunks || 0;
|
||||
const vectorPercent = embeddingsData?.coverage_percent || 0;
|
||||
// coverage_percent is in the indexes array - get the first one (for single project query)
|
||||
const indexEntry = embeddingsData?.indexes?.[0];
|
||||
const vectorPercent = indexEntry?.coverage_percent || 0;
|
||||
const filesWithEmbeddings = indexEntry?.total_files || 0;
|
||||
|
||||
// FTS percentage (all indexed files have FTS, so it's always 100% if indexed)
|
||||
const ftsPercent = totalFiles > 0 ? 100 : 0;
|
||||
|
||||
Reference in New Issue
Block a user