fix: sync protocol artifacts and resolve linting errors

This commit is contained in:
meaningfool
2026-01-12 17:46:43 +01:00
committed by Peter Steinberger
parent f249a82383
commit 93ae3b8405

View File

@@ -87,9 +87,9 @@ function normalizeApiKeyInput(raw: string): string {
const unquoted = const unquoted =
valuePart.length >= 2 && valuePart.length >= 2 &&
((valuePart.startsWith('"') && valuePart.endsWith('"')) || ((valuePart.startsWith('"') && valuePart.endsWith('"')) ||
(valuePart.startsWith("'") && valuePart.endsWith("'")) || (valuePart.startsWith("'") && valuePart.endsWith("'")) ||
(valuePart.startsWith("`") && valuePart.endsWith("`"))) (valuePart.startsWith("`") && valuePart.endsWith("`")))
? valuePart.slice(1, -1) ? valuePart.slice(1, -1)
: valuePart; : valuePart;
@@ -133,20 +133,20 @@ export async function warnIfModelConfigLooksOff(
const configWithModel = const configWithModel =
agentModelOverride && agentModelOverride.length > 0 agentModelOverride && agentModelOverride.length > 0
? { ? {
...config, ...config,
agents: { agents: {
...config.agents, ...config.agents,
defaults: { defaults: {
...config.agents?.defaults, ...config.agents?.defaults,
model: { model: {
...(typeof config.agents?.defaults?.model === "object" ...(typeof config.agents?.defaults?.model === "object"
? config.agents.defaults.model ? config.agents.defaults.model
: undefined), : undefined),
primary: agentModelOverride, primary: agentModelOverride,
},
}, },
}, },
}, }
}
: config; : config;
const ref = resolveConfiguredModelRef({ const ref = resolveConfiguredModelRef({
cfg: configWithModel, cfg: configWithModel,
@@ -239,8 +239,8 @@ export async function applyAuthChoice(params: {
const storeWithKeychain = hasClaudeCli const storeWithKeychain = hasClaudeCli
? store ? store
: ensureAuthProfileStore(params.agentDir, { : ensureAuthProfileStore(params.agentDir, {
allowKeychainPrompt: true, allowKeychainPrompt: true,
}); });
if (!storeWithKeychain.profiles[CLAUDE_CLI_PROFILE_ID]) { if (!storeWithKeychain.profiles[CLAUDE_CLI_PROFILE_ID]) {
if (process.stdin.isTTY) { if (process.stdin.isTTY) {
@@ -540,15 +540,15 @@ export async function applyAuthChoice(params: {
await params.prompter.note( await params.prompter.note(
isRemote isRemote
? [ ? [
"You are running in a remote/VPS environment.", "You are running in a remote/VPS environment.",
"A URL will be shown for you to open in your LOCAL browser.", "A URL will be shown for you to open in your LOCAL browser.",
"After signing in, paste the redirect URL back here.", "After signing in, paste the redirect URL back here.",
].join("\n") ].join("\n")
: [ : [
"Browser will open for OpenAI authentication.", "Browser will open for OpenAI authentication.",
"If the callback doesn't auto-complete, paste the redirect URL.", "If the callback doesn't auto-complete, paste the redirect URL.",
"OpenAI OAuth uses localhost:1455 for the callback.", "OpenAI OAuth uses localhost:1455 for the callback.",
].join("\n"), ].join("\n"),
"OpenAI Codex OAuth", "OpenAI Codex OAuth",
); );
const spin = params.prompter.progress("Starting OAuth flow…"); const spin = params.prompter.progress("Starting OAuth flow…");
@@ -652,15 +652,15 @@ export async function applyAuthChoice(params: {
await params.prompter.note( await params.prompter.note(
isRemote isRemote
? [ ? [
"You are running in a remote/VPS environment.", "You are running in a remote/VPS environment.",
"A URL will be shown for you to open in your LOCAL browser.", "A URL will be shown for you to open in your LOCAL browser.",
"After signing in, copy the redirect URL and paste it back here.", "After signing in, copy the redirect URL and paste it back here.",
].join("\n") ].join("\n")
: [ : [
"Browser will open for Google authentication.", "Browser will open for Google authentication.",
"Sign in with your Google account that has Antigravity access.", "Sign in with your Google account that has Antigravity access.",
"The callback will be captured automatically on localhost:51121.", "The callback will be captured automatically on localhost:51121.",
].join("\n"), ].join("\n"),
"Google Antigravity OAuth", "Google Antigravity OAuth",
); );
const spin = params.prompter.progress("Starting OAuth flow…"); const spin = params.prompter.progress("Starting OAuth flow…");
@@ -718,11 +718,11 @@ export async function applyAuthChoice(params: {
...nextConfig.agents?.defaults, ...nextConfig.agents?.defaults,
model: { model: {
...(existingModel && ...(existingModel &&
"fallbacks" in (existingModel as Record<string, unknown>) "fallbacks" in (existingModel as Record<string, unknown>)
? { ? {
fallbacks: (existingModel as { fallbacks?: string[] }) fallbacks: (existingModel as { fallbacks?: string[] })
.fallbacks, .fallbacks,
} }
: undefined), : undefined),
primary: modelKey, primary: modelKey,
}, },