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

531 B
Raw Blame
/**
 * Renderer switch for the message thread, read once per page load. The flat
 * renderer is the default; `VITE_FLAT_THREAD=false` at build time or
 * `LC_FLAT_THREAD=false` in localStorage falls back to the recursive one.
 */
function readFlag(): boolean {
  const fallback = import.meta.env.VITE_FLAT_THREAD !== 'false';
  try {
    const stored = localStorage.getItem('LC_FLAT_THREAD');
    return stored == null ? fallback : stored !== 'false';
  } catch {
    return fallback;
  }
}

export const FLAT_THREAD = readFlag();