Skip to content

feat: /clean for full context wipe, rename /reset to /reconnect#82

Merged
fitz123 merged 10 commits intomainfrom
reset-restart-commands
Apr 2, 2026
Merged

feat: /clean for full context wipe, rename /reset to /reconnect#82
fitz123 merged 10 commits intomainfrom
reset-restart-commands

Conversation

@fitz123
Copy link
Copy Markdown
Owner

@fitz123 fitz123 commented Apr 2, 2026

Summary

  • Rename /reset to /reconnect (keeps session file, resumes with compacted history)
  • Add /clean command for full context wipe (kills subprocess + deletes session file)
  • Add destroySession() to SessionManager
  • Update error messages to reference /reconnect
  • Both Telegram and Discord

Closes #81

Test plan

  • /reconnect calls closeSession() — session file preserved
  • /clean calls destroySession() — session file deleted, fresh start
  • Error messages reference /reconnect
  • All tests pass

🤖 Generated with Claude Code

fitz123 and others added 10 commits April 2, 2026 12:27
Adds a new public method that closes the session AND deletes stored
state from the session store, so the next message starts a completely
fresh session with no --resume. This is the foundation for the /clean
command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
/reconnect keeps session file (prior context partially retained).
/clean calls destroySession() to wipe stored state for a fresh start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests verify closeSession preserves stored state (reconnect can resume)
while destroySession deletes it (clean starts fresh). BOT_COMMANDS
assertion and existing destroySession tests already covered by prior commits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add handler-level wiring tests verifying /reconnect calls closeSession
and /clean calls destroySession (plan items 5.2, 5.3).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Revert unrelated DM typing suppression in telegram-adapter.ts (out of scope)
- Fix TypeScript errors in test mocks (missing UserFromGetMe and PrivateChat properties)
- Clarify test assertion comment for /clean handler wiring

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fitz123 fitz123 force-pushed the reset-restart-commands branch from 8dea59e to e104a24 Compare April 2, 2026 09:27
@fitz123 fitz123 merged commit 3328adb into main Apr 2, 2026
1 check passed
@fitz123 fitz123 deleted the reset-restart-commands branch April 2, 2026 09:28
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: /clean for full context wipe, rename /reset to /reconnect

1 participant