Feat/model as tool (#2744)

This commit is contained in:
Yeuoly
2024-03-08 15:22:55 +08:00
committed by GitHub
parent 3231a8c51c
commit 40c646cf7a
26 changed files with 840 additions and 43 deletions

View File

@@ -35,6 +35,7 @@ const Item: FC<Props> = ({
const language = getLanguage(locale)
const isBuiltIn = collection.type === CollectionType.builtIn
const isModel = collection.type === CollectionType.model
const canShowDetail = isInToolsPage
const [showDetail, setShowDetail] = useState(false)
const addBtn = <Button className='shrink-0 flex items-center h-7 !px-3 !text-xs !font-medium !text-gray-700' disabled={added || !collection.is_team_authorization} onClick={() => onAdd?.(payload)}>{t(`common.operation.${added ? 'added' : 'add'}`)}</Button>
@@ -73,6 +74,7 @@ const Item: FC<Props> = ({
setShowDetail(false)
}}
isBuiltIn={isBuiltIn}
isModel={isModel}
/>
)}
</>