mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-04 21:47:10 +08:00
fix: attribute config precedence in JSON
This commit is contained in:
@@ -8654,6 +8654,30 @@ fn config_file_report_json(file: &ConfigFileReport) -> serde_json::Value {
|
||||
serde_json::Value::String(source.to_string()),
|
||||
);
|
||||
object.insert("loaded".to_string(), serde_json::Value::Bool(file.loaded));
|
||||
object.insert(
|
||||
"precedence_rank".to_string(),
|
||||
serde_json::Value::Number(serde_json::Number::from(file.precedence_rank)),
|
||||
);
|
||||
object.insert(
|
||||
"wins_for_keys".to_string(),
|
||||
serde_json::Value::Array(
|
||||
file.wins_for_keys
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(serde_json::Value::String)
|
||||
.collect(),
|
||||
),
|
||||
);
|
||||
object.insert(
|
||||
"shadowed_keys".to_string(),
|
||||
serde_json::Value::Array(
|
||||
file.shadowed_keys
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(serde_json::Value::String)
|
||||
.collect(),
|
||||
),
|
||||
);
|
||||
object.insert(
|
||||
"status".to_string(),
|
||||
serde_json::Value::String(file.status.as_str().to_string()),
|
||||
|
||||
Reference in New Issue
Block a user