-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agent: add support for client-side progress bars (#2658)
Fixes sourcegraph/jetbrains#257 Previously, the agent didn't support rendering progress bars on the client. This was problematic because symf symbol uses progress bars to inform the user when symf is indexing, and allows users to cancel indexing. This PR closes this feature gap by adding four new JSON-RPC notification endpoints to the agent protocol to deal with progress bars: * `progress/start`: server to client. * `progress/report`: server to client. * `progress/end`: server to client. * `progress/end`: client to server. Only valid for cancelable progress bars. Agent clients must add `progressBars: 'enabled'` to the client capabilities during the `initalize` handshake to receive progress-related notifications. Additionally, to help clients with testing progress bars, there are two new testing-related JSON-RPC endpoints * `testing/progress`. Client request to server. * `testing/progressCancelation`. Client request to server. This PR adds two test cases that demonstrate how progress bars work, including how to cancel a progress bar. ## Test plan See two new test cases for progress bars. <!-- Required. See https://sourcegraph.com/docs/dev/background-information/testing_principles. -->
- Loading branch information
Showing
4 changed files
with
281 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.