fix: re-detect sessions after idle cleanup
Added forgetSession() to SessionMonitor. When watcher marks a session idle/done, it now clears the key from the monitor's known sessions map. Next poll cycle re-detects the session if the transcript is still active, creating a fresh status post.
This commit is contained in:
@@ -67,6 +67,15 @@ class SessionMonitor extends EventEmitter {
|
||||
if (this.logger) this.logger.info('SessionMonitor stopped');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a session from known sessions so it can be re-detected on next poll.
|
||||
* Called when the watcher marks a session as idle/done.
|
||||
* @param {string} sessionKey
|
||||
*/
|
||||
forgetSession(sessionKey) {
|
||||
this._knownSessions.delete(sessionKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all agent directories under transcriptDir.
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user