huskies: merge 1213 story Chat "stop" command that immediately aborts the in-flight LLM turn

This commit is contained in:
Huskies Agent
2026-07-18 11:46:52 +00:00
parent b91e2d53ff
commit cebe9e2737
7 changed files with 367 additions and 35 deletions
+15
View File
@@ -229,6 +229,11 @@ pub fn commands() -> &'static [BotCommand] {
description: "Distill the session transcript into a seed, then reset (unlike `reset`, keeps distilled context for the next message)",
handler: handle_compact_fallback,
},
BotCommand {
name: "stop",
description: "Cancel the in-flight LLM turn for this room (synonyms: `halt`, `abort`)",
handler: handle_stop_fallback,
},
BotCommand {
name: "timer",
description: "Schedule a deferred agent start: `timer <story_id> <HH:MM>`, `timer list`, `timer cancel <story_id>`",
@@ -439,6 +444,16 @@ fn handle_compact_fallback(_ctx: &CommandContext) -> Option<String> {
None
}
/// Fallback handler for the `stop` command when it is not intercepted by the
/// async handler in `on_room_message`. In practice this is never called —
/// stop is detected and handled before `try_handle_command` is invoked.
/// The entry exists in the registry only so `help` lists it.
///
/// Returns `None` to prevent the LLM from receiving "stop" as a prompt.
fn handle_stop_fallback(_ctx: &CommandContext) -> Option<String> {
None
}
/// Fallback handler for the `cleanup_worktrees` command when it is not
/// intercepted by the async handler in `on_room_message`. In practice this is
/// never called — cleanup_worktrees is detected and handled before