mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-31 02:24:53 +08:00

Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
26 lines
630 B
TypeScript
26 lines
630 B
TypeScript
import ModelName from '../model-name'
|
|
|
|
type ModelDisplayProps = {
|
|
currentModel: any
|
|
modelId: string
|
|
}
|
|
|
|
const ModelDisplay = ({ currentModel, modelId }: ModelDisplayProps) => {
|
|
return currentModel ? (
|
|
<ModelName
|
|
className="flex grow items-center gap-1 px-1 py-[3px]"
|
|
modelItem={currentModel}
|
|
showMode
|
|
showFeatures
|
|
/>
|
|
) : (
|
|
<div className="flex grow items-center gap-1 truncate px-1 py-[3px] opacity-50">
|
|
<div className="system-sm-regular overflow-hidden text-ellipsis text-components-input-text-filled">
|
|
{modelId}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default ModelDisplay
|