Fix fingerprint dedup blocking retry on empty sync result and unnecessary checkpoint diff invalidation
- Clear the dedup fingerprint when listCheckpoints returns no matching checkpoints, so subsequent calls with the same turn set are not silently skipped. - Scope checkpoint/captured invalidation to only non-successful queries, avoiding O(N^2) redundant getCheckpointDiff refetches for immutable per-turn diffs.
This commit is contained in:
1 parent
34e30dfb78
commit
207920b40c
2 files changed
+5
-1
No files matched your search
@@ -67,7 +67,10 @@ function EventRouter() {
|
||||
void invalidateGitQueries(queryClient);
|
||||
}
|
||||
if (event.method === "checkpoint/captured") {
|
||||
void queryClient.invalidateQueries({ queryKey: providerQueryKeys.all });
|
||||
void queryClient.invalidateQueries({
|
||||
queryKey: providerQueryKeys.all,
|
||||
predicate: (query) => query.state.status !== "success",
|
||||
});
|
||||
}
|
||||
dispatch({
|
||||
type: "APPLY_EVENT",
|
||||
|
||||
@@ -1463,6 +1463,7 @@ export default function ChatView() {
|
||||
.map((checkpoint) => [checkpoint.id, checkpoint.turnCount] as const),
|
||||
);
|
||||
if (Object.keys(checkpointTurnCountByTurnId).length === 0) {
|
||||
checkpointTurnCountSyncFingerprintRef.current.delete(syncKey);
|
||||
return;
|
||||
}
|
||||
dispatch({
|
||||
|
||||
Reference in new issue
Block a user