Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
Badge GPT-5.5 xhigh as Max; fix stale enum ref in models.test
Abi Raja12c203f84b4c
diff --git a/frontend/src/lib/models.test.ts b/frontend/src/lib/models.test.tsindex 84101383..9a06ef91 100644--- a/frontend/src/lib/models.test.ts+++ b/frontend/src/lib/models.test.ts@@ -2,31 +2,33 @@ import { CodeGenerationModel, getVariantLabel } from "./models";const FLASH_MIN = CodeGenerationModel.GEMINI_3_FLASH_PREVIEW_MINIMAL;const PRO_HIGH = CodeGenerationModel.GEMINI_3_1_PRO_PREVIEW_HIGH;-const CODEX_HIGH = CodeGenerationModel.GPT_5_2_CODEX_HIGH;+const GPT_XHIGH = CodeGenerationModel.GPT_5_5_XHIGH;const PRO_LOW = CodeGenerationModel.GEMINI_3_1_PRO_PREVIEW_LOW;describe("getVariantLabel", () => {- test("image/create: Flash-minimal -> Fast, Pro-high -> Max", () => {+ test("image/create: Flash-minimal -> Fast; Pro-high & GPT-5.5 xhigh -> Max", () => {const ctx = { inputMode: "image" as const, generationType: "create" as const };expect(getVariantLabel(FLASH_MIN, ctx)).toEqual({ text: "Fast", tone: "fast" });expect(getVariantLabel(PRO_HIGH, ctx)).toEqual({ text: "Max", tone: "max" });- // The other image/create models stay unlabelled.- expect(getVariantLabel(CODEX_HIGH, ctx)).toBeNull();+ expect(getVariantLabel(GPT_XHIGH, ctx)).toEqual({ text: "Max", tone: "max" });+ // Flash-high stays unlabelled.expect(getVariantLabel(CodeGenerationModel.GEMINI_3_FLASH_PREVIEW_HIGH, ctx)).toBeNull();});- test("text/create: Flash-minimal -> Fast; Pro-low has no Max", () => {+ test("text/create: Flash-minimal -> Fast, GPT-5.5 xhigh -> Max; Pro-low unlabelled", () => {const ctx = { inputMode: "text" as const, generationType: "create" as const };expect(getVariantLabel(FLASH_MIN, ctx)).toEqual({ text: "Fast", tone: "fast" });+ expect(getVariantLabel(GPT_XHIGH, ctx)).toEqual({ text: "Max", tone: "max" });expect(getVariantLabel(PRO_LOW, ctx)).toBeNull();});- test("image/update: no labels (Flash-minimal reused but unlabelled)", () => {+ test("image/update: no labels (heavyweight variants reused but unlabelled)", () => {const ctx = { inputMode: "image" as const, generationType: "update" as const };expect(getVariantLabel(FLASH_MIN, ctx)).toBeNull();expect(getVariantLabel(PRO_HIGH, ctx)).toBeNull();+ expect(getVariantLabel(GPT_XHIGH, ctx)).toBeNull();});test("text/update: no labels", () => {diff --git a/frontend/src/lib/models.ts b/frontend/src/lib/models.tsindex 9b4026dc..ea32ae68 100644--- a/frontend/src/lib/models.ts+++ b/frontend/src/lib/models.ts@@ -37,10 +37,12 @@ export interface VariantLabelContext {generationType: "create" | "update";}-// Per-model badge text. Only these two models are labelled.+// Per-model badge text. Only these models are labelled. GPT-5.5 xhigh and+// Gemini 3.1 Pro high are the heavyweight variants, so both read "Max".const VARIANT_LABELS: Partial<Record<CodeGenerationModel, VariantLabel>> = {[CodeGenerationModel.GEMINI_3_FLASH_PREVIEW_MINIMAL]: { text: "Fast", tone: "fast" },[CodeGenerationModel.GEMINI_3_1_PRO_PREVIEW_HIGH]: { text: "Max", tone: "max" },+ [CodeGenerationModel.GPT_5_5_XHIGH]: { text: "Max", tone: "max" },};// Badges are only shown on create flows and on any video flow. In particular