Skip to main content

Mountain/Vine/Server/Notification/
ProgressEnd.rs

1//! Cocoon → Mountain `progress.end` notification.
2//! Fires once per `vscode.window.withProgress(...)` call when the task
3//! settles. Forwarded onto `sky://notification/progress-end` so Sky's
4//! progress indicator tears down.
5
6use serde_json::{Value, json};
7use tauri::Emitter;
8
9use crate::{Vine::Server::MountainVinegRPCService::MountainVinegRPCService, dev_log};
10
11pub async fn ProgressEnd(Service:&MountainVinegRPCService, Parameter:&Value) {
12	let Handle = Parameter.get("handle").and_then(Value::as_str).unwrap_or("");
13
14	if let Err(Error) = Service
15		.ApplicationHandle()
16		.emit("sky://notification/progress-end", json!({ "id": Handle }))
17	{
18		dev_log!(
19			"grpc",
20			"warn: [MountainVinegRPCService] sky://notification/progress-end emit failed: {}",
21			Error
22		);
23	}
24}