mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
CmdPal: collection of Run Commands nits (#42092)
* Path items were being treated inconsistently * We shouldn't re-enumerate a directory on every keystroke * A bunch of elements had empty TextToSuggest (which makes it crazier that it ever worked right) Vaguely regressed in #41956 related to #39091
This commit is contained in:
@@ -19,19 +19,21 @@ public partial class ShellCommandsProvider : CommandProvider
|
||||
private readonly ShellListPage _shellListPage;
|
||||
private readonly FallbackCommandItem _fallbackItem;
|
||||
private readonly IRunHistoryService _historyService;
|
||||
private readonly ITelemetryService _telemetryService;
|
||||
|
||||
public ShellCommandsProvider(IRunHistoryService runHistoryService)
|
||||
public ShellCommandsProvider(IRunHistoryService runHistoryService, ITelemetryService telemetryService)
|
||||
{
|
||||
_historyService = runHistoryService;
|
||||
_telemetryService = telemetryService;
|
||||
|
||||
Id = "com.microsoft.cmdpal.builtin.run";
|
||||
DisplayName = Resources.cmd_plugin_name;
|
||||
Icon = Icons.RunV2Icon;
|
||||
Settings = _settingsManager.Settings;
|
||||
|
||||
_shellListPage = new ShellListPage(_settingsManager, _historyService);
|
||||
_shellListPage = new ShellListPage(_settingsManager, _historyService, _telemetryService);
|
||||
|
||||
_fallbackItem = new FallbackExecuteItem(_settingsManager, _shellListPage.AddToHistory);
|
||||
_fallbackItem = new FallbackExecuteItem(_settingsManager, _shellListPage.AddToHistory, _telemetryService);
|
||||
|
||||
_shellPageItem = new CommandItem(_shellListPage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user