You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/powertoys/command-palette/add-top-level-commands-to-your-extension.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ There you have it. Now you can add additional top-level commands to your extensi
51
51
52
52
If you'd like to update the list of top-level commands dynamically, you can do so in the same way as you would update a list page. This can be useful for cases like an extension that might first require the user to log in, before showing certain commands. In that case, you can show the "log in" command at the top level initially. Then, once the user logs in successfully, you can update the list of top-level commands to include the commands that required authentication.
53
53
54
-
Once you've determined that you need to change the top level list, call [`RaiseItemsChanged()`](../microsoft-commandpalette-extensions-toolkit/commandprovider-raiseitemschanged.md) on your `CommandProvider`. Command Palette will then ask for the top-level commands via `TopLevelCommands()` again, and you can return the updated list.
54
+
Once you've determined that you need to change the top level list, call [`RaiseItemsChanged()`](./microsoft-commandpalette-extensions-toolkit/commandprovider_raiseitemschanged.md) on your `CommandProvider`. Command Palette will then ask for the top-level commands via `TopLevelCommands()` again, and you can return the updated list.
55
55
56
56
> [!TIP]
57
57
> Create the `CommandItem`s for the top-level commands before calling `RaiseItemsChanged()`. This will ensure that the new commands are available when Command Palette asks for the top-level commands. This will help keep the work being done in call to `TopLevelCommands()` method to a minimum.
Copy file name to clipboardExpand all lines: hub/powertoys/command-palette/command-results.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ If you don't know what else to use, this should be your default. Ideally, users
47
47
48
48
This result displays a transient desktop-level message to the user. This is especially useful for displaying confirmation that an action took place when the palette will be closed.
49
49
50
-
Consider the [CopyTextCommand](../microsoft-commandpalette-extensions-toolkit/copytextcommand.md) in the helpers - this command will show a toast with the text "Copied to clipboard", then dismiss the palette.
50
+
Consider the [CopyTextCommand](./microsoft-commandpalette-extensions-toolkit/copytextcommand.md) in the helpers - this command will show a toast with the text "Copied to clipboard", then dismiss the palette.
51
51
52
52
By default, [`CommandResult.ShowToast(string)`](./microsoft-commandpalette-extensions-toolkit/commandresult_showtoast_string.md) helper will have a `Result` of `CommandResult.Dismiss`. However, you can instead change the result to any of the other results if you want. This allows you to display a toast and keep the palette open, if you'd like.
Copy file name to clipboardExpand all lines: hub/powertoys/command-palette/creating-an-extension.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,16 +51,17 @@ ExtensionName/
51
51
From here, you can immediately build the project and run it. Once your package is deployed and running, Command Palette will automatically discover your extension and load it into the palette.
52
52
53
53
> [!TIP]
54
-
> Make sure you deploy your app! Just **build**ing your application won't update the package in the same way that deploying it will.
54
+
> Make sure you _deploy_ your app! Just **build**ing your application won't update the package in the same way that deploying it will.
55
55
56
56
> [!WARNING]
57
57
> Running "ExtensionName (Unpackaged)" from Visual Studio will not **deploy** your app package.
58
58
>
59
-
> If you're using `git` for source control, and you used the standard `.gitignore` file for C#, you'll want to remove the
59
+
> If you're using `git` for source control, and you used the standard `.gitignore` file for C#, you'll want to remove the following two lines from your `.gitignore` file:
60
60
> ```
61
61
> **/Properties/launchSettings.json
62
+
> *.pubxml
62
63
> ```
63
-
> line from your `.gitignore` file. This file is used by WinAppSdk to deploy your app as a package. Without it, anyone who clones your repo won't be able to deploy your extension.
64
+
> These files are used by WinAppSdk to deploy your app as a package. Without it, anyone who clones your repo won't be able to deploy your extension.
64
65
65
66
You should be able to see your extension in the Command Palette at the end of the list of commands. Entering that command should take you to the page for your command, and you should see a single command that says "TODO: Implement your extension here".
Copy file name to clipboardExpand all lines: hub/powertoys/command-palette/publish-extension.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,15 +23,28 @@ The following tools are required to build and publish your extension:
23
23
24
24
Publishing packages to WinGet is the recommended way to share your extensions with users. Extension packages which are listed on WinGet can be discovered and installed directly from the Command Palette.
25
25
26
-
For the most part, following the steps on [Submit packages to Windows Package Manager](https://learn.microsoft.com/en-us/windows/package-manager/package/) will get your extension onto WinGet itself.
26
+
For the most part, following the steps on [Submit packages to Windows Package Manager](../../package-manager/package/manifest.md) will get your extension onto WinGet itself.
27
27
28
28
Before submitting your manifest to WinGet, you'll need to check two things:
29
29
30
30
### Add `windows-commandpalette-extension` tag
31
31
32
+
Command Palette uses the special `windows-commandpalette-extension` tag to discover extensions. Make sure that your manifest includes this tag, so that Command Palette can discover your extension. Add the following to each `.locale.*.yaml` file in your manifest:
33
+
34
+
```yaml
35
+
Tags:
36
+
- windows-commandpalette-extension
37
+
```
38
+
32
39
### Ensure WindowsAppSdk is listed as a dependency
33
40
34
-
If you're using Windows App SDK, then you'll need to make sure that it is listed as a dependency of your package
41
+
If you're using Windows App SDK, then you'll need to make sure that it is listed as a dependency of your package. Add the following to your `.installer.yaml` manifest:
0 commit comments