From b2b7303352a648b3d7a398b0c56340e4be8c0eb4 Mon Sep 17 00:00:00 2001 From: Joey Yu Date: Mon, 9 Feb 2026 13:09:06 -0800 Subject: [PATCH] add --last after exit --- codex-rs/cli/src/main.rs | 13 +++++++------ codex-rs/tui/src/app.rs | 26 ++++++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs index 1cc4fcdaa7..6f824f0291 100644 --- a/codex-rs/cli/src/main.rs +++ b/codex-rs/cli/src/main.rs @@ -396,12 +396,12 @@ fn format_exit_messages(exit_info: AppExitInfo, color_enabled: bool) -> Vec Line<'static> { + vec![ + "To continue this session, run ".into(), + command.cyan(), + " (or ".into(), + "--last".blue(), + ")".into(), + ] + .into() +} + fn errors_for_cwd(cwd: &Path, response: &ListSkillsResponseEvent) -> Vec { response .skills @@ -1338,8 +1349,7 @@ impl App { if let Some(summary) = summary { let mut lines: Vec> = vec![summary.usage_line.clone().into()]; if let Some(command) = summary.resume_command { - let spans = vec!["To continue this session, run ".into(), command.cyan()]; - lines.push(spans.into()); + lines.push(resume_hint_line(command)); } self.chat_widget.add_plain_history_lines(lines); } @@ -1416,11 +1426,7 @@ impl App { let mut lines: Vec> = vec![summary.usage_line.clone().into()]; if let Some(command) = summary.resume_command { - let spans = vec![ - "To continue this session, run ".into(), - command.cyan(), - ]; - lines.push(spans.into()); + lines.push(resume_hint_line(command)); } self.chat_widget.add_plain_history_lines(lines); } @@ -1476,11 +1482,7 @@ impl App { let mut lines: Vec> = vec![summary.usage_line.clone().into()]; if let Some(command) = summary.resume_command { - let spans = vec![ - "To continue this session, run ".into(), - command.cyan(), - ]; - lines.push(spans.into()); + lines.push(resume_hint_line(command)); } self.chat_widget.add_plain_history_lines(lines); }