mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-13 17:36:44 +00:00
Compare commits
1 Commits
fix/resume
...
03b817db2e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03b817db2e |
@@ -3523,10 +3523,10 @@ fn run_resume_command(
|
||||
Ok(ResumeCommandOutcome {
|
||||
session: session.clone(),
|
||||
message: Some(handle_agents_slash_command(args.as_deref(), &cwd)?),
|
||||
json: Some(serde_json::json!({
|
||||
"kind": "agents",
|
||||
"text": handle_agents_slash_command(args.as_deref(), &cwd)?,
|
||||
})),
|
||||
json: Some(
|
||||
serde_json::to_value(handle_agents_slash_command_json(args.as_deref(), &cwd)?)
|
||||
.unwrap_or_else(|_| serde_json::json!(null)),
|
||||
),
|
||||
})
|
||||
}
|
||||
SlashCommand::Skills { args } => {
|
||||
|
||||
@@ -360,6 +360,34 @@ fn resumed_inventory_commands_emit_structured_json_when_requested() {
|
||||
assert_eq!(skills["action"], "list");
|
||||
assert!(skills["summary"]["total"].is_number());
|
||||
assert!(skills["skills"].is_array());
|
||||
|
||||
let agents = assert_json_command_with_env(
|
||||
&root,
|
||||
&[
|
||||
"--output-format",
|
||||
"json",
|
||||
"--resume",
|
||||
session_path.to_str().expect("utf8 session path"),
|
||||
"/agents",
|
||||
],
|
||||
&[
|
||||
(
|
||||
"CLAW_CONFIG_HOME",
|
||||
config_home.to_str().expect("utf8 config home"),
|
||||
),
|
||||
("HOME", home.to_str().expect("utf8 home")),
|
||||
],
|
||||
);
|
||||
assert_eq!(agents["kind"], "agents");
|
||||
assert_eq!(agents["action"], "list");
|
||||
assert!(
|
||||
agents["agents"].is_array(),
|
||||
"agents field must be a JSON array"
|
||||
);
|
||||
assert!(
|
||||
agents["count"].is_number(),
|
||||
"count must be a number, not a text render"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user