tui: address agent picker review feedback

This commit is contained in:
Eric Traut
2026-06-09 13:30:57 -07:00
parent 02597a1ac6
commit 383758acf9
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ impl App {
{
let is_running = channel.store.lock().await.active_turn_id().is_some();
self.agent_navigation.set_running(thread_id, is_running);
} else {
} else if self.thread_event_channels.contains_key(&thread_id) {
self.agent_navigation
.set_running(thread_id, /*is_running*/ false);
}
+7 -1
View File
@@ -1303,7 +1303,7 @@ async fn open_agent_picker_clears_completed_path_backed_agent_running_state() ->
}
#[tokio::test]
async fn open_agent_picker_clears_replay_only_path_backed_running_hint() -> Result<()> {
async fn open_agent_picker_uses_local_path_backed_running_state() -> Result<()> {
let mut app = Box::pin(make_test_app()).await;
let mut app_server = Box::pin(crate::start_embedded_app_server_for_picker(
app.chat_widget.config_ref(),
@@ -1337,6 +1337,12 @@ async fn open_agent_picker_clears_replay_only_path_backed_running_hint() -> Resu
is_closed: false,
})
);
app.thread_event_channels.remove(&thread_id);
app.agent_navigation.set_running(thread_id, true);
Box::pin(app.open_agent_picker(&mut app_server)).await;
assert!(app.agent_navigation.get(&thread_id).unwrap().is_running);
Ok(())
}
+1 -1
View File
@@ -121,7 +121,7 @@ pub(crate) fn maybe_init(config: &Config) {
pub(crate) fn log_inbound_app_event(event: &AppEvent) {
// Log only if enabled
if !LOGGER.is_enabled() {
if !LOGGER.is_enabled() || matches!(event, AppEvent::AgentThreadSelectionPrepared { .. }) {
return;
}