Open
Conversation
added 2 commits
February 8, 2026 15:00
Previously, parseKiloSlashCommands was only called for text blocks, causing slash commands in tool_result blocks to be ignored. This fix extends the processing to tool_result blocks by using the new processTextContent helper function that combines parseMentions and parseKiloSlashCommands. The regression test ensures that slash commands in tool responses are properly processed and transformed.
🦋 Changeset detectedLatest commit: 1704d4c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Context
What problem does this fix?
This fixes a bug where slash commands in
tool_resultblocks were being ignored. When a user responds to a tool (e.g., "ask for feedback"), or the attempt_completion, or the user cancels a tool and then responds with a slash command like/newtaskor a workflow file within<user_message>tags, or if the user canceled, the command was not being processed. The root cause was thatparseKiloSlashCommandswas only called fortextblocks, not fortool_resultblocks in theprocessKiloUserContentMentionsfunction.Implementation
How was it achieved?
Refactored with a helper function: Created
processTextContentthat combinesparseMentionsandparseKiloSlashCommandsinto a single pipeline. This eliminates code duplication and ensures consistent processing across all block types.Extended processing to
tool_resultblocks:tool_resultwith string content: now processes throughprocessTextContentwhen mention tags are presenttool_resultwith array content: each text block is processed throughprocessTextContentneedsRulesFileCheckflag in all casesAdded comprehensive regression tests: Created 4 test cases covering:
tool_resultwith slash commandstool_resultwith slash commandsTradeoffs: None - this is a pure bug fix that extends existing logic to a missing case without changing behavior for other scenarios.
Important attention points:
needsRulesFileCheckflag correctly across all code pathsClineRulesTogglestype for consistencyScreenshots
This is a backend logic fix with no UI changes.
How to Test
Manual testing:
/askor any tool that returns atool_result)<user_message>tags:<user_message>/newtask</user_message><user_message>/just-do-this-workflow.md</user_message>tool_result.contentis a string and when it's an array of text blocksAutomated testing:
Expected: All 4 new regression tests pass, plus all existing mentions tests (37 total) pass.
The changeset has been created at
.changeset/free-toes-hammer.md.Get in Touch
Madrawn in Discord