Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

675 B
Raw Blame
import { QueryClient } from "@tanstack/react-query";

import { TeamHubError } from "@/features/teamhub/teamhub-client";

export function createAppQueryClient() {
  return new QueryClient({
    defaultOptions: {
      mutations: {
        networkMode: "always",
      },
      queries: {
        networkMode: "always",
        // Retry once, but not after 401 or a search TeamHub stopped at its
        // time limit, which would only time out again.
        retry: (failureCount, error) =>
          !(
            error instanceof TeamHubError &&
            (error.status === 401 || error.code === "SEARCH_TIMEOUT")
          ) && failureCount < 1,
      },
    },
  });
}