mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 17:30:16 +01:00
21 lines
703 B
TypeScript
21 lines
703 B
TypeScript
|
|
import { QueryKeys, dataService } from 'librechat-data-provider';
|
||
|
|
import { useQuery } from '@tanstack/react-query';
|
||
|
|
import type { QueryObserverResult, UseQueryOptions } from '@tanstack/react-query';
|
||
|
|
import type t from 'librechat-data-provider';
|
||
|
|
|
||
|
|
export const useVerifyAgentToolAuth = (
|
||
|
|
params: t.VerifyToolAuthParams,
|
||
|
|
config?: UseQueryOptions<t.VerifyToolAuthResponse>,
|
||
|
|
): QueryObserverResult<t.VerifyToolAuthResponse> => {
|
||
|
|
return useQuery<t.VerifyToolAuthResponse>(
|
||
|
|
[QueryKeys.toolAuth, params.toolId],
|
||
|
|
() => dataService.getVerifyAgentToolAuth(params),
|
||
|
|
{
|
||
|
|
refetchOnWindowFocus: false,
|
||
|
|
refetchOnReconnect: false,
|
||
|
|
refetchOnMount: false,
|
||
|
|
...config,
|
||
|
|
},
|
||
|
|
);
|
||
|
|
};
|