Improve CLI command inline pane and monitoring behavior

- Track user-initiated expansion state to avoid auto-collapse conflicts
- Invert inline action visibility so terminal block hides while inline pane owns the expanded body
- Add scrollable output rendering in requested command expanded view
- Simplify CLI monitor nudge message and extract to reusable method
- Show only latest user query and assistant text in monitor task transcript
- Add handle_ctrl_c_for_conversation to status bar for child agent cancellation
- Update rig_request tests for adjusted monitor nudge wording
This commit is contained in:
Ryan Ward
2026-08-18 13:06:30 -05:00
parent a93b80adb4
commit dec90208a4
9 changed files with 279 additions and 47 deletions
+49
View File
@@ -6024,6 +6024,55 @@ fn ctrl_c_buffer_clear_then_exit_requires_three_presses_in_agent_view() {
})
}
#[test]
fn ctrl_c_with_nonempty_agent_input_cancels_active_conversation() {
App::test((), |mut app| async move {
initialize_app_for_terminal_view(&mut app);
FeatureFlag::AgentView.set_enabled(true);
let terminal = add_window_with_terminal(&mut app, None);
let conversation_id = terminal.update(&mut app, |view, ctx| {
let conversation_id =
BlocklistAIHistoryModel::handle(ctx).update(ctx, |history, ctx| {
history.start_new_conversation(view.view_id, false, false, false, ctx)
});
let stream_id = ResponseStreamId::new_for_test();
BlocklistAIHistoryModel::handle(ctx).update(ctx, |history, ctx| {
history
.conversation_mut(&conversation_id)
.expect("conversation should exist")
.append_reassigned_exchange(
&stream_id,
exchange_with_inputs(vec![]),
view.view_id,
ctx,
)
.expect("exchange should append");
});
conversation_id
});
terminal.update(&mut app, |view, ctx| {
view.handle_input_event(
&InputEvent::CtrlC {
cleared_buffer_len: 4,
},
ctx,
);
});
terminal.read(&app, |_, ctx| {
assert_eq!(
BlocklistAIHistoryModel::as_ref(ctx)
.conversation(&conversation_id)
.map(|conversation| conversation.status()),
Some(&ConversationStatus::Cancelled),
"Ctrl+C must cancel the agent instead of only clearing its draft"
);
});
})
}
#[test]
fn terminal_action_ctrl_c_exit_agent_view_requires_confirmation() {
App::test((), |mut app| async move {