opencode-codebase-index 0.15.0 → 0.16.0
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/README.md +33 -8
- package/dist/cli.cjs +144 -51
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +144 -51
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/pi-extension.cjs +92 -9
- package/dist/pi-extension.cjs.map +1 -1
- package/dist/pi-extension.js +92 -9
- package/dist/pi-extension.js.map +1 -1
- package/hooks/hooks.json +2 -2
- package/native/codebase-index-native.darwin-arm64.node +0 -0
- package/native/codebase-index-native.darwin-x64.node +0 -0
- package/native/codebase-index-native.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
- package/skills/codebase-search/SKILL.md +9 -7
package/dist/index.cjs
CHANGED
|
@@ -8943,10 +8943,19 @@ var Indexer = class {
|
|
|
8943
8943
|
});
|
|
8944
8944
|
const embeddingStartTime = import_perf_hooks.performance.now();
|
|
8945
8945
|
const embeddingQuery = stripFilePathHint(query);
|
|
8946
|
-
|
|
8946
|
+
let embedding;
|
|
8947
|
+
try {
|
|
8948
|
+
embedding = await this.getQueryEmbedding(embeddingQuery, provider);
|
|
8949
|
+
} catch (error) {
|
|
8950
|
+
this.logger.warn("Query embedding failed; falling back to keyword-only search", {
|
|
8951
|
+
query,
|
|
8952
|
+
error: getErrorMessage2(error),
|
|
8953
|
+
action: "Check the embedding provider configuration and retry search after restoring provider health."
|
|
8954
|
+
});
|
|
8955
|
+
}
|
|
8947
8956
|
const embeddingMs = import_perf_hooks.performance.now() - embeddingStartTime;
|
|
8948
8957
|
const vectorStartTime = import_perf_hooks.performance.now();
|
|
8949
|
-
const semanticResults = store.search(embedding, maxResults * 4);
|
|
8958
|
+
const semanticResults = embedding ? store.search(embedding, maxResults * 4) : [];
|
|
8950
8959
|
const vectorMs = import_perf_hooks.performance.now() - vectorStartTime;
|
|
8951
8960
|
const keywordStartTime = import_perf_hooks.performance.now();
|
|
8952
8961
|
const keywordResults = await this.keywordSearch(query, maxResults * 4, store, invertedIndex);
|
|
@@ -8981,12 +8990,13 @@ var Indexer = class {
|
|
|
8981
8990
|
});
|
|
8982
8991
|
}
|
|
8983
8992
|
const fusionStartTime = import_perf_hooks.performance.now();
|
|
8993
|
+
const rankingHybridWeight = embedding === void 0 && fusionStrategy === "weighted" ? 1 : effectiveHybridWeight;
|
|
8984
8994
|
const combined = rankHybridResults(query, semanticCandidates, keywordCandidates, {
|
|
8985
8995
|
fusionStrategy,
|
|
8986
8996
|
rrfK,
|
|
8987
8997
|
rerankTopN,
|
|
8988
8998
|
limit: maxResults,
|
|
8989
|
-
hybridWeight:
|
|
8999
|
+
hybridWeight: rankingHybridWeight,
|
|
8990
9000
|
prioritizeSourcePaths: sourceIntent
|
|
8991
9001
|
});
|
|
8992
9002
|
const rerankedCombined = await this.rerankCandidatesWithApi(query, combined, {
|