diff options
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index 693e88c..e867c0e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -27,6 +27,7 @@ const tui_engine = @import("tui_engine.zig"); const tui_components = @import("tui_components.zig"); const tui_event = @import("tui_event.zig"); const tui_app = @import("tui_app.zig"); +const tui_selectors = @import("tui_selectors.zig"); // Shorthand alias for the Lua C API. The bridge module owns the actual // `@cImport`; we re-use it here so the smoke check uses identical types. @@ -66,6 +67,7 @@ test { _ = tui_components; _ = tui_event; _ = tui_app; + _ = tui_selectors; } /// Spin up a Lua interpreter, run a no-op, tear it down. Catches @@ -545,6 +547,22 @@ pub fn main(init: std.process.Init) !void { ); defer alloc.free(model_label); + // Runtime model/reasoning selectors (Ctrl+M / Ctrl+R). Live-session only: + // a pick rebuilds the provider config and pushes it to the agent via + // `setConfig`; nothing is written back to config.toml. Borrows the + // long-lived `app_config`, `models.defs`, and `active_config`. + const selector_ctrl = try tui_app.SelectorController.init( + alloc, + &app, + agent, + &app_config, + &models.defs, + &active_config, + model_label, + ); + defer selector_ctrl.deinit(); + app.setSelectors(selector_ctrl); + // The render engine writes through a buffered file writer; flush after the // loop so the final frame and teardown sequences reach the terminal. defer tui_file.interface.flush() catch {}; |
