Show session resume hint with session id on CLI exit (for ctrl c + ctrl c, /exit(& /quit), and ctrl d exit paths)#2760
Conversation
Greptile code reviewThis repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md. Run a review — add a PR comment with: Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5. Optional: automate with the greploop skill. |
Greptile SummaryThis PR adds a session-resume hint to all CLI exit paths (ctrl+c double-press,
Confidence Score: 4/5Safe to merge once the missing session_id guard in the ctrl+c double-press path is added; without it, the terminal outputs the literal text The ctrl+c exit path in app/cli/support/prompt_support.py — the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User triggers exit] --> B{Exit path}
B -->|/exit or /quit| C[system.py: _cmd_exit]
B -->|Ctrl+C x 2| D[prompt_support.py: repl_prompt_note_ctrl_c]
B -->|Ctrl+D / EOFError| E[loop.py: EOFError handler]
C --> F{session.session_id?}
F -->|Yes| G[print resume hint - DIM styled]
F -->|No| H[skip resume hint]
G --> I[print goodbye. - DIM styled]
H --> I
D --> J{last ctrl+c within 2s?}
J -->|Yes| K[print resume hint - no session_id guard!]
K --> L[print Goodbye! - DIM styled]
J -->|No| M[print Press Ctrl+C again to exit]
E --> N{session.session_id?}
N -->|Yes| O[print resume hint + Goodbye! - plain text no DIM]
N -->|No| P[silent exit]
Reviews (2): Last reviewed commit: "Update app/cli/support/prompt_support.py" | Re-trigger Greptile |
fixes trailing space Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
🎯 Bullseye. @larsspinetta12 opened a PR, kept the vibes clean, and got it merged. Absolute cinema. 🎬 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |
|
@greptile review |

Fixes #(custom)
Describe the changes you have made in this PR - Changed the output message for when you use exit paths(ctrl c + ctrl c, /exit, /quit, and ctrl d) to include a goodbye message and "resume using: /resume <session_id>".
Demo/Screenshot for feature changes and bug fixes -
For /quit:

For /exit:

For ctrl c + ctrl c

For ctrl d:

Code Understanding and AI Usage
Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?
If you used AI assistance:
Explain your implementation approach:
Checklist before requesting a review
Note: Please check Allow edits from maintainers if you would like us to assist in the PR.