Skip to content

Commit 4ee9925

Browse files
Redesign the Command Explorer around modules and lazy loading
The Command Explorer fetched the full command table up front (names, modules, and parameter metadata for everything), which took minutes to populate and showed a flat, hard-to-scan list. Rework it into a lazy, module-grouped tree: - Top-level nodes are modules (with version), expanded on demand; their commands are fetched per module with `excludeParameters` so only names and modules cross the wire. - Module-less commands are collected under a neutral "Functions & Scripts" node with a folder icon, and the request sets `excludeDefaultFunctions` so PowerShell's default-session plumbing doesn't clutter it. - Hovering a module shows its metadata via the new `powerShell/getModule` request, cached so repeated hovers don't re-fetch. - The inline Show Help / Insert command actions are gated to `viewItem == command` so they no longer appear on module nodes. Default the Command Explorer to visible. Because its default now equals the value the ISE profile sets, the ISE compatibility tests could no longer observe a revert by inequality; guard those assertions with `revertIsObservable`, which skips settings whose default already matches the ISE value. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d1faccf commit 4ee9925

3 files changed

Lines changed: 296 additions & 57 deletions

File tree

‎package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
"command": "PowerShell.InsertCommand",
211211
"title": "Insert Command",
212212
"category": "PowerShell",
213-
"icon": "$(pencil)"
213+
"icon": "$(arrow-right)"
214214
},
215215
{
216216
"command": "PowerShell.ShowHelp",
@@ -398,12 +398,12 @@
398398
"view/item/context": [
399399
{
400400
"command": "PowerShell.ShowHelp",
401-
"when": "view == PowerShellCommands",
401+
"when": "view == PowerShellCommands && viewItem == command",
402402
"group": "inline@1"
403403
},
404404
{
405405
"command": "PowerShell.InsertCommand",
406-
"when": "view == PowerShellCommands",
406+
"when": "view == PowerShellCommands && viewItem == command",
407407
"group": "inline@2"
408408
}
409409
]
@@ -755,7 +755,7 @@
755755
},
756756
"powershell.sideBar.CommandExplorerVisibility": {
757757
"type": "boolean",
758-
"default": false,
758+
"default": true,
759759
"markdownDescription": "Specifies the visibility of the Command Explorer in the side bar."
760760
},
761761
"powershell.sideBar.CommandExplorerExcludeFilter": {

0 commit comments

Comments
 (0)