Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
85274f08-cda2-466a-a039-0d135a9d136c
Commits-
Reviewing files that changed from the base of the PR and between 6458c08 and 453fbec18a4bdd3e81a72a3b9838f09378158dff.
Files selected for processing: 2-
src/shared/commit-message-agent-output.tssrc/shared/commit-message-prompt.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
453fbec to
155b620
Compare
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
55377a63-ec67-4c8c-8e8b-e4bc9babb664
Commits-
Reviewing files that changed from the base of the PR and between 453fbec18a4bdd3e81a72a3b9838f09378158dff and 155b620a144b221d2b683b64294a06e1b79b8b23.
Files selected for processing: 4-
src/shared/commit-message-agent-output.tssrc/shared/commit-message-agent-spec.test.tssrc/shared/commit-message-agent-specs-secondary.tssrc/shared/commit-message-prompt.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
155b620 to
b9c710c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e04aa0c5-ddfa-4b71-933e-a11308a4a2d8
Commits-
Reviewing files that changed from the base of the PR and between 155b620a144b221d2b683b64294a06e1b79b8b23 and b9c710cbb5244075fffdf177659be33a68702e61.
Files selected for processing: 2-
src/shared/commit-message-agent-output.tssrc/shared/commit-message-prompt.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
Kimi Code's text mode prefixes thinking and hook output with a bullet, so the commit message arrived mixed with narration. The recipe now asks for --output-format stream-json and the answer is taken from the last assistant record, which is the commit message (stablyai#33556). A record that requests a tool is narration rather than an answer, so it clears the candidate: a stream that ends on a tool call yields no answer, which finalizeFromAgentOutput already treats as a failed run. Only a body whose every non-empty line is a record counts as stream output, so a plain answer that happens to contain a JSON line is left alone.
b9c710c to
7df16e5
Compare
|
Thanks for this fix! The same problem is now fixed on main by #34237 (47018d4): the Kimi recipe passes --output-format stream-json and the output is decoded as the latest assistant message without tool_calls, so bullets, thinking lines, and hook output no longer reach the generated text. Closing as superseded — thanks again for the contribution. |
ELI5
Kimi prints a few lines before it answers — a thinking line, and whatever your hooks print — and every one of those lines starts with a bullet, including the answer. Orca only removed the bullet from the very first line, so the thinking line and the hook output ended up in the commit message box.
The text alone cannot tell you where the preamble ends, because the answer is bulleted too. So this asks Kimi for its machine-readable output instead, where each line is a labelled message and the last one from the assistant is the answer.
What Changed
Before, with Kimi selected as the commit-message agent, pressing Generate commit message filled the box with
After, it fills the box with
Two changes:
commit-message-agent-specs-secondary.ts— the Kimi recipe now passes--output-format stream-jsonafter--prompt.commit-message-agent-output.ts—cleanGeneratedCommitMessagereads the last{"role":"assistant"}line and uses itscontent. A multi-line answer stays a multi-line answer.Why
I first tried to fix this in the text cleaner by keeping only the last bulleted line. That is wrong, and CodeRabbit caught it on this PR: if the answer itself is
• feat: add parser/• handles nested input, keeping the last line throws away the subject. The text mode gives no way to separate preamble from answer, so the fix belongs in how Kimi is invoked.--output-format stream-jsonis the mode the CLI reference documents for exactly this: one JSON message per line,{"role":"assistant","content":"…"}for answers,{"role":"tool",…}for tool results, so the last assistant message is the answer.--final-message-onlywould have been simpler, but it belongs to--printmode, andkimi-coderejects--print— this repo already recorded that in #11669, which is why the recipe uses--prompt.The parser scans line boundaries with
indexOfinstead ofString.split('\n'), becausesplitGeneratedCommitMessagehas a test that fails if the generated body is split into a line array.Two review findings changed the shape of that parser. A body only counts as stream output when every non-empty line is a record with a string
role, so another agent's answer that happens to contain a JSON line —fix: document the payloadfollowed by{"role":"assistant","content":"example"}— keeps its subject instead of being replaced byexample. And a recognized stream with no assistant message now returns an empty string rather than the tool records, so a run that produced no answer reads as a failure instead of putting JSON in the box.Linked Issue
Fixes #33556
Visual Proof
N/A — the change is in the shared string cleaner and the agent recipe behind the commit-message box. No component or layout changed; the box renders whatever string the cleaner returns.
Testing
All pass: 160 tests across the four commit-message suites, 16,028 across
src/shared, typecheck clean, lint clean. Four of the new assertions fail onmain— the recipe expectation, both stream-json parsing cases, and the tool-only stream that must yield nothing.Not verified: I do not have a Kimi CLI on this machine, so I could not run
kimi --prompt … --output-format stream-jsonend to end. The flag, its--prompt-only constraint and the message shape come from the Kimi Code CLI reference, and the parser is tested against that documented shape. If the real output differs, the recipe change is the part to check first.AI Disclosure
Written by Claude in a Hermes agent session. The reporter's diagnosis in #33556 pointed at stream-json; the parser, the tests and the analysis above are mine.
Review
role: "assistant", so a jcode--jsonenvelope or plain text falls through unchanged — the other agents' suites still pass.splitGeneratedCommitMessageperformance test, which assertsString.split('\n')is never called, passes.Agent skill upstream boundary
Notes
Checklist