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.1 KB
Raw Blame
import { Cloud } from 'lucide-react';
import { TooltipAnchor } from '@librechat/client';
import type { TPromptGroupSource } from 'librechat-data-provider';
import { useLocalize } from '~/hooks';

/** Pass `interactive={false}` when nested in another interactive element. */
export default function PromptSourceBadge({
  source,
  interactive = true,
}: {
  source: TPromptGroupSource;
  interactive?: boolean;
}) {
  const localize = useLocalize();
  if (source !== 'langfuse') {
    return null;
  }
  const label = localize('com_ui_prompt_source_langfuse');
  if (!interactive) {
    return (
      <span role="img" aria-label={label} className="flex shrink-0 items-center">
        <Cloud className="text-text-secondary size-3.5" aria-hidden="true" />
      </span>
    );
  }
  return (
    <TooltipAnchor
      description={label}
      side="top"
      render={
        <span tabIndex={0} role="img" aria-label={label} className="flex shrink-0 items-center">
          <Cloud className="text-text-secondary size-3.5" aria-hidden="true" />
        </span>
      }
    />
  );
}