Mountain/RPC/CocoonService/Debug/
StopDebugging.rs1#![allow(non_snake_case)]
2
3use serde_json::json;
8use tauri::Emitter;
9use tonic::{Response, Status};
10
11use crate::{
12 RPC::CocoonService::CocoonServiceImpl,
13 Vine::Generated::{Empty, StopDebuggingRequest},
14 dev_log,
15};
16
17pub async fn Fn(Service:&CocoonServiceImpl, Request:StopDebuggingRequest) -> Result<Response<Empty>, Status> {
18 dev_log!("cocoon", "[CocoonService] stop_debugging: session={}", Request.session_id);
19
20 let _ = Service
21 .environment
22 .ApplicationHandle
23 .emit("sky://debug/sessionEnd", json!({ "sessionId": Request.session_id }));
24
25 Ok(Response::new(Empty {}))
26}