MCPcopy
hub / github.com/pingdotgg/t3code / useThreadPreviewState

Function useThreadPreviewState

apps/web/src/previewStateStore.ts:148–151  ·  view source on GitHub ↗
(ref: ScopedThreadRef | null | undefined)

Source from the content-addressed store, hash-verified

146};
147
148export function useThreadPreviewState(ref: ScopedThreadRef | null | undefined): ThreadPreviewState {
149 const atom = ref ? previewStateAtom(scopedThreadKey(ref)) : emptyPreviewStateAtom;
150 return useAtomValue(atom);
151}
152
153export function useActivePreviewSessions(): Record<string, ThreadPreviewState> {
154 return useAtomValue(activePreviewSessionsAtom);

Callers 2

ChatViewContentFunction · 0.90
PreviewViewFunction · 0.90

Calls 1

scopedThreadKeyFunction · 0.90

Tested by

no test coverage detected