Skip to content

Commit 34523b3

Browse files
feat(acp): route session/setTitle to the new schema types
Wires the SetSessionTitleRequest / SetSessionTitleResponse types into the agent-side JSON-RPC dispatch tables. Companion to agentclientprotocol/agent-client-protocol#1199, which adds the schema definitions for session/setTitle. This PR is the Rust SDK half of the round trip: once the schema crate ships a release with the new types, ACP-backed agents can implement Agent::set_session_title and have it dispatched here.
1 parent 75f5b68 commit 34523b3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/agent-client-protocol/src/schema/client_to_agent/requests.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::schema::{
44
LoadSessionRequest, LoadSessionResponse, NewSessionRequest, NewSessionResponse, PromptRequest,
55
PromptResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionConfigOptionRequest,
66
SetSessionConfigOptionResponse, SetSessionModeRequest, SetSessionModeResponse,
7+
SetSessionTitleRequest, SetSessionTitleResponse,
78
};
89
#[cfg(feature = "unstable_session_fork")]
910
use crate::schema::{ForkSessionRequest, ForkSessionResponse};
@@ -30,6 +31,11 @@ impl_jsonrpc_request!(
3031
SetSessionConfigOptionResponse,
3132
"session/set_config_option"
3233
);
34+
impl_jsonrpc_request!(
35+
SetSessionTitleRequest,
36+
SetSessionTitleResponse,
37+
"session/setTitle"
38+
);
3339

3440
#[cfg(feature = "unstable_session_model")]
3541
impl_jsonrpc_request!(

src/agent-client-protocol/src/schema/enum_impls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ impl_jsonrpc_request_enum!(ClientRequest {
2121
CloseSessionRequest => "session/close",
2222
SetSessionModeRequest => "session/set_mode",
2323
SetSessionConfigOptionRequest => "session/set_config_option",
24+
SetSessionTitleRequest => "session/setTitle",
2425
PromptRequest => "session/prompt",
2526
#[cfg(feature = "unstable_session_model")]
2627
SetSessionModelRequest => "session/set_model",

0 commit comments

Comments
 (0)