fix: Preserve draft text when completing argument-taking slash commands#23950
Conversation
38c91af to
f913903
Compare
f913903 to
037a7c6
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72f007ecd0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Some suggested changes that I made in a stacked PR:
- Simplify tests and move them out of chat_composer to keep that module from becoming obese again
- Generalize to support all slash commands that accept arguments
Otherwise looks good. I tested it locally.
## Summary This stacks on #23950 to make draft-tail preservation reuse the existing inline-argument slash command opt-in instead of maintaining a separate command list. It also moves the new completion tests out of the large chat composer module and into slash_input.rs, where the behavior lives.
…ash_command_entry
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40ee90c0ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This adds slash command completion behavior for argument-taking commands, where text after the partially typed command becomes inline arguments instead of being discarded. This addresses the workflow of drafting text first, moving to the start, and completing a slash command around that existing draft. Before this change, this workflow would remove all user-input text aside from the slash command, which can be frustrating if the user had just typed out a long and well thought out goal.
/goaland/reviewwhen completing withTaborEnter.Follow-up simplification and test relocation from #24683 folded into this PR.