-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to stream or push items into a Quickpick #21372
Comments
We do allow a single promise that resolves to an array of strings or message item, like so const myPromisedItems = new Promise(resolve => resolve(['one', 'two', 'three']);
vscode.window.showQuickPick(myPromisedItems) What we don't support is to update the quick pick later, neither with a promise nor with a sync set of items |
Yeah I was thinking with the array of promises vs a single, is that there could be a race setup where anytime one of the promises was resolved it would add its items to the list -- so entries would somewhat stream in. For example in my Find Related extension, I kick off a series of promises to search for different file matches, and now currently aggregate them into a single promise that generates the list of quickpick items, but it would be great if I could have the items returned by each promise added to the list when it became ready. So longer searches don't block the shorter ones. |
Understood. The big challenge with streaming results (to basically anywhere) is how the UI should behave. Once a subset of results is in users can filter and select one and it will be hard to keep the UX stable when more results come in, esp wrt sorting |
Yeah, that is tricky to be sure. |
Just as a reference to track the issue KnisterPeter/vscode-github#84 |
This can be done with the new API we have: https://code.visualstudio.com/updates/v1_26#_quickinput-api |
1.10.0-insider
256d76f10.12.3 (16D32)
Basically provide a way to add additional items to a quickpick after it is shown and/or provide a way to pass an array of promises to
showQuickPick
that would add items as each one resolves.The text was updated successfully, but these errors were encountered: