huskies: merge 1192 bug compact command is swallowed by the registry placeholder before its real handler runs
This commit is contained in:
@@ -425,10 +425,15 @@ 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.
|
||||
/// Fallback handler for the `compact` command.
|
||||
///
|
||||
/// This IS called on every `compact` dispatch — `try_handle_command` always
|
||||
/// invokes the matched handler, so this runs before the async `compact`
|
||||
/// check each transport performs afterward (`on_room_message` for Matrix; an
|
||||
/// inline check in `handle_incoming_message` for Discord/Slack/WhatsApp). It
|
||||
/// deliberately always returns `None` so that check gets a chance to run the
|
||||
/// real handler instead of the LLM. The entry exists in the registry so
|
||||
/// `help` lists it.
|
||||
///
|
||||
/// Returns `None` to prevent the LLM from receiving "compact" as a prompt.
|
||||
fn handle_compact_fallback(_ctx: &CommandContext) -> Option<String> {
|
||||
|
||||
Reference in New Issue
Block a user