Add hover tooltips for clipped model names (#1982) (#1985)

Long model names are truncated with ellipsis in two places with no way to see
the full name: the model-picker dropdown items and the chat-header model
indicator. Add a native title tooltip carrying the full name to both — the
dropdown item's name span (nameSpan.title = m.display) and the header label
(label.title = the full model id; empty for the 'Select model' placeholder).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
lekt8
2026-06-08 01:23:44 +08:00
committed by GitHub
parent 3a91c11ff8
commit accdc4fc53
2 changed files with 32 additions and 0 deletions
+6
View File
@@ -328,6 +328,9 @@ function _initModelPickerDropdown() {
const nameSpan = document.createElement('span');
nameSpan.className = 'mp-model-name';
nameSpan.textContent = m.display;
// Long model names are clipped with ellipsis — expose the full name on
// hover so the suffix/variant tag is still discoverable (#1982).
nameSpan.title = m.display;
row.appendChild(nameSpan);
if (m.stale) {
const badge = document.createElement('span');
@@ -735,6 +738,9 @@ export function updateModelPicker() {
}
const displayName = modelId ? modelId.split('/').pop() : 'Select model';
// The header indicator clips long names with ellipsis; show the full model
// identifier on hover (#1982). No tooltip on the "Select model" placeholder.
label.title = modelId || '';
const logo = modelId ? providerLogo(modelId) : null;
if (logo) {
label.innerHTML = '<span class="model-picker-logo">' + logo + '</span> ' + displayName;