|
1 | | -import type { QuickInputButton, QuickPick, QuickPickItem } from 'vscode'; |
| 1 | +import type { CancellationToken, QuickInputButton, QuickPick, QuickPickItem } from 'vscode'; |
2 | 2 | import { commands, ThemeIcon, Uri } from 'vscode'; |
3 | 3 | import { getAvatarUri } from '../../avatars'; |
4 | 4 | import type { |
@@ -520,7 +520,12 @@ export class LaunchpadCommand extends QuickCommand<State> { |
520 | 520 | quickpick.busy = true; |
521 | 521 | try { |
522 | 522 | await this.updateItemsDebouncer(async cancellationToken => { |
523 | | - await updateContextItems(this.container, context, { force: true, search: search }); |
| 523 | + await updateContextItems( |
| 524 | + this.container, |
| 525 | + context, |
| 526 | + { force: true, search: search }, |
| 527 | + cancellationToken, |
| 528 | + ); |
524 | 529 | if (cancellationToken.isCancellationRequested) { |
525 | 530 | return; |
526 | 531 | } |
@@ -1352,8 +1357,9 @@ async function updateContextItems( |
1352 | 1357 | container: Container, |
1353 | 1358 | context: Context, |
1354 | 1359 | options?: { force?: boolean; search?: string }, |
| 1360 | + cancellation?: CancellationToken, |
1355 | 1361 | ) { |
1356 | | - const result = await container.launchpad.getCategorizedItems(options); |
| 1362 | + const result = await container.launchpad.getCategorizedItems(options, cancellation); |
1357 | 1363 | if (options?.search != null) { |
1358 | 1364 | context.result = container.launchpad.mergeSearchedCategorizedItems(context.result, result); |
1359 | 1365 | } else { |
|
0 commit comments