don't bother users with non-critical indexing errors
This commit is contained in:
parent
af32cffd28
commit
65925baa5b
3 changed files with 22 additions and 10 deletions
16
core/core.ts
16
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",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
4
extensions/vscode/package-lock.json
generated
4
extensions/vscode/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue