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.js
CHANGED
|
@@ -8942,10 +8942,19 @@ var Indexer = class {
|
|
|
8942
8942
|
});
|
|
8943
8943
|
const embeddingStartTime = performance2.now();
|
|
8944
8944
|
const embeddingQuery = stripFilePathHint(query);
|
|
8945
|
-
|
|
8945
|
+
let embedding;
|
|
8946
|
+
try {
|
|
8947
|
+
embedding = await this.getQueryEmbedding(embeddingQuery, provider);
|
|
8948
|
+
} catch (error) {
|
|
8949
|
+
this.logger.warn("Query embedding failed; falling back to keyword-only search", {
|
|
8950
|
+
query,
|
|
8951
|
+
error: getErrorMessage2(error),
|
|
8952
|
+
action: "Check the embedding provider configuration and retry search after restoring provider health."
|
|
8953
|
+
});
|
|
8954
|
+
}
|
|
8946
8955
|
const embeddingMs = performance2.now() - embeddingStartTime;
|
|
8947
8956
|
const vectorStartTime = performance2.now();
|
|
8948
|
-
const semanticResults = store.search(embedding, maxResults * 4);
|
|
8957
|
+
const semanticResults = embedding ? store.search(embedding, maxResults * 4) : [];
|
|
8949
8958
|
const vectorMs = performance2.now() - vectorStartTime;
|
|
8950
8959
|
const keywordStartTime = performance2.now();
|
|
8951
8960
|
const keywordResults = await this.keywordSearch(query, maxResults * 4, store, invertedIndex);
|
|
@@ -8980,12 +8989,13 @@ var Indexer = class {
|
|
|
8980
8989
|
});
|
|
8981
8990
|
}
|
|
8982
8991
|
const fusionStartTime = performance2.now();
|
|
8992
|
+
const rankingHybridWeight = embedding === void 0 && fusionStrategy === "weighted" ? 1 : effectiveHybridWeight;
|
|
8983
8993
|
const combined = rankHybridResults(query, semanticCandidates, keywordCandidates, {
|
|
8984
8994
|
fusionStrategy,
|
|
8985
8995
|
rrfK,
|
|
8986
8996
|
rerankTopN,
|
|
8987
8997
|
limit: maxResults,
|
|
8988
|
-
hybridWeight:
|
|
8998
|
+
hybridWeight: rankingHybridWeight,
|
|
8989
8999
|
prioritizeSourcePaths: sourceIntent
|
|
8990
9000
|
});
|
|
8991
9001
|
const rerankedCombined = await this.rerankCandidatesWithApi(query, combined, {
|