fix: show rich session names in chat UIs

This commit is contained in:
Peter Steinberger
2026-01-03 05:07:13 +01:00
parent fabad7aa7a
commit b417fe5727
4 changed files with 16 additions and 5 deletions

View File

@@ -43,7 +43,10 @@ export function renderChat(props: ChatProps) {
props.onSessionKeyChange((e.target as HTMLSelectElement).value)}
>
${sessionOptions.map(
(entry) => html`<option value=${entry.key}>${entry.key}</option>`,
(entry) =>
html`<option value=${entry.key}>
${entry.displayName ?? entry.key}
</option>`,
)}
</select>
</label>
@@ -115,6 +118,7 @@ export function renderChat(props: ChatProps) {
type SessionOption = {
key: string;
updatedAt?: number | null;
displayName?: string;
};
function resolveSessionOptions(