@devries-cameron20 / t3code Mirror · read-only / commits / 84265950ea
Fork 0

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 21, 22:15 UTC

fix(server): large tool summaries no longer split an emoji at the cap (#33832)

Co-authored-by: johan vaz <johanvaz@Nathalines-MacBook-Pro.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Johan Vaz committed Nov 12, 2026 at 07:14 UTC 84265950ea0f0410465da9ff81b7cdab4c6d36e7
2 files changed +12 -1
apps/server/src/orchestration-v2/WireProjection.test.ts
+9
@@ -175,6 +175,15 @@ describe("orchestration V2 wire projection", () => {
175 summary: '"'.repeat(159) + "…",
176 truncated: true,
177 });
178 +
179 + const boundary = projectTurnItemForWire({
180 + ...base,
181 + input: { text: "a".repeat(149) + "😀" + "b".repeat(17_000) },
182 + });
183 + expect(boundary.type === "dynamic_tool" ? boundary.input : null).toEqual({
184 + summary: '{"text":"' + "a".repeat(149) + "…",
185 + truncated: true,
186 + });
187 });
188
189 it("truncates detail at a UTF-8 boundary without changing the source", () => {
apps/server/src/orchestration-v2/WireProjection.ts
+3 -1
@@ -97,8 +97,10 @@ function summarizeDynamicValue(value: unknown): unknown {
97 pendingSpace = false;
98 if (firstLine.length > 160) break;
99 }
100 + const last = firstLine.charCodeAt(158);
101 + const end = last >= 0xd800 && last <= 0xdbff ? 158 : 159;
102 return {
101 - summary: firstLine.length <= 160 ? firstLine : `${firstLine.slice(0, 159).trimEnd()}…`,
103 + summary: firstLine.length <= 160 ? firstLine : `${firstLine.slice(0, end).trimEnd()}…`,
104 truncated: true,
105 };
106 }