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

740 B
Raw Blame
import { atom, PrimitiveAtom } from 'jotai';
import { NotificationSeverity } from '~/common';

export const fontSizeAtom: PrimitiveAtom<string> & {
  init: string;
} = atom<string>('text-base');

export type ToastState = {
  open: boolean;
  message: string;
  severity: NotificationSeverity;
  showIcon: boolean;
  /** Milliseconds until the toast closes itself, or `Infinity` to require a dismissal. */
  duration: number;
  /** Increments per shown toast, so each one gets its own close deadline. */
  id: number;
};

export const toastState: PrimitiveAtom<ToastState> & {
  init: ToastState;
} = atom<ToastState>({
  open: false,
  message: '',
  severity: NotificationSeverity.SUCCESS,
  showIcon: true,
  duration: 3000,
  id: 0,
});