Skip to content

Commit 0f48943

Browse files
authored
fix(tabby-agent): fix code search score is NaN. (#4182)
1 parent ff5e3f5 commit 0f48943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clients/tabby-agent/src/codeSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export class CodeSearchEngine {
213213
.map((hit) => {
214214
return {
215215
...hit.document,
216-
score: hit.score ?? 0,
216+
score: hit.score || 0, // set score to 0 if it is NaN
217217
};
218218
})
219219
.sort((a, b) => b.score - a.score)

0 commit comments

Comments
 (0)