fix(wizard): type OAuth provider login
parent
a9bcf88bfa
commit
5f4936dce5
|
|
@ -1,6 +1,10 @@
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
|
||||||
import { loginAnthropic, type OAuthCredentials } from "@mariozechner/pi-ai";
|
import {
|
||||||
|
loginAnthropic,
|
||||||
|
type OAuthCredentials,
|
||||||
|
type OAuthProvider,
|
||||||
|
} from "@mariozechner/pi-ai";
|
||||||
import { discoverAuthStorage } from "@mariozechner/pi-coding-agent";
|
import { discoverAuthStorage } from "@mariozechner/pi-coding-agent";
|
||||||
import { resolveClawdbotAgentDir } from "../agents/agent-paths.js";
|
import { resolveClawdbotAgentDir } from "../agents/agent-paths.js";
|
||||||
import {
|
import {
|
||||||
|
|
@ -247,7 +251,8 @@ export async function runOnboardingWizard(
|
||||||
try {
|
try {
|
||||||
const agentDir = resolveClawdbotAgentDir();
|
const agentDir = resolveClawdbotAgentDir();
|
||||||
const authStorage = discoverAuthStorage(agentDir);
|
const authStorage = discoverAuthStorage(agentDir);
|
||||||
await authStorage.login("openai-codex", {
|
const provider = "openai-codex" as unknown as OAuthProvider;
|
||||||
|
await authStorage.login(provider, {
|
||||||
onAuth: async ({ url }) => {
|
onAuth: async ({ url }) => {
|
||||||
if (isRemote) {
|
if (isRemote) {
|
||||||
spin.stop("OAuth URL ready");
|
spin.stop("OAuth URL ready");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue