Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

Adds support for comma-separated patterns and negative filters (using ! prefix) in the Output panel filter.

Changes

Filter parsing (parseFilters)

  • Splits input by comma to extract multiple patterns
  • Identifies negative filters by ! prefix
  • Trims whitespace and filters empty patterns

Filter application (shouldShowLine)

  • Negative filters checked first (early exit if match)
  • Positive filters use OR logic (any match shows line)
  • No positive filters defaults to showing everything

UI update

  • Placeholder now shows: "Filter (e.g. text, !exclude, error,warning)"

Examples

// Multiple patterns - shows lines matching ANY pattern
"error,warning,critical"

// Negative filters - hides matching lines
"!debug,!trace,!copilot"

// Combined - shows errors/warnings but excludes copilot logs
"error,warning,!copilot"

Single filters work unchanged: "error" behaves identically to before.

Testing

Added unit tests covering:

  • Single/multiple positive and negative filters
  • Mixed positive and negative patterns
  • Whitespace handling and edge cases
Original prompt

This section details on the original issue you should resolve

<issue_title>Output filter- support negative and multiple filters</issue_title>
<issue_description>I love the new output filter, and it would be really useful to have negative filter patterns with ! or multiple comma-separated patterns. Useful enough that I might do a PR if you don't have time and can point me to the code.

For example, I always have Copilot Chat in trace mode, but there are some very noisy logs that I'd like to filter out.</issue_description>

Comments on the Issue (you are @copilot in this section)

@sandy081 Thanks for the feedback. It is definitely in the list to support but would do in next milestone. @sandy081 FYI here is where the filtering is implemented - https://github.com/microsoft/vscode/blob/f0c1f4ddd62f6531f407f91aef0adf9e0aed5aec/src/vs/workbench/contrib/output/browser/outputView.ts#L468

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 15, 2025 14:55
Co-authored-by: sandy081 <10746682+sandy081@users.noreply.github.com>
Co-authored-by: sandy081 <10746682+sandy081@users.noreply.github.com>
Co-authored-by: sandy081 <10746682+sandy081@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for negative and multiple output filters Output filter: support negative and multiple filters Dec 15, 2025
Copilot AI requested a review from sandy081 December 15, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Output filter- support negative and multiple filters

2 participants