Skip to content

An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.

Rust

fix(cli): implement /session list in resume mode — ROADMAP #21 partial

YeonGyu-Kim8dcf10361f20
diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs
index b399f9a7..fb06e10b 100644
--- a/rust/crates/rusty-claude-cli/src/main.rs
+++ b/rust/crates/rusty-claude-cli/src/main.rs
@@ -2964,6 +2964,25 @@ fn run_resume_command(
})
}
SlashCommand::Unknown(name) => Err(format_unknown_slash_command(name).into()),
+ // /session list can be served from the sessions directory without a live session.
+ SlashCommand::Session {
+ action: Some(ref act),
+ ..
+ } if act == "list" => {
+ let sessions = list_managed_sessions().unwrap_or_default();
+ let session_ids: Vec<String> = sessions.iter().map(|s| s.id.clone()).collect();
+ let active_id = session.session_id.clone();
+ let text = render_session_list(&active_id).unwrap_or_else(|e| format!("error: {e}"));
+ Ok(ResumeCommandOutcome {
+ session: session.clone(),
+ message: Some(text),
+ json: Some(serde_json::json!({
+ "kind": "session_list",
+ "sessions": session_ids,
+ "active": active_id,
+ })),
+ })
+ }
SlashCommand::Bughunter { .. }
| SlashCommand::Commit { .. }
| SlashCommand::Pr { .. }