raggrep 0.2.2 → 0.2.3

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.
package/dist/index.js CHANGED
@@ -147,7 +147,7 @@ function getEmbeddingConfigFromModule(moduleConfig) {
147
147
  }
148
148
  return {
149
149
  model: modelName,
150
- showProgress: options.showProgress !== false
150
+ showProgress: options.showProgress === true
151
151
  };
152
152
  }
153
153
  var DEFAULT_CONFIG, RAGGREP_TEMP_BASE, EMBEDDING_MODELS;
@@ -1847,7 +1847,6 @@ class CoreModule {
1847
1847
  bm25Data: this.bm25Index.serialize()
1848
1848
  };
1849
1849
  await fs2.writeFile(path5.join(coreDir, "symbols.json"), JSON.stringify(symbolIndexData, null, 2));
1850
- console.log(` [Core] Symbol index built with ${this.symbolIndex.size} files`);
1851
1850
  }
1852
1851
  async search(query, ctx, options) {
1853
1852
  const config = ctx.config;
@@ -1982,7 +1981,7 @@ class TransformersEmbeddingProvider {
1982
1981
  constructor(config) {
1983
1982
  this.config = {
1984
1983
  model: config?.model ?? "all-MiniLM-L6-v2",
1985
- showProgress: config?.showProgress ?? true
1984
+ showProgress: config?.showProgress ?? false
1986
1985
  };
1987
1986
  }
1988
1987
  async initialize(config) {
@@ -2115,7 +2114,7 @@ var init_transformersEmbedding = __esm(() => {
2115
2114
  };
2116
2115
  globalConfig = {
2117
2116
  model: "all-MiniLM-L6-v2",
2118
- showProgress: true
2117
+ showProgress: false
2119
2118
  };
2120
2119
  });
2121
2120
 
@@ -2732,7 +2731,9 @@ class TypeScriptModule {
2732
2731
  embeddings,
2733
2732
  embeddingModel: currentConfig.model
2734
2733
  };
2735
- const chunkTypes = [...new Set(parsedChunks.map((pc) => pc.type))];
2734
+ const chunkTypes = [
2735
+ ...new Set(parsedChunks.map((pc) => pc.type))
2736
+ ];
2736
2737
  const exports = parsedChunks.filter((pc) => pc.isExported && pc.name).map((pc) => pc.name);
2737
2738
  const allKeywords = new Set;
2738
2739
  for (const pc of parsedChunks) {
@@ -2772,11 +2773,14 @@ class TypeScriptModule {
2772
2773
  }
2773
2774
  this.symbolicIndex.buildBM25Index();
2774
2775
  await this.symbolicIndex.save();
2775
- console.log(` Symbolic index built with ${this.pendingSummaries.size} file summaries`);
2776
2776
  this.pendingSummaries.clear();
2777
2777
  }
2778
2778
  async search(query, ctx, options = {}) {
2779
- const { topK = DEFAULT_TOP_K2, minScore = DEFAULT_MIN_SCORE2, filePatterns } = options;
2779
+ const {
2780
+ topK = DEFAULT_TOP_K2,
2781
+ minScore = DEFAULT_MIN_SCORE2,
2782
+ filePatterns
2783
+ } = options;
2780
2784
  const indexDir = getRaggrepDir(ctx.rootDir, ctx.config);
2781
2785
  const symbolicIndex = new SymbolicIndex(indexDir, this.id);
2782
2786
  let allFiles;
@@ -2913,10 +2917,9 @@ import * as path11 from "path";
2913
2917
  class ModuleRegistryImpl {
2914
2918
  modules = new Map;
2915
2919
  register(module) {
2916
- if (this.modules.has(module.id)) {
2917
- console.warn(`Module '${module.id}' is already registered, overwriting...`);
2920
+ if (!this.modules.has(module.id)) {
2921
+ this.modules.set(module.id, module);
2918
2922
  }
2919
- this.modules.set(module.id, module);
2920
2923
  }
2921
2924
  get(id) {
2922
2925
  return this.modules.get(id);
@@ -3155,7 +3158,6 @@ class IntrospectionIndex {
3155
3158
  await fs5.mkdir(path10.dirname(introFilePath), { recursive: true });
3156
3159
  await fs5.writeFile(introFilePath, JSON.stringify(intro, null, 2));
3157
3160
  }
3158
- console.log(` [Introspection] Saved metadata for ${this.files.size} files`);
3159
3161
  }
3160
3162
  async load(config) {
3161
3163
  const introDir = path10.join(getRaggrepDir(this.rootDir, config), "introspection");
@@ -3624,4 +3626,4 @@ export {
3624
3626
  cleanup
3625
3627
  };
3626
3628
 
3627
- //# debugId=719044F94BD570BC64756E2164756E21
3629
+ //# debugId=22D9AEEC336F77A764756E2164756E21