diff options
| author | akbash <akbash@herdr.dev> | 2026-09-14 01:11:07 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-14 02:11:07 +0400 |
| commit | 3b478e69dcbe8e416ddd46f0e24156392d4e71da (patch) | |
| tree | e4ae8adfc09dce6eb09bd036fb727cc7f19edff7 /src/client/mod.rs | |
| parent | 4e1096b1018496a23fb9de7f9ae737d3792bb38b (diff) | |
fix: scope agent views to the selected machine (#3784)
* fix: scope agent views to the selected machine
refs #3732
* fix: preserve stable agent view ordering
refs #3732
---------
Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
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; |
