refactor(cli): add protected TUI extension hooks for wrapper CLIs

Based on PR #1749 by @erosika (reimplemented on current main).

Extracts three protected methods from run() so wrapper CLIs can extend
the TUI without overriding the entire method:

- _get_extra_tui_widgets(): inject widgets between spacer and status bar
- _register_extra_tui_keybindings(kb, input_area): add keybindings
- _build_tui_layout_children(**widgets): full control over ordering

Default implementations reproduce existing layout exactly. The inline
HSplit in run() now delegates to _build_tui_layout_children().

5 tests covering defaults, widget insertion position, and keybinding
registration.
This commit is contained in:
Teknium 2026-03-21 09:38:22 -07:00
parent 07112e4e98
commit d70e07fc45
No known key found for this signature in database
4 changed files with 424 additions and 16 deletions

View file

@ -129,6 +129,7 @@ const sidebars: SidebarsConfig = {
'developer-guide/environments',
'developer-guide/adding-tools',
'developer-guide/creating-skills',
'developer-guide/extending-the-cli',
'developer-guide/contributing',
],
},