Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

504 B
Raw Blame
/* Copyright 2026 Marimo. All rights reserved. */

import { useAtom } from "jotai";
import { atomWithStorage } from "jotai/utils";
import { jotaiJsonStorage } from "@/utils/storage/jotai";

export type FixMode = "prompt" | "autofix" | "chat";

const BASE_KEY = "marimo:ai-autofix-mode";

const fixModeAtom = atomWithStorage<FixMode>(
  BASE_KEY,
  "autofix",
  jotaiJsonStorage,
);

export function useFixMode() {
  const [fixMode, setFixMode] = useAtom(fixModeAtom);
  return { fixMode, setFixMode };
}