From 544486a374cd5cae7acce1302648d8dad079db48 Mon Sep 17 00:00:00 2001 From: historia Date: Wed, 26 Aug 2026 18:18:21 -0400 Subject: fix: default directory when choosing voices in tui --- app/ui/tui.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app/ui/tui.py') diff --git a/app/ui/tui.py b/app/ui/tui.py index cc21c0b..d91274b 100644 --- a/app/ui/tui.py +++ b/app/ui/tui.py @@ -1245,7 +1245,8 @@ def checkbox_tree(scr, title: str, families: List[dict], footer: Optional[str] = None, expand_all: bool = False, back_value: object = None, - checked: Optional[set] = None) -> List[Tuple[int, str]]: + checked: Optional[set] = None, + start_on_buttons: bool = False) -> List[Tuple[int, str]]: """Pick model families and packages from an expandable tree. FAMILIES is a list of dicts (one per family) shaped like:: @@ -1272,8 +1273,10 @@ def checkbox_tree(scr, title: str, families: List[dict], family starts expanded. CHECKED (a set of (family_index, option_key) pairs) pre-checks those options instead, expanding every family that holds a checked option and placing the cursor on the first such - family — the "modify an existing config" entry point. A - "[recommended]" tag is shown only when a family has more than one + family — the "modify an existing config" entry point. + START_ON_BUTTONS puts the initial focus on Confirm, so Enter accepts + the tree as it stands (the seeded modify selection) immediately. + A "[recommended]" tag is shown only when a family has more than one option — a single option needs no tag. Family and option rows are left-justified like a DOS list. Esc (or 'q') aborts the wizard unless BACK_VALUE is given (not None), in @@ -1312,7 +1315,7 @@ def checkbox_tree(scr, title: str, families: List[dict], first_checked = min((index for index, _option_key in checked), default=None) cursor = 0 - on_buttons = False + on_buttons = start_on_buttons btn_index = 0 while True: nodes = visible_nodes() -- cgit v1.2.3