Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Nov 14, 2024
1 parent c22e9e7 commit 9836311
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/tabby-common/src/api/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ pub struct CodeSearchResponse {
pub hits: Vec<CodeSearchHit>,
}

#[derive(Default, Clone)]
#[derive(Default, Clone, PartialEq, Debug)]
pub struct CodeSearchHit {
pub scores: CodeSearchScores,
pub doc: CodeSearchDocument,
}

#[derive(Default, Clone)]
#[derive(Default, Clone, PartialEq, Debug)]
pub struct CodeSearchScores {
/// Reciprocal rank fusion score: https://www.elastic.co/guide/en/elasticsearch/reference/current/rrf.html
pub rrf: f32,
pub bm25: f32,
pub embedding: f32,
}

#[derive(Builder, Default, Clone)]
#[derive(Builder, Default, Clone, PartialEq, Debug)]
pub struct CodeSearchDocument {
/// Unique identifier for the file in the repository, stringified SourceFileKey.
pub file_id: String,
Expand Down Expand Up @@ -65,7 +65,7 @@ impl CodeSearchQuery {
source_id: String,
) -> Self {
Self {
filepath: filepath.map(|path| normalize_to_unix_path(&path)),
filepath: filepath.map(|path| normalize_to_unix_path(&path)),
language,
content,
source_id,
Expand Down

0 comments on commit 9836311

Please sign in to comment.