mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 17:47:30 +08:00
Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins
This commit is contained in:
commit
53fa13f007
@ -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
|
||||||
|
|||||||
@ -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,
|
})
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user