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.

fix use API.get for pair with agent modal (#9090)

Myles Scolnick8d1ea4a2e979
diff --git a/frontend/src/components/editor/actions/pair-with-agent-modal.tsx b/frontend/src/components/editor/actions/pair-with-agent-modal.tsx
index a97eac71e8..4c09ffa099 100644
--- a/frontend/src/components/editor/actions/pair-with-agent-modal.tsx
+++ b/frontend/src/components/editor/actions/pair-with-agent-modal.tsx
@@ -16,6 +16,7 @@ import { Events } from "@/utils/events";
import { Tooltip } from "@/components/ui/tooltip";
import { assertNever } from "@/utils/assertNever";
import { asRemoteURL, useRuntimeManager } from "@/core/runtime/config";
+import { API } from "@/core/network/api";
type AgentTab = "claude" | "codex" | "opencode";
@@ -54,7 +55,9 @@ const SKILL_INSTALL = "npx skills add marimo-team/marimo-pair";
function useAuthToken(): string | null {
const [token, setToken] = useState<string | null>(null);
useEffect(() => {
- fetch(asRemoteURL("/auth/token").href, { credentials: "include" })
+ fetch(asRemoteURL("/auth/token").href, {
+ headers: API.headers(),
+ })
.then((res) =>
res.ok ? (res.json() as Promise<{ token: string | null }>) : null,
)