mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-05 14:07:11 +08:00
fix: align discovered_config_files count with config check
The status_context function now filters loader.discover() to only count paths that exist on disk, matching the check_config_health behavior. Both config.discovered_files_count and workspace.discovered_config_files now report the same number. Generated with https://github.com/Yeachan-Heo/gajae-code Co-authored-by: Gajae Code <dev@gajae-code.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -9238,7 +9238,8 @@ fn status_context(
|
||||
) -> Result<StatusContext, Box<dyn std::error::Error>> {
|
||||
let cwd = env::current_dir()?;
|
||||
let loader = ConfigLoader::default_for(&cwd);
|
||||
let discovered_config_files = loader.discover().len();
|
||||
// #456: count only paths that exist on disk, matching check_config_health behavior.
|
||||
let discovered_config_files = loader.discover().iter().filter(|e| e.path.exists()).count();
|
||||
// #143: degrade gracefully on config parse failure rather than hard-fail.
|
||||
// `claw doctor` already does this; `claw status` now matches that contract
|
||||
// so that one malformed `mcpServers.*` entry doesn't take down the whole
|
||||
|
||||
Reference in New Issue
Block a user