Skip to main content

Mountain/Vine/Server/Notification/
OutputCreate.rs

1#![allow(non_snake_case)]
2//! Cocoon → Mountain `output.create` notification.
3//! Emitted by `Cocoon/.../Services/Window/OutputChannel.ts:39` once per
4//! `vscode.window.createOutputChannel(name)` call. Re-emits on the
5//! canonical `sky://output/create` channel the Sky `OutputChannels` map
6//! already listens for.
7
8use serde_json::Value;
9use tauri::Emitter;
10
11use crate::{Vine::Server::MountainVinegRPCService::MountainVinegRPCService, dev_log};
12
13pub async fn OutputCreate(Service:&MountainVinegRPCService, Parameter:&Value) {
14	let _ = Service.ApplicationHandle().emit("sky://output/create", Parameter);
15	dev_log!(
16		"grpc",
17		"[Output] create id={} name={}",
18		Parameter.get("id").and_then(Value::as_str).unwrap_or("?"),
19		Parameter.get("name").and_then(Value::as_str).unwrap_or("?")
20	);
21}