From ee802145e1e255a05168fd39f1cce7a5e5b6ecf1 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Thu, 9 Jul 2026 11:05:34 +1000 Subject: [PATCH] style(acp): import SessionMode types instead of qualifying in test helper The mode_state test helper added in 885da4aeb spelled out agent_client_protocol::schema::SessionMode and SessionModeId inline, while every other schema type in provider.rs comes through the schema::v1 import at the top of the file (schema re-exports v1, so they are the same types). Add the two names to that import and drop the qualified paths. No behavior change; the 47 acp::provider unit tests still pass. Co-Authored-By: Claude Fable 5 Signed-off-by: Matt Toohey --- crates/goose/src/acp/provider.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/crates/goose/src/acp/provider.rs b/crates/goose/src/acp/provider.rs index 94c51a0dae..7e35823352 100644 --- a/crates/goose/src/acp/provider.rs +++ b/crates/goose/src/acp/provider.rs @@ -4,9 +4,9 @@ use agent_client_protocol::schema::v1::{ McpServerStdio, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse, RequestPermissionOutcome, RequestPermissionRequest, RequestPermissionResponse, SessionConfigKind, SessionConfigOption, SessionConfigOptionCategory, - SessionConfigSelectOptions, SessionId, SessionModeState, SessionNotification, SessionUpdate, - SetSessionConfigOptionRequest, SetSessionModeRequest, SetSessionModeResponse, StopReason, - TextContent, ToolCallContent, ToolCallStatus, ToolKind, + SessionConfigSelectOptions, SessionId, SessionMode, SessionModeId, SessionModeState, + SessionNotification, SessionUpdate, SetSessionConfigOptionRequest, SetSessionModeRequest, + SetSessionModeResponse, StopReason, TextContent, ToolCallContent, ToolCallStatus, ToolKind, }; use agent_client_protocol::schema::ProtocolVersion; use agent_client_protocol::{Agent, Client, ConnectionTo}; @@ -1897,15 +1897,10 @@ mod tests { fn mode_state(current: &str, available: &[&str]) -> SessionModeState { SessionModeState::new( - agent_client_protocol::schema::SessionModeId::new(current), + SessionModeId::new(current), available .iter() - .map(|id| { - agent_client_protocol::schema::SessionMode::new( - agent_client_protocol::schema::SessionModeId::new(*id), - *id, - ) - }) + .map(|id| SessionMode::new(SessionModeId::new(*id), *id)) .collect(), ) }