Files
kandev/apps/web/lib/state/slices/ui/transcript-auto-scroll-selectors.ts
T
2026-07-29 18:51:38 +01:00

13 lines
426 B
TypeScript

/**
* Auto-scroll is enabled by default for every session; a session only
* shows up in the map once the user has explicitly toggled it off (or back
* on) via the transcript's auto-scroll toggle button.
*/
export function isTranscriptAutoScrollEnabled(
enabledBySessionId: Record<string, boolean>,
sessionId: string | null,
): boolean {
if (!sessionId) return true;
return enabledBySessionId[sessionId] ?? true;
}