diff --git a/frontend/packages/core/src/components/AIProviderSelect/index.tsx b/frontend/packages/core/src/components/AIProviderSelect/index.tsx new file mode 100644 index 00000000..2c568c4d --- /dev/null +++ b/frontend/packages/core/src/components/AIProviderSelect/index.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { Select, Space } from 'antd'; +import { useTranslation } from 'react-i18next'; + +export interface AIProviderOption { + label: string; + value: string; +} + +interface AIProviderSelectProps { + value?: string; + onChange?: (value: string) => void; + style?: React.CSSProperties; + options?: AIProviderOption[]; +} + +const defaultOptions: AIProviderOption[] = [ + { label: 'OpenAI', value: 'openai' }, + { label: 'Anthropic', value: 'anthropic' } +]; + +const AIProviderSelect: React.FC = ({ + value, + onChange, + style = { width: 200 }, + options = defaultOptions +}) => { + const { t } = useTranslation(); + + return ( + + {t('AI 供应商')}: + - +