Skip to content

Correctly map Brigadier suggestions to cloud#595

Merged
Citymonstret merged 1 commit intofeat/2.0.0/commandinput-suggestionsfrom
feat/2.0.0/commandinput-suggestions-wrappedbrig-1
Dec 27, 2023
Merged

Correctly map Brigadier suggestions to cloud#595
Citymonstret merged 1 commit intofeat/2.0.0/commandinput-suggestionsfrom
feat/2.0.0/commandinput-suggestions-wrappedbrig-1

Conversation

@jpenilla
Copy link
Copy Markdown
Member

cloud expects the suggestion to be a replacement for the entire argument, use Brigadier's range information to meet that requirement.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 26, 2023

Test Results

  85 files  ±0    85 suites  ±0   15s ⏱️ -1s
514 tests ±0  514 ✔️ ±0  0 💤 ±0  0 ±0 
547 runs  ±0  547 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 1986517. ± Comparison against base commit 49f9feb.

♻️ This comment has been updated with latest results.

cloud expects the suggestion to be a replacement for the entire argument, use Brigadier's range information to meet that requirement.
@jpenilla jpenilla force-pushed the feat/2.0.0/commandinput-suggestions-wrappedbrig-1 branch from d3689b4 to 1986517 Compare December 26, 2023 23:29
@jpenilla jpenilla added the bug Something isn't working label Dec 26, 2023
@Citymonstret Citymonstret merged commit db81523 into feat/2.0.0/commandinput-suggestions Dec 27, 2023
@Citymonstret Citymonstret deleted the feat/2.0.0/commandinput-suggestions-wrappedbrig-1 branch December 27, 2023 09:05
@jpenilla jpenilla added this to the 2.0.0 milestone Dec 30, 2023
jpenilla added a commit that referenced this pull request Dec 30, 2023
* feat(core): don't use requested argument count for suggestions

Instead of relying on the parser to tell us how many arguments it wants, we just check if it's able to consume all the input.

* feat: make suggestion providers accept CommandInput

* feat: allow `@Suggestions` to accept `CommandInput`

* chore: update `SuggestionProvider` JavaDoc

* feat: add test for a multi-token-consuming parser

* Correctly map Brigadier suggestions to cloud (#595)

cloud expects the suggestion to be a replacement for the entire argument, use Brigadier's range information to meet that requirement.

* feat: preserve whitespace when reading from CommandInput (#599)

* fix: don't preemptively switch component for aggregate suggestions

* Remove BlockingSuggestionProvider.ConstantStrings (#605)

* Remove ArgumentParser#getRequestedArgumentCount (#607)

* remove unnecessary future chaining

this is not needed after the extraction of aggregate suggestion logic

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StringRange not taken into account when mapping Brigadier suggestions to cloud

2 participants