Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add window/progress #245

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Window
* :arrow_left: [window/showMessage](#window_showMessage)
* :arrow_right_hook: [window/showMessageRequest](#window_showMessageRequest)
* :arrow_left: [window/logMessage](#window_logMessage)
* **New** :arrow_left: [window/progress](#window_progress)
* :arrow_left: [telemetry/event](#telemetry_event)

>**New** Client
Expand Down Expand Up @@ -611,7 +612,7 @@ The initialize request is sent as the first request from the client to the serve

Until the server has responded to the `initialize` request with an `InitializeResult` the client must not sent any additional requests or notifications to the server.

>**Updated**: During the `initialize` request the server is allowed to sent the notifications `window/showMessage`, `window/logMessage` and `telemetry/event` as well as the `window/showMessageRequest` request to the client.
>**Updated**: During the `initialize` request the server is allowed to sent the notifications `window/showMessage`, `window/logMessage`, `window/progress` and `telemetry/event` as well as the `window/showMessageRequest` request to the client.

_Request_:
* method: 'initialize'
Expand Down Expand Up @@ -1323,6 +1324,47 @@ interface LogMessageParams {

Where type is defined as above.

#### <a name="window_progress"></a>Progress Notification

The progress notification is sent from the server to the client to ask the client to indicate progress.

_Notification_:
* method: 'window/progress'
* params: `ProgressParams` defined as follows:

```typescript
interface ProgressParams {
/**
* A unique identifier to associate multiple progress notifications with the same progress.
*/
id: string;

/**
* The title of the progress.
* This should be the same for all ProgressParams with the same id.
*/
title: string;

/**
* Optional progress message to display.
* If unset, the previous progress message (if any) is still valid.
*/
message?: string;

/**
* Optional progress percentage to display.
* If unset, the previous progress percentage (if any) is still valid.
*/
percentage?: number;

/**
* Set to true on the final progress update.
* No more progress notifications with the same ID should be sent.
*/
done?: boolean;
}
```

#### <a name="telemetry_event"></a>Telemetry Notification

The telemetry notification is sent from the server to the client to ask the client to log a telemetry event.
Expand Down