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

597 B
Raw Blame
import { applyFontSize } from '@librechat/client';
import { createStorageAtomWithEffect, initializeFromStorage } from './jotai-utils';

const DEFAULT_FONT_SIZE = 'text-base';

/**
 * This atom stores the user's font size preference
 */
export const fontSizeAtom = createStorageAtomWithEffect<string>(
  'fontSize',
  DEFAULT_FONT_SIZE,
  applyFontSize,
);

/**
 * Initialize font size on app load
 * This function applies the saved font size from localStorage to the DOM
 */
export const initializeFontSize = (): void => {
  initializeFromStorage('fontSize', DEFAULT_FONT_SIZE, applyFontSize);
};