Skip to content

Commit 40d5678

Browse files
authored
Merge pull request #5 from Eilodon/claude/call-graph-resolver-bug-fjv0uz
Eilodon/call graph resolver bug
2 parents 837fda9 + 07471ae commit 40d5678

7 files changed

Lines changed: 349 additions & 69 deletions

File tree

crates/ci-cli/src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ enum Commands {
2323
/// Database file path
2424
#[arg(long)]
2525
db_path: Option<PathBuf>,
26+
/// Tool preset: full (all 16 tools), orient, trace, edit
27+
#[arg(long, default_value = "full")]
28+
preset: String,
2629
},
2730
/// One-shot index of the project (stub)
2831
Index {
@@ -72,11 +75,12 @@ async fn main() -> Result<()> {
7275
Commands::Serve {
7376
project_root,
7477
db_path,
78+
preset,
7579
} => {
7680
let root = std::fs::canonicalize(&project_root)?;
7781
let db = db_path.unwrap_or_else(|| ci_server::default_db_path(&root));
78-
tracing::info!("Starting MCP server for {}", root.display());
79-
ci_server::serve_stdio(root, db).await?;
82+
tracing::info!("Starting MCP server for {} (preset={})", root.display(), preset);
83+
ci_server::serve_stdio_with_preset(root, db, preset).await?;
8084
}
8185
Commands::Index { project_root } => {
8286
let root = std::fs::canonicalize(&project_root)?;

crates/ci-core/src/config.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub struct Config {
99
pub ignore: Vec<String>,
1010
pub entry_points: Vec<String>,
1111
pub hub_threshold: HubThresholdConfig,
12-
pub call_graph: CallGraphConfig,
1312
pub semantic_search: SemanticSearchConfig,
1413
pub search: SearchConfig,
1514
pub path: PathConfig,
@@ -41,7 +40,6 @@ impl Default for Config {
4140
],
4241
entry_points: Vec::new(),
4342
hub_threshold: HubThresholdConfig::default(),
44-
call_graph: CallGraphConfig::default(),
4543
semantic_search: SemanticSearchConfig::default(),
4644
search: SearchConfig::default(),
4745
path: PathConfig::default(),
@@ -72,22 +70,6 @@ impl Default for HubThresholdConfig {
7270
}
7371
}
7472

75-
#[derive(Debug, Clone, Deserialize, Serialize)]
76-
#[serde(default)]
77-
pub struct CallGraphConfig {
78-
pub resolver: String,
79-
pub confidence_tracking: bool,
80-
}
81-
82-
impl Default for CallGraphConfig {
83-
fn default() -> Self {
84-
Self {
85-
resolver: "conservative".into(),
86-
confidence_tracking: true,
87-
}
88-
}
89-
}
90-
9173
#[derive(Debug, Clone, Deserialize, Serialize)]
9274
#[serde(default)]
9375
pub struct SemanticSearchConfig {

crates/ci-server/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ use tools::CodeIntelligenceServer;
1818
pub type EmbedderHandle = Arc<RwLock<Option<Arc<Embedder>>>>;
1919

2020
pub async fn serve_stdio(project_root: PathBuf, db_path: PathBuf) -> Result<()> {
21+
serve_stdio_with_preset(project_root, db_path, "full".into()).await
22+
}
23+
24+
pub async fn serve_stdio_with_preset(project_root: PathBuf, db_path: PathBuf, preset: String) -> Result<()> {
2125
// Register the sqlite-vec extension before any connection is opened (no-op
2226
// unless built with the `embeddings` feature).
2327
ci_core::embedding::register_extension();
2428

25-
let server = CodeIntelligenceServer::new(project_root.clone(), db_path.clone())?;
29+
let server = CodeIntelligenceServer::new_with_preset(project_root.clone(), db_path.clone(), preset)?;
2630
let ct = CancellationToken::new();
2731
let ct_clone = ct.clone();
2832

0 commit comments

Comments
 (0)