feat(cli): overhaul thinking UI (#18725)

This commit is contained in:
Keith Guerin
2026-03-06 20:20:27 -08:00
committed by GitHub
parent 9455ecd78c
commit e5d58c2b5a
29 changed files with 763 additions and 184 deletions

View File

@@ -48,12 +48,14 @@ describe('textUtils', () => {
it('should handle unicode characters that crash string-width', () => {
// U+0602 caused string-width to crash (see #16418)
const char = '؂';
expect(getCachedStringWidth(char)).toBe(0);
expect(() => getCachedStringWidth(char)).not.toThrow();
expect(typeof getCachedStringWidth(char)).toBe('number');
});
it('should handle unicode characters that crash string-width with ANSI codes', () => {
const charWithAnsi = '\u001b[31m' + '؂' + '\u001b[0m';
expect(getCachedStringWidth(charWithAnsi)).toBe(0);
expect(() => getCachedStringWidth(charWithAnsi)).not.toThrow();
expect(typeof getCachedStringWidth(charWithAnsi)).toBe('number');
});
});