diff --git a/rust/crates/commands/src/lib.rs b/rust/crates/commands/src/lib.rs index b3609bf..983588a 100644 --- a/rust/crates/commands/src/lib.rs +++ b/rust/crates/commands/src/lib.rs @@ -174,8 +174,8 @@ pub fn resume_supported_slash_commands() -> Vec<&'static SlashCommandSpec> { #[must_use] pub fn render_slash_command_help() -> String { let mut lines = vec![ - "Available commands:".to_string(), - " (resume-safe commands are marked with [resume])".to_string(), + "Slash commands".to_string(), + " [resume] means the command also works with --resume SESSION.json".to_string(), ]; for spec in slash_command_specs() { let name = match spec.argument_hint { @@ -288,7 +288,7 @@ mod tests { #[test] fn renders_help_from_shared_specs() { let help = render_slash_command_help(); - assert!(help.contains("resume-safe commands")); + assert!(help.contains("works with --resume SESSION.json")); assert!(help.contains("/help")); assert!(help.contains("/status")); assert!(help.contains("/compact")); @@ -340,7 +340,7 @@ mod tests { let result = handle_slash_command("/help", &session, CompactionConfig::default()) .expect("help command should be handled"); assert_eq!(result.session, session); - assert!(result.message.contains("Available commands:")); + assert!(result.message.contains("Slash commands")); } #[test] diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index 7442ea4..994099e 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -623,7 +623,14 @@ impl LiveCli { true, permission_mode_label(), )?; - println!("Cleared local session history."); + println!( + "Session cleared + Mode fresh session + Preserved model {} + Permission mode {}", + self.model, + permission_mode_label() + ); Ok(()) } @@ -685,10 +692,16 @@ impl LiveCli { } fn render_repl_help() -> String { - format!( - "{} - /exit Quit the REPL", - render_slash_command_help() + [ + "REPL".to_string(), + " /exit Quit the REPL".to_string(), + " /quit Quit the REPL".to_string(), + String::new(), + render_slash_command_help(), + ] + .join( + " +", ) } @@ -1351,9 +1364,17 @@ mod tests { ); } + #[test] + fn shared_help_uses_resume_annotation_copy() { + let help = commands::render_slash_command_help(); + assert!(help.contains("Slash commands")); + assert!(help.contains("works with --resume SESSION.json")); + } + #[test] fn repl_help_includes_shared_commands_and_exit() { let help = render_repl_help(); + assert!(help.contains("REPL")); assert!(help.contains("/help")); assert!(help.contains("/status")); assert!(help.contains("/model [model]"));