feat(Chat): support whitespace queries via allowSpaces on ChatComposerTrigger - #6128
Open
Geervan wants to merge 1 commit into
Open
feat(Chat): support whitespace queries via allowSpaces on ChatComposerTrigger#6128Geervan wants to merge 1 commit into
Geervan wants to merge 1 commit into
Conversation
Geervan
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 7, 2026 17:45
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsChat (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual RegressionStatus: No visual change across 2 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
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.
Fixes #6110
Summary
Adds opt-in
allowSpaces?: booleantoChatComposerTriggerin@astryxdesign/core, enabling multi-word trigger queries (e.g.@Cindy Zhang) and trailing-space candidate browsing (@).Scanner & Termination Rules
.,,,!,?,;,:unconditionally terminate active queries.@O'Brien,@Jean-Luc's Task).textBeforeCursorup to the active selection offset.@,,@.) returnsnullimmediately.allowSpaces: falseor unset (such as/slash commands) retain strict space-terminating single-token behavior.New Test Suite (
useTriggerMenu.test.tsx)Added dedicated hook unit test file
packages/core/src/Chat/useTriggerMenu.test.tsxcovering all 12 scanner edge cases:/command behavior unchanged (closes on space).allowSpaces: truemulti-word query matching (@Project Alpha).@)..,,,!,?,;,:).null(@,,@.).@O'Brien,@Jean-Luc's Task).email@domain.com,foo/bardo not activate).Verification
packages/core/src/Chat/useTriggerMenu.test.tsx: 12/12 passedpackages/core/src/Chat/: 263/263 passed across 19 test files