Skip to content

feat(tui): /resume — pick up a saved session in the fullscreen TUI - #562

Draft
justrach wants to merge 1 commit into
mainfrom
cursor/tui-resume-554f
Draft

feat(tui): /resume — pick up a saved session in the fullscreen TUI#562
justrach wants to merge 1 commit into
mainfrom
cursor/tui-resume-554f

Conversation

@justrach

Copy link
Copy Markdown
Owner

This is the first slice of harness parity: every peer pager (Claude -c/-r, Codex resume, Pi /resume, OpenCode session attach) lets you close the TUI and pick the session back up. Graff’s line REPL already had /save//resume; the fullscreen TUI started a fresh transcript.

Rebase of #538 onto current main (clickable panels, paint, Gemini effort). /resume opens a searchable picker over .graff/sessions (title + age, newest first); /resume <name> loads directly. User/assistant text lands in the transcript, the saved model is re-applied, and historyChanged(.reset) seeds the next turn from the resumed conversation.

Still not in this slice (follow-ups): tool_use/tool_result blocks, TUI /save, session name in the top bar, same-named model seats under two providers.

zig build tui-test -Dtest-filter="resume" 13/13.

Open in Web Open in Cursor 

…een TUI

/resume opens a searchable picker over .graff/sessions (the same store and
metadata the line REPL's /resume and /sessions read): base — title (age),
newest first, fuzzy filter, Enter loads. /resume <name> skips the picker.

The load extracts the saved conversation's user/assistant text turns
(plain strings and structured text blocks; tool traffic skipped) into the
transcript, so the next turn resends them as model-visible history, and
re-applies the session's saved model through the /model switch path.

Plumbing follows the /compact seam: engine.g_sessions_fn/g_resume_fn set
from tui_launch, implemented in src/tui_resume.zig; picker UI in
TUI/resume.zig mirrors the model picker. /resume is guarded behind the
mid-turn #521 gate, and its notices force the agent screen so they are
never hidden behind the welcome pane.

Verified end-to-end under a pty against a real session fixture: picker
renders base/title/age, Enter loads 3 turns including an
anthropic-style text-block message, and the resumed rows paint.

Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant