import { useTranslation } from "react-i18next"; import { FormLabel } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import ApiKeyInput from "@/components/ProviderForm/ApiKeyInput"; import EndpointSpeedTest from "@/components/ProviderForm/EndpointSpeedTest"; import { Zap } from "lucide-react"; import type { ProviderCategory } from "@/types"; interface CodexFormFieldsProps { // API Key codexApiKey: string; onApiKeyChange: (key: string) => void; category?: ProviderCategory; shouldShowApiKeyLink: boolean; websiteUrl: string; // Base URL shouldShowSpeedTest: boolean; codexBaseUrl: string; onBaseUrlChange: (url: string) => void; isEndpointModalOpen: boolean; onEndpointModalToggle: (open: boolean) => void; onCustomEndpointsChange: (endpoints: string[]) => void; } export function CodexFormFields({ codexApiKey, onApiKeyChange, category, shouldShowApiKeyLink, websiteUrl, shouldShowSpeedTest, codexBaseUrl, onBaseUrlChange, isEndpointModalOpen, onEndpointModalToggle, onCustomEndpointsChange, }: CodexFormFieldsProps) { const { t } = useTranslation(); return ( <> {/* Codex API Key 输入框 */}
{t("providerForm.codexApiHint", { defaultValue: "Codex API 端点地址", })}