fix: avoid duplicate label when displayName equals label
For main/cron sessions, displayName falls back to label, causing 'Label — Label' duplication. Now only shows label suffix when it differs from displayName.
This commit is contained in:
parent
58760b53a0
commit
fd508a34f8
@ -88,7 +88,9 @@ export function renderChatControls(state: AppViewState) {
|
||||
(entry) => entry.key,
|
||||
(entry) => {
|
||||
const base = entry.displayName ?? entry.key;
|
||||
const text = entry.label ? `${base} — ${entry.label}` : base;
|
||||
// Only append label if it differs from displayName
|
||||
const showLabel = entry.label && entry.label !== entry.displayName;
|
||||
const text = showLabel ? `${base} — ${entry.label}` : base;
|
||||
return html`<option value=${entry.key}>${text}</option>`;
|
||||
},
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user