From 65925baa5bd1494444ee7d17aeffdc7fb6da2c56 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 29 Aug 2024 19:05:22 -0700 Subject: [PATCH] don't bother users with non-critical indexing errors --- core/core.ts | 16 ++++++++++++++-- core/indexing/chunk/chunk.ts | 12 ++++++------ extensions/vscode/package-lock.json | 4 ++-- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/core/core.ts b/core/core.ts index 1bb3f9c81..d813ee830 100644 --- a/core/core.ts +++ b/core/core.ts @@ -714,10 +714,22 @@ export class Core { dirs, this.indexingCancellationController.signal, )) { - this.messenger.request("indexProgress", update); - this.indexingState = update; + let updateToSend = { ...update }; + if (update.status === "failed") { + updateToSend.status = "done"; + updateToSend.desc = "Indexing complete"; + updateToSend.progress = 1.0; + } + + this.messenger.request("indexProgress", updateToSend); + this.indexingState = updateToSend; if (update.status === "failed") { + console.debug( + "Indexing failed with error: ", + update.desc, + update.debugInfo, + ); Telemetry.capture( "indexing_error", { diff --git a/core/indexing/chunk/chunk.ts b/core/indexing/chunk/chunk.ts index 48af77c38..7513ccabb 100644 --- a/core/indexing/chunk/chunk.ts +++ b/core/indexing/chunk/chunk.ts @@ -1,5 +1,5 @@ import { Chunk, ChunkWithoutID } from "../../index.js"; -import { countTokens, countTokensAsync } from "../../llm/countTokens.js"; +import { countTokensAsync } from "../../llm/countTokens.js"; import { extractMinimalStackTraceInfo } from "../../util/extractMinimalStackTraceInfo.js"; import { Telemetry } from "../../util/posthog.js"; import { supportedLanguages } from "../../util/treeSitter.js"; @@ -58,11 +58,11 @@ export async function* chunkDocument({ chunkPromises.push( new Promise(async (resolve) => { if ((await countTokensAsync(chunkWithoutId.content)) > maxChunkSize) { - console.debug( - `Chunk with more than ${maxChunkSize} tokens constructed: `, - filepath, - countTokens(chunkWithoutId.content), - ); + // console.debug( + // `Chunk with more than ${maxChunkSize} tokens constructed: `, + // filepath, + // countTokens(chunkWithoutId.content), + // ); return resolve(undefined); } resolve({ diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index fb0abc7e0..c3df2a736 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.200", + "version": "0.9.201", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.200", + "version": "0.9.201", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10",