MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / progress_report

Method progress_report

src/util.rs:1797–1818  ·  view source on GitHub ↗

Send a `WorkDoneProgressReport` notification with a percentage and optional message. `percentage` should be in the range 0..=100. `message` replaces the previous detail line when `Some`.

(
        &self,
        token: &NumberOrString,
        percentage: u32,
        message: Option<String>,
    )

Source from the content-addressed store, hash-verified

1795 /// `percentage` should be in the range 0..=100. `message` replaces
1796 /// the previous detail line when `Some`.
1797 pub(crate) async fn progress_report(
1798 &self,
1799 token: &NumberOrString,
1800 percentage: u32,
1801 message: Option<String>,
1802 ) {
1803 use tower_lsp::lsp_types::notification::Progress;
1804
1805 let Some(client) = &self.client else { return };
1806 client
1807 .send_notification::<Progress>(ProgressParams {
1808 token: token.clone(),
1809 value: ProgressParamsValue::WorkDone(WorkDoneProgress::Report(
1810 WorkDoneProgressReport {
1811 cancellable: Some(false),
1812 message,
1813 percentage: Some(percentage),
1814 },
1815 )),
1816 })
1817 .await;
1818 }
1819
1820 /// Send a `WorkDoneProgressEnd` notification.
1821 ///

Callers 3

init_single_projectMethod · 0.80
init_monorepoMethod · 0.80
init_no_composerMethod · 0.80

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected