huskies: merge 1205 bug compact STILL swallowed after 1192 — interception is placed AFTER the registry dispatch, not before
This commit is contained in:
@@ -425,15 +425,14 @@ fn handle_reset_fallback(_ctx: &CommandContext) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
/// 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.
|
||||
/// Fallback handler for the `compact` command when it is not intercepted by
|
||||
/// the async handler beforehand. For Matrix, `on_room_message` detects and
|
||||
/// handles `compact` before `try_handle_command` is invoked, so this is
|
||||
/// never called. Discord/Slack/WhatsApp check for `compact` only after their
|
||||
/// own `try_handle_command` dispatch, so this handler does run there — it
|
||||
/// deliberately always returns `None` so their subsequent async 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