Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

384 B
Raw Blame
/** The saved theme choice as a live value. The platform seam owns the storage. */
import { useSyncExternalStore } from 'react'
import { getThemePref, onThemeChange, type ThemePref } from '../../../platform'

export function useThemePref(): ThemePref {
  return useSyncExternalStore(
    (notify) => onThemeChange(() => notify()),
    getThemePref,
    () => 'system' as const,
  )
}