mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 23:31:24 +00:00
fix: align embedded runner with pi-coding-agent API
This commit is contained in:
@@ -15,10 +15,15 @@ import { ensureAuthStoreFile, resolveAuthStorePath } from "./paths.js";
|
||||
import { suggestOAuthProfileIdForLegacyDefault } from "./repair.js";
|
||||
import { ensureAuthProfileStore, saveAuthProfileStore } from "./store.js";
|
||||
|
||||
const OAUTH_PROVIDER_IDS = new Set(getOAuthProviders().map((provider) => provider.id));
|
||||
const OAUTH_PROVIDER_IDS = new Set<OAuthProvider>(
|
||||
getOAuthProviders().map((provider) => provider.id as OAuthProvider),
|
||||
);
|
||||
|
||||
const isOAuthProvider = (provider: string): provider is OAuthProvider =>
|
||||
OAUTH_PROVIDER_IDS.has(provider as OAuthProvider);
|
||||
|
||||
const resolveOAuthProvider = (provider: string): OAuthProvider | null =>
|
||||
OAUTH_PROVIDER_IDS.has(provider) ? provider : null;
|
||||
isOAuthProvider(provider) ? provider : null;
|
||||
|
||||
function buildOAuthApiKey(provider: string, credentials: OAuthCredentials): string {
|
||||
const needsProjectId = provider === "google-gemini-cli" || provider === "google-antigravity";
|
||||
|
||||
Reference in New Issue
Block a user