Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Remove fast-tier icons from model selection UI
Julius Marminge081a6dacdbb6
diff --git a/apps/web/src/appSettings.test.ts b/apps/web/src/appSettings.test.tsindex e07e116af..6c6cbac49 100644--- a/apps/web/src/appSettings.test.ts+++ b/apps/web/src/appSettings.test.ts@@ -4,7 +4,6 @@ import {getAppModelOptions,getSlashModelOptions,normalizeCustomModelSlugs,- shouldShowFastTierIcon,resolveAppModelSelection,} from "./appSettings";@@ -83,11 +82,3 @@ describe("getSlashModelOptions", () => {expect(options.map((option) => option.slug)).toEqual(["openai/gpt-oss-120b"]);});});--describe("shouldShowFastTierIcon", () => {- it("shows the fast-tier icon only for gpt-5.4 when fast mode is enabled", () => {- expect(shouldShowFastTierIcon("gpt-5.4", true)).toBe(true);- expect(shouldShowFastTierIcon("gpt-5.4", false)).toBe(false);- expect(shouldShowFastTierIcon("gpt-5.3-codex", true)).toBe(false);- });-});diff --git a/apps/web/src/appSettings.ts b/apps/web/src/appSettings.tsindex 53177312c..5ed218fb2 100644--- a/apps/web/src/appSettings.ts+++ b/apps/web/src/appSettings.ts@@ -6,7 +6,6 @@ import { getDefaultModel, getModelOptions, normalizeModelSlug } from "@t3tools/sconst APP_SETTINGS_STORAGE_KEY = "t3code:app-settings:v1";const MAX_CUSTOM_MODEL_COUNT = 32;export const MAX_CUSTOM_MODEL_LENGTH = 256;-const MODELS_WITH_FAST_SUPPORT = new Set(["gpt-5.4"]);const BUILT_IN_MODEL_SLUGS_BY_PROVIDER: Record<ProviderKind, ReadonlySet<string>> = {codex: new Set(getModelOptions("codex").map((option) => option.slug)),};@@ -33,18 +32,6 @@ export interface AppModelOption {isCustom: boolean;}-export function shouldShowFastTierIcon(- model: string | null | undefined,- fastModeEnabled: boolean,-): boolean {- const normalizedModel = normalizeModelSlug(model);- return (- fastModeEnabled &&- normalizedModel !== null &&- MODELS_WITH_FAST_SUPPORT.has(normalizedModel)- );-}-const DEFAULT_APP_SETTINGS = AppSettingsSchema.makeUnsafe({});let listeners: Array<() => void> = [];diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex eafabbb36..3362622b7 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -145,7 +145,6 @@ import {XIcon,CopyIcon,CheckIcon,- ZapIcon,} from "lucide-react";import { Button } from "./ui/button";import { Input } from "./ui/input";@@ -205,7 +204,6 @@ import { readNativeApi } from "~/nativeApi";import {getAppModelOptions,resolveAppModelSelection,- shouldShowFastTierIcon,useAppSettings,} from "../appSettings";import {@@ -408,7 +406,6 @@ type ComposerCommandItem =model: ModelSlug;label: string;description: string;- showFastBadge: boolean;};type SendPhase = "idle" | "preparing-worktree" | "sending-turn";@@ -519,9 +516,6 @@ const ComposerCommandMenuItem = memo(function ComposerCommandMenuItem(props: {</Badge>) : null}<span className="flex min-w-0 items-center gap-1.5 truncate">- {props.item.type === "model" && props.item.showFastBadge ? (- <ZapIcon className="size-3.5 shrink-0 text-amber-500" />- ) : null}<span className="truncate">{props.item.label}</span></span><span className="truncate text-muted-foreground/70 text-xs">{props.item.description}</span>@@ -1250,10 +1244,8 @@ export default function ChatView({ threadId }: ChatViewProps) {model: slug,label: name,description: `${providerLabel} · ${slug}`,- showFastBadge:- provider === "codex" && shouldShowFastTierIcon(slug, selectedCodexFastModeEnabled),}));- }, [composerTrigger, searchableModelOptions, selectedCodexFastModeEnabled, workspaceEntries]);+ }, [composerTrigger, searchableModelOptions, workspaceEntries]);const composerMenuOpen = Boolean(composerTrigger);const activeComposerMenuItem = useMemo(() =>@@ -3695,7 +3687,6 @@ export default function ChatView({ threadId }: ChatViewProps) {model={selectedModelForPickerWithCustomFallback}lockedProvider={lockedProvider}modelOptionsByProvider={modelOptionsByProvider}- fastModeEnabled={selectedCodexFastModeEnabled}onProviderModelChange={onProviderModelSelect}/>@@ -5543,7 +5534,6 @@ const ProviderModelPicker = memo(function ProviderModelPicker(props: {model: ModelSlug;lockedProvider: ProviderKind | null;modelOptionsByProvider: Record<ProviderKind, ReadonlyArray<{ slug: string; name: string }>>;- fastModeEnabled: boolean;disabled?: boolean;onProviderModelChange: (provider: ProviderKind, model: ModelSlug) => void;}) {@@ -5573,12 +5563,9 @@ const ProviderModelPicker = memo(function ProviderModelPicker(props: {disabled={props.disabled}/>}- >+ ><span className="flex min-w-0 items-center gap-2"><ProviderIcon aria-hidden="true" className="size-4 shrink-0 text-muted-foreground/70" />- {props.provider === "codex" && shouldShowFastTierIcon(props.model, props.fastModeEnabled) ? (- <ZapIcon className="size-3.5 shrink-0 text-amber-500" />- ) : null}<span className="truncate">{selectedModelLabel}</span><ChevronDownIcon aria-hidden="true" className="size-3 opacity-60" /></span>@@ -5621,10 +5608,6 @@ const ProviderModelPicker = memo(function ProviderModelPicker(props: {value={modelOption.slug}onClick={() => setIsMenuOpen(false)}>- {option.value === "codex" &&- shouldShowFastTierIcon(modelOption.slug, props.fastModeEnabled) ? (- <ZapIcon className="size-3.5 shrink-0 text-amber-500" />- ) : null}{modelOption.name}</MenuRadioItem>))}