Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.

Commit 44fb547

Browse files
quangdang46claude
andcommitted
fix(doctor): remove git repository requirement
why doctor should work from any directory, not just git repos. Removed Repository::discover() call and runtime log fallback since doctor is a diagnostic tool that only needs to check config and test LLM connectivity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6dc9082 commit 44fb547

1 file changed

Lines changed: 8 additions & 19 deletions

File tree

crates/core/src/main.rs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ fn run_config_get(json: bool) -> Result<()> {
516516

517517
fn run_doctor(json: bool) -> Result<()> {
518518
let cwd = std::env::current_dir()?;
519-
let repo = Repository::discover(&cwd)?;
520519
let config = load_config(&cwd)?;
521520
let config_report = build_config_report(&cwd)?;
522521
let resolved_llm = config.resolved_llm_config();
@@ -586,24 +585,14 @@ fn run_doctor(json: bool) -> Result<()> {
586585
cost_usd: response.cost_usd,
587586
error_chain: Vec::new(),
588587
},
589-
Err(error) => {
590-
log_llm_fallback(
591-
&repo,
592-
"doctor",
593-
resolved_llm.provider,
594-
resolved_llm.model.clone(),
595-
Some("doctor".into()),
596-
&error,
597-
);
598-
DoctorLlmReport {
599-
ok: false,
600-
response_preview: None,
601-
input_tokens: None,
602-
output_tokens: None,
603-
cost_usd: None,
604-
error_chain: error_chain(&error),
605-
}
606-
}
588+
Err(error) => DoctorLlmReport {
589+
ok: false,
590+
response_preview: None,
591+
input_tokens: None,
592+
output_tokens: None,
593+
cost_usd: None,
594+
error_chain: error_chain(&error),
595+
},
607596
};
608597

609598
checks.push(DoctorCheck {

0 commit comments

Comments
 (0)