huskies: merge 1186 story compact chat command: distill session context deterministically, then reset with a seed

This commit is contained in:
Huskies Agent
2026-07-17 12:05:04 +00:00
parent b241661941
commit 043c77f077
29 changed files with 1051 additions and 6 deletions
+15
View File
@@ -224,6 +224,11 @@ pub fn commands() -> &'static [BotCommand] {
description: "Clear the current Claude Code session and start fresh",
handler: handle_reset_fallback,
},
BotCommand {
name: "compact",
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: "timer",
description: "Schedule a deferred agent start: `timer <story_id> <HH:MM>`, `timer list`, `timer cancel <story_id>`",
@@ -420,6 +425,16 @@ fn handle_reset_fallback(_ctx: &CommandContext) -> Option<String> {
None
}
/// Fallback handler for the `compact` command when it is not intercepted by
/// the async handler in `on_room_message`. In practice this is never called —
/// compact 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 "compact" as a prompt.
fn handle_compact_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