codelens_engine/
embedding_store.rs1use serde::Serialize;
9
10#[derive(Debug, Clone)]
12pub struct EmbeddingChunk {
13 pub file_path: String,
14 pub symbol_name: String,
15 pub kind: String,
16 pub line: usize,
17 pub signature: String,
18 pub name_path: String,
19 pub text: String,
20 pub embedding: Vec<f32>,
22 pub doc_embedding: Option<Vec<f32>>,
24}
25
26#[derive(Debug, Clone, Serialize)]
28pub struct ScoredChunk {
29 pub file_path: String,
30 pub symbol_name: String,
31 pub kind: String,
32 pub line: usize,
33 pub signature: String,
34 pub name_path: String,
35 pub score: f64,
36}
37
38#[derive(Debug, Clone)]
42pub struct ArtifactEmbeddingChunk {
43 pub analysis_id: String,
44 pub tool_name: String,
45 pub surface: String,
46 pub project_scope: Option<String>,
47 pub summary: String,
48 pub top_findings: Vec<String>,
49 pub risk_level: String,
50 pub embedding: Vec<f32>,
51}
52
53#[derive(Debug, Clone, Serialize)]
55pub struct ScoredArtifactChunk {
56 pub analysis_id: String,
57 pub tool_name: String,
58 pub surface: String,
59 pub project_scope: Option<String>,
60 pub summary: String,
61 pub score: f64,
62}