Repository navigation
fix(commit-message): use Kimi --prompt instead of Claude --print - #11674
Conversation
Greptile SummaryFixes Kimi commit-message generation by replacing the now-rejected
Confidence Score: 5/5Safe to merge — the change is a minimal, targeted fix to a broken CLI flag with no side effects on other agents. The only touched code is the Kimi spec: Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/shared/commit-message-agent-spec.ts | Switches Kimi from promptDelivery: 'stdin' with --print to promptDelivery: 'argv' with --prompt <text> --quiet, matching kimi-code 0.31+ CLI requirements; the three-way thinking-level ternary and model guard are unchanged and correct. |
| src/shared/commit-message-agent-spec.test.ts | Adds three new Kimi tests: --prompt vs --print with thinkingLevel='on', thinkingLevel='off' vs undefined to cover both remaining ternary branches, and model='default'/model='' to verify --model omission — addressing all gaps flagged in prior review threads. |
Reviews (2): Last reviewed commit: "test(commit-message): cover Kimi argumen..." | Re-trigger Greptile
📝 WalkthroughWalkthroughKimi commit-message generation now passes the prompt through the 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
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 |
kimi-code rejects --print (suggesting --prompt). Deliver the generation prompt as the --prompt argv value so branch auto-rename and commit message generation work when Kimi is the selected agent. Fixes stablyai#11669
607a83b to
33e82ac
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Thanks @AmethystLiang for the merge — and for closing #11669 with it. |
|
Heads-up: this fix unfortunately still doesn't work in v1.4.179 — the new invocation adds Error (from the worktree's Verified locally against the latest published CLI versions: So One compounding issue: my worktrees running pi/omp agents also show this failure as a Kimi CLI error — the rename still runs through the configured default agent (kimi) instead of the workspace's agent, i.e. #11009 is still reproducible on 1.4.179 and #11147 is still needed. Happy to test the next RC again. |
|
Thanks for the residual report — confirmed on current
Follow-up should drop Appreciate the CLI repro matrix — happy to re-check once a drop-quiet fix lands. |
…blyai#11674) * fix(commit-message): use Kimi --prompt instead of Claude --print kimi-code rejects --print (suggesting --prompt). Deliver the generation prompt as the --prompt argv value so branch auto-rename and commit message generation work when Kimi is the selected agent. Fixes stablyai#11669 * test(commit-message): cover Kimi argument defaults
Fixes #11669 (P0).
Branch auto-rename and Source Control commit-message generation are broken for every Kimi Code user: Orca invokes
kimiwith Claude's--printflag, kimi-code exits withunknown option '--print'and suggests--prompt, and generation fails.Summary
The Kimi entry in
COMMIT_MESSAGE_AGENT_SPECSnow buildskimi --prompt <text> --quiet [--model …] [--thinking|--no-thinking].Why
promptDeliveryflips fromstdintoargv: kimi-code accepts the generation prompt only as the value of--prompt, so it has to be on argv. That is not a new code path —planCommitMessageGenerationalready passes the prompt intospec.buildArgsfor argv specs and leavesstdinPayloadnull (src/shared/commit-message-plan.ts:220and:255), which is exactly how Copilot has been wired all along (commit-message-agent-spec.ts,promptDelivery: 'argv'with'--prompt', prompt). Only the Kimi spec changes; every other agent keeps stdin delivery.Both broken surfaces run through that plan: branch auto-rename via
first-work-branch-rename.ts→commit-message-text-generation.ts, and Source Control viasource-control-generation-plan.ts.Screenshots
No visual change.
Testing
pnpm exec vitest run --config config/vitest.config.ts src/shared/commit-message-agent-spec.test.ts src/shared/commit-message-plan.test.ts(52 tests)New spec tests assert that
--promptis present and--printis absent, that the prompt is the argv value immediately after--prompt, that--thinking/--no-thinking/ omission map to distinct argv, and that--modelis omitted for both the config default and an empty model.Notes
Shared spec change only — no platform-specific behaviour; the flags are the same on macOS, Linux and Windows.