| | |
| | | import type { FC } from 'react' |
| | | import { useTranslation } from 'react-i18next' |
| | | import { RiEqualizer2Line } from '@remixicon/react' |
| | | import type { ModelProvider } from '../declarations' |
| | | import { |
| | | ConfigurationMethodEnum, |
| | |
| | | import PriorityUseTip from './priority-use-tip' |
| | | import { UPDATE_MODEL_PROVIDER_CUSTOM_MODEL_LIST } from './index' |
| | | import Indicator from '@/app/components/header/indicator' |
| | | import { Settings01 } from '@/app/components/base/icons/src/vender/line/general' |
| | | import Button from '@/app/components/base/button' |
| | | import { changeModelProviderPriority } from '@/service/common' |
| | | import { useToastContext } from '@/app/components/base/toast' |
| | |
| | | <> |
| | | { |
| | | provider.provider_credential_schema && ( |
| | | <div className='relative ml-1 w-[112px] shrink-0 rounded-lg border-[0.5px] border-components-panel-border bg-white/[0.18] p-1'> |
| | | <div className='system-xs-medium-uppercase mb-1 flex h-5 items-center justify-between pl-2 pr-[7px] pt-1 text-text-tertiary'> |
| | | <div className='shrink-0 relative ml-1 p-1 w-[112px] rounded-lg bg-white/[0.3] border-[0.5px] border-black/5'> |
| | | <div className='flex items-center justify-between mb-1 pt-1 pl-2 pr-[7px] h-5 text-xs font-medium text-gray-500'> |
| | | API-KEY |
| | | <Indicator color={isCustomConfigured ? 'green' : 'red'} /> |
| | | <Indicator color={isCustomConfigured ? 'green' : 'gray'} /> |
| | | </div> |
| | | <div className='flex items-center gap-0.5'> |
| | | <Button |
| | |
| | | size='small' |
| | | onClick={onSetup} |
| | | > |
| | | <RiEqualizer2Line className='mr-1 h-3.5 w-3.5' /> |
| | | <Settings01 className='mr-1 w-3 h-3' /> |
| | | {t('common.operation.setup')} |
| | | </Button> |
| | | { |