// 主题的存储键与默认值。单独一个不带 "use client" 的模块,是因为服务端组件 // (app/layout.tsx 的首屏脚本)也要用它:从 "use client" 模块往服务端 import 常量, // 拿到的只是客户端引用代理,插进脚本字符串里会变成 "undefined"。 export type Theme = "dark" | "light"; export const THEME_STORE = "agenthub.theme"; export const DEFAULT_THEME: Theme = "dark"; export function isTheme(value: unknown): value is Theme { return value === "dark" || value === "light"; }