Run the quit cleanup on a plain kill, Ctrl+C and a closing terminal

AI Assisted
This commit is contained in:
Seth committed 2026-12-05 00:10:44 -08:00
1 parent 6a93395148
commit 8c028c1ce0
7 files changed
+458 -3

No files matched your search

+2 -1
View File
@@ -11,6 +11,7 @@ use std::thread;
use serde::Serialize;
use crate::agents::{agent_launch_spec, Agent, PermissionMode};
use crate::log;
use crate::pty_host::{PtyHost, StartOptions};
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
@@ -734,7 +735,7 @@ impl Shared {
// the log, since the bar's reason is gone once a new agent starts.
if let Some((choice, _)) = &inner.last_start {
if let Some(line) = exit_log_line(choice.kind.id(), &reason) {
eprintln!("{line}");
log::line(&line);
}
}
inner.state = AgentState::Ended { reason };