aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/endpoints.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-21 20:47:14 +0300
committerGitHub <noreply@github.com>2026-09-21 20:47:14 +0300
commit28360107c1bfab57fb0de99d74bfa48e74423ca8 (patch)
tree30f9d953e48fb81b32f2a663500c6cff6f447f8f /src/client/shell/endpoints.rs
parent309749ad65f3aa596f077ec23a1bf3ee428b7a04 (diff)
fix: distinguish agent completion from startup and session changes (#4457)
refs #3338 refs #3990 refs #3916
Diffstat (limited to 'src/client/shell/endpoints.rs')
-rw-r--r--src/client/shell/endpoints.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/client/shell/endpoints.rs b/src/client/shell/endpoints.rs
index 513842ba..dd6fa3cb 100644
--- a/src/client/shell/endpoints.rs
+++ b/src/client/shell/endpoints.rs
@@ -309,6 +309,23 @@ impl ClientShellState {
.map(|snapshot| (snapshot.boot_id.as_str(), snapshot.revision))
}
+ pub(crate) fn set_endpoint_agent_completions(
+ &mut self,
+ endpoint_id: &ClientEndpointId,
+ generation: u64,
+ projection: crate::protocol::endpoint::EndpointAgentCompletions,
+ ) {
+ if let Some(endpoint) = self
+ .endpoints
+ .iter_mut()
+ .find(|endpoint| &endpoint.endpoint_id == endpoint_id)
+ {
+ endpoint
+ .agent_presentation
+ .receive_completions(Some(generation), projection);
+ }
+ }
+
pub(crate) fn set_endpoint_agent_view_projection_for_generation(
&mut self,
endpoint_id: &ClientEndpointId,
@@ -546,7 +563,7 @@ impl ClientShellState {
}
self.endpoints[index]
.agent_presentation
- .project_snapshot(&mut snapshot);
+ .project_snapshot_for_generation(&mut snapshot, generation);
let presented_surface = if acknowledge_surface && endpoint_id == &self.active_endpoint_id {
self.pane_surface.as_ref()
} else {