wwf
4 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/header/account-setting/model-provider-page/model-name/index.tsx
@@ -37,45 +37,43 @@
  if (!modelItem)
    return null
  return (
    <div className={cn('system-sm-regular flex items-center gap-0.5 overflow-hidden truncate text-ellipsis text-components-input-text-filled', className)}>
    <div className={cn('flex items-center truncate text-components-input-text-filled system-sm-regular', className)}>
      <div
        className='truncate'
        title={modelItem.label[language] || modelItem.label.en_US}
      >
        {modelItem.label[language] || modelItem.label.en_US}
      </div>
      <div className='flex items-center gap-0.5'>
        {
          showModelType && modelItem.model_type && (
            <ModelBadge className={modelTypeClassName}>
              {modelTypeFormat(modelItem.model_type)}
            </ModelBadge>
          )
        }
        {
          modelItem.model_properties.mode && showMode && (
            <ModelBadge className={modeClassName}>
              {(modelItem.model_properties.mode as string).toLocaleUpperCase()}
            </ModelBadge>
          )
        }
        {
          showFeatures && modelItem.features?.map(feature => (
            <FeatureIcon
              key={feature}
              feature={feature}
              className={featuresClassName}
            />
          ))
        }
        {
          showContextSize && modelItem.model_properties.context_size && (
            <ModelBadge>
              {sizeFormat(modelItem.model_properties.context_size as number)}
            </ModelBadge>
          )
        }
      </div>
      {
        showModelType && modelItem.model_type && (
          <ModelBadge className={cn('ml-1', modelTypeClassName)}>
            {modelTypeFormat(modelItem.model_type)}
          </ModelBadge>
        )
      }
      {
        modelItem.model_properties.mode && showMode && (
          <ModelBadge className={cn('ml-1', modeClassName)}>
            {(modelItem.model_properties.mode as string).toLocaleUpperCase()}
          </ModelBadge>
        )
      }
      {
        showFeatures && modelItem.features?.map(feature => (
          <FeatureIcon
            key={feature}
            feature={feature}
            className={featuresClassName}
          />
        ))
      }
      {
        showContextSize && modelItem.model_properties.context_size && (
          <ModelBadge className='ml-1'>
            {sizeFormat(modelItem.model_properties.context_size as number)}
          </ModelBadge>
        )
      }
      {children}
    </div>
  )