(sessionId: string, connectionId: string, wirePaths: readonly string[])
| 491 | } |
| 492 | }, |
| 493 | async remove(sessionId: string, connectionId: string, wirePaths: readonly string[]) { |
| 494 | try { |
| 495 | const session = await sessionService.get(sessionId); |
| 496 | const realCwd = await fspPromises.realpath(session.metadata.cwd); |
| 497 | const absPaths: string[] = []; |
| 498 | for (const p of wirePaths) { |
| 499 | |
| 500 | const safe = await resolveSafePath(session.metadata.cwd, p); |
| 501 | absPaths.push(safe.absolute); |
| 502 | } |
| 503 | fsWatcher.removePaths(sessionId, connectionId, absPaths); |
| 504 | const watched = fsWatcher.watchedPaths(connectionId, sessionId); |
| 505 | const wire = watched.map((abs) => toPosixRelativeForCwd(realCwd, abs)); |
| 506 | return { |
| 507 | ok: true as const, |
| 508 | watched_paths: wire, |
| 509 | current_count: fsWatcher.countForConnection(connectionId), |
| 510 | }; |
| 511 | } catch (error) { |
| 512 | return mapFsWatchError(error); |
| 513 | } |
| 514 | }, |
| 515 | cleanupConnection(connectionId: string) { |
| 516 | fsWatcher.forgetConnection(connectionId); |
| 517 | }, |
nothing calls this directly
no test coverage detected