@grepai/cli 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +8 -17
  2. package/index.js.map +7 -7
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -105885,7 +105885,7 @@ RecordBatchStreamWriter["throughDOM"] = recordBatchWriterThroughDOMStream;
105885
105885
 
105886
105886
  // ../core/src/internal/services/lancedb.ts
105887
105887
  var CHUNK_TABLE = "chunks";
105888
- var FLUSH_INSERT_QUEUE_THRESHOLD = 100;
105888
+ var FLUSH_INSERT_QUEUE_THRESHOLD = 1000;
105889
105889
 
105890
105890
  class LanceDb extends Service()("@grepai/core/internal/services/lancedb", {
105891
105891
  scoped: gen2(function* () {
@@ -105934,7 +105934,7 @@ class LanceDb extends Service()("@grepai/core/internal/services/lancedb", {
105934
105934
  cause: "Failed to insert chunk embeddings. Could not find chunk or document."
105935
105935
  })
105936
105936
  }));
105937
- if (keys(documentInsertQueue).length >= FLUSH_INSERT_QUEUE_THRESHOLD) {
105937
+ if (insertQueue.length >= FLUSH_INSERT_QUEUE_THRESHOLD) {
105938
105938
  yield* flushInsertQueue();
105939
105939
  }
105940
105940
  });
@@ -110114,7 +110114,7 @@ var CodebaseScannerAgentFs = scoped3(CodebaseScanner, gen2(function* () {
110114
110114
  const results = yield* scanFs();
110115
110115
  const { new: newFiles, modified, deleted } = results;
110116
110116
  yield* forEach5([...newFiles, ...modified], ({ filePath, content }) => agentFs.use((a) => a.fs.writeFile(filePath, content)).pipe(retry({
110117
- times: 5,
110117
+ times: 10,
110118
110118
  schedule: exponential3("50 millis"),
110119
110119
  while: (cause2) => cause2.message.includes("UNIQUE constraint failed: fs_dentry")
110120
110120
  })), { concurrency: "unbounded" });
@@ -110512,16 +110512,7 @@ class FileIndexer extends Service()("@grepai/core/internal/services/file-indexer
110512
110512
  const embeddings = yield* forEach5(chunkBatches, (chunks3) => embedder.embedMany(map4(chunks3, ({ content: content2 }) => content2)).pipe(map16(map4((embedding, index2) => ({
110513
110513
  chunkId: chunks3[index2].id,
110514
110514
  embedding
110515
- }))), catchTags2({
110516
- VercelAiError: (cause2) => {
110517
- if (cause2.message.includes("at most 100 requests")) {
110518
- return new VercelAiError({
110519
- cause: new Error(cause2.message + " " + input.filePath)
110520
- });
110521
- }
110522
- return cause2;
110523
- }
110524
- }))).pipe(map16(flatten));
110515
+ }))))).pipe(map16(flatten));
110525
110516
  yield* pipe(documentStorage.insert({ filePath, hash: hash3 }), zipRight3(chunkStorage.insertMany(chunks2)), zipRight3(chunkStorage.insertManyEmbeddings(embeddings)));
110526
110517
  }, (effect3) => match2(db, {
110527
110518
  onNone: () => effect3,
@@ -110611,13 +110602,13 @@ class Indexer extends Service()("@grepai/core/internal/services/indexer", {
110611
110602
  filePath,
110612
110603
  fileCount: filesToClean.length
110613
110604
  }))), {
110614
- concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () => 10), exhaustive2)
110605
+ concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () => 50), exhaustive2)
110615
110606
  });
110616
110607
  yield* forEach5(filesToIndex, (file8) => fileIndexer.index(file8).pipe(tap2(() => onFileIndexed({
110617
110608
  filePath: file8.filePath,
110618
110609
  fileCount: filesToIndex.length
110619
110610
  }))), {
110620
- concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () => 10), exhaustive2)
110611
+ concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () => 50), exhaustive2)
110621
110612
  });
110622
110613
  yield* onFinished();
110623
110614
  });
@@ -118268,11 +118259,11 @@ var program = gen2(function* () {
118268
118259
  const command = exports_Command.make("grepai").pipe(exports_Command.withSubcommands(subcommands));
118269
118260
  const cli = exports_Command.run(command, {
118270
118261
  name: "GREP AI",
118271
- version: "v0.8.0"
118262
+ version: "v0.8.1"
118272
118263
  });
118273
118264
  yield* cli(process.argv);
118274
118265
  });
118275
118266
  program.pipe(provide2(ProjectScanner.Default.pipe(provideMerge2(exports_BunContext.layer))), exports_BunRuntime.runMain);
118276
118267
 
118277
- //# debugId=89DB27A0A5B43E3364756E2164756E21
118268
+ //# debugId=C493F6813D74B44664756E2164756E21
118278
118269
  //# sourceMappingURL=index.js.map