The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 18:15 UTC
chore: fit three comments to the four-line cap so lint passes on main (#24675)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 24, 2026 at 19:33 UTC
68d5b7ac735a5e95a945084430c6b5925873cc82
3 files changed
+12
-16
apps/server/src/orchestration-v2/WireProjection.ts
+4
-5
@@ -257,11 +257,10 @@ function remember<K, V>(memory: Map<K, V>, key: K, value: V): void {
257
}
258
259
/**
260
- * One per subscription, applied after coalescing so it only remembers records the client
261
- * received, in the snapshot or in events. A record event comes before the turn item that repeats
262
- * its body (adapters and the orchestrator emit them in that order), so the item can ship blank
263
- * and marked; so can a repeated subagent record. Emitting in the other order, or forgetting a
264
- * record, only costs bytes: the repeat ships whole.
260
+ * One per subscription, after coalescing, so it remembers only records the client received. A
261
+ * record event comes before the turn item that repeats its body, so the item (or a repeated
262
+ * subagent record) ships blank and marked. The other order, or a forgotten record, only costs
263
+ * bytes: the repeat ships whole.
264
*/
265
export function makeLiveBodyDeduper(): (
266
item: OrchestrationV2ThreadStreamItem,
packages/contracts/src/orchestrationV2.ts
+4
-6
@@ -744,12 +744,10 @@ export const OrchestrationV2SubagentWorkflow = Schema.Struct({
744
export type OrchestrationV2SubagentWorkflow = typeof OrchestrationV2SubagentWorkflow.Type;
745
746
/**
747
- * Wire-only. Set for clients that opted in with `acceptDedupedBodies` or `dedupeBodies=1` when the
748
- * marked field was blanked because the client already holds the same value: in the record it
749
- * received earlier on the same response or stream. Restore with
750
- * `@t3tools/shared/orchestrationV2DedupedBodies` before use; never store or forward a marked
751
- * value. Clients that opted in restore only these fields, so blanking another field needs a new
752
- * opt-in.
747
+ * Wire-only, for clients that opted in with `acceptDedupedBodies` or `dedupeBodies=1`: the field
748
+ * was blanked because an earlier record on the same response or stream holds the same value.
749
+ * Restore with `@t3tools/shared/orchestrationV2DedupedBodies`; never store or forward a marked
750
+ * value. Clients restore only these fields, so blanking another field needs a new opt-in.
751
*/
752
const DedupedBodyMarker = Schema.optionalKey(Schema.Literal(true));
753
packages/shared/src/orchestrationV2DedupedBodies.ts
+4
-5
@@ -11,11 +11,10 @@ import {
11
import * as Schema from "effect/Schema";
12
13
/**
14
- * A turn item repeats a body its record already carries: message text, checkpoint files, a
15
- * subagent's prompt and result. For clients that opt in, the server blanks the repeat and marks
16
- * the field (`textOmitted`, `filesOmitted`, `promptOmitted`, `resultOmitted`), and the client
17
- * copies the value back from the record it already holds. Only a body equal to the record's is
18
- * blanked, so the restore is exact.
14
+ * For clients that opt in, the server blanks a turn item's body that its record already carries
15
+ * (message text, checkpoint files, a subagent's prompt and result) and marks the field. The client
16
+ * copies the value back from the record. Only a body equal to the record's is blanked, so the
17
+ * restore is exact.
18
*/
19
export interface DedupedBodySource {
20
readonly messageText: (id: MessageId) => string | undefined;