Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

fix(tui): Models loads the focused pane's own models again (#537)

lingrde2b867772f03
diff --git a/tui/src/input.rs b/tui/src/input.rs
index d0e2843a5..5af4e4b83 100644
--- a/tui/src/input.rs
+++ b/tui/src/input.rs
@@ -827,8 +827,8 @@ fn prepare(app: &mut App, kind: &PickerKind) {
fn load_models(app: &mut App) {
// ── models: this computer's models, the grids and the saved APIs (models.rs) ──
crate::models::open(app);
- // (The harness a Use moves: the focused one, or the only one on screen.)
- let Some(crate::models::Target { machine, agent, .. }) = crate::models::target(app) else { return };
+ // (The focused pane's engine's own models — what `model_rows` lists for that pane.)
+ let Some((machine, agent)) = focused_agent(app) else { return };
let Some(link) = app.link(&machine) else { return };
let mark = loading(format!("models {machine} {agent}"), true);
let key = (machine, agent.clone());