What happened?
splitIntoTokensWithAnsi in packages/tui/src/utils.ts only splits tokens on spaces.
URLs contain no spaces, so long URLs become one token and get broken character-by-character via breakLongWord.
If the break falls after a - in the URL (e.g. 2026-05- for date slugs), URLs in the TUI get truncated so links are no longer clickable.
Possible fix: treat URL-safe punctuation (/, ., -, ?, &, =, _, ~, %, :, #, @) as token separators so URLs break at natural boundaries. A PUNCTUATION_REGEX already exists in the same file.
Steps to reproduce
Using Windows Powershell (presumably also any other terminal client), prompt pi to respond with a long URL like https://mydomain.com/01-02-03-04-05-06-07-08-09-10-11-12-13-14-15-16-17-18-19-20-21-22-23-24-25/index.html that breaks across more than one line and click on the link. The URL will be truncated and will not load in the default browser.
Expected behavior
The full URL survives the line break and loads correctly in the default browser when clicked.
Version
0.74.0
What happened?
splitIntoTokensWithAnsiinpackages/tui/src/utils.tsonly splits tokens on spaces.URLs contain no spaces, so long URLs become one token and get broken character-by-character via breakLongWord.
If the break falls after a - in the URL (e.g.
2026-05-for date slugs), URLs in the TUI get truncated so links are no longer clickable.Possible fix: treat URL-safe punctuation (
/, ., -, ?, &, =, _, ~, %, :, #, @) as token separators so URLs break at natural boundaries. APUNCTUATION_REGEXalready exists in the same file.Steps to reproduce
Using Windows Powershell (presumably also any other terminal client), prompt pi to respond with a long URL like
https://mydomain.com/01-02-03-04-05-06-07-08-09-10-11-12-13-14-15-16-17-18-19-20-21-22-23-24-25/index.htmlthat breaks across more than one line and click on the link. The URL will be truncated and will not load in the default browser.Expected behavior
The full URL survives the line break and loads correctly in the default browser when clicked.
Version
0.74.0