Skip to content

feat(sessions): add Ctrl+D shortcut to delete sessions (#551) - #552

Open
rhine9473 wants to merge 1 commit into
openpi-dev:mainfrom
rhine9473:feat/sessions-delete-shortcut
Open

rhine9473 wants to merge 1 commit into
openpi-dev:mainfrom
rhine9473:feat/sessions-delete-shortcut

Conversation

@rhine9473

Copy link
Copy Markdown
Contributor

Summary

Fixes #551.

This PR adds a Ctrl+D shortcut to delete sessions directly from the /sessions picker:

  1. Shortcut & Binding: Pressing Ctrl+D on a selected session triggers the deletion workflow.
  2. Confirmation Safeguard: Prompts with Delete session? Enter confirm · Esc cancel to prevent accidental deletion.
  3. Active Session Protection: Blocks deleting the currently active session with an error notification.
  4. Safe Deletion: Uses the system trash CLI when available, falling back to permanent unlink.
  5. Real-Time UI Update: Removes the deleted session from the list in real-time, advances selection to adjacent session, and updates preview smoothly.
  6. Unit Tests: Adds test coverage for deleteSessionFile under tests/extensions/sessions/sessions.test.ts.

Testing

  • node --test --experimental-strip-types tests/extensions/sessions/sessions.test.ts (7 passed, 0 failed)
  • Verified locally in interactive TUI on Windows: Ctrl+D triggers deletion confirmation, Enter deletes the file and refreshes list, Esc safely cancels.
  • Biome check verified clean.

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.

feat(sessions): 为 /sessions 增加 Ctrl+D 快捷删除会话功能(对齐原生 /resume 体验)

1 participant