Repository navigation
docs: pass --code to the aichat commit-generation example - #4332
Merged
Merged
Conversation
With a reasoning model, aichat prints the reasoning in a <think> block ahead of the answer, and Worktrunk takes stdout verbatim, so the commit subject becomes "<think>". aichat's --code flag strips that block and leaves a message without code fences unchanged. Signed-off-by: FenjuFu <[email protected]>
worktrunk-bot
left a comment
Collaborator
There was a problem hiding this comment.
test_taskfile_llm_commands_match_config_example fails on this head (code-coverage log). It asserts that Taskfile.yaml's bench-llm-commits commands match dev/config.example.toml, and the Taskfile entry is the one place still missing the flag:
COMMANDS["aichat"]='aichat -m claude:claude-haiku-4.5'
Adding --code there makes them match again, and every other aichat -m occurrence in the tree already has it. That line falls outside the diff, so it can't be an inline suggestion. I'm happy to push it as a commit if you'd like.
Signed-off-by: FenjuFu <[email protected]>
worktrunk-bot
approved these changes
Oct 1, 2026
Contributor
Author
|
Thanks, added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4331.
With a reasoning model, aichat prints the reasoning in a
<think>block before the answer, so the documented aichat command produced commits whose subject was<think>. This adds--codeto the aichat example, which strips that block. Without a code fence in the output, the message passes through unchanged, and the default prompt already asks for no code blocks. A one-line note explains the flag.src/cli/mod.rsanddocs/src/content/docs/llm-commits.mdare the hand-edited sources. The mirrors (docs/src/content/docs/config.md,skills/andplugins/references,dev/config.example.toml) the two help snapshots, and thebench-llm-commitscommand inTaskfile.yamlcarry the same change.Testing
bash -c '<command>'with the default commit prompt on stdin. Before the change the first line was<think>; after it,refactor(config): return Result from load. With thinking disabled,--codeoutput was an ordinary message (details in aichat commit-generation example commits the model's <think> block with reasoning models #4331).test_docs_are_in_syncor the help snapshot tests locally (no MSVC linker on this machine), so I edited the mirrors and snapshots by hand to match the generator's existing output for the neighbouring Codex entry. CI will confirm.