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

683 B
Raw Blame
import { createContext, useContext } from 'react';
import { TriangleAlert } from 'lucide-react';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';

export const ToolAuthWarningContext = createContext(false);

export function ToolAuthWarning({ className }: { className?: string }) {
  const localize = useLocalize();
  const suppressed = useContext(ToolAuthWarningContext);

  if (suppressed) {
    return null;
  }

  return (
    <p className={cn('text-text-warning flex items-center text-xs', className)}>
      <TriangleAlert className="me-1.5 inline-block h-4 w-4" aria-hidden="true" />
      {localize('com_assistants_allow_sites_you_trust')}
    </p>
  );
}