diff --git a/ccw/src/core/routes/codexlens/config-handlers.ts b/ccw/src/core/routes/codexlens/config-handlers.ts index f7175db1..60a7178d 100644 --- a/ccw/src/core/routes/codexlens/config-handlers.ts +++ b/ccw/src/core/routes/codexlens/config-handlers.ts @@ -113,8 +113,8 @@ export async function handleCodexLensConfigRoutes(ctx: RouteContext): Promise 0 ? Math.round((indexedFiles / totalFiles) * 100) : 0; + // Get embeddings data from index status + const filesWithEmbeddings = embeddingsData?.files_with_embeddings || 0; + const totalChunks = embeddingsData?.total_chunks || 0; + const vectorPercent = embeddingsData?.coverage_percent || 0; - // Vector percentage (files with embeddings) - const vectorPercent = totalFiles > 0 ? Math.round((filesWithEmbeddings / totalFiles) * 1000) / 10 : 0; + // FTS percentage (all indexed files have FTS, so it's always 100% if indexed) + const ftsPercent = totalFiles > 0 ? 100 : 0; res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({