Skip to main content

Mountain/RPC/CocoonService/Output/
AppendOutput.rs

1//! Append text to an output channel via `sky://output/append`.
2
3use serde_json::json;
4use tauri::Emitter;
5use tonic::{Response, Status};
6use ::Vine::Generated::{AppendOutputRequest, Empty};
7
8use crate::RPC::CocoonService::CocoonServiceImpl;
9
10pub async fn Fn(Service:&CocoonServiceImpl, Request:AppendOutputRequest) -> Result<Response<Empty>, Status> {
11	let _ = Service.environment.ApplicationHandle.emit(
12		"sky://output/append",
13		json!({ "channel": Request.channel_id, "text": Request.value }),
14	);
15
16	Ok(Response::new(Empty {}))
17}