Commit 1b8b850
authored
fix(auto-reply): truncate user-facing text on UTF-16 boundary (#97299)
Summary:
- The PR imports `truncateUtf16Safe` and uses it for the Codex usage-limit preview and verbose working-label truncation paths in auto-reply.
- PR surface: Source +2. Total +2 across 2 files.
- Reproducibility: yes. Current main uses raw `slice(0, N)` at both reported user-facing truncation sites, and ... ludes terminal before/after output showing dangling surrogates before the fix and safe truncation after it.
Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.
Validation:
- ClawSweeper review passed for head 74a0a32.
- Required merge gates passed before the squash merge.
Prepared head SHA: 74a0a32
Review: #97299 (comment)
Co-authored-by: zenglingbiao <[email protected]>
Approved-by: takhoffman1 parent c29e1fe commit 1b8b850
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
753 | 754 | | |
754 | 755 | | |
755 | 756 | | |
756 | | - | |
| 757 | + | |
757 | 758 | | |
758 | 759 | | |
759 | 760 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
2565 | 2566 | | |
2566 | 2567 | | |
2567 | 2568 | | |
2568 | | - | |
| 2569 | + | |
2569 | 2570 | | |
2570 | 2571 | | |
2571 | 2572 | | |
| |||
0 commit comments