From d4a5e02e8433db156b9dabe2b81ddd1d2aca9ea6 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 25 May 2026 15:36:50 +0300 Subject: feat: hand off ptys during updates --- src/app/api.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/app/api.rs') diff --git a/src/app/api.rs b/src/app/api.rs index 6f88f6c3..c51a1bb0 100644 --- a/src/app/api.rs +++ b/src/app/api.rs @@ -330,7 +330,9 @@ impl App { &mut self, request: crate::api::schema::Request, ) -> String { - use crate::api::schema::{Method, ResponseResult, SuccessResponse}; + use crate::api::schema::{ + ErrorBody, ErrorResponse, Method, ResponseResult, SuccessResponse, + }; let response = match request.method { Method::ServerStop(_) => { @@ -340,6 +342,16 @@ impl App { result: ResponseResult::Ok {}, } } + Method::ServerLiveHandoff(_) => { + let response = ErrorResponse { + id: request.id, + error: ErrorBody { + code: "unsupported_in_app_mode".into(), + message: "live handoff is only supported by the headless server".into(), + }, + }; + return serde_json::to_string(&response).unwrap_or_else(|_| "{}".to_string()); + } Method::ServerReloadConfig(_) => { let report = self.reload_config(); SuccessResponse { -- cgit v1.2.3