Add enhanced session management with secure encrypted sessions - #7
Conversation
…ment commands Co-authored-by: YoungMayor <47315212+YoungMayor@users.noreply.github.com>
…ndling Co-authored-by: YoungMayor <47315212+YoungMayor@users.noreply.github.com>
Co-authored-by: YoungMayor <47315212+YoungMayor@users.noreply.github.com>
|
golangci-lint run --fix
Please refactor the startSession command, break it down to reduce it's length and if/else checks. Then on sessions and secure-sessions. After the session is ended, do not automatically copy the session to pwd. Ask the user if he would like to copy it to the current directory. And when user does |
… and prompt before copying to pwd Co-authored-by: YoungMayor <47315212+YoungMayor@users.noreply.github.com>
Done in commit 48d7ac4:
Example:
All tests passing ✅ |
Implements comprehensive session tracking improvements: default note behavior, task collection, session persistence/management, and encrypted sessions with password protection.
Changes
Enhanced Session Recording
Noteprefix required)Task [description]collects todos, appended as markdown checklist on session endEND,QUIT,CLOSE(case-insensitive)~/.config/mayrlabs/sessions/with optional copy to pwd (user prompted)session-{timestamp}-{slugSummary}.md(max 32 chars) for easy identificationSession Management Commands
sessions: Interactive browser to copy/delete/clipboard sessions with summary displaysession-clear: Bulk delete with 6-digit PIN confirmationsession-prune [days]: Delete sessions older than N days with PIN confirmationSecure Sessions
secure-session-start: Password-protected sessions with XOR encryptionsecure-sessions: Decrypt and manage encrypted sessions with summary displaysecure-sessions/password-hints.txtExample
Output session includes collected tasks:
Session saved as:
session-20240126-100000-api-refactor.mdWhen listing sessions:
After session ends, user is prompted:
Implementation
Core changes in
internal/commands/session.go:startSession()into focused helper functions to reduce cyclomatic complexity from 42 to 8slugify()for filename generation andextractSummaryFromFilename()for displayencryptSessionFile()/decryptSessionFile()for XOR cipherEncryption uses basic XOR—suitable for casual use. Production sensitive data should upgrade to AES.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.