()
| 394 | onCleanup(disposeAll) |
| 395 | |
| 396 | const prune = () => { |
| 397 | while (cache.size > MAX_TERMINAL_SESSIONS) { |
| 398 | const first = cache.keys().next().value |
| 399 | if (!first) return |
| 400 | const entry = cache.get(first) |
| 401 | entry?.dispose() |
| 402 | cache.delete(first) |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | const loadWorkspace = (dir: string, legacySessionID: string | undefined, serverScope: ServerScopeValue) => { |
| 407 | // Terminals are workspace-scoped so tabs persist while switching sessions in the same directory. |
no test coverage detected