diff --git a/src/agent-client-protocol/examples/agent.rs b/src/agent-client-protocol/examples/agent.rs index 1aa6ffe..fe03a7e 100644 --- a/src/agent-client-protocol/examples/agent.rs +++ b/src/agent-client-protocol/examples/agent.rs @@ -14,7 +14,7 @@ use std::cell::Cell; -use agent_client_protocol::{self as acp, Client as _, SessionConfigOptionValue}; +use agent_client_protocol::{self as acp, Client as _}; use serde_json::json; use tokio::sync::{mpsc, oneshot}; use tokio_util::compat::{TokioAsyncReadCompatExt as _, TokioAsyncWriteCompatExt as _}; @@ -120,9 +120,7 @@ impl acp::Agent for ExampleAgent { args: acp::SetSessionConfigOptionRequest, ) -> Result { log::info!("Received set session config option request {args:?}"); - let SessionConfigOptionValue::ValueId { value } = args.value else { - return Err(acp::Error::invalid_params()); - }; + let value = args.value; let option = acp::SessionConfigOption::select( args.config_id, "Example Option", diff --git a/src/agent-client-protocol/src/rpc_tests.rs b/src/agent-client-protocol/src/rpc_tests.rs index ecdbf2d..e3c1016 100644 --- a/src/agent-client-protocol/src/rpc_tests.rs +++ b/src/agent-client-protocol/src/rpc_tests.rs @@ -271,9 +271,7 @@ impl Agent for TestAgent { &self, args: agent_client_protocol_schema::SetSessionConfigOptionRequest, ) -> Result { - let SessionConfigOptionValue::ValueId { value } = args.value else { - return Err(Error::invalid_params()); - }; + let value = args.value; let option = agent_client_protocol_schema::SessionConfigOption::select( args.config_id, "Test Option",