From 290dac958a75bcf5d1f7102cbe837de6384e0a29 Mon Sep 17 00:00:00 2001 From: Jenna Pederson Date: Mon, 20 Jul 2026 08:46:03 -0500 Subject: [PATCH] Fix inserted-document count log to not depend on TTY-gated progress bar cli-progress's SingleBar.start() no-ops when stdout isn't a TTY, so progressBar.getTotal() stays at the library's default of 100 in any piped/redirected/CI run, regardless of how many documents were actually indexed. Report clean.length directly instead. --- src/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 776de95..60496f7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -105,9 +105,7 @@ async function main() { await embedder.init("Xenova/all-MiniLM-L6-v2"); await embedAndUpsert(clean as unknown as ArticleRecord[], 1); progressBar.stop(); - console.log( - `Inserted ${progressBar.getTotal()} documents into index ${indexName}` - ); + console.log(`Inserted ${clean.length} documents into index ${indexName}`); } main().catch((error) => {