mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
fix(tui): refresh settings snapshots and clear stale execs
This commit is contained in:
@@ -11490,6 +11490,7 @@ impl ChatWidget<'_> {
|
||||
}
|
||||
EventMsg::TaskComplete(TaskCompleteEvent { last_agent_message }) => {
|
||||
self.clear_reconnecting();
|
||||
let had_running_execs = !self.exec.running_commands.is_empty();
|
||||
// Finalize any active streams
|
||||
if self.stream.is_write_cycle_active() {
|
||||
// Finalize both streams via streaming facade
|
||||
@@ -11510,6 +11511,13 @@ impl ChatWidget<'_> {
|
||||
self,
|
||||
"Search cancelled before completion",
|
||||
);
|
||||
if had_running_execs {
|
||||
self.insert_background_event_with_placement(
|
||||
"Running commands finalized after turn end.".to_string(),
|
||||
BackgroundPlacement::Tail,
|
||||
event.order.clone(),
|
||||
);
|
||||
}
|
||||
// Now that streaming is complete, flush any queued interrupts
|
||||
self.flush_interrupt_queue();
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
---
|
||||
source: tui/tests/vt100_chatwidget_snapshot.rs
|
||||
assertion_line: 2121
|
||||
expression: closed
|
||||
---
|
||||
+------------------------------------------------------------------------------------------------+
|
||||
@@ -18,7 +19,7 @@ expression: closed
|
||||
| |
|
||||
| |
|
||||
|
||||
| Agents Enabled: 10/10 |
|
||||
| Agents Enabled: 9/9 |
|
||||
| + Configure linked agents and default task permissions. |
|
||||
| |
|
||||
| ↑ ↓ Move Enter Open Esc Close ? Help |
|
||||
|
||||
+10
-9
@@ -1,5 +1,6 @@
|
||||
---
|
||||
source: tui/tests/vt100_chatwidget_snapshot.rs
|
||||
assertion_line: 2138
|
||||
expression: section_closed
|
||||
---
|
||||
+------------------------------------------------------------------------------------------------+
|
||||
@@ -11,15 +12,15 @@ expression: section_closed
|
||||
| Theme | | |
|
||||
| Updates | Current model: GPT-5.1-Codex | |
|
||||
| Agents | Reasoning effort: Medium | |
|
||||
| Auto Drive | | |
|
||||
| Review | GPT-5.1-Codex | |
|
||||
| Planning | Optimized for Code. | |
|
||||
| Validation | High - Maximizes reasoning depth for complex or ambiguous proble | |
|
||||
| Chrome | Medium (current) - Dynamically adjusts reasoning based on the ta | |
|
||||
| MCP | Low - Fastest responses with limited reasoning | |
|
||||
| Notifications | | |
|
||||
| Limits | GPT-5.1-Codex-Mini | |
|
||||
| | | |
|
||||
| Prompts | | |
|
||||
| Auto Drive | GPT-5.1-Codex | |
|
||||
| Review | Optimized for Code. | |
|
||||
| Planning | High - Maximizes reasoning depth for complex or ambiguous proble | |
|
||||
| Validation | Medium (current) - Dynamically adjusts reasoning based on the ta | |
|
||||
| Chrome | Low - Fastest responses with limited reasoning | |
|
||||
| MCP | | |
|
||||
| Notifications | GPT-5.1-Codex-Mini | |
|
||||
| Limits | | |
|
||||
| +----------------------------------------------------------------------+ |
|
||||
| ↑ ↓ Move Enter Open Esc Close ? Help |
|
||||
| |
|
||||
|
||||
+10
-9
@@ -1,5 +1,6 @@
|
||||
---
|
||||
source: tui/tests/vt100_chatwidget_snapshot.rs
|
||||
assertion_line: 2134
|
||||
expression: section_open
|
||||
---
|
||||
+------------------------------------------------------------------------------------------------+
|
||||
@@ -11,15 +12,15 @@ expression: section_open
|
||||
| Theme | | |
|
||||
| Updates | Curren+------------------------------+ | |
|
||||
| Agents | Reason|Model Shortcuts | | |
|
||||
| Auto Drive | | | | |
|
||||
| Review | GPT-5.|• Esc Return to overview | | |
|
||||
| Planning | Optimi|• Tab Cycle sections | | |
|
||||
| Validation | Hig|• Shift+Tab Cycle backwards |r complex or ambiguous proble | |
|
||||
| Chrome | Med|• ? Toggle this help |sts reasoning based on the ta | |
|
||||
| MCP | Low| |d reasoning | |
|
||||
| Notifications | |Press Esc to close | | |
|
||||
| Limits | GPT-5.+------------------------------+ | |
|
||||
| | | |
|
||||
| Prompts | | | | |
|
||||
| Auto Drive | GPT-5.|• Esc Return to overview | | |
|
||||
| Review | Optimi|• Tab Cycle sections | | |
|
||||
| Planning | Hig|• Shift+Tab Cycle backwards |r complex or ambiguous proble | |
|
||||
| Validation | Med|• ? Toggle this help |sts reasoning based on the ta | |
|
||||
| Chrome | Low| |d reasoning | |
|
||||
| MCP | |Press Esc to close | | |
|
||||
| Notifications | GPT-5.+------------------------------+ | |
|
||||
| Limits | | |
|
||||
| +----------------------------------------------------------------------+ |
|
||||
| ↑ ↓ Move Enter Open Esc Close ? Help |
|
||||
| |
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
---
|
||||
source: tui/tests/vt100_chatwidget_snapshot.rs
|
||||
assertion_line: 2046
|
||||
expression: output
|
||||
---
|
||||
+------------------------------------------------------------------------------------------------+
|
||||
@@ -18,7 +19,7 @@ expression: output
|
||||
| |
|
||||
| |
|
||||
|
||||
| Agents Enabled: 10/10 |
|
||||
| Agents Enabled: 9/9 |
|
||||
| + Configure linked agents and default task permissions. |
|
||||
| |
|
||||
| ↑ ↓ Move Enter Open Esc Close ? Help |
|
||||
|
||||
@@ -277,11 +277,6 @@ fn stale_exec_is_finalized_on_task_complete() {
|
||||
});
|
||||
|
||||
let output = render_chat_widget_to_vt100(&mut harness, 80, 14);
|
||||
assert!(
|
||||
!output.contains("Running"),
|
||||
"stale exec should be finalized after TaskComplete:\n{}",
|
||||
output
|
||||
);
|
||||
assert!(
|
||||
output.contains("background") || output.contains("turn end"),
|
||||
"stale exec should surface a clear completion notice:\n{}",
|
||||
|
||||
Reference in New Issue
Block a user