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