Mountain/Vine/Server/Notification/OutputClear.rs
1#![allow(non_snake_case)]
2//! Cocoon → Mountain `output.clear` notification.
3//! Forwarding atom for `OutputChannel.clear()` - the Sky listener resets
4//! the in-memory buffer for the matching channel.
5
6use serde_json::Value;
7use tauri::Emitter;
8
9use crate::{Vine::Server::MountainVinegRPCService::MountainVinegRPCService, dev_log};
10
11pub async fn OutputClear(Service:&MountainVinegRPCService, Parameter:&Value) {
12 let _ = Service.ApplicationHandle().emit("sky://output/clear", Parameter);
13 dev_log!(
14 "grpc",
15 "[Output] clear channel={}",
16 Parameter.get("channel").and_then(Value::as_str).unwrap_or("?")
17 );
18}