chore: tool selelct use the same tools data

This commit is contained in:
Joel 2025-01-07 16:58:20 +08:00
parent 0383fce821
commit 55ad1fe1f0
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import type { FC } from 'react'
import { memo } from 'react'
import { useStore } from '../store'
import { useAllBuiltInTools, useAllCustomTools, useAllWorkflowTools } from '@/service/use-tools'
import type { BlockEnum } from '../types'
import { useTabs } from './hooks'
import type { ToolDefaultValue } from './types'
@ -28,9 +28,9 @@ const Tabs: FC<TabsProps> = ({
noBlocks,
}) => {
const tabs = useTabs()
const buildInTools = useStore(s => s.buildInTools)
const customTools = useStore(s => s.customTools)
const workflowTools = useStore(s => s.workflowTools)
const { data: buildInTools } = useAllBuiltInTools()
const { data: customTools } = useAllCustomTools()
const { data: workflowTools } = useAllWorkflowTools()
return (
<div onClick={e => e.stopPropagation()}>