* Sets the active session ID. * @param id The ID of the session to set as active.
(id: string)
| 110 | * @param id The ID of the session to set as active. |
| 111 | */ |
| 112 | setActiveSessionId(id: string): void { |
| 113 | if (this.browsers.has(id)) { |
| 114 | this.activeSessionId = id; |
| 115 | } else if (id === this.defaultSessionId) { |
| 116 | // Allow setting to default ID even if session doesn't exist yet |
| 117 | // (it will be created on first use via ensureDefaultSessionInternal) |
| 118 | this.activeSessionId = id; |
| 119 | } else { |
| 120 | process.stderr.write( |
| 121 | `[SessionManager] WARN - Set active session failed for non-existent ID: ${id}\n`, |
| 122 | ); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Gets the active session ID. |
no outgoing calls
no test coverage detected