diff --git a/apps/ai-game-creator-shell/src/features/project-workspace/ConversationModelSelect.tsx b/apps/ai-game-creator-shell/src/features/project-workspace/ConversationModelSelect.tsx index aed89fa26..66dfa522a 100644 --- a/apps/ai-game-creator-shell/src/features/project-workspace/ConversationModelSelect.tsx +++ b/apps/ai-game-creator-shell/src/features/project-workspace/ConversationModelSelect.tsx @@ -98,6 +98,9 @@ export function ConversationModelSelect({ const [busy, setBusy] = useState(!initialCatalog); const [error, setError] = useState(''); const [notice, setNotice] = useState(''); + /** 触发钮上显示的模型名(目录还没读完时用「模型」占位);同时用作触发钮的 `title`。 */ + const triggerLabel = + models.find((model) => model.id === selected)?.displayName ?? '模型'; const [manualRefreshBusy, setManualRefreshBusy] = useState(false); const [open, setOpen] = useState(false); const containerRef = useRef(null); @@ -502,6 +505,8 @@ export function ConversationModelSelect({ type="button" className="conversation-model-trigger" aria-label="对话模型" + /* 触发钮最窄可缩到 64px,模型名靠省略号收住:补 `title` 让被截断的名字仍可查看。 */ + title={triggerLabel} aria-haspopup="listbox" aria-expanded={open} disabled={disabled} @@ -517,7 +522,7 @@ export function ConversationModelSelect({ /> {/* 控件位只显示已选模型名;目录还没读完时用「模型」占位(加载提示留在菜单里)。 */} - {models.find((model) => model.id === selected)?.displayName ?? '模型'} + {triggerLabel}