lspeasy / core/src / createProgressBegin
Function: createProgressBegin()
ts
function createProgressBegin(
title,
cancellable?,
message?,
percentage?): WorkDoneProgressBegin;Defined in: packages/core/src/protocol/progress.ts:52
Creates a WorkDoneProgressBegin payload to start a work-done progress notification.
Parameters
| Parameter | Type | Description |
|---|---|---|
title | string | Short, human-readable title for the progress operation (required). |
cancellable? | boolean | Whether the client should offer a cancel button. |
message? | string | Optional initial status message shown below the title. |
percentage? | number | Optional initial progress percentage (0–100). |
Returns
WorkDoneProgressBegin
A WorkDoneProgressBegin object ready to send as $/progress.
Remarks
Send this as the value of a $/progress notification after creating a progress token with window/workDoneProgress/create. The title is always displayed; message overrides the title for the first intermediate status text. Set cancellable: true only when the server can honour a $/cancelRequest for the underlying operation — clients use this to show a cancel button.