fix(codex): accept ChatGPT Edu Plus accounts #7869
ClosedExotic209093(GitHub profile, opens in a new tab)wants to merge 2 commits into
main fromrefs/pull/7869/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- packages/effect-codex-app-server/src/_internal/shared.ts line 49OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -19,0 +29,21 @@29+ "team",30+ "self_serve_business_usage_based",31+ "business",32+ "enterprise_cbp_usage_based",33+ "enterprise",34+ "edu",35+ "unknown",36+]);37+38+export const normalizeUnknownPlanTypes = (value: unknown): unknown => {39+ if (Array.isArray(value)) {40+ return value.map(normalizeUnknownPlanTypes);41+ }42+ if (typeof value !== "object" || value === null) {43+ return value;44+ }45+46+ return Object.fromEntries(47+ Object.entries(value).map(([key, child]) => [48+ key,49+ key === "planType" && typeof child === "string" && !KNOWN_PLAN_TYPES.has(child)
- @@ -19,0 +31,21 @@31+ "business",32+ "enterprise_cbp_usage_based",33+ "enterprise",34+ "edu",35+ "unknown",36+]);37+38+export const normalizeUnknownPlanTypes = (value: unknown): unknown => {39+ if (Array.isArray(value)) {40+ return value.map(normalizeUnknownPlanTypes);41+ }42+ if (typeof value !== "object" || value === null) {43+ return value;44+ }45+46+ return Object.fromEntries(47+ Object.entries(value).map(([key, child]) => [48+ key,49+ key === "planType" && typeof child === "string" && !KNOWN_PLAN_TYPES.has(child)50+ ? "unknown"51+ : normalizeUnknownPlanTypes(child),@@ -31,4 +67,6 @@3167 );3268 }336934- return Schema.decodeUnknownEffect(schema)(raw).pipe(70+ return Schema.decodeUnknownEffect(schema)(71+ typeof raw === "object" && raw !== null ? normalizeUnknownPlanTypes(raw) : raw,72+ ).pipe(
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
4676644d-ef97-4b24-ac5b-4c1b08303bc2You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Comment `@coderabbitai help` to get the list of available commands.