mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-05 22:17:10 +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();
|
.count();
|
||||||
let has_drift = !metadata_drift.is_empty();
|
let has_drift = !metadata_drift.is_empty();
|
||||||
let status = if has_drift { "degraded" } else { "ok" };
|
let status = if has_drift { "degraded" } else { "ok" };
|
||||||
|
// #410: add `count` field for polymorphic consumption parity with agents list
|
||||||
json!({
|
json!({
|
||||||
"kind": "skills",
|
"kind": "skills",
|
||||||
"status": status,
|
"status": status,
|
||||||
"action": action,
|
"action": action,
|
||||||
|
"count": skills.len(),
|
||||||
"valid_count": skills.len(),
|
"valid_count": skills.len(),
|
||||||
"metadata_drift_count": metadata_drift.len(),
|
"metadata_drift_count": metadata_drift.len(),
|
||||||
"summary": {
|
"summary": {
|
||||||
@@ -4684,6 +4686,7 @@ fn render_mcp_summary_report_json(cwd: &Path, mcp: &McpConfigCollection) -> Valu
|
|||||||
json!({
|
json!({
|
||||||
"kind": "mcp",
|
"kind": "mcp",
|
||||||
"action": "list",
|
"action": "list",
|
||||||
|
"count": mcp.valid_count(),
|
||||||
"working_directory": cwd.display().to_string(),
|
"working_directory": cwd.display().to_string(),
|
||||||
"configured_servers": mcp.valid_count(),
|
"configured_servers": mcp.valid_count(),
|
||||||
"total_configured": mcp.total_configured(),
|
"total_configured": mcp.total_configured(),
|
||||||
|
|||||||
@@ -6249,7 +6249,7 @@ fn run_resume_command(
|
|||||||
session: session.clone(),
|
session: session.clone(),
|
||||||
message: Some(render_repl_help()),
|
message: Some(render_repl_help()),
|
||||||
json: Some(
|
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 => {
|
SlashCommand::Compact => {
|
||||||
|
|||||||
Reference in New Issue
Block a user