Skip to content

feat(core, prompts): add async autocomplete options - #471

Open
mateussilva92 wants to merge 4 commits into
bombshell-dev:mainfrom
mateussilva92:async-autocomplete
Open

feat(core, prompts): add async autocomplete options#471
mateussilva92 wants to merge 4 commits into
bombshell-dev:mainfrom
mateussilva92:async-autocomplete

Conversation

@mateussilva92

@mateussilva92 mateussilva92 commented Feb 22, 2026

Copy link
Copy Markdown

This PR enhances the autocomplete prompt to support async option functions.

Fixes:

#467

What’s New:

Autocomplete:

  • Autocomplete options can now be provided as an async function;
  • Request cancellation via AbortController;
  • Stale responses are safely ignored to prevent race conditions;
  • Proper loading state handling;

Common/Helper:

  • unicodeOr is now generic
  • isAsync function was added.

Backwards Compatibility:

  • Existing sync configurations continue to work unchanged.
  • No existing unit tests changed.

Notes:

This PR has the feature itself fully developed. I didn't create any unit tests yet since I want to get feedback on my implementation. When I get an thumbs up on the implementation I'll add the unit tests / examples and remaining files.

@changeset-bot

changeset-bot Bot commented Feb 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c531b6b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mateussilva92
mateussilva92 marked this pull request as ready for review June 26, 2026 09:55
@pkg-pr-new

pkg-pr-new Bot commented Aug 24, 2026

Copy link
Copy Markdown

commit: ebd1852

@43081j

43081j commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

this is a very large change for something we haven't seen much demand for. also note that this doesn't fix #467, it just adds async on top of what that is asking to document.

i very much appreciate the work that has gone into this, but am tempted to leave it sync-only until we see some real demand for it. otherwise it is a slippery slope to introducing a lot of extra code for edge case features.

@dreyfus92 thoughts?

@dreyfus92

Copy link
Copy Markdown
Member

i agree. i'd rather keep it as it is until we see a real demand, this is a lot of surface for an edge case. a couple of things for context: #467 is asing for a reordering filter, not async, and that's already doable with the options getter reading this.userInput. so the fix there is docs, happy to review a pr for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants