Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(mobile): 避免过期队列误报插话未送达

Dashfe84ef31b03b
diff --git a/apps/mobile/app/sessions/[sessionId].tsx b/apps/mobile/app/sessions/[sessionId].tsx
index c17c04e85b..9be3386ed9 100644
--- a/apps/mobile/app/sessions/[sessionId].tsx
+++ b/apps/mobile/app/sessions/[sessionId].tsx
@@ -7762,14 +7762,15 @@ function SessionScreenContent({ beforeSessionSwitchRef, newSessionActionRef }: S
const projectionEpochAtRequestStart =
remoteSessionStore.captureInputProjectionAuthorityEpoch(sessionId);
const projection = await maker.input.getProjection(sessionId);
- remoteSessionStore.setInputProjectionIfCurrent(
+ const projectionApplied = remoteSessionStore.setInputProjectionIfCurrent(
sessionId,
projection,
projectionEpochAtRequestStart,
);
// The boolean ACK can also mean "kept for the next turn" on older hosts.
- // Inspect the authoritative queue rather than reporting that as delivery.
- if (remoteSessionStore.getInputProjection(sessionId).pendingQueue
+ // Only a successfully applied snapshot proves it is still queued. A turn
+ // boundary can invalidate the query while leaving the old queue visible.
+ if (projectionApplied && remoteSessionStore.getInputProjection(sessionId).pendingQueue
.some((entry) => entry.clientId === item.clientId)) {
showTransientNotice(t('message.queue.steerQueued'));
}