Skip to content

Expose null progress reporter detection - #1827

Open
volksec wants to merge 1 commit into
microsoft:mainfrom
volksec:agent/expose-null-progress-reporter-check
Open

Expose null progress reporter detection#1827
volksec wants to merge 1 commit into
microsoft:mainfrom
volksec:agent/expose-null-progress-reporter-check

Conversation

@volksec

@volksec volksec commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • export isNullProgressReporter from vscode-languageserver
  • let consumers distinguish a no-op work-done reporter without inspecting its constructor
  • replace the server test's constructor.name check with the public helper
  • cover both real and null work-done reporters

Motivation

Consumers currently need to rely on implementation details to determine whether a request supplied a real work-done reporter. For example, Pyright compared the reporter constructor with a reporter created by attachWorkDone. A public type guard makes this check explicit and keeps NullProgressReporter itself private.

This avoids adding a required property to WorkDoneProgressReporter, which would break external implementations of that interface.

Fixes #847.

Validation

  • npm --prefix server run all
    • TypeScript compilation passed
    • ESLint passed
    • 13 tests passed
  • git diff --check

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@volksec

volksec commented Jul 28, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@volksec
volksec marked this pull request as ready for review July 30, 2026 18:21
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

Allow to determine if NullProgressMonitor is used.

1 participant