From 6410761015798bb40a0c91bb5894a65a25a210a5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:30:31 +0000 Subject: [PATCH 1/2] Initial plan From 1246f3abd211e1618a333f6f5fc32275ebcec0c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:39:41 +0000 Subject: [PATCH 2/2] Fix PsesDocumentHighlightHandler log to show count at debug and details at trace level Agent-Logs-Url: https://github.com/PowerShell/PowerShellEditorServices/sessions/75bc95f1-fc65-4fc4-9ace-752c9d6a517b Co-authored-by: JustinGrote <15258962+JustinGrote@users.noreply.github.com> --- .../Handlers/DocumentHighlightHandler.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentHighlightHandler.cs b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentHighlightHandler.cs index 0e470d46f..790da79b4 100644 --- a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentHighlightHandler.cs +++ b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DocumentHighlightHandler.cs @@ -55,7 +55,19 @@ public override Task Handle( }); } - _logger.LogDebug("Highlights: " + highlights); + _logger.LogDebug("Highlights: {Count} highlight(s) found.", highlights.Count); + if (_logger.IsEnabled(LogLevel.Trace)) + { + foreach (DocumentHighlight highlight in highlights) + { + _logger.LogTrace(" Highlight: Kind={Kind}, Range=[({StartLine},{StartChar})-({EndLine},{EndChar})]", + highlight.Kind, + highlight.Range.Start.Line, + highlight.Range.Start.Character, + highlight.Range.End.Line, + highlight.Range.End.Character); + } + } return cancellationToken.IsCancellationRequested || highlights.Count == 0 ? Task.FromResult(s_emptyHighlightContainer)