We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0517eb7 commit b4de030Copy full SHA for b4de030
1 file changed
apps/sim/hooks/queries/tasks.ts
@@ -609,7 +609,8 @@ export function useForkTask(workspaceId?: string) {
609
const queryClient = useQueryClient()
610
return useMutation({
611
mutationFn: forkChat,
612
- onSuccess: (data, variables) => {
+ onSuccess: async (data, variables) => {
613
+ await queryClient.cancelQueries({ queryKey: taskKeys.list(workspaceId) })
614
const existing = queryClient.getQueryData<TaskMetadata[]>(taskKeys.list(workspaceId))
615
if (existing) {
616
const sourceTask = existing.find((t) => t.id === variables.chatId)
0 commit comments