Rename session from /resume session list (#863)

* Add session renaming in interactive mode resume picker

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./

* Add docs entry for renaming in picker

* Update shortcut to ctrl+r for session renaming
This commit is contained in:
Sergii Kozak 2026-01-25 10:42:34 -08:00 committed by GitHub
parent 676de103e1
commit b5873507c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 449 additions and 89 deletions

View file

@ -3460,9 +3460,19 @@ export class InteractiveMode {
void this.shutdown();
},
() => this.ui.requestRender(),
{
renameSession: async (sessionFilePath: string, nextName: string | undefined) => {
const next = (nextName ?? "").trim();
if (!next) return;
const mgr = SessionManager.open(sessionFilePath);
mgr.appendSessionInfo(next);
},
showRenameHint: true,
},
this.sessionManager.getSessionFile(),
);
return { component: selector, focus: selector.getSessionList() };
return { component: selector, focus: selector };
});
}