add tool selector in endpoint modal

This commit is contained in:
JzoNg
2024-11-14 00:01:47 +08:00
parent 194a99220b
commit ff1d42bd66
4 changed files with 158 additions and 29 deletions

View File

@ -1,6 +1,6 @@
'use client'
import type { FC } from 'react'
import React, { useState } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { RiArrowRightUpLine, RiCloseLine } from '@remixicon/react'
import ActionButton from '@/app/components/base/action-button'
@ -11,8 +11,6 @@ import Toast from '@/app/components/base/toast'
import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'
import cn from '@/utils/classnames'
import ToolSelector from '@/app/components/tools/tool-selector'
type Props = {
formSchemas: any
defaultValues?: any
@ -40,11 +38,6 @@ const EndpointModal: FC<Props> = ({
onSaved(tempCredential)
}
const [mockTool, setTool] = useState<any>({
provider: 'langgenius/google/google',
tool_name: 'google_search',
})
return (
<Drawer
isOpen
@ -88,7 +81,6 @@ const EndpointModal: FC<Props> = ({
</a>)
: null}
/>
<ToolSelector disabled={false} value={mockTool} onSelect={setTool} />
</div>
<div className={cn('p-4 pt-0 flex justify-end')} >
<div className='flex gap-2'>