fix(wizard): type OAuth provider login
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user