(queryClient: QueryClient)
| 1718 | }; |
| 1719 | |
| 1720 | export const upsertUserChatProviderKey = (queryClient: QueryClient) => ({ |
| 1721 | mutationFn: ({ providerConfigId, req }: UpsertUserChatProviderKeyArgs) => |
| 1722 | API.experimental.upsertUserAIProviderKey(providerConfigId, req), |
| 1723 | onSuccess: async () => { |
| 1724 | await Promise.all([ |
| 1725 | queryClient.invalidateQueries({ |
| 1726 | queryKey: userChatProviderConfigsKey, |
| 1727 | }), |
| 1728 | queryClient.invalidateQueries({ queryKey: chatModelsKey }), |
| 1729 | ]); |
| 1730 | }, |
| 1731 | }); |
| 1732 | |
| 1733 | export const deleteUserChatProviderKey = (queryClient: QueryClient) => ({ |
| 1734 | mutationFn: (providerConfigId: string) => |
no test coverage detected