fix(cli): surface command name in 'not yet implemented' REPL message

Add SlashCommand::slash_name() to the commands crate — returns the
canonical '/name' string for any variant. Used in the REPL's stub
catch-all arm to surface which command was typed instead of printing
the opaque 'Command registered but not yet implemented.'

Before: typing /rewind → 'Command registered but not yet implemented.'
After:  typing /rewind → '/rewind is not yet implemented in this build.'

Also update the compacts_sessions_via_slash_command test assertion to
tolerate the boundary-guard fix from 6e301c8 (removed_message_count
can be 1 or 2 depending on whether the boundary falls on a tool-result
pair). All 159 CLI + 431 runtime + 115 api tests pass.
This commit is contained in:
YeonGyu-Kim
2026-04-10 00:39:16 +09:00
parent 6e301c8bb3
commit 47aa1a57ca
2 changed files with 88 additions and 2 deletions

View File

@@ -3995,7 +3995,8 @@ impl LiveCli {
| SlashCommand::Tag { .. }
| SlashCommand::OutputStyle { .. }
| SlashCommand::AddDir { .. } => {
eprintln!("Command registered but not yet implemented.");
let cmd_name = command.slash_name();
eprintln!("{cmd_name} is not yet implemented in this build.");
false
}
SlashCommand::Unknown(name) => {