(keys: string[])
| 324 | ] as const |
| 325 | |
| 326 | const dropSessionState = (keys: string[]) => { |
| 327 | for (const key of keys) { |
| 328 | const scope = SessionStateKey.scope(key) |
| 329 | const parts = SessionStateKey.route(key).split("/") |
| 330 | const dir = parts[0] |
| 331 | const session = parts[1] |
| 332 | if (!dir) continue |
| 333 | |
| 334 | for (const entry of SESSION_STATE_KEYS) { |
| 335 | const target = session |
| 336 | ? Persist.serverSession(scope, dir, session, entry.key) |
| 337 | : Persist.serverWorkspace(scope, dir, entry.key) |
| 338 | void removePersisted(target, platform) |
| 339 | |
| 340 | if (scope !== ServerScope.local) continue |
| 341 | const legacyKey = `${dir}/${entry.legacy}${session ? "/" + session : ""}.${entry.version}` |
| 342 | void removePersisted({ key: legacyKey }, platform) |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | function prune(keep?: string) { |
| 348 | const drop = pruneSessionKeys({ |
no test coverage detected