v0.95.0 — click through to the PR
A clickable PR link in the cost tables
moshcode costandmoshcode cost --allgained aprcolumn. The cell readsview #128and is an OSC 8 hyperlink, so clicking it opens the pull request in your browser.- The label and the click target are separate, which is the point: the column stays four characters wide while the target is the full GitHub URL. A URL column would have been sixty characters of table.
- Claude Code writes a
pr-linkrecord when a session opens a pull request, and that is where this comes from. Nothing was reading it before. Other engines record nothing like it and leave the column blank. moshcode cost --jsonnow carriesprandprson every session and run.
The cost table is where you notice a session that cost $300, and the next thing you want is the thing it produced, which lives on GitHub rather than on this machine.
Terminals without OSC 8
Not every terminal speaks OSC 8 and there is no way to ask one whether it does, so there are two routes back to the plain form. Piped output prints the raw URL, because nothing reading a pipe wants escape sequences. MOSHCODE_HYPERLINKS=0 forces the same plain URL in a terminal that would otherwise paint a view nobody can click.
Layout
ui.mjs learned about hyperlinks to make this line up. strip previously matched only SGR sequences, so a cell with a URL hidden inside it would have measured sixty columns wide and pushed the whole table apart. clip now copies an OSC 8 wrapper whole and closes one it cut into, the same care it already took with colour, because a terminal handed an opener with no closer keeps linking everything printed after it.
Not in this release
moshcode ps does not get the column. It runs in 0.22s, and the transcript scan the PR link comes from takes 1.75s. That is a nine times regression on the command you run constantly, in exchange for a cell that is empty while the work is still in progress. The per-session moshcode cost table lists the same sessions and already pays for that scan.
Only https URLs are accepted. The string ends up in an escape sequence handed to your browser, and a transcript is a file on disk that other tools write to, so javascript:, file:// and plain http:// are dropped rather than rendered as a dead link.
Eleven new tests. The full suite passes: 2,894 tests, 0 failures.
Run moshcode upgrade self.
PR: #493