mirror of
https://github.com/block/goose.git
synced 2026-07-10 00:20:17 +00:00
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 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
This commit is contained in:
parent
885da4aeb7
commit
ee802145e1
1 changed files with 5 additions and 10 deletions
|
|
@ -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(),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue