fix(cli): show last-turn preview after /resume so restored context is visible (#30351)#31331
Closed
haran2001 wants to merge 1 commit into
Closed
fix(cli): show last-turn preview after /resume so restored context is visible (#30351)#31331haran2001 wants to merge 1 commit into
haran2001 wants to merge 1 commit into
Conversation
Contributor
|
Closing as superseded by PR #31695 (merged), which bundles this fix and several sibling PRs in the PR #31695 wires Authorship for the cherry-picked commits is preserved in (Bulk-closed during a CLI PR triage sweep.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/resume, the classic CLI prints only↻ Resumed session <id> (N user messages, M total)and returns to the prompt. The full transcript is not re-rendered (the TUI ships a dedicated overlay for that), so on native Windows 11 terminals — where there is no scrollback that survives the resume — users cannot tell whether the previous conversation context was actually restored.Last turn:preview after every successful/resumethat has restored history: one[You]line + one[Hermes]line (both truncated to 240 chars), plus a tip to use/historyfor the full transcript.starting freshand no preview header._handle_resume_commandand the new_show_resume_context_previewhelper.Test Plan
python -m pytest tests/cli/test_cli_init.py -q -o 'addopts=' -k 'resume or sessions'— 10 passed (3 new + 7 existing resume/sessions tests still green).test_resume_prints_last_turn_preview— asserts last user + last assistant content is rendered and earlier turns are not.test_resume_preview_truncates_long_messages— verifies the 240-char cap with ellipsis suffix.test_resume_empty_session_skips_preview— asserts thestarting freshbranch does not print aLast turn:header.Closes #30351