diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-20 15:17:54 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-20 15:18:03 +0300 |
| commit | 28b628d79d755afbb3ac45f9184a03c204c26784 (patch) | |
| tree | 93ee9f4c9939430c5e82b22da7c080f99f882fe0 /src/integration/mod.rs | |
| parent | 9450b168c727e9e4cbee95e6edf4f11cfe6f2154 (diff) | |
fix: report kimi questions as blocked
Diffstat (limited to 'src/integration/mod.rs')
| -rw-r--r-- | src/integration/mod.rs | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/src/integration/mod.rs b/src/integration/mod.rs index fdc1c5bd..73c23fc6 100644 --- a/src/integration/mod.rs +++ b/src/integration/mod.rs @@ -58,20 +58,37 @@ const KIMI_HOOK_ASSET: &str = if cfg!(windows) { } else { include_str!("assets/kimi/herdr-agent-state.sh") }; -const KIMI_INTEGRATION_VERSION: u32 = 4; +const KIMI_INTEGRATION_VERSION: u32 = 5; const KIMI_CONFIG_BLOCK_BEGIN: &str = "# >>> herdr kimi integration"; const KIMI_CONFIG_BLOCK_END: &str = "# <<< herdr kimi integration"; const KIMI_MIN_VERSION: &str = "0.14.0"; -const KIMI_HOOK_EVENTS: [(&str, &str); 9] = [ - ("SessionStart", "session"), - ("UserPromptSubmit", "working"), - ("PreToolUse", "working"), - ("SubagentStart", "working"), - ("PreCompact", "working"), - ("PermissionRequest", "blocked"), - ("PermissionResult", "working"), - ("Stop", "idle"), - ("Interrupt", "idle"), +const KIMI_ASK_USER_QUESTION_MATCHER: &str = "^AskUserQuestion$"; +const KIMI_OTHER_TOOL_MATCHER: &str = "^(?!AskUserQuestion$).*$"; +const KIMI_HOOK_EVENTS: [(&str, Option<&str>, &str); 12] = [ + ("SessionStart", None, "session"), + ("UserPromptSubmit", None, "working"), + ("PreToolUse", Some(KIMI_OTHER_TOOL_MATCHER), "working"), + ( + "PreToolUse", + Some(KIMI_ASK_USER_QUESTION_MATCHER), + "blocked", + ), + ( + "PostToolUse", + Some(KIMI_ASK_USER_QUESTION_MATCHER), + "working", + ), + ( + "PostToolUseFailure", + Some(KIMI_ASK_USER_QUESTION_MATCHER), + "working", + ), + ("SubagentStart", None, "working"), + ("PreCompact", None, "working"), + ("PermissionRequest", None, "blocked"), + ("PermissionResult", None, "working"), + ("Stop", None, "idle"), + ("Interrupt", None, "idle"), ]; const COPILOT_HOOK_INSTALL_NAME: &str = if cfg!(windows) { "herdr-agent-state.ps1" |
