lspeasy / core/src / createProgressReport
Function: createProgressReport()
ts
function createProgressReport(
message?,
percentage?,
cancellable?): WorkDoneProgressReport;Defined in: packages/core/src/protocol/progress.ts:85
Creates a WorkDoneProgressReport payload to update an in-progress work-done notification.
Parameters
| Parameter | Type | Description |
|---|---|---|
message? | string | Updated status text; omit to keep the previous message. |
percentage? | number | Updated progress percentage (0–100); omit for indeterminate. |
cancellable? | boolean | Whether the cancel button should be shown/hidden. |
Returns
WorkDoneProgressReport
A WorkDoneProgressReport object ready to send as $/progress.
Remarks
All parameters are optional. Omit message to keep the last displayed message; omit percentage when the operation does not have a measurable completion ratio. If cancellable changes between reports, the client will update the cancel button accordingly.