diff options
Diffstat (limited to 'src/client/mod.rs')
| -rw-r--r-- | src/client/mod.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index 36174064..8775ac19 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -421,6 +421,17 @@ async fn run_client_loop( .as_ref() .and_then(|(_, handshake)| handshake.endpoint_methods.clone()), ); + shell.set_endpoint_agent_view_projection_supported( + &endpoint::ClientEndpointId::Local, + initial + .as_ref() + .and_then(|(_, handshake)| handshake.endpoint_capabilities.as_ref()) + .is_some_and(|capabilities| { + capabilities.iter().any(|capability| { + capability == crate::protocol::endpoint::AGENT_VIEW_PROJECTION_CAPABILITY + }) + }), + ); if local_unavailable { shell.set_endpoint_status( &endpoint::ClientEndpointId::Local, @@ -1157,8 +1168,15 @@ async fn run_client_loop( ) { continue; } + let agent_view_projection_supported = negotiation.supports_capability( + crate::protocol::endpoint::AGENT_VIEW_PROJECTION_CAPABILITY, + ); let frame = state.shell.as_mut().and_then(|shell| { shell.set_endpoint_methods_for(&endpoint_id, Some(negotiation.methods())); + shell.set_endpoint_agent_view_projection_supported( + &endpoint_id, + agent_view_projection_supported, + ); shell.compose(state.reported_size.0, state.reported_size.1) }); let reader_quit = writer.stop_handle(); @@ -1829,6 +1847,18 @@ async fn run_client_loop( } let snapshot = match endpoint::decode_endpoint_control(&kind, &data) { Ok(endpoint::EndpointControlMessage::HealthPong) => continue, + Ok(endpoint::EndpointControlMessage::AgentViewProjection( + projection, + )) => { + if let Some(shell) = state.shell.as_mut() { + shell.set_endpoint_agent_view_projection_for_generation( + &endpoint_id, + generation, + projection, + ); + } + continue; + } Ok(endpoint::EndpointControlMessage::Ignored) => { debug!(%kind, "ignoring unknown endpoint control message"); continue; |
