MCPcopy Index your code
hub / github.com/coder/coder / upsertUserChatProviderKey

Function upsertUserChatProviderKey

site/src/api/queries/chats.ts:1720–1731  ·  view source on GitHub ↗
(queryClient: QueryClient)

Source from the content-addressed store, hash-verified

1718};
1719
1720export 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
1733export const deleteUserChatProviderKey = (queryClient: QueryClient) => ({
1734 mutationFn: (providerConfigId: string) =>

Callers 1

AgentSettingsAPIKeysPageFunction · 0.90

Calls 2

allMethod · 0.80

Tested by

no test coverage detected