Skip to content

Conversation

@svkozak
Copy link
Contributor

@svkozak svkozak commented Jan 20, 2026

Summary

Recent update introduced /name command to add session names and this PR adds renaming support to the interactive /resume picker allowing to rename sessions in the list without opening them individually. Also modifies how session 'recency' is derived (if only metadata changed, session's 'modified' date remains the same).

Interactive /resume rename support

  • Ctrl+N opens a full-page rename mode inside the session selector (no overlay).
  • Rename mode shows “Rename Session”, an input, and save/cancel hints.
  • Esc/Ctrl+C cancels rename; Enter saves.

rename-1

rename-2

Get session 'modified' time based on latest activity

  • Session “modified” time is derived from last user/assistant message timestamp (with fallbacks), not file mtime, so renaming (or /name) doesn’t reorder the recent list. (mtime is kept as a fallback)

Refresh/reload behaviour

  • After rename/delete, the session list refreshes so updated names appear immediately.
  • Small refactor of refresh logic into a shared loadScope(...) helper to reduce duplication.

Tests

  • Added/updated tests to cover:
    • rename hint behavior (/resume vs --resume)
    • rename flow (Ctrl+N → rename UI → typing → Enter)
    • “modified timestamp uses last message timestamp” behavior
    • existing delete/path/scope behavior remains covered

Session list now displays last message timestamp as modified time
instead of file mtime. Ctrl+N enters rename mode in the interactive
resume picker, allowing quick session renaming without leaving the
selector. Rename hint is shown only in interactive mode, not in the
CLI --resume picker./
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