You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import Tooltip from '@/app/components/base/tooltip'
|
|
import Link from 'next/link'
|
|
import { RiErrorWarningFill } from '@remixicon/react'
|
|
|
|
type StatusIndicatorsProps = {
|
|
needsConfiguration: boolean
|
|
modelProvider: boolean
|
|
disabled: boolean
|
|
pluginInfo: any
|
|
t: any
|
|
}
|
|
|
|
const StatusIndicators = ({ needsConfiguration, modelProvider, disabled, pluginInfo, t }: StatusIndicatorsProps) => {
|
|
return (
|
|
<>
|
|
{!needsConfiguration && modelProvider && disabled && (
|
|
<Tooltip
|
|
popupContent={t('workflow.nodes.agent.modelSelectorTooltips.deprecated')}
|
|
asChild={false}
|
|
>
|
|
<RiErrorWarningFill className='w-4 h-4 text-text-destructive' />
|
|
</Tooltip>
|
|
)}
|
|
{!modelProvider && !pluginInfo && (
|
|
<Tooltip
|
|
popupContent={
|
|
<div className='flex w-[240px] max-w-[240px] gap-1 flex-col px-1 py-1.5'>
|
|
<div className='text-text-primary title-xs-semi-bold'>{t('workflow.nodes.agent.modelNotInMarketplace.title')}</div>
|
|
<div className='min-w-[200px] text-text-secondary body-xs-regular'>
|
|
{t('workflow.nodes.agent.modelNotInMarketplace.desc')}
|
|
</div>
|
|
<div className='text-text-accent body-xs-regular cursor-pointer z-[100]'>
|
|
<Link
|
|
href={'/plugins'}
|
|
onClick={(e) => {
|
|
e.stopPropagation()
|
|
}}
|
|
>
|
|
{t('workflow.nodes.agent.linkToPlugin')}
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
}
|
|
asChild={false}
|
|
needsDelay
|
|
>
|
|
<RiErrorWarningFill className='w-4 h-4 text-text-destructive' />
|
|
</Tooltip>
|
|
)}
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default StatusIndicators
|