1import type { ScopedThreadRef } from "@t3tools/contracts";
2
3/** Desktop ids must distinguish environments and server restarts; server tab ids are process-local. */
4export function previewRuntimeTabId(
5 threadRef: ScopedThreadRef,
6 serverEpoch: string | null,
7 tabId: string,
8): string {
9 return JSON.stringify([threadRef.environmentId, threadRef.threadId, serverEpoch, tabId]);
10}