mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-27 05:46:34 +02:00
On a terminal too short to show every row, /sessions used to render the whole list top-to-bottom \u2014 the cursor would move but the overflowing rows at the bottom got clipped off the screen and you could never reach them visually. up/down still worked logically but the user had no way to see which row was currently selected past the cutoff. The dialog now keeps a viewport around the cursor. MaxRows is set by the interactive host each frame to (terminal rows - 12) with a min of 3, so the viewport grows with the window. The cursor stays two rows inside the top/bottom edge of the viewport (one row when the viewport itself is very small) so you can see what's coming next. When content is hidden above or below, a muted "\u2191 N more above" / "\u2193 N more below" marker replaces the offscreen rows so you know there's more. Keys: up / down move one row (unchanged), PgUp / PgDn jump one page (viewport size minus 1 for overlap), Home / End go to the first / last entry, Enter / Esc unchanged. The hint line in the dialog header now mentions pgup/pgdn so it's discoverable. Empty-list behaviour is unchanged; the no-sessions message still renders as before. |
||
|---|---|---|
| .. | ||
| extensions | ||
| modes | ||
| tools | ||
| args.go | ||
| botcmd.go | ||
| botcmd_unix.go | ||
| botcmd_windows.go | ||
| build.go | ||
| changelog.go | ||
| cli.go | ||
| config.go | ||
| extcmd.go | ||
| modelsync.go | ||
| rpc.go | ||
| systemprompt.go | ||
| update.go | ||