fix(tui): show absolute position numbers in model picker

The model picker displayed row numbers 1-12 regardless of scroll
position, making it impossible to tell where you were in the list.
Now shows the actual item index (e.g. 5, 6, 7... when scrolled down).

Also removed '1-9,0 quick' from the hint text since digit shortcuts
still work relative to the visible window, which would be confusing
with absolute numbering.
This commit is contained in:
Austin Pickett 2026-04-30 20:04:42 -04:00
parent 443950e827
commit 36fa8a4d28

View file

@ -207,7 +207,7 @@ export function ModelPicker({ gw, onCancel, onSelect, sessionId, t }: ModelPicke
wrap="truncate-end"
>
{providerIdx === idx ? '▸ ' : ' '}
{i + 1}. {row}
{idx + 1}. {row}
</Text>
) : (
<Text color={t.color.muted} key={`pad-${i}`} wrap="truncate-end">
@ -223,7 +223,7 @@ export function ModelPicker({ gw, onCancel, onSelect, sessionId, t }: ModelPicke
<Text color={t.color.muted} wrap="truncate-end">
persist: {persistGlobal ? 'global' : 'session'} · g toggle
</Text>
<OverlayHint t={t}>/ select · Enter choose · 1-9,0 quick · Esc/q cancel</OverlayHint>
<OverlayHint t={t}>/ select · Enter choose · Esc/q cancel</OverlayHint>
</Box>
)
}
@ -273,7 +273,7 @@ export function ModelPicker({ gw, onCancel, onSelect, sessionId, t }: ModelPicke
wrap="truncate-end"
>
{prefix}
{i + 1}. {row}
{idx + 1}. {row}
</Text>
)
})}
@ -286,7 +286,7 @@ export function ModelPicker({ gw, onCancel, onSelect, sessionId, t }: ModelPicke
persist: {persistGlobal ? 'global' : 'session'} · g toggle
</Text>
<OverlayHint t={t}>
{models.length ? '↑/↓ select · Enter switch · 1-9,0 quick · Esc back · q close' : 'Enter/Esc back · q close'}
{models.length ? '↑/↓ select · Enter switch · Esc back · q close' : 'Enter/Esc back · q close'}
</OverlayHint>
</Box>
)