Mountain/Vine/Server/Notification/WindowShowTextDocument.rs
1//! Cocoon → Mountain `window.showTextDocument` notification.
2//! Fires when an extension calls
3//! `vscode.window.showTextDocument(uri, options)`. Extension activation
4//! commonly uses this for "jump to definition" and "reveal config".
5//! Forwarded on `sky://window/showTextDocument`.
6
7use serde_json::Value;
8use tauri::Emitter;
9
10use crate::{Vine::Server::MountainVinegRPCService::MountainVinegRPCService, dev_log};
11
12pub async fn WindowShowTextDocument(Service:&MountainVinegRPCService, Parameter:&Value) {
13 if let Err(Error) = Service.ApplicationHandle().emit("sky://window/showTextDocument", Parameter) {
14 dev_log!(
15 "grpc",
16 "warn: [MountainVinegRPCService] sky://window/showTextDocument emit failed: {}",
17 Error
18 );
19 }
20}