mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 04:01:56 +00:00
fix: emoji text wrapping crash in pi-tui
Fixed crash when rendering text containing emojis followed by long content. The breakLongWord function was iterating over UTF-16 code units instead of grapheme clusters, causing emojis (surrogate pairs) to be miscounted during line wrapping. Now uses Intl.Segmenter to properly handle multi-codepoint characters.
This commit is contained in:
parent
5b940c2686
commit
e7c48e33a2
3 changed files with 48 additions and 8 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
### Fixed
|
||||
|
||||
- **Emoji Text Wrapping Crash**: Fixed crash when rendering text containing emojis (e.g., 😂) followed by long content like URLs. The `breakLongWord` function in `pi-tui` was iterating over UTF-16 code units instead of grapheme clusters, causing emojis (which are surrogate pairs) to be miscounted during line wrapping. Now uses `Intl.Segmenter` to properly handle multi-codepoint characters.
|
||||
- **Footer Cost Display**: Added `$` prefix to cost display in footer. Now shows `$0.078` instead of `0.078`. ([#53](https://github.com/badlogic/pi-mono/issues/53))
|
||||
|
||||
## [0.9.3] - 2025-11-24
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue