From ca77c114dd2e803830fe3f725933c1648a6e0028 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Mon, 12 Jan 2026 21:10:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20CodexLens=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=8A=B6=E6=80=81=E8=8E=B7=E5=8F=96=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=BD=BF=E7=94=A8=20'projects=20show'=20?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E5=B9=B6=E6=B7=BB=E5=8A=A0=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/routes/codexlens/config-handlers.ts | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) 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({