(queryClient: QueryClient)
| 1217 | }; |
| 1218 | |
| 1219 | export const createChat = (queryClient: QueryClient) => ({ |
| 1220 | mutationFn: (req: TypesGen.CreateChatRequest) => |
| 1221 | API.experimental.createChat(req), |
| 1222 | onSuccess: () => { |
| 1223 | void invalidateChatListQueries(queryClient); |
| 1224 | void queryClient.invalidateQueries({ |
| 1225 | queryKey: chatsByWorkspaceKeyPrefix, |
| 1226 | }); |
| 1227 | }, |
| 1228 | }); |
| 1229 | |
| 1230 | export const createChatMessage = ( |
| 1231 | queryClient: QueryClient, |