From 867866f131b0b6c76c54272791e7f7dea01db990 Mon Sep 17 00:00:00 2001 From: historia Date: Tue, 25 Aug 2026 16:40:30 -0400 Subject: feat: better tui menu option gating for models that support custom voices (qwen) and models that do not support instructions --- app/ui/tui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/ui/tui.py') diff --git a/app/ui/tui.py b/app/ui/tui.py index 663df0a..d675946 100644 --- a/app/ui/tui.py +++ b/app/ui/tui.py @@ -373,7 +373,10 @@ class Frame: Returns (y0, x0, dialog_h, visible); also refreshes self.scroll and self.page_size. """ - chrome = 7 if self.buttons else 6 # title/gap/status/footer/borders + # Borders, title, status and footer are fixed chrome; a titled + # frame also reserves a blank line below its title, and buttons + # take their own row above the status. + chrome = 6 + (1 if self.title else 0) + (1 if self.buttons else 0) dialog_h = min(max(self.MIN_HEIGHT, len(flat) + chrome), height) visible = max(1, dialog_h - chrome) self.page_size = max(1, visible) @@ -447,7 +450,7 @@ class Frame: inner_w = dialog_w - 2 for line in range(self.scroll, min(len(flat), self.scroll + visible)): logical, row, piece = flat[line] - y = y0 + 2 + (line - self.scroll) + y = y0 + (3 if self.title else 2) + (line - self.scroll) selected = logical == self.cursor and row["selectable"] if selected: _addstr(scr, y, inner_x, " " * inner_w, theme["bar"]) -- cgit v1.2.3