monaco-editor-core 0.56.0-dev-20251121 → 0.56.0-dev-20251122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +2 -0
  18. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  19. package/esm/vs/base/browser/ui/list/rowCache.js +1 -4
  20. package/esm/vs/base/browser/ui/list/rowCache.js.map +1 -1
  21. package/esm/vs/base/browser/ui/menu/menu.js +14 -12
  22. package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
  23. package/esm/vs/base/common/map.js +8 -5
  24. package/esm/vs/base/common/map.js.map +1 -1
  25. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +1 -4
  26. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  27. package/esm/vs/base/common/worker/webWorker.js +10 -7
  28. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  29. package/esm/vs/editor/browser/services/editorWorkerService.js +1 -1
  30. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  31. package/esm/vs/editor/contrib/find/browser/findWidgetSearchHistory.js.map +1 -1
  32. package/esm/vs/editor/contrib/find/browser/replaceWidgetHistory.js.map +1 -1
  33. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  34. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +29 -16
  35. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
  36. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +42 -5
  37. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
  38. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +10 -0
  39. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +1 -1
  40. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -1
  41. package/esm/vs/platform/actionWidget/browser/actionWidget.css +7 -0
  42. package/esm/vs/platform/hover/browser/hoverService.js +17 -8
  43. package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
  44. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +41 -8
  45. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  46. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  47. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  48. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  49. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  50. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  51. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  52. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  53. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +8 -0
  54. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  55. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  56. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  57. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  58. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  59. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  60. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  61. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  62. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  63. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  64. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  65. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  66. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  67. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  68. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -1
  69. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  70. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/platform/quickinput/browser/commandsQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAIhG,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAU,8BAA8B,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAgC,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,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,QAAQ,EAAqC,CAAC;QAElF,MAAM,8BAA8B,GAAG,MAAM,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC;QACjF,IAAI,OAAO,8BAA8B,KAAK,QAAQ,EAAE,CAAC;YACxD,OAAO,8BAA8B,CAAC;QACvC,CAAC;QAED,OAAO,iBAAe,CAAC,+BAA+B,CAAC;IACxD,CAAC;;AAnHW,eAAe;IAczB,WAAA,eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;IACrB,WAAA,WAAW,CAAA;GAhBD,eAAe,CAoH3B","file":"commandsQuickAccess.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { WorkbenchActionExecutedClassification, WorkbenchActionExecutedEvent } from '../../../base/common/actions.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { toErrorMessage } from '../../../base/common/errorMessage.js';\nimport { isCancellationError } from '../../../base/common/errors.js';\nimport { IMatch, matchesBaseContiguousSubString, matchesWords, or } from '../../../base/common/filters.js';\nimport { createSingleCallFunction } from '../../../base/common/functional.js';\nimport { Disposable, DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';\nimport { LRUCache } from '../../../base/common/map.js';\nimport { TfIdfCalculator, normalizeTfIdfScores } from '../../../base/common/tfIdf.js';\nimport { localize } from '../../../nls.js';\nimport { ILocalizedString } from '../../action/common/action.js';\nimport { ICommandService } from '../../commands/common/commands.js';\nimport { IConfigurationChangeEvent, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { IDialogService } from '../../dialogs/common/dialogs.js';\nimport { IInstantiationService } from '../../instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks } from './pickerQuickAccess.js';\nimport { IQuickAccessProviderRunOptions } from '../common/quickAccess.js';\nimport { IQuickPickSeparator } from '../common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget, WillSaveStateReason } from '../../storage/common/storage.js';\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\nimport { Categories } from '../../action/common/actionCommonCategories.js';\n\nexport interface ICommandQuickPick extends IPickerQuickAccessItem {\n\treadonly commandId: string;\n\treadonly commandAlias?: string;\n\treadonly commandDescription?: ILocalizedString;\n\treadonly commandCategory?: string;\n\n\treadonly args?: unknown[];\n\n\ttfIdfScore?: number;\n}\n\nexport interface ICommandsQuickAccessOptions extends IPickerQuickAccessProviderOptions<ICommandQuickPick> {\n\treadonly showAlias: boolean;\n\tsuggestedCommandIds?: Set<string>;\n}\n\nexport abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider<ICommandQuickPick> implements IDisposable {\n\n\tstatic PREFIX = '>';\n\n\tprivate static readonly TFIDF_THRESHOLD = 0.5;\n\tprivate static readonly TFIDF_MAX_RESULTS = 5;\n\n\tprivate static WORD_FILTER = or(matchesBaseContiguousSubString, matchesWords);\n\n\tprivate readonly commandsHistory: CommandsHistory;\n\n\tprotected override readonly options: ICommandsQuickAccessOptions;\n\n\tconstructor(\n\t\toptions: ICommandsQuickAccessOptions,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService protected readonly keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly commandService: ICommandService,\n\t\t@ITelemetryService private readonly telemetryService: ITelemetryService,\n\t\t@IDialogService private readonly dialogService: IDialogService\n\t) {\n\t\tsuper(AbstractCommandsQuickAccessProvider.PREFIX, options);\n\n\t\tthis.commandsHistory = this._register(instantiationService.createInstance(CommandsHistory));\n\n\t\tthis.options = options;\n\t}\n\n\tprotected async _getPicks(filter: string, _disposables: DisposableStore, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): Promise<Picks<ICommandQuickPick> | FastAndSlowPicks<ICommandQuickPick>> {\n\n\t\t// Ask subclass for all command picks\n\t\tconst allCommandPicks = await this.getCommandPicks(token);\n\n\t\tif (token.isCancellationRequested) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst runTfidf = createSingleCallFunction(() => {\n\t\t\tconst tfidf = new TfIdfCalculator();\n\t\t\ttfidf.updateDocuments(allCommandPicks.map(commandPick => ({\n\t\t\t\tkey: commandPick.commandId,\n\t\t\t\ttextChunks: [this.getTfIdfChunk(commandPick)]\n\t\t\t})));\n\t\t\tconst result = tfidf.calculateScores(filter, token);\n\n\t\t\treturn normalizeTfIdfScores(result)\n\t\t\t\t.filter(score => score.score > AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD)\n\t\t\t\t.slice(0, AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS);\n\t\t});\n\n\t\t// Filter\n\t\tconst filteredCommandPicks: ICommandQuickPick[] = [];\n\t\tfor (const commandPick of allCommandPicks) {\n\t\t\tconst labelHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label) ?? undefined;\n\n\t\t\tlet aliasHighlights: IMatch[] | undefined;\n\t\t\tif (commandPick.commandAlias) {\n\t\t\t\taliasHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias) ?? undefined;\n\t\t\t}\n\n\t\t\t// Add if matching in label or alias\n\t\t\tif (labelHighlights || aliasHighlights) {\n\t\t\t\tcommandPick.highlights = {\n\t\t\t\t\tlabel: labelHighlights,\n\t\t\t\t\tdetail: this.options.showAlias ? aliasHighlights : undefined\n\t\t\t\t};\n\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Also add if we have a 100% command ID match\n\t\t\telse if (filter === commandPick.commandId) {\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Handle tf-idf scoring for the rest if there's a filter\n\t\t\telse if (filter.length >= 3) {\n\t\t\t\tconst tfidf = runTfidf();\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// Add if we have a tf-idf score\n\t\t\t\tconst tfidfScore = tfidf.find(score => score.key === commandPick.commandId);\n\t\t\t\tif (tfidfScore) {\n\t\t\t\t\tcommandPick.tfIdfScore = tfidfScore.score;\n\t\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add description to commands that have duplicate labels\n\t\tconst mapLabelToCommand = new Map<string, ICommandQuickPick>();\n\t\tfor (const commandPick of filteredCommandPicks) {\n\t\t\tconst existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\n\t\t\tif (existingCommandForLabel) {\n\t\t\t\tcommandPick.description = commandPick.commandId;\n\t\t\t\texistingCommandForLabel.description = existingCommandForLabel.commandId;\n\t\t\t} else {\n\t\t\t\tmapLabelToCommand.set(commandPick.label, commandPick);\n\t\t\t}\n\t\t}\n\n\t\t// Sort by MRU order and fallback to name otherwise\n\t\tfilteredCommandPicks.sort((commandPickA, commandPickB) => {\n\n\t\t\t// If a result came from tf-idf, we want to put that towards the bottom\n\t\t\tif (commandPickA.tfIdfScore && commandPickB.tfIdfScore) {\n\t\t\t\tif (commandPickA.tfIdfScore === commandPickB.tfIdfScore) {\n\t\t\t\t\treturn commandPickA.label.localeCompare(commandPickB.label); // prefer lexicographically smaller command\n\t\t\t\t}\n\n\t\t\t\treturn commandPickB.tfIdfScore - commandPickA.tfIdfScore; // prefer higher tf-idf score\n\t\t\t} else if (commandPickA.tfIdfScore) {\n\t\t\t\treturn 1; // first command has a score but other doesn't so other wins\n\t\t\t} else if (commandPickB.tfIdfScore) {\n\t\t\t\treturn -1; // other command has a score but first doesn't so first wins\n\t\t\t}\n\n\t\t\tconst commandACounter = this.commandsHistory.peek(commandPickA.commandId);\n\t\t\tconst commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\n\n\t\t\tif (commandACounter && commandBCounter) {\n\t\t\t\treturn commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\n\t\t\t}\n\n\t\t\tif (commandACounter) {\n\t\t\t\treturn -1; // first command was used, so it wins over the non used one\n\t\t\t}\n\n\t\t\tif (commandBCounter) {\n\t\t\t\treturn 1; // other command was used so it wins over the command\n\t\t\t}\n\n\t\t\tif (this.options.suggestedCommandIds) {\n\t\t\t\tconst commandASuggestion = this.options.suggestedCommandIds.has(commandPickA.commandId);\n\t\t\t\tconst commandBSuggestion = this.options.suggestedCommandIds.has(commandPickB.commandId);\n\t\t\t\tif (commandASuggestion && commandBSuggestion) {\n\t\t\t\t\treturn 0; // honor the order of the array\n\t\t\t\t}\n\n\t\t\t\tif (commandASuggestion) {\n\t\t\t\t\treturn -1; // first command was suggested, so it wins over the non suggested one\n\t\t\t\t}\n\n\t\t\t\tif (commandBSuggestion) {\n\t\t\t\t\treturn 1; // other command was suggested so it wins over the command\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if one is Developer and the other isn't, put non-Developer first\n\t\t\tconst isDeveloperA = commandPickA.commandCategory === Categories.Developer.value;\n\t\t\tconst isDeveloperB = commandPickB.commandCategory === Categories.Developer.value;\n\t\t\tif (isDeveloperA && !isDeveloperB) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!isDeveloperA && isDeveloperB) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// both commands were never used, so we sort by name\n\t\t\treturn commandPickA.label.localeCompare(commandPickB.label);\n\t\t});\n\n\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = [];\n\n\t\tlet addOtherSeparator = false;\n\t\tlet addSuggestedSeparator = true;\n\t\tlet addCommonlyUsedSeparator = !!this.options.suggestedCommandIds;\n\t\tfor (let i = 0; i < filteredCommandPicks.length; i++) {\n\t\t\tconst commandPick = filteredCommandPicks[i];\n\n\t\t\t// Separator: recently used\n\t\t\tif (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('recentlyUsed', \"recently used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t}\n\n\t\t\tif (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\taddSuggestedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: commonly used\n\t\t\tif (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('commonlyUsed', \"commonly used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t\taddCommonlyUsedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: other commands\n\t\t\tif (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('morecCommands', \"other commands\") });\n\t\t\t\taddOtherSeparator = false;\n\t\t\t}\n\n\t\t\t// Command\n\t\t\tcommandPicks.push(this.toCommandPick(commandPick, runOptions));\n\t\t}\n\n\t\tif (!this.hasAdditionalCommandPicks(filter, token)) {\n\t\t\treturn commandPicks;\n\t\t}\n\n\t\treturn {\n\t\t\tpicks: commandPicks,\n\t\t\tadditionalPicks: (async (): Promise<Picks<ICommandQuickPick>> => {\n\t\t\t\tconst additionalCommandPicks = await this.getAdditionalCommandPicks(allCommandPicks, filteredCommandPicks, filter, token);\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = additionalCommandPicks.map(commandPick => this.toCommandPick(commandPick, runOptions));\n\t\t\t\t// Basically, if we haven't already added a separator, we add one before the additional picks so long\n\t\t\t\t// as one hasn't been added to the start of the array.\n\t\t\t\tif (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {\n\t\t\t\t\tcommandPicks.unshift({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\t}\n\t\t\t\treturn commandPicks;\n\t\t\t})()\n\t\t};\n\t}\n\n\tprivate toCommandPick(commandPick: ICommandQuickPick | IQuickPickSeparator, runOptions?: IQuickAccessProviderRunOptions): ICommandQuickPick | IQuickPickSeparator {\n\t\tif (commandPick.type === 'separator') {\n\t\t\treturn commandPick;\n\t\t}\n\n\t\tconst keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\n\t\tconst ariaLabel = keybinding ?\n\t\t\tlocalize('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\n\t\t\tcommandPick.label;\n\n\t\treturn {\n\t\t\t...commandPick,\n\t\t\tariaLabel,\n\t\t\tdetail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,\n\t\t\tkeybinding,\n\t\t\taccept: async () => {\n\n\t\t\t\t// Add to history\n\t\t\t\tthis.commandsHistory.push(commandPick.commandId);\n\n\t\t\t\t// Telementry\n\t\t\t\tthis.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', {\n\t\t\t\t\tid: commandPick.commandId,\n\t\t\t\t\tfrom: runOptions?.from ?? 'quick open'\n\t\t\t\t});\n\n\t\t\t\t// Run\n\t\t\t\ttry {\n\t\t\t\t\tcommandPick.args?.length\n\t\t\t\t\t\t? await this.commandService.executeCommand(commandPick.commandId, ...commandPick.args)\n\t\t\t\t\t\t: await this.commandService.executeCommand(commandPick.commandId);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isCancellationError(error)) {\n\t\t\t\t\t\tthis.dialogService.error(localize('canNotRun', \"Command '{0}' resulted in an error\", commandPick.label), toErrorMessage(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t// TF-IDF string to be indexed\n\tprivate getTfIdfChunk({ label, commandAlias, commandDescription }: ICommandQuickPick) {\n\t\tlet chunk = label;\n\t\tif (commandAlias && commandAlias !== label) {\n\t\t\tchunk += ` - ${commandAlias}`;\n\t\t}\n\t\tif (commandDescription && commandDescription.value !== label) {\n\t\t\t// If the original is the same as the value, don't add it\n\t\t\tchunk += ` - ${commandDescription.value === commandDescription.original ? commandDescription.value : `${commandDescription.value} (${commandDescription.original})`}`;\n\t\t}\n\t\treturn chunk;\n\t}\n\n\tprotected abstract getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;\n\n\tprotected abstract hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;\n\tprotected abstract getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;\n}\n\ninterface ISerializedCommandHistory {\n\treadonly usesLRU?: boolean;\n\treadonly entries: { key: string; value: number }[];\n}\n\ninterface ICommandsQuickAccessConfiguration {\n\treadonly workbench: {\n\t\treadonly commandPalette: {\n\t\t\treadonly history: number;\n\t\t\treadonly preserveInput: boolean;\n\t\t};\n\t};\n}\n\nexport class CommandsHistory extends Disposable {\n\n\tstatic readonly DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\n\n\tprivate static readonly PREF_KEY_CACHE = 'commandPalette.mru.cache';\n\tprivate static readonly PREF_KEY_COUNTER = 'commandPalette.mru.counter';\n\n\tprivate static cache: LRUCache<string, number> | undefined;\n\tprivate static counter = 1;\n\tprivate static hasChanges = false;\n\n\tprivate configuredCommandsHistoryLength = 0;\n\n\tconstructor(\n\t\t@IStorageService private readonly storageService: IStorageService,\n\t\t@IConfigurationService private readonly configurationService: IConfigurationService,\n\t\t@ILogService private readonly logService: ILogService\n\t) {\n\t\tsuper();\n\n\t\tthis.updateConfiguration();\n\t\tthis.load();\n\n\t\tthis.registerListeners();\n\t}\n\n\tprivate registerListeners(): void {\n\t\tthis._register(this.configurationService.onDidChangeConfiguration(e => this.updateConfiguration(e)));\n\t\tthis._register(this.storageService.onWillSaveState(e => {\n\t\t\tif (e.reason === WillSaveStateReason.SHUTDOWN) {\n\t\t\t\t// Commands history is very dynamic and so we limit impact\n\t\t\t\t// on storage to only save on shutdown. This helps reduce\n\t\t\t\t// the overhead of syncing this data across machines.\n\t\t\t\tthis.saveState();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate updateConfiguration(e?: IConfigurationChangeEvent): void {\n\t\tif (e && !e.affectsConfiguration('workbench.commandPalette.history')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\n\n\t\tif (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\n\t\t\tCommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\n\t\t\tCommandsHistory.hasChanges = true;\n\t\t}\n\t}\n\n\tprivate load(): void {\n\t\tconst raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, StorageScope.PROFILE);\n\t\tlet serializedCache: ISerializedCommandHistory | undefined;\n\t\tif (raw) {\n\t\t\ttry {\n\t\t\t\tserializedCache = JSON.parse(raw);\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`[CommandsHistory] invalid data: ${error}`);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = CommandsHistory.cache = new LRUCache<string, number>(this.configuredCommandsHistoryLength, 1);\n\t\tif (serializedCache) {\n\t\t\tlet entries: { key: string; value: number }[];\n\t\t\tif (serializedCache.usesLRU) {\n\t\t\t\tentries = serializedCache.entries;\n\t\t\t} else {\n\t\t\t\tentries = serializedCache.entries.sort((a, b) => a.value - b.value);\n\t\t\t}\n\t\t\tentries.forEach(entry => cache.set(entry.key, entry.value));\n\t\t}\n\n\t\tCommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, StorageScope.PROFILE, CommandsHistory.counter);\n\t}\n\n\tpush(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tpeek(commandId: string): number | undefined {\n\t\treturn CommandsHistory.cache?.peek(commandId);\n\t}\n\n\tprivate saveState(): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!CommandsHistory.hasChanges) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializedCache: ISerializedCommandHistory = { usesLRU: true, entries: [] };\n\t\tCommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\n\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), StorageScope.PROFILE, StorageTarget.USER);\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, StorageScope.PROFILE, StorageTarget.USER);\n\t\tCommandsHistory.hasChanges = false;\n\t}\n\n\tstatic getConfiguredCommandHistoryLength(configurationService: IConfigurationService): number {\n\t\tconst config = configurationService.getValue<ICommandsQuickAccessConfiguration>();\n\n\t\tconst configuredCommandHistoryLength = config.workbench?.commandPalette?.history;\n\t\tif (typeof configuredCommandHistoryLength === 'number') {\n\t\t\treturn configuredCommandHistoryLength;\n\t\t}\n\n\t\treturn CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["vs/platform/quickinput/browser/commandsQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAIhG,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,E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C,SAAS,CAAC,eAAe,CAAC,2DAA2C,CAAC;QACrI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,iBAAe,CAAC,gBAAgB,EAAE,iBAAe,CAAC,OAAO,2DAA2C,CAAC;QAC/H,iBAAe,CAAC,UAAU,GAAG,KAAK,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,iCAAiC,CAAC,oBAA2C;QACnF,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,EAAqC,CAAC;QAElF,MAAM,8BAA8B,GAAG,MAAM,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC;QACjF,IAAI,OAAO,8BAA8B,KAAK,QAAQ,EAAE,CAAC;YACxD,OAAO,8BAA8B,CAAC;QACvC,CAAC;QAED,OAAO,iBAAe,CAAC,+BAA+B,CAAC;IACxD,CAAC;;AA5HW,eAAe;IAczB,WAAA,eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;IACrB,WAAA,WAAW,CAAA;GAhBD,eAAe,CA6H3B","file":"commandsQuickAccess.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { WorkbenchActionExecutedClassification, WorkbenchActionExecutedEvent } from '../../../base/common/actions.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Codicon } from '../../../base/common/codicons.js';\nimport { toErrorMessage } from '../../../base/common/errorMessage.js';\nimport { isCancellationError } from '../../../base/common/errors.js';\nimport { IMatch, matchesBaseContiguousSubString, matchesWords, or } from '../../../base/common/filters.js';\nimport { createSingleCallFunction } from '../../../base/common/functional.js';\nimport { Disposable, DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';\nimport { LRUCache } from '../../../base/common/map.js';\nimport { ThemeIcon } from '../../../base/common/themables.js';\nimport { TfIdfCalculator, normalizeTfIdfScores } from '../../../base/common/tfIdf.js';\nimport { localize } from '../../../nls.js';\nimport { ILocalizedString } from '../../action/common/action.js';\nimport { ICommandService } from '../../commands/common/commands.js';\nimport { IConfigurationChangeEvent, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { IDialogService } from '../../dialogs/common/dialogs.js';\nimport { IInstantiationService } from '../../instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks, TriggerAction } from './pickerQuickAccess.js';\nimport { IQuickAccessProviderRunOptions } from '../common/quickAccess.js';\nimport { IKeyMods, IQuickPickSeparator } from '../common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget, WillSaveStateReason } from '../../storage/common/storage.js';\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\nimport { Categories } from '../../action/common/actionCommonCategories.js';\n\nexport interface ICommandQuickPick extends IPickerQuickAccessItem {\n\treadonly commandId: string;\n\treadonly commandAlias?: string;\n\treadonly commandDescription?: ILocalizedString;\n\treadonly commandCategory?: string;\n\n\treadonly args?: unknown[];\n\n\ttfIdfScore?: number;\n}\n\nexport interface ICommandsQuickAccessOptions extends IPickerQuickAccessProviderOptions<ICommandQuickPick> {\n\treadonly showAlias: boolean;\n\tsuggestedCommandIds?: Set<string>;\n}\n\nexport abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider<ICommandQuickPick> implements IDisposable {\n\n\tstatic PREFIX = '>';\n\n\tprivate static readonly TFIDF_THRESHOLD = 0.5;\n\tprivate static readonly TFIDF_MAX_RESULTS = 5;\n\n\tprivate static WORD_FILTER = or(matchesBaseContiguousSubString, matchesWords);\n\n\tprivate readonly commandsHistory: CommandsHistory;\n\n\tprotected override readonly options: ICommandsQuickAccessOptions;\n\n\tconstructor(\n\t\toptions: ICommandsQuickAccessOptions,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService protected readonly keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly commandService: ICommandService,\n\t\t@ITelemetryService private readonly telemetryService: ITelemetryService,\n\t\t@IDialogService private readonly dialogService: IDialogService\n\t) {\n\t\tsuper(AbstractCommandsQuickAccessProvider.PREFIX, options);\n\n\t\tthis.commandsHistory = this._register(instantiationService.createInstance(CommandsHistory));\n\n\t\tthis.options = options;\n\t}\n\n\tprotected async _getPicks(filter: string, _disposables: DisposableStore, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): Promise<Picks<ICommandQuickPick> | FastAndSlowPicks<ICommandQuickPick>> {\n\n\t\t// Ask subclass for all command picks\n\t\tconst allCommandPicks = await this.getCommandPicks(token);\n\n\t\tif (token.isCancellationRequested) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst runTfidf = createSingleCallFunction(() => {\n\t\t\tconst tfidf = new TfIdfCalculator();\n\t\t\ttfidf.updateDocuments(allCommandPicks.map(commandPick => ({\n\t\t\t\tkey: commandPick.commandId,\n\t\t\t\ttextChunks: [this.getTfIdfChunk(commandPick)]\n\t\t\t})));\n\t\t\tconst result = tfidf.calculateScores(filter, token);\n\n\t\t\treturn normalizeTfIdfScores(result)\n\t\t\t\t.filter(score => score.score > AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD)\n\t\t\t\t.slice(0, AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS);\n\t\t});\n\n\t\t// Filter\n\t\tconst filteredCommandPicks: ICommandQuickPick[] = [];\n\t\tfor (const commandPick of allCommandPicks) {\n\t\t\tconst labelHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label) ?? undefined;\n\n\t\t\tlet aliasHighlights: IMatch[] | undefined;\n\t\t\tif (commandPick.commandAlias) {\n\t\t\t\taliasHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias) ?? undefined;\n\t\t\t}\n\n\t\t\t// Add if matching in label or alias\n\t\t\tif (labelHighlights || aliasHighlights) {\n\t\t\t\tcommandPick.highlights = {\n\t\t\t\t\tlabel: labelHighlights,\n\t\t\t\t\tdetail: this.options.showAlias ? aliasHighlights : undefined\n\t\t\t\t};\n\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Also add if we have a 100% command ID match\n\t\t\telse if (filter === commandPick.commandId) {\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Handle tf-idf scoring for the rest if there's a filter\n\t\t\telse if (filter.length >= 3) {\n\t\t\t\tconst tfidf = runTfidf();\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// Add if we have a tf-idf score\n\t\t\t\tconst tfidfScore = tfidf.find(score => score.key === commandPick.commandId);\n\t\t\t\tif (tfidfScore) {\n\t\t\t\t\tcommandPick.tfIdfScore = tfidfScore.score;\n\t\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add description to commands that have duplicate labels\n\t\tconst mapLabelToCommand = new Map<string, ICommandQuickPick>();\n\t\tfor (const commandPick of filteredCommandPicks) {\n\t\t\tconst existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\n\t\t\tif (existingCommandForLabel) {\n\t\t\t\tcommandPick.description = commandPick.commandId;\n\t\t\t\texistingCommandForLabel.description = existingCommandForLabel.commandId;\n\t\t\t} else {\n\t\t\t\tmapLabelToCommand.set(commandPick.label, commandPick);\n\t\t\t}\n\t\t}\n\n\t\t// Sort by MRU order and fallback to name otherwise\n\t\tfilteredCommandPicks.sort((commandPickA, commandPickB) => {\n\n\t\t\t// If a result came from tf-idf, we want to put that towards the bottom\n\t\t\tif (commandPickA.tfIdfScore && commandPickB.tfIdfScore) {\n\t\t\t\tif (commandPickA.tfIdfScore === commandPickB.tfIdfScore) {\n\t\t\t\t\treturn commandPickA.label.localeCompare(commandPickB.label); // prefer lexicographically smaller command\n\t\t\t\t}\n\n\t\t\t\treturn commandPickB.tfIdfScore - commandPickA.tfIdfScore; // prefer higher tf-idf score\n\t\t\t} else if (commandPickA.tfIdfScore) {\n\t\t\t\treturn 1; // first command has a score but other doesn't so other wins\n\t\t\t} else if (commandPickB.tfIdfScore) {\n\t\t\t\treturn -1; // other command has a score but first doesn't so first wins\n\t\t\t}\n\n\t\t\tconst commandACounter = this.commandsHistory.peek(commandPickA.commandId);\n\t\t\tconst commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\n\n\t\t\tif (commandACounter && commandBCounter) {\n\t\t\t\treturn commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\n\t\t\t}\n\n\t\t\tif (commandACounter) {\n\t\t\t\treturn -1; // first command was used, so it wins over the non used one\n\t\t\t}\n\n\t\t\tif (commandBCounter) {\n\t\t\t\treturn 1; // other command was used so it wins over the command\n\t\t\t}\n\n\t\t\tif (this.options.suggestedCommandIds) {\n\t\t\t\tconst commandASuggestion = this.options.suggestedCommandIds.has(commandPickA.commandId);\n\t\t\t\tconst commandBSuggestion = this.options.suggestedCommandIds.has(commandPickB.commandId);\n\t\t\t\tif (commandASuggestion && commandBSuggestion) {\n\t\t\t\t\treturn 0; // honor the order of the array\n\t\t\t\t}\n\n\t\t\t\tif (commandASuggestion) {\n\t\t\t\t\treturn -1; // first command was suggested, so it wins over the non suggested one\n\t\t\t\t}\n\n\t\t\t\tif (commandBSuggestion) {\n\t\t\t\t\treturn 1; // other command was suggested so it wins over the command\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if one is Developer and the other isn't, put non-Developer first\n\t\t\tconst isDeveloperA = commandPickA.commandCategory === Categories.Developer.value;\n\t\t\tconst isDeveloperB = commandPickB.commandCategory === Categories.Developer.value;\n\t\t\tif (isDeveloperA && !isDeveloperB) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!isDeveloperA && isDeveloperB) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// both commands were never used, so we sort by name\n\t\t\treturn commandPickA.label.localeCompare(commandPickB.label);\n\t\t});\n\n\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = [];\n\n\t\tlet addOtherSeparator = false;\n\t\tlet addSuggestedSeparator = true;\n\t\tlet addCommonlyUsedSeparator = !!this.options.suggestedCommandIds;\n\t\tfor (let i = 0; i < filteredCommandPicks.length; i++) {\n\t\t\tconst commandPick = filteredCommandPicks[i];\n\t\t\tconst isInHistory = !!this.commandsHistory.peek(commandPick.commandId);\n\n\t\t\t// Separator: recently used\n\t\t\tif (i === 0 && isInHistory) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('recentlyUsed', \"recently used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t}\n\n\t\t\tif (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\taddSuggestedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: commonly used\n\t\t\tif (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !isInHistory && this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('commonlyUsed', \"commonly used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t\taddCommonlyUsedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: other commands\n\t\t\tif (addOtherSeparator && commandPick.tfIdfScore === undefined && !isInHistory && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('morecCommands', \"other commands\") });\n\t\t\t\taddOtherSeparator = false;\n\t\t\t}\n\n\t\t\t// Command\n\t\t\tcommandPicks.push(this.toCommandPick(commandPick, runOptions, isInHistory));\n\t\t}\n\n\t\tif (!this.hasAdditionalCommandPicks(filter, token)) {\n\t\t\treturn commandPicks;\n\t\t}\n\n\t\treturn {\n\t\t\tpicks: commandPicks,\n\t\t\tadditionalPicks: (async (): Promise<Picks<ICommandQuickPick>> => {\n\t\t\t\tconst additionalCommandPicks = await this.getAdditionalCommandPicks(allCommandPicks, filteredCommandPicks, filter, token);\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = additionalCommandPicks.map(commandPick => this.toCommandPick(commandPick, runOptions));\n\t\t\t\t// Basically, if we haven't already added a separator, we add one before the additional picks so long\n\t\t\t\t// as one hasn't been added to the start of the array.\n\t\t\t\tif (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {\n\t\t\t\t\tcommandPicks.unshift({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\t}\n\t\t\t\treturn commandPicks;\n\t\t\t})()\n\t\t};\n\t}\n\n\tprivate toCommandPick(commandPick: ICommandQuickPick | IQuickPickSeparator, runOptions?: IQuickAccessProviderRunOptions, isRecentlyUsed: boolean = false): ICommandQuickPick | IQuickPickSeparator {\n\t\tif (commandPick.type === 'separator') {\n\t\t\treturn commandPick;\n\t\t}\n\n\t\tconst keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\n\t\tconst ariaLabel = keybinding ?\n\t\t\tlocalize('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\n\t\t\tcommandPick.label;\n\n\t\t// Add remove button for recently used items (as the last button, to the right)\n\t\tconst existingButtons = commandPick.buttons || [];\n\t\tconst buttons = isRecentlyUsed ? [\n\t\t\t...existingButtons,\n\t\t\t{\n\t\t\t\ticonClass: ThemeIcon.asClassName(Codicon.close),\n\t\t\t\ttooltip: localize('removeFromRecentlyUsed', \"Remove from Recently Used\")\n\t\t\t}\n\t\t] : commandPick.buttons;\n\n\t\treturn {\n\t\t\t...commandPick,\n\t\t\tariaLabel,\n\t\t\tdetail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,\n\t\t\tkeybinding,\n\t\t\tbuttons,\n\t\t\taccept: async () => {\n\n\t\t\t\t// Add to history\n\t\t\t\tthis.commandsHistory.push(commandPick.commandId);\n\n\t\t\t\t// Telementry\n\t\t\t\tthis.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', {\n\t\t\t\t\tid: commandPick.commandId,\n\t\t\t\t\tfrom: runOptions?.from ?? 'quick open'\n\t\t\t\t});\n\n\t\t\t\t// Run\n\t\t\t\ttry {\n\t\t\t\t\tcommandPick.args?.length\n\t\t\t\t\t\t? await this.commandService.executeCommand(commandPick.commandId, ...commandPick.args)\n\t\t\t\t\t\t: await this.commandService.executeCommand(commandPick.commandId);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isCancellationError(error)) {\n\t\t\t\t\t\tthis.dialogService.error(localize('canNotRun', \"Command '{0}' resulted in an error\", commandPick.label), toErrorMessage(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttrigger: isRecentlyUsed ? (buttonIndex: number, keyMods: IKeyMods): TriggerAction | Promise<TriggerAction> => {\n\t\t\t\t// The remove button is now the last button\n\t\t\t\tconst removeButtonIndex = existingButtons.length;\n\t\t\t\tif (buttonIndex === removeButtonIndex) {\n\t\t\t\t\tthis.commandsHistory.remove(commandPick.commandId);\n\t\t\t\t\treturn TriggerAction.REMOVE_ITEM;\n\t\t\t\t}\n\t\t\t\t// Handle other buttons (e.g., configure keybinding button)\n\t\t\t\tif (commandPick.trigger) {\n\t\t\t\t\treturn commandPick.trigger(buttonIndex, keyMods);\n\t\t\t\t}\n\t\t\t\treturn TriggerAction.NO_ACTION;\n\t\t\t} : commandPick.trigger\n\t\t};\n\t}\n\n\t// TF-IDF string to be indexed\n\tprivate getTfIdfChunk({ label, commandAlias, commandDescription }: ICommandQuickPick) {\n\t\tlet chunk = label;\n\t\tif (commandAlias && commandAlias !== label) {\n\t\t\tchunk += ` - ${commandAlias}`;\n\t\t}\n\t\tif (commandDescription && commandDescription.value !== label) {\n\t\t\t// If the original is the same as the value, don't add it\n\t\t\tchunk += ` - ${commandDescription.value === commandDescription.original ? commandDescription.value : `${commandDescription.value} (${commandDescription.original})`}`;\n\t\t}\n\t\treturn chunk;\n\t}\n\n\tprotected abstract getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;\n\n\tprotected abstract hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;\n\tprotected abstract getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;\n}\n\ninterface ISerializedCommandHistory {\n\treadonly usesLRU?: boolean;\n\treadonly entries: { key: string; value: number }[];\n}\n\ninterface ICommandsQuickAccessConfiguration {\n\treadonly workbench: {\n\t\treadonly commandPalette: {\n\t\t\treadonly history: number;\n\t\t\treadonly preserveInput: boolean;\n\t\t};\n\t};\n}\n\nexport class CommandsHistory extends Disposable {\n\n\tstatic readonly DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\n\n\tprivate static readonly PREF_KEY_CACHE = 'commandPalette.mru.cache';\n\tprivate static readonly PREF_KEY_COUNTER = 'commandPalette.mru.counter';\n\n\tprivate static cache: LRUCache<string, number> | undefined;\n\tprivate static counter = 1;\n\tprivate static hasChanges = false;\n\n\tprivate configuredCommandsHistoryLength = 0;\n\n\tconstructor(\n\t\t@IStorageService private readonly storageService: IStorageService,\n\t\t@IConfigurationService private readonly configurationService: IConfigurationService,\n\t\t@ILogService private readonly logService: ILogService\n\t) {\n\t\tsuper();\n\n\t\tthis.updateConfiguration();\n\t\tthis.load();\n\n\t\tthis.registerListeners();\n\t}\n\n\tprivate registerListeners(): void {\n\t\tthis._register(this.configurationService.onDidChangeConfiguration(e => this.updateConfiguration(e)));\n\t\tthis._register(this.storageService.onWillSaveState(e => {\n\t\t\tif (e.reason === WillSaveStateReason.SHUTDOWN) {\n\t\t\t\t// Commands history is very dynamic and so we limit impact\n\t\t\t\t// on storage to only save on shutdown. This helps reduce\n\t\t\t\t// the overhead of syncing this data across machines.\n\t\t\t\tthis.saveState();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate updateConfiguration(e?: IConfigurationChangeEvent): void {\n\t\tif (e && !e.affectsConfiguration('workbench.commandPalette.history')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\n\n\t\tif (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\n\t\t\tCommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\n\t\t\tCommandsHistory.hasChanges = true;\n\t\t}\n\t}\n\n\tprivate load(): void {\n\t\tconst raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, StorageScope.PROFILE);\n\t\tlet serializedCache: ISerializedCommandHistory | undefined;\n\t\tif (raw) {\n\t\t\ttry {\n\t\t\t\tserializedCache = JSON.parse(raw);\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`[CommandsHistory] invalid data: ${error}`);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = CommandsHistory.cache = new LRUCache<string, number>(this.configuredCommandsHistoryLength, 1);\n\t\tif (serializedCache) {\n\t\t\tlet entries: { key: string; value: number }[];\n\t\t\tif (serializedCache.usesLRU) {\n\t\t\t\tentries = serializedCache.entries;\n\t\t\t} else {\n\t\t\t\tentries = serializedCache.entries.sort((a, b) => a.value - b.value);\n\t\t\t}\n\t\t\tentries.forEach(entry => cache.set(entry.key, entry.value));\n\t\t}\n\n\t\tCommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, StorageScope.PROFILE, CommandsHistory.counter);\n\t}\n\n\tpush(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tpeek(commandId: string): number | undefined {\n\t\treturn CommandsHistory.cache?.peek(commandId);\n\t}\n\n\tremove(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.delete(commandId);\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tprivate saveState(): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!CommandsHistory.hasChanges) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializedCache: ISerializedCommandHistory = { usesLRU: true, entries: [] };\n\t\tCommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\n\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), StorageScope.PROFILE, StorageTarget.USER);\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, StorageScope.PROFILE, StorageTarget.USER);\n\t\tCommandsHistory.hasChanges = false;\n\t}\n\n\tstatic getConfiguredCommandHistoryLength(configurationService: IConfigurationService): number {\n\t\tconst config = configurationService.getValue<ICommandsQuickAccessConfiguration>();\n\n\t\tconst configuredCommandHistoryLength = config.workbench?.commandPalette?.history;\n\t\tif (typeof configuredCommandHistoryLength === 'number') {\n\t\t\treturn configuredCommandHistoryLength;\n\t\t}\n\n\t\treturn CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\n\t}\n}\n"]}
@@ -62,7 +62,7 @@ let HelpQuickAccessProvider = class HelpQuickAccessProvider {
62
62
  prefix,
63
63
  label,
64
64
  keybinding: helpEntry.commandId ? this.keybindingService.lookupKeybinding(helpEntry.commandId) : undefined,
65
- ariaLabel: localize(1754, "{0}, {1}", label, helpEntry.description),
65
+ ariaLabel: localize(1755, "{0}, {1}", label, helpEntry.description),
66
66
  description: helpEntry.description
67
67
  };
68
68
  });
