- Added suspend_session() callback for idle timer (terminates subprocess, updates metadata to suspended, silent) - Added get_subprocess_lock() helper to prevent race between timeout and user message - Updated handle_message/handle_photo/handle_document with resume logic (detects suspended, shows 'Resuming session...', spawns with --continue) - Added idle timer reset in on_complete callback (timer only starts after Claude finishes) - Added idle timer reset on user activity (message/photo/document) - Updated new_session() to initialize idle timer after subprocess creation - Updated switch_session_cmd() to initialize idle timer when auto-spawning subprocess - Updated archive_session_cmd() to cancel idle timer and remove subprocess lock - Updated model_cmd() to cancel idle timer when terminating subprocess - Added cleanup_orphaned_subprocesses() to kill orphaned PIDs verified via /proc/cmdline at startup - Added post_init() callback for startup cleanup - Added post_shutdown() callback for graceful shutdown (terminates all subprocesses, cancels all timers) - Updated help text with new commands Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| personas | ||
| .gitignore | ||
| bot.py | ||
| claude_subprocess.py | ||
| idle_timer.py | ||
| message_batcher.py | ||
| session_manager.py | ||
| telegram_utils.py | ||