|
1 | 1 | mod initialize; |
| 2 | +mod new_session; |
2 | 3 |
|
3 | 4 | use crate::config::Config; |
4 | 5 | use crate::nats::{FlushClient, PublishClient, RequestClient}; |
@@ -48,11 +49,8 @@ impl<N: RequestClient + PublishClient + FlushClient, C: GetElapsed> Agent for Br |
48 | 49 | )) |
49 | 50 | } |
50 | 51 |
|
51 | | - async fn new_session(&self, _args: NewSessionRequest) -> Result<NewSessionResponse> { |
52 | | - Err(Error::new( |
53 | | - ErrorCode::InternalError.into(), |
54 | | - "not yet implemented", |
55 | | - )) |
| 52 | + async fn new_session(&self, args: NewSessionRequest) -> Result<NewSessionResponse> { |
| 53 | + new_session::handle(self, args).await |
56 | 54 | } |
57 | 55 |
|
58 | 56 | async fn load_session(&self, _args: LoadSessionRequest) -> Result<LoadSessionResponse> { |
@@ -109,7 +107,7 @@ mod tests { |
109 | 107 | use crate::config::Config; |
110 | 108 | use agent_client_protocol::{ |
111 | 109 | Agent, AuthenticateRequest, CancelNotification, ExtNotification, ExtRequest, |
112 | | - LoadSessionRequest, NewSessionRequest, PromptRequest, SetSessionModeRequest, |
| 110 | + LoadSessionRequest, PromptRequest, SetSessionModeRequest, |
113 | 111 | }; |
114 | 112 | use trogon_nats::AdvancedMockNatsClient; |
115 | 113 |
|
@@ -137,12 +135,6 @@ mod tests { |
137 | 135 | .await |
138 | 136 | .is_err() |
139 | 137 | ); |
140 | | - assert!( |
141 | | - bridge |
142 | | - .new_session(NewSessionRequest::new(".")) |
143 | | - .await |
144 | | - .is_err() |
145 | | - ); |
146 | 138 | assert!( |
147 | 139 | bridge |
148 | 140 | .load_session(LoadSessionRequest::new("s1", ".")) |
|
0 commit comments