@@ -31,22 +31,22 @@ import { IHoverService, WorkbenchHoverDelegate } from '../../hover/browser/hover
31
31
  import { ContextKeyExpr, RawContextKey } from '../../contextkey/common/contextkey.js';
32
32
  import { observableValue } from '../../../base/common/observable.js';
33
33
  export const inQuickInputContextKeyValue = 'inQuickInput';
34
- export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(1755, "Whether keyboard focus is inside the quick input control"));
34
+ export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(1756, "Whether keyboard focus is inside the quick input control"));
35
35
  export const inQuickInputContext = ContextKeyExpr.has(inQuickInputContextKeyValue);
36
36
  export const quickInputAlignmentContextKeyValue = 'quickInputAlignment';
37
- export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(1756, "The alignment of the quick input"));
37
+ export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(1757, "The alignment of the quick input"));
38
38
  export const quickInputTypeContextKeyValue = 'quickInputType';
39
- export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(1757, "The type of the currently visible quick input"));
39
+ export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(1758, "The type of the currently visible quick input"));
40
40
  export const endOfQuickInputBoxContextKeyValue = 'cursorAtEndOfQuickInputBox';
41
- export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(1758, "Whether the cursor in the quick input is at the end of the input box"));
41
+ export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(1759, "Whether the cursor in the quick input is at the end of the input box"));
42
42
  export const endOfQuickInputBoxContext = ContextKeyExpr.has(endOfQuickInputBoxContextKeyValue);
