MCPcopy Create free account
hub / github.com/anomalyco/opencode / getSystemMode

Function getSystemMode

packages/ui/src/theme/context.tsx:128–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126}
127
128function getSystemMode(): "light" | "dark" {
129 if (typeof window !== "object") return "light"
130 return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
131}
132
133function applyThemeCss(theme: DesktopTheme, themeId: string, mode: "light" | "dark") {
134 const isDark = mode === "dark"

Callers 4

context.tsxFile · 0.85
onStorageFunction · 0.85
onMediaFunction · 0.85
setColorSchemeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected