feat: unified exec footer (#8117)

# With `unified_exec`
Known tools are correctly casted
<img width="1150" height="312" alt="Screenshot 2025-12-16 at 19 27 28"
src="https://github.com/user-attachments/assets/24150ee5-e88d-461b-a459-483c24784196"
/>
If a session exit the turn, we render it with the "Ran ..."
<img width="1168" height="355" alt="Screenshot 2025-12-16 at 19 27 58"
src="https://github.com/user-attachments/assets/3f00b60c-2d57-4f9d-a201-9cc8388957cb"
/>
If a session does not exit during the turn, it is closed at the end of
the turn but this is not rendered
<img width="642" height="342" alt="Screenshot 2025-12-16 at 19 34 37"
src="https://github.com/user-attachments/assets/c2bd9283-7017-4915-ba73-c52199b0b28e"
/>

# Without `unified_exec`
No changes
<img width="740" height="603" alt="Screenshot 2025-12-16 at 19 31 21"
src="https://github.com/user-attachments/assets/ca5d90fe-a9b2-42ba-bcd7-3e98c4ed22e8"
/>
This commit is contained in:
jif-oai
2025-12-17 17:12:04 +00:00
committed by GitHub
parent ac6ba286aa
commit f74e0cda92
7 changed files with 405 additions and 3 deletions

View File

@@ -389,6 +389,7 @@ fn make_chatwidget_manual(
suppressed_exec_calls: HashSet::new(),
last_unified_wait: None,
task_complete_pending: false,
unified_exec_sessions: Vec::new(),
mcp_startup_status: None,
interrupts: InterruptManager::new(),
reasoning_buffer: String::new(),
@@ -1184,6 +1185,7 @@ fn exec_end_without_begin_uses_event_command() {
#[test]
fn exec_history_shows_unified_exec_startup_commands() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(None);
chat.on_task_started();
let begin = begin_exec_with_source(
&mut chat,
@@ -1207,6 +1209,46 @@ fn exec_history_shows_unified_exec_startup_commands() {
);
}
#[test]
fn exec_history_shows_unified_exec_tool_calls() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None);
chat.on_task_started();
let begin = begin_exec_with_source(
&mut chat,
"call-startup",
"ls",
ExecCommandSource::UnifiedExecStartup,
);
end_exec(&mut chat, begin, "", "", 0);
let blob = active_blob(&chat);
assert_eq!(blob, "• Explored\n └ List ls\n");
}
#[test]
fn unified_exec_end_after_task_complete_is_suppressed() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(None);
chat.on_task_started();
let begin = begin_exec_with_source(
&mut chat,
"call-startup",
"echo unified exec startup",
ExecCommandSource::UnifiedExecStartup,
);
drain_insert_history(&mut rx);
chat.on_task_complete(None);
end_exec(&mut chat, begin, "", "", 0);
let cells = drain_insert_history(&mut rx);
assert!(
cells.is_empty(),
"expected unified exec end after task complete to be suppressed"
);
}
/// Selecting the custom prompt option from the review popup sends
/// OpenReviewCustomPrompt to the app event channel.
#[test]