add model info in model selector

This commit is contained in:
JzoNg
2024-12-31 12:38:07 +08:00
parent 3bed0346d7
commit df421796bb
8 changed files with 116 additions and 18 deletions

View File

@ -10,6 +10,8 @@ import Drawer from '@/app/components/base/drawer'
import type { PluginDetail } from '@/app/components/plugins/types'
import cn from '@/utils/classnames'
import ModelParameterModal from '@/app/components/plugins/plugin-detail-panel/model-selector'
type Props = {
detail?: PluginDetail
onUpdate: () => void
@ -52,6 +54,15 @@ const PluginDetailPanel: FC<Props> = ({
{!!detail.declaration.agent_strategy && <AgentStrategyList detail={detail} />}
{!!detail.declaration.endpoint && <EndpointList detail={detail} />}
{!!detail.declaration.model && <ModelList detail={detail} />}
<ModelParameterModal
popupClassName='!w-[387px]'
isAdvancedMode
isInWorkflow
isAgentStrategy={true}
value={null}
setModel={() => {}}
scope={'llm'}
/>
</div>
</>
)}

View File

@ -205,7 +205,7 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
)
}
</PortalToFollowElemTrigger>
<PortalToFollowElemContent className={cn('z-[60]', portalToFollowElemContentClassName)}>
<PortalToFollowElemContent className={cn('z-50', portalToFollowElemContentClassName)}>
<div className={cn(popupClassName, 'w-[389px] rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg shadow-lg')}>
<div className={cn('max-h-[420px] p-4 pt-3 overflow-y-auto')}>
<div className='relative'>