@bitkyc08/opencodex
Version:
Universal provider proxy for OpenAI Codex & Claude Code — use any LLM with Codex CLI/App/SDK and Claude Code
15 lines (12 loc) • 840 B
text/typescript
export const CODEX_CATALOG_REFRESH_PENDING_WARNING =
"Warning: the account change was saved, but the Codex model catalog refresh is pending. Run 'ocx sync' to retry.";
/** Read only the public completion flag from an account mutation response. */
export function codexCatalogRefreshPending(value: unknown): boolean {
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
const descriptor = Object.getOwnPropertyDescriptor(value, "catalogRefreshPending");
return descriptor !== undefined && "value" in descriptor && descriptor.value === true;
}
/** Print fixed recovery guidance without reflecting server or account details. */
export function warnIfCodexCatalogRefreshPending(value: unknown): void {
if (codexCatalogRefreshPending(value)) console.error(CODEX_CATALOG_REFRESH_PENDING_WARNING);
}