Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

665 B
Raw Blame
/**
 * Per-bot usage state.
 *
 * Mirror of `apps/web/src/state/botUsage.ts` over mobile's atom wiring, so both
 * clients read the same `bot.usage` query. The query does not poll: it reads
 * again when the app returns to the foreground, when the screen is focused, and
 * on pull-to-refresh.
 *
 * @module state/botUsage
 */
import { createBotUsageEnvironmentAtoms } from "@akeru/client-runtime/state/bot-usage";

import { connectionAtomRuntime } from "../connection/runtime";
import { appFocusSignalAtom } from "./appFocusSignal";

export const botUsageEnvironment = createBotUsageEnvironmentAtoms(connectionAtomRuntime, {
  focusSignal: appFocusSignalAtom,
});