Commit cb083e5
fix(native-hook-relay): use truncateUtf16Safe for hook display text truncation
Replace naive .slice(0, N) truncation with truncateUtf16Safe() in:
- truncateText() helper (covers 4 call sites for tool display text)
- Inline hook result truncation (...[truncated] suffix)
Prevents surrogate pair splitting in native hook relay display
output (tool names, commands, descriptions shown to users).
Co-Authored-By: Claude <[email protected]>1 parent 7b33e2e commit cb083e5
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
1929 | 1930 | | |
1930 | 1931 | | |
1931 | 1932 | | |
1932 | | - | |
| 1933 | + | |
1933 | 1934 | | |
1934 | 1935 | | |
1935 | 1936 | | |
| |||
2223 | 2224 | | |
2224 | 2225 | | |
2225 | 2226 | | |
2226 | | - | |
| 2227 | + | |
2227 | 2228 | | |
2228 | 2229 | | |
2229 | 2230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
149 | | - | |
| 148 | + | |
150 | 149 | | |
151 | 150 | | |
152 | 151 | | |
| |||
0 commit comments