huskies: merge 1213 story Chat "stop" command that immediately aborts the in-flight LLM turn
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user