thread/archive

This commit is contained in:
Owen Lin
2025-11-02 10:03:21 -08:00
parent 6c9e541574
commit 27251b597d
3 changed files with 276 additions and 6 deletions

View File

@@ -31,6 +31,7 @@ use codex_app_server_protocol::SendUserMessageParams;
use codex_app_server_protocol::SendUserTurnParams;
use codex_app_server_protocol::ServerRequest;
use codex_app_server_protocol::SetDefaultModelParams;
use codex_app_server_protocol::ThreadArchiveParams;
use codex_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::JSONRPCError;
@@ -317,6 +318,15 @@ impl McpProcess {
self.send_request("loginChatGpt", None).await
}
/// Send a `thread/archive` JSON-RPC request (v2).
pub async fn send_thread_archive_request(
&mut self,
params: ThreadArchiveParams,
) -> anyhow::Result<i64> {
let params = Some(serde_json::to_value(params)?);
self.send_request("thread/archive", params).await
}
/// Send a `cancelLoginChatGpt` JSON-RPC request.
pub async fn send_cancel_login_chat_gpt_request(
&mut self,