(
tabs: readonly { type: "session"; server: ServerConnection.Key; sessionId: string }[],
sessionID: string,
active: ServerConnection.Key,
)
| 17 | } |
| 18 | |
| 19 | export function legacySessionServer( |
| 20 | tabs: readonly { type: "session"; server: ServerConnection.Key; sessionId: string }[], |
| 21 | sessionID: string, |
| 22 | active: ServerConnection.Key, |
| 23 | ) { |
| 24 | const matches = tabs.filter((tab) => tab.sessionId === sessionID) |
| 25 | return matches.find((tab) => tab.server === active)?.server ?? (matches.length === 1 ? matches[0]?.server : active) |
| 26 | } |
| 27 | |
| 28 | type SessionParent = { id: string; parentID?: string } |
| 29 |
no test coverage detected