openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
20 lines (19 loc) • 860 B
JavaScript
import { n as resolveManifestDeprecatedProviderAuthChoice } from "./provider-auth-choices-BfC_56hU.mjs";
//#region src/commands/auth-choice-legacy.ts
/** Resolve a legacy choice and its diagnostics from one manifest generation. */
function resolveLegacyOnboardAuthChoice(e, t) {
if (e === "oauth") return { authChoice: "setup-token" };
if (e !== "claude-cli") return { authChoice: e };
const n = resolveManifestDeprecatedProviderAuthChoice(e, t);
if (!n) return { authChoice: e };
const r = n.choiceLabel.trim() || "the replacement auth choice";
return {
authChoice: n.choiceId,
deprecated: {
message: `Auth choice "${e}" is deprecated; using ${r} setup instead.`,
nonInteractiveError: [`Auth choice "${e}" is deprecated.`, `Use "--auth-choice ${n.choiceId}".`].join("\n")
}
};
}
//#endregion
export { resolveLegacyOnboardAuthChoice as t };