mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-05 14:07:11 +08:00
fix: standardize list command count fields and resume help field name
#410: Added field to mcp list and skills list JSON for polymorphic consumption parity with agents list. All three sibling list commands now expose a canonical integer field alongside their command-specific details. #338: Changed resume JSON from to field for consistency with top-level . Generated with https://github.com/Yeachan-Heo/gajae-code Co-authored-by: Gajae Code <dev@gajae-code.com>
This commit is contained in:
@@ -4492,10 +4492,12 @@ fn render_skills_report_json_with_action(collection: &SkillCollection, action: &
|
||||
.count();
|
||||
let has_drift = !metadata_drift.is_empty();
|
||||
let status = if has_drift { "degraded" } else { "ok" };
|
||||
// #410: add `count` field for polymorphic consumption parity with agents list
|
||||
json!({
|
||||
"kind": "skills",
|
||||
"status": status,
|
||||
"action": action,
|
||||
"count": skills.len(),
|
||||
"valid_count": skills.len(),
|
||||
"metadata_drift_count": metadata_drift.len(),
|
||||
"summary": {
|
||||
@@ -4684,6 +4686,7 @@ fn render_mcp_summary_report_json(cwd: &Path, mcp: &McpConfigCollection) -> Valu
|
||||
json!({
|
||||
"kind": "mcp",
|
||||
"action": "list",
|
||||
"count": mcp.valid_count(),
|
||||
"working_directory": cwd.display().to_string(),
|
||||
"configured_servers": mcp.valid_count(),
|
||||
"total_configured": mcp.total_configured(),
|
||||
|
||||
@@ -6249,7 +6249,7 @@ fn run_resume_command(
|
||||
session: session.clone(),
|
||||
message: Some(render_repl_help()),
|
||||
json: Some(
|
||||
serde_json::json!({ "kind": "help", "action": "help", "status": "ok", "text": render_repl_help() }),
|
||||
serde_json::json!({ "kind": "help", "action": "help", "status": "ok", "message": render_repl_help() }),
|
||||
),
|
||||
}),
|
||||
SlashCommand::Compact => {
|
||||
|
||||
Reference in New Issue
Block a user