Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/agent-client-protocol/examples/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _};
Expand Down Expand Up @@ -120,13 +120,11 @@
args: acp::SetSessionConfigOptionRequest,
) -> Result<acp::SetSessionConfigOptionResponse, acp::Error> {
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",
value,

Check failure on line 127 in src/agent-client-protocol/examples/agent.rs

View workflow job for this annotation

GitHub Actions / Build

the trait bound `SessionConfigValueId: From<SessionConfigOptionValue>` is not satisfied
vec![
acp::SessionConfigSelectOption::new("option1", "Option 1"),
acp::SessionConfigSelectOption::new("option2", "Option 2"),
Expand Down
4 changes: 1 addition & 3 deletions src/agent-client-protocol/src/rpc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,11 @@
&self,
args: agent_client_protocol_schema::SetSessionConfigOptionRequest,
) -> Result<agent_client_protocol_schema::SetSessionConfigOptionResponse> {
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",
value,

Check failure on line 278 in src/agent-client-protocol/src/rpc_tests.rs

View workflow job for this annotation

GitHub Actions / Build

the trait bound `SessionConfigValueId: From<SessionConfigOptionValue>` is not satisfied
vec![
agent_client_protocol_schema::SessionConfigSelectOption::new("value1", "Value 1"),
agent_client_protocol_schema::SessionConfigSelectOption::new("value2", "Value 2"),
Expand Down
Loading