43
43
  export const backButton = {
44
44
  iconClass: ThemeIcon.asClassName(Codicon.quickInputBack),
45
- tooltip: localize(1759, "Back"),
45
+ tooltip: localize(1760, "Back"),
46
46
  handle: -1 // TODO
47
47
  };
48
48
  export class QuickInput extends Disposable {
49
- static { this.noPromptMessage = localize(1760, "Press 'Enter' to confirm your input or 'Escape' to cancel"); }
49
+ static { this.noPromptMessage = localize(1761, "Press 'Enter' to confirm your input or 'Escape' to cancel"); }
50
50
  constructor(ui) {
51
51
  super();
52
52
  this.ui = ui;
@@ -322,7 +322,7 @@ export class QuickInput extends Disposable {
322
322
  }
323
323
  getSteps() {
324
324
  if (this.step && this.totalSteps) {
325
- return localize(1761, "{0}/{1}", this.step, this.totalSteps);
325
+ return localize(1762, "{0}/{1}", this.step, this.totalSteps);
326
326
  }
327
327
  if (this.step) {
328
328
  return String(this.step);
@@ -352,7 +352,7 @@ export class QuickInput extends Disposable {
352
352
  }
353
353
  }
354
354
  export class QuickPick extends QuickInput {
355
- static { this.DEFAULT_ARIA_LABEL = localize(1762, "Type to narrow down results."); }
355
+ static { this.DEFAULT_ARIA_LABEL = localize(1763, "Type to narrow down results."); }
356
356
  constructor(ui) {
357
357
  super(ui);
358
358
  this._value = '';
@@ -586,7 +586,7 @@ export class QuickPick extends QuickInput {
586
586
  this.update();
587
587
  }
588
588
  get okLabel() {
589
- return this._okLabel ?? localize(1763, "OK");
589
+ return this._okLabel ?? localize(1764, "OK");
590
590
  }
591
591
  set okLabel(okLabel) {
592
592
  this._okLabel = okLabel;
@@ -932,7 +932,7 @@ export class InputBox extends QuickInput {
932
932
  set prompt(prompt) {
933
933
  this._prompt = prompt;
934
934
  this.noValidationMessage = prompt
935
- ? localize(1764, "{0} (Press 'Enter' to confirm or 'Escape' to cancel)", prompt)
935
+ ? localize(1765, "{0} (Press 'Enter' to confirm or 'Escape' to cancel)", prompt)
936
936
  : QuickInput.noPromptMessage;
937
937
  this.update();
938
938
  }
@@ -13,7 +13,7 @@ function registerQuickInputCommandAndKeybindingRule(rule, options = {}) {
13
13
  KeybindingsRegistry.registerCommandAndKeybindingRule({
14
14
  weight: 200 /* KeybindingWeight.WorkbenchContrib */,
15
15
  when: inQuickInputContext,
16
- metadata: { description: localize(1765, "Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
16
+ metadata: { description: localize(1766, "Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
17
17
  ...rule,
18
18
  secondary: getSecondary(rule.primary, rule.secondary ?? [], options)
19
19
  });
@@ -24,7 +24,7 @@ function registerQuickPickCommandAndKeybindingRule(rule, options = {}) {
24
24
  when: ContextKeyExpr.and(ContextKeyExpr.or(
25
25
  // Only things that use Tree widgets
26
26
  ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickPick" /* QuickInputType.QuickPick */), ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickTree" /* QuickInputType.QuickTree */)), inQuickInputContext),
27
- metadata: { description: localize(1766, "Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
27
+ metadata: { description: localize(1767, "Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
28
28
  ...rule,
29
29
  secondary: getSecondary(rule.primary, rule.secondary ?? [], options)
30
30
  });
@@ -79,8 +79,8 @@ registerQuickPickCommandAndKeybindingRule({ id: 'quickInput.previous', primary:
79
79
  // In this case, we want that modifier key+up/down to navigate to the next/previous item, not the next/previous separator.
80
80
  // To handle this, we have a separate command for navigating to the next/previous separator when we are not in quick access mode.
81
81
  // If, however, we are in quick access mode, and you hold down an additional modifier key, we will navigate to the next/previous separator.
82
- const nextSeparatorFallbackDesc = localize(1767, "If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator.");
83
- const prevSeparatorFallbackDesc = localize(1768, "If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");
82
+ const nextSeparatorFallbackDesc = localize(1768, "If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator.");
83
+ const prevSeparatorFallbackDesc = localize(1769, "If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");
84
84
  if (isMacintosh) {
85
85
  registerQuickPickCommandAndKeybindingRule({
86
86
  id: 'quickInput.nextSeparatorWithQuickAccessFallback',
@@ -145,7 +145,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
145
145
  // All other kinds of Quick things handle Accept, except Widget. In other words, Accepting is a detail on the things
146
146
  // that extend IQuickInput
147
147
  ContextKeyExpr.notEquals(quickInputTypeContextKeyValue, "quickWidget" /* QuickInputType.QuickWidget */), inQuickInputContext, ContextKeyExpr.not('isComposing')),
148
- metadata: { description: localize(1769, "Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
148
+ metadata: { description: localize(1770, "Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
149
149
  handler: (accessor) => {
150
150
  const currentQuickPick = accessor.get(IQuickInputService).currentQuickInput;
151
151
  currentQuickPick?.accept();
@@ -118,7 +118,7 @@ let QuickInputController = class QuickInputController extends Disposable {
118
118
  const rightActionBar = this._register(new ActionBar(titleBar, { hoverDelegate: this.options.hoverDelegate }));
119
119
  rightActionBar.domNode.classList.add('quick-input-right-action-bar');
120
120
  const headerContainer = dom.append(container, $('.quick-input-header'));
121
- const checkAll = this._register(new TriStateCheckbox(localize(1770, "Toggle all checkboxes"), false, { ...defaultCheckboxStyles, size: 15 }));
121
+ const checkAll = this._register(new TriStateCheckbox(localize(1771, "Toggle all checkboxes"), false, { ...defaultCheckboxStyles, size: 15 }));
122
122
  dom.append(headerContainer, checkAll.domNode);
123
123
  this._register(checkAll.onChange(() => {
124
124
  const checked = checkAll.checked;
@@ -137,21 +137,21 @@ let QuickInputController = class QuickInputController extends Disposable {
137
137
  const visibleCountContainer = dom.append(filterContainer, $('.quick-input-visible-count'));
138
138
  visibleCountContainer.setAttribute('aria-live', 'polite');
139
139
  visibleCountContainer.setAttribute('aria-atomic', 'true');
140
- const visibleCount = this._register(new CountBadge(visibleCountContainer, { countFormat: localize(1771, "{0} Results") }, this.styles.countBadge));
140
+ const visibleCount = this._register(new CountBadge(visibleCountContainer, { countFormat: localize(1772, "{0} Results") }, this.styles.countBadge));
141
141
  const countContainer = dom.append(filterContainer, $('.quick-input-count'));
142
142
  countContainer.setAttribute('aria-live', 'polite');
143
- const count = this._register(new CountBadge(countContainer, { countFormat: localize(1772, "{0} Selected") }, this.styles.countBadge));
143
+ const count = this._register(new CountBadge(countContainer, { countFormat: localize(1773, "{0} Selected") }, this.styles.countBadge));
144
144
  const inlineActionBar = this._register(new ActionBar(headerContainer, { hoverDelegate: this.options.hoverDelegate }));
145
145
  inlineActionBar.domNode.classList.add('quick-input-inline-action-bar');
146
146
  const okContainer = dom.append(headerContainer, $('.quick-input-action'));
147
147
  const ok = this._register(new Button(okContainer, this.styles.button));
148
- ok.label = localize(1773, "OK");
148
+ ok.label = localize(1774, "OK");
149
149
  this._register(ok.onDidClick(e => {
150
150
  this.onDidAcceptEmitter.fire();
151
151
  }));
152
152
  const customButtonContainer = dom.append(headerContainer, $('.quick-input-action'));
153
153
  const customButton = this._register(new Button(customButtonContainer, { ...this.styles.button, supportIcons: true }));
154
- customButton.label = localize(1774, "Custom");
154
+ customButton.label = localize(1775, "Custom");
155
155
  this._register(customButton.onDidClick(e => {
156
156
  this.onDidCustomEmitter.fire();
157
157
  }));
@@ -588,7 +588,7 @@ let QuickInputController = class QuickInputController extends Disposable {
588
588
  ui.ignoreFocusOut = false;
589
589
  ui.inputBox.toggles = undefined;
590
590
  const backKeybindingLabel = this.options.backKeybindingLabel();
591
- backButton.tooltip = backKeybindingLabel ? localize(1775, "Back ({0})", backKeybindingLabel) : localize(1776, "Back");
591
+ backButton.tooltip = backKeybindingLabel ? localize(1776, "Back ({0})", backKeybindingLabel) : localize(1777, "Back");
592
592
  ui.container.style.display = '';
593
593
  this.updateLayout();
594
594
  this.dndController?.layoutContainer();
@@ -206,7 +206,7 @@ class QuickInputItemDelegate {
206
206
  }
207
207
  class QuickInputAccessibilityProvider {
208
208
  getWidgetAriaLabel() {
209
- return localize(1777, "Quick Input");
209
+ return localize(1778, "Quick Input");
210
210
  }
211
211
  getAriaLabel(element) {
212
212
  return element.separator?.label
@@ -58,7 +58,7 @@ export function renderQuickInputDescription(description, container, actionHandle
58
58
  else {
59
59
  let title = node.title;
60
60
  if (!title && node.href.startsWith('command:')) {
61
- title = localize(1778, "Click to execute command '{0}'", node.href.substring('command:'.length));
61
+ title = localize(1779, "Click to execute command '{0}'", node.href.substring('command:'.length));
62
62
  }
63
63
  else if (!title) {
64
64
  title = node.href;
@@ -13,7 +13,7 @@ export class QuickTreeAccessibilityProvider {
13
13
  this.onCheckedEvent = onCheckedEvent;
14
14
  }
15
15
  getWidgetAriaLabel() {
16
- return localize(1779, "Quick Tree");
16
+ return localize(1780, "Quick Tree");
17
17
  }
18
18
  getAriaLabel(element) {
19
19
  return element.ariaLabel || [element.label, element.description]
@@ -83,6 +83,7 @@ let QuickInputTreeController = class QuickInputTreeController extends Disposable
83
83
  identityProvider: new QuickInputTreeIdentityProvider()
84
84
  }));
85
85
  this.registerCheckboxStateListeners();
86
+ this.registerOnDidChangeFocus();
86
87
  }
87
88
  get tree() {
88
89
  return this._tree;
@@ -184,6 +185,13 @@ let QuickInputTreeController = class QuickInputTreeController extends Disposable
184
185
  });
185
186
  this._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems());
186
187
  }
188
+ registerOnDidChangeFocus() {
189
+ // Ensure that selection follows focus
190
+ this._register(this._tree.onDidChangeFocus(e => {
191
+ const item = this._tree.getFocus().findLast(item => item !== null);
192
+ this._tree.setSelection(item ? [item] : [], e.browserEvent);
193
+ }));
194
+ }
187
195
  getCheckedLeafItems() {
188
196
  const lookedAt = new Set();
189
197
  const toLookAt = [...this._tree.getNode().children];
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/quickinput/browser/tree/quickInputTreeController.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TreeController.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { RenderIndentGuides } from '../../../../base/browser/ui/tree/abstractTree.js';\nimport { IHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { IIdentityProvider } from '../../../../base/browser/ui/list/list.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { IInstantiationService } from '../../../instantiation/common/instantiation.js';\nimport { WorkbenchObjectTree } from '../../../list/browser/listService.js';\nimport { IQuickTreeCheckboxEvent, IQuickTreeItem, IQuickTreeItemButtonEvent } from '../../common/quickInput.js';\nimport { QuickInputTreeDelegate } from './quickInputDelegate.js';\nimport { getParentNodeState, IQuickTreeFilterData } from './quickInputTree.js';\nimport { QuickTreeAccessibilityProvider } from './quickInputTreeAccessibilityProvider.js';\nimport { QuickInputTreeFilter } from './quickInputTreeFilter.js';\nimport { QuickInputCheckboxStateHandler, QuickInputTreeRenderer } from './quickInputTreeRenderer.js';\nimport { QuickInputTreeSorter } from './quickInputTreeSorter.js';\nimport { Checkbox } from '../../../../base/browser/ui/toggle/toggle.js';\n\nconst $ = dom.$;\n\nclass QuickInputTreeIdentityProvider implements IIdentityProvider<IQuickTreeItem> {\n\tprivate readonly _elementIds = new WeakMap<IQuickTreeItem, string>();\n\tprivate _counter = 0;\n\n\tgetId(element: IQuickTreeItem): { toString(): string } {\n\t\tlet id = element.id;\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = this._elementIds.get(element);\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = `__generated_${this._counter++}`;\n\t\tthis._elementIds.set(element, id);\n\t\treturn id;\n\t}\n}\n\nexport class QuickInputTreeController extends Disposable {\n\tprivate readonly _renderer: QuickInputTreeRenderer<IQuickTreeItem>;\n\tprivate readonly _checkboxStateHandler: QuickInputCheckboxStateHandler<IQuickTreeItem>;\n\tprivate readonly _filter: QuickInputTreeFilter;\n\tprivate readonly _sorter: QuickInputTreeSorter;\n\tprivate readonly _tree: WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>;\n\n\tprivate readonly _onDidTriggerButton = this._register(new Emitter<IQuickTreeItemButtonEvent<IQuickTreeItem>>());\n\n\tprivate readonly _onDidChangeCheckboxState = this._register(new Emitter<IQuickTreeCheckboxEvent<IQuickTreeItem>>());\n\treadonly onDidChangeCheckboxState = this._onDidChangeCheckboxState.event;\n\n\tprivate readonly _onDidCheckedLeafItemsChange = this._register(new Emitter<ReadonlyArray<IQuickTreeItem>>());\n\n\tprivate readonly _onLeave = new Emitter<void>();\n\t/**\n\t * Event that is fired when the tree would no longer have focus.\n\t*/\n\treadonly onLeave: Event<void> = this._onLeave.event;\n\n\tprivate readonly _onDidAccept = this._register(new Emitter<void>());\n\t/**\n\t * Event that is fired when a non-pickable item is clicked, indicating acceptance.\n\t */\n\treadonly onDidAccept: Event<void> = this._onDidAccept.event;\n\n\tprivate readonly _container: HTMLElement;\n\n\tconstructor(\n\t\tcontainer: HTMLElement,\n\t\thoverDelegate: IHoverDelegate | undefined,\n\t\t@IInstantiationService private readonly instantiationService: IInstantiationService,\n\t) {\n\t\tsuper();\n\t\tthis._container = dom.append(container, $('.quick-input-tree'));\n\t\tthis._checkboxStateHandler = this._register(new QuickInputCheckboxStateHandler<IQuickTreeItem>());\n\t\tthis._renderer = this._register(this.instantiationService.createInstance(\n\t\t\tQuickInputTreeRenderer,\n\t\t\thoverDelegate,\n\t\t\tthis._onDidTriggerButton,\n\t\t\tthis.onDidChangeCheckboxState,\n\t\t\tthis._checkboxStateHandler,\n\t\t));\n\t\tthis._filter = this.instantiationService.createInstance(QuickInputTreeFilter);\n\t\tthis._sorter = this._register(new QuickInputTreeSorter());\n\t\tthis._tree = this._register(this.instantiationService.createInstance(\n\t\t\tWorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>,\n\t\t\t'QuickInputTree',\n\t\t\tthis._container,\n\t\t\tnew QuickInputTreeDelegate(),\n\t\t\t[this._renderer],\n\t\t\t{\n\t\t\t\taccessibilityProvider: new QuickTreeAccessibilityProvider(this.onDidChangeCheckboxState),\n\t\t\t\thorizontalScrolling: false,\n\t\t\t\tmultipleSelectionSupport: false,\n\t\t\t\tfindWidgetEnabled: false,\n\t\t\t\talwaysConsumeMouseWheel: true,\n\t\t\t\thideTwistiesOfChildlessElements: true,\n\t\t\t\trenderIndentGuides: RenderIndentGuides.None,\n\t\t\t\texpandOnDoubleClick: true,\n\t\t\t\texpandOnlyOnTwistieClick: true,\n\t\t\t\tdisableExpandOnSpacebar: true,\n\t\t\t\tsorter: this._sorter,\n\t\t\t\tfilter: this._filter,\n\t\t\t\tidentityProvider: new QuickInputTreeIdentityProvider()\n\t\t\t}\n\t\t));\n\t\tthis.registerCheckboxStateListeners();\n\t}\n\n\tget tree(): WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData> {\n\t\treturn this._tree;\n\t}\n\n\tget displayed() {\n\t\treturn this._container.style.display !== 'none';\n\t}\n\n\tset displayed(value: boolean) {\n\t\tthis._container.style.display = value ? '' : 'none';\n\t}\n\n\tget sortByLabel() {\n\t\treturn this._sorter.sortByLabel;\n\t}\n\n\tset sortByLabel(value: boolean) {\n\t\tthis._sorter.sortByLabel = value;\n\t\tthis._tree.resort(null, true);\n\t}\n\n\tgetActiveDescendant() {\n\t\treturn this._tree.getHTMLElement().getAttribute('aria-activedescendant');\n\t}\n\n\tupdateFilterOptions(options: {\n\t\tmatchOnLabel?: boolean;\n\t\tmatchOnDescription?: boolean;\n\t}): void {\n\t\tif (options.matchOnLabel !== undefined) {\n\t\t\tthis._filter.matchOnLabel = options.matchOnLabel;\n\t\t}\n\t\tif (options.matchOnDescription !== undefined) {\n\t\t\tthis._filter.matchOnDescription = options.matchOnDescription;\n\t\t}\n\t\tthis._tree.refilter();\n\t}\n\n\tlayout(maxHeight?: number): void {\n\t\tthis._tree.getHTMLElement().style.maxHeight = maxHeight ? `${\n\t\t\t// Make sure height aligns with list item heights\n\t\t\tMath.floor(maxHeight / 44) * 44\n\t\t\t// Add some extra height so that it's clear there's more to scroll\n\t\t\t+ 6\n\t\t\t}px` : '';\n\t\tthis._tree.layout();\n\t}\n\n\tregisterCheckboxStateListeners() {\n\t\tthis._register(this._tree.onDidOpen(e => {\n\t\t\tconst item = e.element;\n\t\t\tif (!item) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (item.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check if the item is pickable (defaults to true if not specified)\n\t\t\tif (item.pickable === false) {\n\t\t\t\t// For non-pickable items, set it as the active item and fire the accept event\n\t\t\t\tthis._tree.setFocus([item]);\n\t\t\t\tthis._onDidAccept.fire();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst target = e.browserEvent?.target as HTMLElement | undefined;\n\t\t\tif (target && target.classList.contains(Checkbox.CLASS_NAME)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.updateCheckboxState(item, item.checked === true);\n\t\t}));\n\n\t\tthis._register(this._checkboxStateHandler.onDidChangeCheckboxState(e => {\n\t\t\tthis.updateCheckboxState(e.item, e.checked === true);\n\t\t}));\n\t}\n\n\tprivate updateCheckboxState(item: IQuickTreeItem, newState: boolean): void {\n\t\tif ((item.checked ?? false) === newState) {\n\t\t\treturn; // No change\n\t\t}\n\n\t\t// Handle checked item\n\t\titem.checked = newState;\n\t\tthis._tree.rerender(item);\n\n\t\t// Handle children of the checked item\n\t\tconst updateSet = new Set<IQuickTreeItem>();\n\t\tconst toUpdate = [...this._tree.getNode(item).children];\n\t\twhile (toUpdate.length) {\n\t\t\tconst pop = toUpdate.shift();\n\t\t\tif (pop?.element && !updateSet.has(pop.element)) {\n\t\t\t\tupdateSet.add(pop.element);\n\t\t\t\tif ((pop.element.checked ?? false) !== item.checked) {\n\t\t\t\t\tpop.element.checked = item.checked;\n\t\t\t\t\tthis._tree.rerender(pop.element);\n\t\t\t\t}\n\t\t\t\ttoUpdate.push(...pop.children);\n\t\t\t}\n\t\t}\n\n\t\t// Handle parents of the checked item\n\t\tlet parent = this._tree.getParentElement(item);\n\t\twhile (parent) {\n\t\t\tconst parentChildren = [...this._tree.getNode(parent).children];\n\t\t\tconst newState = getParentNodeState(parentChildren);\n\n\t\t\tif ((parent.checked ?? false) !== newState) {\n\t\t\t\tparent.checked = newState;\n\t\t\t\tthis._tree.rerender(parent);\n\t\t\t}\n\t\t\tparent = this._tree.getParentElement(parent);\n\t\t}\n\n\t\tthis._onDidChangeCheckboxState.fire({\n\t\t\titem,\n\t\t\tchecked: item.checked ?? false\n\t\t});\n\t\tthis._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems());\n\t}\n\n\tgetCheckedLeafItems() {\n\t\tconst lookedAt = new Set<IQuickTreeItem>();\n\t\tconst toLookAt = [...this._tree.getNode().children];\n\t\tconst checkedItems = new Array<IQuickTreeItem>();\n\t\twhile (toLookAt.length) {\n\t\t\tconst lookAt = toLookAt.shift();\n\t\t\tif (!lookAt?.element || lookedAt.has(lookAt.element)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (lookAt.element.checked) {\n\t\t\t\tlookedAt.add(lookAt.element);\n\t\t\t\ttoLookAt.push(...lookAt.children);\n\t\t\t\tif (!lookAt.element.children) {\n\t\t\t\t\tcheckedItems.push(lookAt.element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn checkedItems;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { RenderIndentGuides } from '../../../../base/browser/ui/tree/abstractTree.js';\nimport { IHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { IIdentityProvider } from '../../../../base/browser/ui/list/list.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { IInstantiationService } from '../../../instantiation/common/instantiation.js';\nimport { WorkbenchObjectTree } from '../../../list/browser/listService.js';\nimport { IQuickTreeCheckboxEvent, IQuickTreeItem, IQuickTreeItemButtonEvent } from '../../common/quickInput.js';\nimport { QuickInputTreeDelegate } from './quickInputDelegate.js';\nimport { getParentNodeState, IQuickTreeFilterData } from './quickInputTree.js';\nimport { QuickTreeAccessibilityProvider } from './quickInputTreeAccessibilityProvider.js';\nimport { QuickInputTreeFilter } from './quickInputTreeFilter.js';\nimport { QuickInputCheckboxStateHandler, QuickInputTreeRenderer } from './quickInputTreeRenderer.js';\nimport { QuickInputTreeSorter } from './quickInputTreeSorter.js';\nimport { Checkbox } from '../../../../base/browser/ui/toggle/toggle.js';\n\nconst $ = dom.$;\n\nclass QuickInputTreeIdentityProvider implements IIdentityProvider<IQuickTreeItem> {\n\tprivate readonly _elementIds = new WeakMap<IQuickTreeItem, string>();\n\tprivate _counter = 0;\n\n\tgetId(element: IQuickTreeItem): { toString(): string } {\n\t\tlet id = element.id;\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = this._elementIds.get(element);\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = `__generated_${this._counter++}`;\n\t\tthis._elementIds.set(element, id);\n\t\treturn id;\n\t}\n}\n\nexport class QuickInputTreeController extends Disposable {\n\tprivate readonly _renderer: QuickInputTreeRenderer<IQuickTreeItem>;\n\tprivate readonly _checkboxStateHandler: QuickInputCheckboxStateHandler<IQuickTreeItem>;\n\tprivate readonly _filter: QuickInputTreeFilter;\n\tprivate readonly _sorter: QuickInputTreeSorter;\n\tprivate readonly _tree: WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>;\n\n\tprivate readonly _onDidTriggerButton = this._register(new Emitter<IQuickTreeItemButtonEvent<IQuickTreeItem>>());\n\n\tprivate readonly _onDidChangeCheckboxState = this._register(new Emitter<IQuickTreeCheckboxEvent<IQuickTreeItem>>());\n\treadonly onDidChangeCheckboxState = this._onDidChangeCheckboxState.event;\n\n\tprivate readonly _onDidCheckedLeafItemsChange = this._register(new Emitter<ReadonlyArray<IQuickTreeItem>>());\n\n\tprivate readonly _onLeave = new Emitter<void>();\n\t/**\n\t * Event that is fired when the tree would no longer have focus.\n\t*/\n\treadonly onLeave: Event<void> = this._onLeave.event;\n\n\tprivate readonly _onDidAccept = this._register(new Emitter<void>());\n\t/**\n\t * Event that is fired when a non-pickable item is clicked, indicating acceptance.\n\t */\n\treadonly onDidAccept: Event<void> = this._onDidAccept.event;\n\n\tprivate readonly _container: HTMLElement;\n\n\tconstructor(\n\t\tcontainer: HTMLElement,\n\t\thoverDelegate: IHoverDelegate | undefined,\n\t\t@IInstantiationService private readonly instantiationService: IInstantiationService,\n\t) {\n\t\tsuper();\n\t\tthis._container = dom.append(container, $('.quick-input-tree'));\n\t\tthis._checkboxStateHandler = this._register(new QuickInputCheckboxStateHandler<IQuickTreeItem>());\n\t\tthis._renderer = this._register(this.instantiationService.createInstance(\n\t\t\tQuickInputTreeRenderer,\n\t\t\thoverDelegate,\n\t\t\tthis._onDidTriggerButton,\n\t\t\tthis.onDidChangeCheckboxState,\n\t\t\tthis._checkboxStateHandler,\n\t\t));\n\t\tthis._filter = this.instantiationService.createInstance(QuickInputTreeFilter);\n\t\tthis._sorter = this._register(new QuickInputTreeSorter());\n\t\tthis._tree = this._register(this.instantiationService.createInstance(\n\t\t\tWorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>,\n\t\t\t'QuickInputTree',\n\t\t\tthis._container,\n\t\t\tnew QuickInputTreeDelegate(),\n\t\t\t[this._renderer],\n\t\t\t{\n\t\t\t\taccessibilityProvider: new QuickTreeAccessibilityProvider(this.onDidChangeCheckboxState),\n\t\t\t\thorizontalScrolling: false,\n\t\t\t\tmultipleSelectionSupport: false,\n\t\t\t\tfindWidgetEnabled: false,\n\t\t\t\talwaysConsumeMouseWheel: true,\n\t\t\t\thideTwistiesOfChildlessElements: true,\n\t\t\t\trenderIndentGuides: RenderIndentGuides.None,\n\t\t\t\texpandOnDoubleClick: true,\n\t\t\t\texpandOnlyOnTwistieClick: true,\n\t\t\t\tdisableExpandOnSpacebar: true,\n\t\t\t\tsorter: this._sorter,\n\t\t\t\tfilter: this._filter,\n\t\t\t\tidentityProvider: new QuickInputTreeIdentityProvider()\n\t\t\t}\n\t\t));\n\t\tthis.registerCheckboxStateListeners();\n\t}\n\n\tget tree(): WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData> {\n\t\treturn this._tree;\n\t}\n\n\tget displayed() {\n\t\treturn this._container.style.display !== 'none';\n\t}\n\n\tset displayed(value: boolean) {\n\t\tthis._container.style.display = value ? '' : 'none';\n\t}\n\n\tget sortByLabel() {\n\t\treturn this._sorter.sortByLabel;\n\t}\n\n\tset sortByLabel(value: boolean) {\n\t\tthis._sorter.sortByLabel = value;\n\t\tthis._tree.resort(null, true);\n\t}\n\n\tgetActiveDescendant() {\n\t\treturn this._tree.getHTMLElement().getAttribute('aria-activedescendant');\n\t}\n\n\tupdateFilterOptions(options: {\n\t\tmatchOnLabel?: boolean;\n\t\tmatchOnDescription?: boolean;\n\t}): void {\n\t\tif (options.matchOnLabel !== undefined) {\n\t\t\tthis._filter.matchOnLabel = options.matchOnLabel;\n\t\t}\n\t\tif (options.matchOnDescription !== undefined) {\n\t\t\tthis._filter.matchOnDescription = options.matchOnDescription;\n\t\t}\n\t\tthis._tree.refilter();\n\t}\n\n\tlayout(maxHeight?: number): void {\n\t\tthis._tree.getHTMLElement().style.maxHeight = maxHeight ? `${\n\t\t\t// Make sure height aligns with list item heights\n\t\t\tMath.floor(maxHeight / 44) * 44\n\t\t\t// Add some extra height so that it's clear there's more to scroll\n\t\t\t+ 6\n\t\t\t}px` : '';\n\t\tthis._tree.layout();\n\t}\n\n\tregisterCheckboxStateListeners() {\n\t\tthis._register(this._tree.onDidOpen(e => {\n\t\t\tconst item = e.element;\n\t\t\tif (!item) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (item.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check if the item is pickable (defaults to true if not specified)\n\t\t\tif (item.pickable === false) {\n\t\t\t\t// For non-pickable items, set it as the active item and fire the accept event\n\t\t\t\tthis._tree.setFocus([item]);\n\t\t\t\tthis._onDidAccept.fire();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst target = e.browserEvent?.target as HTMLElement | undefined;\n\t\t\tif (target && target.classList.contains(Checkbox.CLASS_NAME)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.updateCheckboxState(item, item.checked === true);\n\t\t}));\n\n\t\tthis._register(this._checkboxStateHandler.onDidChangeCheckboxState(e => {\n\t\t\tthis.updateCheckboxState(e.item, e.checked === true);\n\t\t}));\n\t}\n\n\tprivate updateCheckboxState(item: IQuickTreeItem, newState: boolean): void {\n\t\tif ((item.checked ?? false) === newState) {\n\t\t\treturn; // No change\n\t\t}\n\n\t\t// Handle checked item\n\t\titem.checked = newState;\n\t\tthis._tree.rerender(item);\n\n\t\t// Handle children of the checked item\n\t\tconst updateSet = new Set<IQuickTreeItem>();\n\t\tconst toUpdate = [...this._tree.getNode(item).children];\n\t\twhile (toUpdate.length) {\n\t\t\tconst pop = toUpdate.shift();\n\t\t\tif (pop?.element && !updateSet.has(pop.element)) {\n\t\t\t\tupdateSet.add(pop.element);\n\t\t\t\tif ((pop.element.checked ?? false) !== item.checked) {\n\t\t\t\t\tpop.element.checked = item.checked;\n\t\t\t\t\tthis._tree.rerender(pop.element);\n\t\t\t\t}\n\t\t\t\ttoUpdate.push(...pop.children);\n\t\t\t}\n\t\t}\n\n\t\t// Handle parents of the checked item\n\t\tlet parent = this._tree.getParentElement(item);\n\t\twhile (parent) {\n\t\t\tconst parentChildren = [...this._tree.getNode(parent).children];\n\t\t\tconst newState = getParentNodeState(parentChildren);\n\n\t\t\tif ((parent.checked ?? false) !== newState) {\n\t\t\t\tparent.checked = newState;\n\t\t\t\tthis._tree.rerender(parent);\n\t\t\t}\n\t\t\tparent = this._tree.getParentElement(parent);\n\t\t}\n\n\t\tthis._onDidChangeCheckboxState.fire({\n\t\t\titem,\n\t\t\tchecked: item.checked ?? false\n\t\t});\n\t\tthis._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems());\n\t}\n\n\tgetCheckedLeafItems() {\n\t\tconst lookedAt = new Set<IQuickTreeItem>();\n\t\tconst toLookAt = [...this._tree.getNode().children];\n\t\tconst checkedItems = new Array<IQuickTreeItem>();\n\t\twhile (toLookAt.length) {\n\t\t\tconst lookAt = toLookAt.shift();\n\t\t\tif (!lookAt?.element || lookedAt.has(lookAt.element)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (lookAt.element.checked) {\n\t\t\t\tlookedAt.add(lookAt.element);\n\t\t\t\ttoLookAt.push(...lookAt.children);\n\t\t\t\tif (!lookAt.element.children) {\n\t\t\t\t\tcheckedItems.push(lookAt.element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn checkedItems;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/quickinput/browser/tree/quickInputTreeController.ts","vs/platform/quickinput/browser/tree/quickInputTreeController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAGtF,OAAO,EAAE,OAAO,EAAS,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC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AI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACnC,CAAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,YAAY,CAAC;IACrB,CAAC;CACD,CAAA;AA9NY,wBAAwB;IA+BlC,WAAA,qBAAqB,CAAA;GA/BX,wBAAwB,CA8NpC","file":"quickInputTreeController.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { RenderIndentGuides } from '../../../../base/browser/ui/tree/abstractTree.js';\nimport { IHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { IIdentityProvider } from '../../../../base/browser/ui/list/list.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { IInstantiationService } from '../../../instantiation/common/instantiation.js';\nimport { WorkbenchObjectTree } from '../../../list/browser/listService.js';\nimport { IQuickTreeCheckboxEvent, IQuickTreeItem, IQuickTreeItemButtonEvent } from '../../common/quickInput.js';\nimport { QuickInputTreeDelegate } from './quickInputDelegate.js';\nimport { getParentNodeState, IQuickTreeFilterData } from './quickInputTree.js';\nimport { QuickTreeAccessibilityProvider } from './quickInputTreeAccessibilityProvider.js';\nimport { QuickInputTreeFilter } from './quickInputTreeFilter.js';\nimport { QuickInputCheckboxStateHandler, QuickInputTreeRenderer } from './quickInputTreeRenderer.js';\nimport { QuickInputTreeSorter } from './quickInputTreeSorter.js';\nimport { Checkbox } from '../../../../base/browser/ui/toggle/toggle.js';\n\nconst $ = dom.$;\n\nclass QuickInputTreeIdentityProvider implements IIdentityProvider<IQuickTreeItem> {\n\tprivate readonly _elementIds = new WeakMap<IQuickTreeItem, string>();\n\tprivate _counter = 0;\n\n\tgetId(element: IQuickTreeItem): { toString(): string } {\n\t\tlet id = element.id;\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = this._elementIds.get(element);\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = `__generated_${this._counter++}`;\n\t\tthis._elementIds.set(element, id);\n\t\treturn id;\n\t}\n}\n\nexport class QuickInputTreeController extends Disposable {\n\tprivate readonly _renderer: QuickInputTreeRenderer<IQuickTreeItem>;\n\tprivate readonly _checkboxStateHandler: QuickInputCheckboxStateHandler<IQuickTreeItem>;\n\tprivate readonly _filter: QuickInputTreeFilter;\n\tprivate readonly _sorter: QuickInputTreeSorter;\n\tprivate readonly _tree: WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>;\n\n\tprivate readonly _onDidTriggerButton = this._register(new Emitter<IQuickTreeItemButtonEvent<IQuickTreeItem>>());\n\n\tprivate readonly _onDidChangeCheckboxState = this._register(new Emitter<IQuickTreeCheckboxEvent<IQuickTreeItem>>());\n\treadonly onDidChangeCheckboxState = this._onDidChangeCheckboxState.event;\n\n\tprivate readonly _onDidCheckedLeafItemsChange = this._register(new Emitter<ReadonlyArray<IQuickTreeItem>>());\n\n\tprivate readonly _onLeave = new Emitter<void>();\n\t/**\n\t * Event that is fired when the tree would no longer have focus.\n\t*/\n\treadonly onLeave: Event<void> = this._onLeave.event;\n\n\tprivate readonly _onDidAccept = this._register(new Emitter<void>());\n\t/**\n\t * Event that is fired when a non-pickable item is clicked, indicating acceptance.\n\t */\n\treadonly onDidAccept: Event<void> = this._onDidAccept.event;\n\n\tprivate readonly _container: HTMLElement;\n\n\tconstructor(\n\t\tcontainer: HTMLElement,\n\t\thoverDelegate: IHoverDelegate | undefined,\n\t\t@IInstantiationService private readonly instantiationService: IInstantiationService,\n\t) {\n\t\tsuper();\n\t\tthis._container = dom.append(container, $('.quick-input-tree'));\n\t\tthis._checkboxStateHandler = this._register(new QuickInputCheckboxStateHandler<IQuickTreeItem>());\n\t\tthis._renderer = this._register(this.instantiationService.createInstance(\n\t\t\tQuickInputTreeRenderer,\n\t\t\thoverDelegate,\n\t\t\tthis._onDidTriggerButton,\n\t\t\tthis.onDidChangeCheckboxState,\n\t\t\tthis._checkboxStateHandler,\n\t\t));\n\t\tthis._filter = this.instantiationService.createInstance(QuickInputTreeFilter);\n\t\tthis._sorter = this._register(new QuickInputTreeSorter());\n\t\tthis._tree = this._register(this.instantiationService.createInstance(\n\t\t\tWorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>,\n\t\t\t'QuickInputTree',\n\t\t\tthis._container,\n\t\t\tnew QuickInputTreeDelegate(),\n\t\t\t[this._renderer],\n\t\t\t{\n\t\t\t\taccessibilityProvider: new QuickTreeAccessibilityProvider(this.onDidChangeCheckboxState),\n\t\t\t\thorizontalScrolling: false,\n\t\t\t\tmultipleSelectionSupport: false,\n\t\t\t\tfindWidgetEnabled: false,\n\t\t\t\talwaysConsumeMouseWheel: true,\n\t\t\t\thideTwistiesOfChildlessElements: true,\n\t\t\t\trenderIndentGuides: RenderIndentGuides.None,\n\t\t\t\texpandOnDoubleClick: true,\n\t\t\t\texpandOnlyOnTwistieClick: true,\n\t\t\t\tdisableExpandOnSpacebar: true,\n\t\t\t\tsorter: this._sorter,\n\t\t\t\tfilter: this._filter,\n\t\t\t\tidentityProvider: new QuickInputTreeIdentityProvider()\n\t\t\t}\n\t\t));\n\t\tthis.registerCheckboxStateListeners();\n\t\tthis.registerOnDidChangeFocus();\n\t}\n\n\tget tree(): WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData> {\n\t\treturn this._tree;\n\t}\n\n\tget displayed() {\n\t\treturn this._container.style.display !== 'none';\n\t}\n\n\tset displayed(value: boolean) {\n\t\tthis._container.style.display = value ? '' : 'none';\n\t}\n\n\tget sortByLabel() {\n\t\treturn this._sorter.sortByLabel;\n\t}\n\n\tset sortByLabel(value: boolean) {\n\t\tthis._sorter.sortByLabel = value;\n\t\tthis._tree.resort(null, true);\n\t}\n\n\tgetActiveDescendant() {\n\t\treturn this._tree.getHTMLElement().getAttribute('aria-activedescendant');\n\t}\n\n\tupdateFilterOptions(options: {\n\t\tmatchOnLabel?: boolean;\n\t\tmatchOnDescription?: boolean;\n\t}): void {\n\t\tif (options.matchOnLabel !== undefined) {\n\t\t\tthis._filter.matchOnLabel = options.matchOnLabel;\n\t\t}\n\t\tif (options.matchOnDescription !== undefined) {\n\t\t\tthis._filter.matchOnDescription = options.matchOnDescription;\n\t\t}\n\t\tthis._tree.refilter();\n\t}\n\n\tlayout(maxHeight?: number): void {\n\t\tthis._tree.getHTMLElement().style.maxHeight = maxHeight ? `${\n\t\t\t// Make sure height aligns with list item heights\n\t\t\tMath.floor(maxHeight / 44) * 44\n\t\t\t// Add some extra height so that it's clear there's more to scroll\n\t\t\t+ 6\n\t\t\t}px` : '';\n\t\tthis._tree.layout();\n\t}\n\n\tregisterCheckboxStateListeners() {\n\t\tthis._register(this._tree.onDidOpen(e => {\n\t\t\tconst item = e.element;\n\t\t\tif (!item) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (item.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check if the item is pickable (defaults to true if not specified)\n\t\t\tif (item.pickable === false) {\n\t\t\t\t// For non-pickable items, set it as the active item and fire the accept event\n\t\t\t\tthis._tree.setFocus([item]);\n\t\t\t\tthis._onDidAccept.fire();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst target = e.browserEvent?.target as HTMLElement | undefined;\n\t\t\tif (target && target.classList.contains(Checkbox.CLASS_NAME)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.updateCheckboxState(item, item.checked === true);\n\t\t}));\n\n\t\tthis._register(this._checkboxStateHandler.onDidChangeCheckboxState(e => {\n\t\t\tthis.updateCheckboxState(e.item, e.checked === true);\n\t\t}));\n\t}\n\n\tprivate updateCheckboxState(item: IQuickTreeItem, newState: boolean): void {\n\t\tif ((item.checked ?? false) === newState) {\n\t\t\treturn; // No change\n\t\t}\n\n\t\t// Handle checked item\n\t\titem.checked = newState;\n\t\tthis._tree.rerender(item);\n\n\t\t// Handle children of the checked item\n\t\tconst updateSet = new Set<IQuickTreeItem>();\n\t\tconst toUpdate = [...this._tree.getNode(item).children];\n\t\twhile (toUpdate.length) {\n\t\t\tconst pop = toUpdate.shift();\n\t\t\tif (pop?.element && !updateSet.has(pop.element)) {\n\t\t\t\tupdateSet.add(pop.element);\n\t\t\t\tif ((pop.element.checked ?? false) !== item.checked) {\n\t\t\t\t\tpop.element.checked = item.checked;\n\t\t\t\t\tthis._tree.rerender(pop.element);\n\t\t\t\t}\n\t\t\t\ttoUpdate.push(...pop.children);\n\t\t\t}\n\t\t}\n\n\t\t// Handle parents of the checked item\n\t\tlet parent = this._tree.getParentElement(item);\n\t\twhile (parent) {\n\t\t\tconst parentChildren = [...this._tree.getNode(parent).children];\n\t\t\tconst newState = getParentNodeState(parentChildren);\n\n\t\t\tif ((parent.checked ?? false) !== newState) {\n\t\t\t\tparent.checked = newState;\n\t\t\t\tthis._tree.rerender(parent);\n\t\t\t}\n\t\t\tparent = this._tree.getParentElement(parent);\n\t\t}\n\n\t\tthis._onDidChangeCheckboxState.fire({\n\t\t\titem,\n\t\t\tchecked: item.checked ?? false\n\t\t});\n\t\tthis._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems());\n\t}\n\n\tregisterOnDidChangeFocus() {\n\t\t// Ensure that selection follows focus\n\t\tthis._register(this._tree.onDidChangeFocus(e => {\n\t\t\tconst item = this._tree.getFocus().findLast(item => item !== null);\n\t\t\tthis._tree.setSelection(item ? [item] : [], e.browserEvent);\n\t\t}));\n\t}\n\n\tgetCheckedLeafItems() {\n\t\tconst lookedAt = new Set<IQuickTreeItem>();\n\t\tconst toLookAt = [...this._tree.getNode().children];\n\t\tconst checkedItems = new Array<IQuickTreeItem>();\n\t\twhile (toLookAt.length) {\n\t\t\tconst lookAt = toLookAt.shift();\n\t\t\tif (!lookAt?.element || lookedAt.has(lookAt.element)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (lookAt.element.checked) {\n\t\t\t\tlookedAt.add(lookAt.element);\n\t\t\t\ttoLookAt.push(...lookAt.children);\n\t\t\t\tif (!lookAt.element.children) {\n\t\t\t\t\tcheckedItems.push(lookAt.element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn checkedItems;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { RenderIndentGuides } from '../../../../base/browser/ui/tree/abstractTree.js';\nimport { IHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { IIdentityProvider } from '../../../../base/browser/ui/list/list.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { IInstantiationService } from '../../../instantiation/common/instantiation.js';\nimport { WorkbenchObjectTree } from '../../../list/browser/listService.js';\nimport { IQuickTreeCheckboxEvent, IQuickTreeItem, IQuickTreeItemButtonEvent } from '../../common/quickInput.js';\nimport { QuickInputTreeDelegate } from './quickInputDelegate.js';\nimport { getParentNodeState, IQuickTreeFilterData } from './quickInputTree.js';\nimport { QuickTreeAccessibilityProvider } from './quickInputTreeAccessibilityProvider.js';\nimport { QuickInputTreeFilter } from './quickInputTreeFilter.js';\nimport { QuickInputCheckboxStateHandler, QuickInputTreeRenderer } from './quickInputTreeRenderer.js';\nimport { QuickInputTreeSorter } from './quickInputTreeSorter.js';\nimport { Checkbox } from '../../../../base/browser/ui/toggle/toggle.js';\n\nconst $ = dom.$;\n\nclass QuickInputTreeIdentityProvider implements IIdentityProvider<IQuickTreeItem> {\n\tprivate readonly _elementIds = new WeakMap<IQuickTreeItem, string>();\n\tprivate _counter = 0;\n\n\tgetId(element: IQuickTreeItem): { toString(): string } {\n\t\tlet id = element.id;\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = this._elementIds.get(element);\n\t\tif (id !== undefined) {\n\t\t\treturn id;\n\t\t}\n\n\t\tid = `__generated_${this._counter++}`;\n\t\tthis._elementIds.set(element, id);\n\t\treturn id;\n\t}\n}\n\nexport class QuickInputTreeController extends Disposable {\n\tprivate readonly _renderer: QuickInputTreeRenderer<IQuickTreeItem>;\n\tprivate readonly _checkboxStateHandler: QuickInputCheckboxStateHandler<IQuickTreeItem>;\n\tprivate readonly _filter: QuickInputTreeFilter;\n\tprivate readonly _sorter: QuickInputTreeSorter;\n\tprivate readonly _tree: WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>;\n\n\tprivate readonly _onDidTriggerButton = this._register(new Emitter<IQuickTreeItemButtonEvent<IQuickTreeItem>>());\n\n\tprivate readonly _onDidChangeCheckboxState = this._register(new Emitter<IQuickTreeCheckboxEvent<IQuickTreeItem>>());\n\treadonly onDidChangeCheckboxState = this._onDidChangeCheckboxState.event;\n\n\tprivate readonly _onDidCheckedLeafItemsChange = this._register(new Emitter<ReadonlyArray<IQuickTreeItem>>());\n\n\tprivate readonly _onLeave = new Emitter<void>();\n\t/**\n\t * Event that is fired when the tree would no longer have focus.\n\t*/\n\treadonly onLeave: Event<void> = this._onLeave.event;\n\n\tprivate readonly _onDidAccept = this._register(new Emitter<void>());\n\t/**\n\t * Event that is fired when a non-pickable item is clicked, indicating acceptance.\n\t */\n\treadonly onDidAccept: Event<void> = this._onDidAccept.event;\n\n\tprivate readonly _container: HTMLElement;\n\n\tconstructor(\n\t\tcontainer: HTMLElement,\n\t\thoverDelegate: IHoverDelegate | undefined,\n\t\t@IInstantiationService private readonly instantiationService: IInstantiationService,\n\t) {\n\t\tsuper();\n\t\tthis._container = dom.append(container, $('.quick-input-tree'));\n\t\tthis._checkboxStateHandler = this._register(new QuickInputCheckboxStateHandler<IQuickTreeItem>());\n\t\tthis._renderer = this._register(this.instantiationService.createInstance(\n\t\t\tQuickInputTreeRenderer,\n\t\t\thoverDelegate,\n\t\t\tthis._onDidTriggerButton,\n\t\t\tthis.onDidChangeCheckboxState,\n\t\t\tthis._checkboxStateHandler,\n\t\t));\n\t\tthis._filter = this.instantiationService.createInstance(QuickInputTreeFilter);\n\t\tthis._sorter = this._register(new QuickInputTreeSorter());\n\t\tthis._tree = this._register(this.instantiationService.createInstance(\n\t\t\tWorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData>,\n\t\t\t'QuickInputTree',\n\t\t\tthis._container,\n\t\t\tnew QuickInputTreeDelegate(),\n\t\t\t[this._renderer],\n\t\t\t{\n\t\t\t\taccessibilityProvider: new QuickTreeAccessibilityProvider(this.onDidChangeCheckboxState),\n\t\t\t\thorizontalScrolling: false,\n\t\t\t\tmultipleSelectionSupport: false,\n\t\t\t\tfindWidgetEnabled: false,\n\t\t\t\talwaysConsumeMouseWheel: true,\n\t\t\t\thideTwistiesOfChildlessElements: true,\n\t\t\t\trenderIndentGuides: RenderIndentGuides.None,\n\t\t\t\texpandOnDoubleClick: true,\n\t\t\t\texpandOnlyOnTwistieClick: true,\n\t\t\t\tdisableExpandOnSpacebar: true,\n\t\t\t\tsorter: this._sorter,\n\t\t\t\tfilter: this._filter,\n\t\t\t\tidentityProvider: new QuickInputTreeIdentityProvider()\n\t\t\t}\n\t\t));\n\t\tthis.registerCheckboxStateListeners();\n\t\tthis.registerOnDidChangeFocus();\n\t}\n\n\tget tree(): WorkbenchObjectTree<IQuickTreeItem, IQuickTreeFilterData> {\n\t\treturn this._tree;\n\t}\n\n\tget displayed() {\n\t\treturn this._container.style.display !== 'none';\n\t}\n\n\tset displayed(value: boolean) {\n\t\tthis._container.style.display = value ? '' : 'none';\n\t}\n\n\tget sortByLabel() {\n\t\treturn this._sorter.sortByLabel;\n\t}\n\n\tset sortByLabel(value: boolean) {\n\t\tthis._sorter.sortByLabel = value;\n\t\tthis._tree.resort(null, true);\n\t}\n\n\tgetActiveDescendant() {\n\t\treturn this._tree.getHTMLElement().getAttribute('aria-activedescendant');\n\t}\n\n\tupdateFilterOptions(options: {\n\t\tmatchOnLabel?: boolean;\n\t\tmatchOnDescription?: boolean;\n\t}): void {\n\t\tif (options.matchOnLabel !== undefined) {\n\t\t\tthis._filter.matchOnLabel = options.matchOnLabel;\n\t\t}\n\t\tif (options.matchOnDescription !== undefined) {\n\t\t\tthis._filter.matchOnDescription = options.matchOnDescription;\n\t\t}\n\t\tthis._tree.refilter();\n\t}\n\n\tlayout(maxHeight?: number): void {\n\t\tthis._tree.getHTMLElement().style.maxHeight = maxHeight ? `${\n\t\t\t// Make sure height aligns with list item heights\n\t\t\tMath.floor(maxHeight / 44) * 44\n\t\t\t// Add some extra height so that it's clear there's more to scroll\n\t\t\t+ 6\n\t\t\t}px` : '';\n\t\tthis._tree.layout();\n\t}\n\n\tregisterCheckboxStateListeners() {\n\t\tthis._register(this._tree.onDidOpen(e => {\n\t\t\tconst item = e.element;\n\t\t\tif (!item) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (item.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check if the item is pickable (defaults to true if not specified)\n\t\t\tif (item.pickable === false) {\n\t\t\t\t// For non-pickable items, set it as the active item and fire the accept event\n\t\t\t\tthis._tree.setFocus([item]);\n\t\t\t\tthis._onDidAccept.fire();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst target = e.browserEvent?.target as HTMLElement | undefined;\n\t\t\tif (target && target.classList.contains(Checkbox.CLASS_NAME)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.updateCheckboxState(item, item.checked === true);\n\t\t}));\n\n\t\tthis._register(this._checkboxStateHandler.onDidChangeCheckboxState(e => {\n\t\t\tthis.updateCheckboxState(e.item, e.checked === true);\n\t\t}));\n\t}\n\n\tprivate updateCheckboxState(item: IQuickTreeItem, newState: boolean): void {\n\t\tif ((item.checked ?? false) === newState) {\n\t\t\treturn; // No change\n\t\t}\n\n\t\t// Handle checked item\n\t\titem.checked = newState;\n\t\tthis._tree.rerender(item);\n\n\t\t// Handle children of the checked item\n\t\tconst updateSet = new Set<IQuickTreeItem>();\n\t\tconst toUpdate = [...this._tree.getNode(item).children];\n\t\twhile (toUpdate.length) {\n\t\t\tconst pop = toUpdate.shift();\n\t\t\tif (pop?.element && !updateSet.has(pop.element)) {\n\t\t\t\tupdateSet.add(pop.element);\n\t\t\t\tif ((pop.element.checked ?? false) !== item.checked) {\n\t\t\t\t\tpop.element.checked = item.checked;\n\t\t\t\t\tthis._tree.rerender(pop.element);\n\t\t\t\t}\n\t\t\t\ttoUpdate.push(...pop.children);\n\t\t\t}\n\t\t}\n\n\t\t// Handle parents of the checked item\n\t\tlet parent = this._tree.getParentElement(item);\n\t\twhile (parent) {\n\t\t\tconst parentChildren = [...this._tree.getNode(parent).children];\n\t\t\tconst newState = getParentNodeState(parentChildren);\n\n\t\t\tif ((parent.checked ?? false) !== newState) {\n\t\t\t\tparent.checked = newState;\n\t\t\t\tthis._tree.rerender(parent);\n\t\t\t}\n\t\t\tparent = this._tree.getParentElement(parent);\n\t\t}\n\n\t\tthis._onDidChangeCheckboxState.fire({\n\t\t\titem,\n\t\t\tchecked: item.checked ?? false\n\t\t});\n\t\tthis._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems());\n\t}\n\n\tregisterOnDidChangeFocus() {\n\t\t// Ensure that selection follows focus\n\t\tthis._register(this._tree.onDidChangeFocus(e => {\n\t\t\tconst item = this._tree.getFocus().findLast(item => item !== null);\n\t\t\tthis._tree.setSelection(item ? [item] : [], e.browserEvent);\n\t\t}));\n\t}\n\n\tgetCheckedLeafItems() {\n\t\tconst lookedAt = new Set<IQuickTreeItem>();\n\t\tconst toLookAt = [...this._tree.getNode().children];\n\t\tconst checkedItems = new Array<IQuickTreeItem>();\n\t\twhile (toLookAt.length) {\n\t\t\tconst lookAt = toLookAt.shift();\n\t\t\tif (!lookAt?.element || lookedAt.has(lookAt.element)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (lookAt.element.checked) {\n\t\t\t\tlookedAt.add(lookAt.element);\n\t\t\t\ttoLookAt.push(...lookAt.children);\n\t\t\t\tif (!lookAt.element.children) {\n\t\t\t\t\tcheckedItems.push(lookAt.element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn checkedItems;\n\t}\n}\n"]}
@@ -51,13 +51,13 @@ class ColorRegistry extends Disposable {
51
51
  }
52
52
  if (needsTransparency) {
53
53
  propertySchema.pattern = '^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$';
54
- propertySchema.patternErrorMessage = nls.localize(2029, 'This color must be transparent or it will obscure content');
54
+ propertySchema.patternErrorMessage = nls.localize(2030, 'This color must be transparent or it will obscure content');
55
55
  }
56
56
  this.colorSchema.properties[id] = {
57
57
  description,
58
58
  oneOf: [
59
59
  propertySchema,
60
- { type: 'string', const: DEFAULT_COLOR_CONFIG_VALUE, description: nls.localize(2030, 'Use the default color.') }
60
+ { type: 'string', const: DEFAULT_COLOR_CONFIG_VALUE, description: nls.localize(2031, 'Use the default color.') }
61
61
  ]
62
62
  };
63
63
  this.colorReferenceSchema.enum.push(id);
@@ -6,25 +6,25 @@ import * as nls from '../../../../nls.js';
6
6
  // Import the effects we need
7
7
  import { Color } from '../../../../base/common/color.js';
8
8
  import { registerColor, transparent } from '../colorUtils.js';
9
- export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#616161', hcDark: '#FFFFFF', hcLight: '#292929' }, nls.localize(1780, "Overall foreground color. This color is only used if not overridden by a component."));
10
- export const disabledForeground = registerColor('disabledForeground', { dark: '#CCCCCC80', light: '#61616180', hcDark: '#A5A5A5', hcLight: '#7F7F7F' }, nls.localize(1781, "Overall foreground for disabled elements. This color is only used if not overridden by a component."));
11
- export const errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hcDark: '#F48771', hcLight: '#B5200D' }, nls.localize(1782, "Overall foreground color for error messages. This color is only used if not overridden by a component."));
12
- export const descriptionForeground = registerColor('descriptionForeground', { light: '#717171', dark: transparent(foreground, 0.7), hcDark: transparent(foreground, 0.7), hcLight: transparent(foreground, 0.7) }, nls.localize(1783, "Foreground color for description text providing additional information, for example for a label."));
13
- export const iconForeground = registerColor('icon.foreground', { dark: '#C5C5C5', light: '#424242', hcDark: '#FFFFFF', hcLight: '#292929' }, nls.localize(1784, "The default color for icons in the workbench."));
14
- export const focusBorder = registerColor('focusBorder', { dark: '#007FD4', light: '#0090F1', hcDark: '#F38518', hcLight: '#006BBD' }, nls.localize(1785, "Overall border color for focused elements. This color is only used if not overridden by a component."));
15
- export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hcDark: '#6FC3DF', hcLight: '#0F4A85' }, nls.localize(1786, "An extra border around elements to separate them from others for greater contrast."));
16
- export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hcDark: focusBorder, hcLight: focusBorder }, nls.localize(1787, "An extra border around active elements to separate them from others for greater contrast."));
17
- export const selectionBackground = registerColor('selection.background', null, nls.localize(1788, "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));
9
+ export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#616161', hcDark: '#FFFFFF', hcLight: '#292929' }, nls.localize(1781, "Overall foreground color. This color is only used if not overridden by a component."));
10
+ export const disabledForeground = registerColor('disabledForeground', { dark: '#CCCCCC80', light: '#61616180', hcDark: '#A5A5A5', hcLight: '#7F7F7F' }, nls.localize(1782, "Overall foreground for disabled elements. This color is only used if not overridden by a component."));
11
+ export const errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hcDark: '#F48771', hcLight: '#B5200D' }, nls.localize(1783, "Overall foreground color for error messages. This color is only used if not overridden by a component."));
12
+ export const descriptionForeground = registerColor('descriptionForeground', { light: '#717171', dark: transparent(foreground, 0.7), hcDark: transparent(foreground, 0.7), hcLight: transparent(foreground, 0.7) }, nls.localize(1784, "Foreground color for description text providing additional information, for example for a label."));
13
+ export const iconForeground = registerColor('icon.foreground', { dark: '#C5C5C5', light: '#424242', hcDark: '#FFFFFF', hcLight: '#292929' }, nls.localize(1785, "The default color for icons in the workbench."));
14
+ export const focusBorder = registerColor('focusBorder', { dark: '#007FD4', light: '#0090F1', hcDark: '#F38518', hcLight: '#006BBD' }, nls.localize(1786, "Overall border color for focused elements. This color is only used if not overridden by a component."));
15
+ export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hcDark: '#6FC3DF', hcLight: '#0F4A85' }, nls.localize(1787, "An extra border around elements to separate them from others for greater contrast."));
16
+ export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hcDark: focusBorder, hcLight: focusBorder }, nls.localize(1788, "An extra border around active elements to separate them from others for greater contrast."));
17
+ export const selectionBackground = registerColor('selection.background', null, nls.localize(1789, "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));
18
18
  // ------ text link
19
- export const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hcDark: '#21A6FF', hcLight: '#0F4A85' }, nls.localize(1789, "Foreground color for links in text."));
20
- export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#006AB1', dark: '#3794FF', hcDark: '#21A6FF', hcLight: '#0F4A85' }, nls.localize(1790, "Foreground color for links in text when clicked on and on mouse hover."));
21
- export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hcDark: Color.black, hcLight: '#292929' }, nls.localize(1791, "Color for text separators."));
19
+ export const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hcDark: '#21A6FF', hcLight: '#0F4A85' }, nls.localize(1790, "Foreground color for links in text."));
20
+ export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#006AB1', dark: '#3794FF', hcDark: '#21A6FF', hcLight: '#0F4A85' }, nls.localize(1791, "Foreground color for links in text when clicked on and on mouse hover."));
21
+ export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hcDark: Color.black, hcLight: '#292929' }, nls.localize(1792, "Color for text separators."));
22
22
  // ------ text preformat
23
- export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#000000', hcLight: '#FFFFFF' }, nls.localize(1792, "Foreground color for preformatted text segments."));
24
- export const textPreformatBackground = registerColor('textPreformat.background', { light: '#0000001A', dark: '#FFFFFF1A', hcDark: '#FFFFFF', hcLight: '#09345f' }, nls.localize(1793, "Background color for preformatted text segments."));
23
+ export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#000000', hcLight: '#FFFFFF' }, nls.localize(1793, "Foreground color for preformatted text segments."));
24
+ export const textPreformatBackground = registerColor('textPreformat.background', { light: '#0000001A', dark: '#FFFFFF1A', hcDark: '#FFFFFF', hcLight: '#09345f' }, nls.localize(1794, "Background color for preformatted text segments."));
25
25
  // ------ text block quote
26
- export const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#f2f2f2', dark: '#222222', hcDark: null, hcLight: '#F2F2F2' }, nls.localize(1794, "Background color for block quotes in text."));
27
- export const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hcDark: Color.white, hcLight: '#292929' }, nls.localize(1795, "Border color for block quotes in text."));
26
+ export const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#f2f2f2', dark: '#222222', hcDark: null, hcLight: '#F2F2F2' }, nls.localize(1795, "Background color for block quotes in text."));
27
+ export const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hcDark: Color.white, hcLight: '#292929' }, nls.localize(1796, "Border color for block quotes in text."));
28
28
  // ------ text code block
29
- export const textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hcDark: Color.black, hcLight: '#F2F2F2' }, nls.localize(1796, "Background color for code blocks in text."));
29
+ export const textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hcDark: Color.black, hcLight: '#F2F2F2' }, nls.localize(1797, "Background color for code blocks in text."));
30
30
  //# sourceMappingURL=baseColors.js.map