From 832b7348465af8cf927809e474f5728a50808eaa Mon Sep 17 00:00:00 2001 From: ethan Date: Mon, 1 Dec 2025 11:25:46 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20make=20model=20tooltip=20?= =?UTF-8?q?abbreviations=20dynamic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tooltip now derives abbreviation examples from KNOWN_MODELS instead of hardcoding model names, so updates to model versions automatically propagate to the tooltip. _Generated with `mux`_ --- src/browser/components/ChatInput/index.tsx | 8 ++++++-- src/common/constants/knownModels.ts | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/browser/components/ChatInput/index.tsx b/src/browser/components/ChatInput/index.tsx index 6190f8011..3f124cbfc 100644 --- a/src/browser/components/ChatInput/index.tsx +++ b/src/browser/components/ChatInput/index.tsx @@ -57,6 +57,7 @@ import { import type { ThinkingLevel } from "@/common/types/thinking"; import type { MuxFrontendMetadata } from "@/common/types/message"; +import { MODEL_ABBREVIATION_EXAMPLES } from "@/common/constants/knownModels"; import { useTelemetry } from "@/browser/hooks/useTelemetry"; import { getTokenCountPromise } from "@/browser/utils/tokenizer/rendererClient"; import { CreationCenterContent } from "./CreationCenterContent"; @@ -933,8 +934,11 @@ export const ChatInput: React.FC = (props) => {

Abbreviations: -
/model opus - Claude Opus 4.1 -
/model sonnet - Claude Sonnet 4.5 + {MODEL_ABBREVIATION_EXAMPLES.map((ex) => ( + +
/model {ex.abbrev} - {ex.displayName} +
+ ))}

Full format: diff --git a/src/common/constants/knownModels.ts b/src/common/constants/knownModels.ts index c4c4d1a5b..ce405f079 100644 --- a/src/common/constants/knownModels.ts +++ b/src/common/constants/knownModels.ts @@ -159,3 +159,9 @@ export const KNOWN_MODEL_OPTIONS = Object.values(KNOWN_MODELS).map((model) => ({ label: formatModelDisplayName(model.providerModelId), value: model.id, })); + +/** Tooltip-friendly abbreviation examples: show representative shortcuts */ +export const MODEL_ABBREVIATION_EXAMPLES = (["opus", "sonnet"] as const).map((abbrev) => ({ + abbrev, + displayName: formatModelDisplayName(MODEL_ABBREVIATIONS[abbrev].split(":")[1]), +}));