Mountain/Vine/Server/Notification/ProgressComplete.rs
1#![allow(non_snake_case)]
2//! Cocoon → Mountain `progress.complete` notification.
3//! Fires once `vscode.window.withProgress(...)` settles - either the task
4//! finishes or Cocoon cancels it. Emits onto Sky's canonical
5//! `sky://progress/complete` channel so the renderer's progress indicator
6//! tears down. (Earlier code emitted `sky://progress/end` which Sky never
7//! listened on - the indicator stayed pinned forever.)
8
9use serde_json::Value;
10use tauri::Emitter;
11
12use crate::{Vine::Server::MountainVinegRPCService::MountainVinegRPCService, dev_log};
13
14pub async fn ProgressComplete(Service:&MountainVinegRPCService, Parameter:&Value) {
15 let _ = Service.ApplicationHandle().emit("sky://progress/complete", Parameter);
16 dev_log!(
17 "grpc",
18 "[Progress] complete id={}",
19 Parameter.get("id").and_then(Value::as_str).unwrap_or("?")
20 );
21}