fix(cli): JSON parity for /memory and /providers in resume mode

Two gaps closed:

1. /memory (resume): json field was None, emitting prose regardless of
   --output-format json. Now emits:
     {kind:memory, cwd, instruction_files:N, files:[{path,lines,preview}...]}

2. /providers (resume): had a spec entry but no parse arm, producing the
   circular 'Unknown slash command: /providers — Did you mean /providers'.
   Added 'providers' as an alias for 'doctor' in the parse match so
   /providers dispatches to the same structured diagnostic output.

3. /doctor (resume): also wired json_value() so --output-format json
   returns the structured doctor report instead of None.

Continues ROADMAP #26 resumed-command JSON parity track.
159 CLI tests pass, fmt clean.
This commit is contained in:
YeonGyu-Kim
2026-04-09 23:35:25 +09:00
parent ed42f8f298
commit 7587f2c1eb
2 changed files with 32 additions and 7 deletions

View File

@@ -1320,7 +1320,7 @@ pub fn validate_slash_command_input(
"skills" | "skill" => SlashCommand::Skills {
args: parse_skills_args(remainder.as_deref())?,
},
"doctor" => {
"doctor" | "providers" => {
validate_no_args(command, &args)?;
SlashCommand::Doctor
}