index.tsx 936 B

12345678910111213141516171819202122232425262728293031323334
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import cn from 'classnames'
  5. import { useTranslation } from 'react-i18next'
  6. import s from './style.module.css'
  7. import Config from '@/app/components/explore/universal-chat/config'
  8. type Props = {
  9. modelId: string
  10. plugins: Record<string, boolean>
  11. dataSets: any[]
  12. }
  13. const ConfigViewPanel: FC<Props> = ({
  14. modelId,
  15. plugins,
  16. dataSets,
  17. }) => {
  18. const { t } = useTranslation()
  19. return (
  20. <div className={cn('absolute top-9 right-0 z-20 p-4 bg-white rounded-2xl shadow-md', s.panelBorder)}>
  21. <div className='w-[368px]'>
  22. <Config
  23. readonly
  24. modelId={modelId}
  25. plugins={plugins}
  26. dataSets={dataSets}
  27. />
  28. <div className='mt-3 text-xs leading-[18px] text-500 font-normal'>{t('explore.universalChat.viewConfigDetailTip')}</div>
  29. </div>
  30. </div>
  31. )
  32. }
  33. export default React.memo(ConfigViewPanel)