Uh oh!
There was an error while loading. Please reload this page.
Treat filter the same as function in LSP outline hierarchy - #2283
Treat filter the same as function in LSP outline hierarchy#2283Justin Grote (JustinGrote) with Copilot wants to merge 5 commits into
filter the same as function in LSP outline hierarchy#2283Conversation
- Add explicit comment in VisitFunctionDefinition clarifying filter gets SymbolType.Function so it participates in the outline hierarchy the same way regular functions do (children expand correctly) - Update MultipleSymbols.ps1 test data so AFilter has a local variable declaration ($FilterVar = $_), exercising filter-with-children path - Update FindsSymbolsInFile test counts and add assertion verifying $FilterVar inside a filter is tracked as a declaration (prerequisite for it appearing as a child of the filter in the outline) Agent-Logs-Url: https://github.com/PowerShell/PowerShellEditorServices/sessions/89bcabc2-3cb5-470a-8d43-bcc6adaf0c30 Co-authored-by: JustinGrote <15258962+JustinGrote@users.noreply.github.com>
filter the same as function in LSP outline hierarchyThere was a problem hiding this comment.
Pull request overview
This PR aims to clarify and test how PowerShell filter definitions participate in symbol discovery for the LSP outline hierarchy.
Changes:
- Added a clarifying comment around filter/function symbol classification.
- Updated the shared symbol fixture so
AFiltercontains a local variable declaration. - Updated symbol-count assertions and added coverage for
$FilterVaras a declaration.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/PowerShellEditorServices/Services/Symbols/Visitors/SymbolVisitor.cs | Adds a comment explaining filter handling in function symbol visitation. |
test/PowerShellEditorServices.Test.Shared/Symbols/MultipleSymbols.ps1 | Adds a variable declaration inside the sample filter. |
test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs | Updates symbol counts and asserts the filter-local variable declaration is discovered. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Justin Grote (JustinGrote)
commented
May 14, 2026
Copilot fix |
… async Agent-Logs-Url: https://github.com/PowerShell/PowerShellEditorServices/sessions/1f70b303-b695-4522-916d-016544f441de Co-authored-by: JustinGrote <15258962+JustinGrote@users.noreply.github.com>
Head branch was pushed to by a user without write access
Fixed in a4e0fff. The root cause was calling the non-existent
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Andy Jordan (andyleejordan)
left a comment
There was a problem hiding this comment.
I think Copilot must have accidentally undid its own work. Tests were updated, and a comment in source added, but no actual code changes that might fix this issue.
GetDocumentSymbolsdoes not exist in the test context (CS0103)using Microsoft.PowerShell.EditorServices.Handlers;to the test fileGetDocumentSymbolsprivate async helper that instantiatesPsesDocumentSymbolHandlerand callsHandle, returning top-levelDocumentSymbolobjectsFindsSymbolsInFilefromvoidtoasync Taskto support the awaited helper call"AFilter"to"filter AFilter ()"to match the actualSymbolReference.Nameformat (produced byGetFunctionDisplayName)