pizen_lynx_protocol/
lib.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
4pub enum SymbolType {
5 Definition,
6 Reference,
7}
8
9#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct SymbolRecord {
11 pub symbol_id: String,
12 pub symbol_name: String,
13 pub symbol_type: SymbolType,
14 pub file_path: String,
15 pub start_line: usize,
16 pub end_line: usize,
17}
18
19#[derive(Debug, Clone, Serialize, Deserialize)]
20pub struct CodeChunk {
21 pub id: String,
22 pub file_path: String,
23 pub start_line: usize,
24 pub end_line: usize,
25 pub raw_content: String,
26 pub symbols_defined: Vec<String>,
27}
28
29#[derive(Debug, Clone, Serialize, Deserialize)]
30pub struct DiscoveryResult {
31 pub symbol_id: String,
32 pub score: f32,
33 pub file_path: String,
34 pub start_line: usize,
35 pub end_line: usize,
36 #[serde(default)]
37 pub reasons: Vec<String>,
38}