fix(claude): preserve attachment context when the prompt is a slash command#43
Closed
herikwebb wants to merge 1 commit into
Closed
fix(claude): preserve attachment context when the prompt is a slash command#43herikwebb wants to merge 1 commit into
herikwebb wants to merge 1 commit into
Conversation
…ommand The CLI query assembly kept only the last user line whenever it started with '/', silently discarding the context lines NBI had just appended for the same turn (attachment @-mentions, cell pointers, output context) — the footgun previously documented in extension.py's on_message. Extract the join into assemble_client_query: control-only commands (/clear, /cost, ...) still drop the context since it is meaningless to them, while any other command is moved to the front of the query (the CLI only recognizes a command at the start) with the context lines preserved after it, so custom skill and plugin commands receive the user's attachments. Promote claude_sessions' control-command set to a public name (adding /context) and reuse it as the single source of truth.
Automated PR ReviewModel: Changed files: Review result: No automated findings were found. Residual risks: the slash-command behavior now depends on a static |
Owner
Author
|
Raised upstream as plmbr#388; closing this fork PR. Review history retained here. |
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.
Problem
The CLI query assembly kept only the last user line whenever it started with
/, silently discarding the context lines NBI had just appended for the same turn (attachment @-mentions, cell pointers, output context) — the footgun previously documented inextension.py'son_message.Change
assemble_client_query:/clear,/cost, ...) still drop the context — it is meaningless to them;claude_sessions' control-command set to a public name (CONTROL_SLASH_COMMANDS, adding/context) and reuse it as the single source of truth; the private alias remains for compatibility.Testing
Full Python suite passes (1300 tests).