diff --git a/ee/tabby-webserver/src/service/answer.rs b/ee/tabby-webserver/src/service/answer.rs index 7f359c3cf183..a1296e407f72 100644 --- a/ee/tabby-webserver/src/service/answer.rs +++ b/ee/tabby-webserver/src/service/answer.rs @@ -572,6 +572,8 @@ pub async fn merge_code_snippets( result.extend(file_hits); } } + + result.sort_by(|a, b| b.scores.rrf.total_cmp(&a.scores.rrf)); result }