Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins

This commit is contained in:
AkaraChen 2024-11-07 16:44:46 +08:00
commit 53fa13f007
2 changed files with 6 additions and 8 deletions

View File

@ -51,7 +51,7 @@ const ToolPicker: FC<Props> = ({
const { data: buildInTools } = useAllBuiltInTools() const { data: buildInTools } = useAllBuiltInTools()
const { data: customTools } = useAllCustomTools() const { data: customTools } = useAllCustomTools()
const { invalidate: invalidateCustomTools } = useInvalidateAllCustomTools() const invalidateCustomTools = useInvalidateAllCustomTools()
const { data: workflowTools } = useAllWorkflowTools() const { data: workflowTools } = useAllWorkflowTools()
const handleAddedCustomTool = invalidateCustomTools const handleAddedCustomTool = invalidateCustomTools

View File

@ -30,13 +30,11 @@ export const useAllCustomTools = () => {
export const useInvalidateAllCustomTools = () => { export const useInvalidateAllCustomTools = () => {
const queryClient = useQueryClient() const queryClient = useQueryClient()
return { return () => {
invalidate: () => { queryClient.invalidateQueries(
queryClient.invalidateQueries( {
{ queryKey: useAllCustomToolsKey,
queryKey: useAllCustomToolsKey, })
})
},
} }
} }