Trim comments and docs to what the code needs

AI Assisted
This commit is contained in:
Seth committed 2026-12-05 13:19:59 -08:00
1 parent eba3c3bf0c
commit 0bd721fc27
33 files changed
+292 -392

No files matched your search

+5 -8
View File
@@ -36,10 +36,9 @@ pub type BeforeFresh = Arc<dyn Fn() -> Option<String> + Send + Sync>;
/// the manager.
pub type ForgetSession = Arc<dyn Fn() + Send + Sync>;
/// Runs once for each agent that ends, however it ends: by itself, by a stop,
/// or replaced by Restart or a loop phase's fresh start. It can run with the
/// manager's state locked, so it must return quickly and must not call back
/// into the manager.
/// Runs once for each agent that ends: by itself, by a stop, or replaced by a
/// fresh agent. It can run with the manager's state locked, so it must return
/// quickly and must not call back into the manager.
pub type Ended = Arc<dyn Fn() + Send + Sync>;
/// What the page needs to draw the bar. `generation` counts the agents started
@@ -675,10 +674,8 @@ impl Shared {
Err(e) => format!("stopped: {e}"),
};
// Only an agent the app stopped or replaced takes its process
// group with it: after a Restart or New Session this finishes
// what `kill`'s grace thread started (after a stop it finds the
// group gone). An agent that ended by itself leaves its group
// alone, so work the person asked it to leave running survives.
// group with it. One that ended by itself leaves its group alone,
// so work the person asked it to leave running survives.
if !shared.on_exit(generation, reason) {
host.end_group();
}