23 lines · 752 B · TypeScript
RawDownload
import type { ScopedThreadRef } from "@t3tools/contracts"; /** * The server only guarantees preview tab ids are unique within one process. * Desktop resources live across every connected environment, so they need a * stronger identity that also changes when a server process restarts. */export function previewRuntimeTabId(  threadRef: ScopedThreadRef,  serverEpoch: string | null,  tabId: string,): string {  return JSON.stringify([threadRef.environmentId, threadRef.threadId, serverEpoch, tabId]);} export function isCurrentPreviewRuntimeTab(  threadRef: ScopedThreadRef,  serverEpoch: string | null,  tabId: string,  runtimeTabId: string,): boolean {  return previewRuntimeTabId(threadRef, serverEpoch, tabId) === runtimeTabId;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t