Conversation
📝 WalkthroughWalkthroughRenames the Kimi Code hook tool matcher from ChangesKimi Code hook and config path alignment
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
=======================================
Coverage 97.42% 97.42%
=======================================
Files 94 94
Lines 10327 10327
=======================================
Hits 10061 10061
Misses 266 266 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Greptile SummaryThis PR corrects three incorrect Kimi Code integration details that were previously using wrong values. All changes are straightforward find-and-replace corrections applied consistently across source, compiled output, and tests.
Confidence Score: 5/5All three corrections are applied uniformly across source, compiled output, and tests — no partial updates or stale references remain. The changes are narrow, factual corrections to three string constants used only in the Kimi Code integration path. Source files, the bundled dist artifact, and every related test are updated in lockstep, leaving no inconsistency between them. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Kimi Code fires PreToolUse hook] --> B{tool_name == 'Bash'?}
B -- Yes --> C[cc-safety-net evaluates command]
B -- No --> D[Hook exits silently — no-op]
C --> E{Command blocked?}
E -- Yes --> F[Deny with reason]
E -- No --> G[Allow]
H[hook install --kimi-code] --> I{KIMI_CODE_HOME set?}
I -- Yes --> J[Write to $KIMI_CODE_HOME/config.toml]
I -- No --> K[Write to ~/.kimi-code/config.toml]
J --> L[Append matcher = Bash hook block]
K --> L
Reviews (1): Last reviewed commit: "test(kimi-code): align hook install test..." | Re-trigger Greptile |
Changes
1. Tool name:
Shell→BashKimi Code's shell execution tool is named
Bash, notShell. The hook matcher and all related constants/tests now target the correct tool name.src/bin/hook/constants.ts—KIMI_CODE_TOOL_NAME→"Bash"src/bin/hook/install/kimi-code.ts— hook block & inline hook templates updatedhook-helpers.ts,hook-adapter-direct.test.ts,kimi-code-hook.test.ts,hook-install.test.ts2. Config path:
.kimi→.kimi-codeKimi Code stores its config under
~/.kimi-code/, not~/.kimi/.src/bin/hook/install/kimi-code.ts—getKimiConfigPathfallback dir updatedsrc/bin/doctor/hooks.ts—_getKimiConfigPathfallback dir updatedhook-install.test.ts,hooks.test.ts3. Env var:
KIMI_SHARE_DIR→KIMI_CODE_HOMEThe environment variable override for the config directory is
KIMI_CODE_HOME.src/bin/hook/install/kimi-code.ts— env var reference updatedsrc/bin/doctor/hooks.ts— env var reference updatedhook-install.test.ts,hooks.test.ts4. Docs
README.md— added a note about the optional/cc-safety-netskill for Kimi CodeSummary by CodeRabbit
Documentation
/cc-safety-netskill, enabling users to define and enforce custom safety rules.Configuration Updates
.kimito.kimi-code, withKIMI_CODE_HOMEenvironment variable now taking precedence for path resolution.