feat(MessageComposer): control command sendability#1746
Open
MartinCupela wants to merge 10 commits into
Open
Conversation
Add configurable command sendability validators so the composer can block submit for incomplete built-in and custom commands. Reuse the same validation context for send-button gating and final composition validation to keep command readiness consistent. Co-authored-by: Cursor <cursoragent@cursor.com>
Provide a default ban validator in composer config. Allow command validator arrays to be replaced via config overrides. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Size Change: +5.35 kB (+1.38%) Total Size: 393 kB 📦 View Changed
|
isekovanic
requested changes
May 14, 2026
5250cfb to
6c096ad
Compare
isekovanic
approved these changes
May 19, 2026
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.
Goal
Closes REACT-971
Add API that allows to verify, whether the message composer in command mode has state ready to be composed and sent to the server.
This are the rules:
MessageComposer.isCommandSendablereturnstrueMessageComposer.isCommandSendablereturnstrueMessageComposer.isCommandSendablereturnstrueMessageComposer.isCommandSendablereturnstrueIt is possible to provide custom command sendability validation function(s) in case the integrators have custom commands and want to apply custom validation rules.
Mentioned users state kept up-to-date on text change
Make sure that the mentioned users array in text composer state is not stale. Until now, this was verified only at the composition time. Now we prune stale user mentions on every text change middleware execution.