Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

1.4 KB
Raw Blame
// This file is kept for backward compatibility but is no longer used internally.
// Theme state is now managed via React useState + localStorage in ThemeProvider.

import { WritableAtom } from 'jotai';
import { IThemeRGB } from 'librechat-data-provider';
import { atomWithStorage, RESET } from 'jotai/utils';

/**
 * @deprecated Use ThemeContext instead. This atom is no longer used internally.
 */
export const themeModeAtom: WritableAtom<
  string,
  [string | typeof RESET | ((prev: string) => string | typeof RESET)],
  void
> = atomWithStorage<string>('color-theme', 'system', undefined, {
  getOnInit: true,
});

/**
 * @deprecated Use ThemeContext instead. This atom is no longer used internally.
 */
export const themeColorsAtom: WritableAtom<
  IThemeRGB | undefined,
  [
    | IThemeRGB
    | typeof RESET
    | ((prev: IThemeRGB | undefined) => IThemeRGB | typeof RESET | undefined)
    | undefined,
  ],
  void
> = atomWithStorage<IThemeRGB | undefined>('theme-colors', undefined, undefined, {
  getOnInit: true,
});

/**
 * @deprecated Use ThemeContext instead. This atom is no longer used internally.
 */
export const themeNameAtom: WritableAtom<
  string | undefined,
  [
    | string
    | typeof RESET
    | ((prev: string | undefined) => string | typeof RESET | undefined)
    | undefined,
  ],
  void
> = atomWithStorage<string | undefined>('theme-name', undefined, undefined, {
  getOnInit: true,
});