Claude's answers, rendered: Markdown, math, charts and diagrams drawn in the Claude Code terminal. Independent project, not affiliated with Anthropic.
TypeScript claude-code-mod
Limitations: the herdr variables on macOS, and lists cut into pages
razorback1642c1b96b56e2
diff --git a/docs/limitations.md b/docs/limitations.mdindex b72d2b5..fc83b81 100644--- a/docs/limitations.md+++ b/docs/limitations.md@@ -61,6 +61,8 @@- **Over ssh**, the mod cannot read the terminal's config on your computer. So it uses the metrics of the theme's code font (Menlo on macOS) for the text size, and `auto` uses `COLORFGBG` if ssh sends it. Else `auto` is dark. The mod does not use the OS appearance of the remote computer. Pages are shorter, so that each one is at most 4096 pixels tall. In tmux or screen on the remote computer, no pictures show.- **In herdr**, herdr does not send an image to the terminal if the image is too large for its transfer limit (30 MiB as base64, approximately 22 MiB as pixels: width × height × 4 bytes). It shows no image and no message. Thus the mod makes pages shorter in herdr, so that each page is at most 16 MiB as pixels. A pasted image, an image that Claude sends, a PDF page or a live Typst drawing larger than approximately 22 MiB as pixels (for example, 2900 × 2000 pixels) does not show in herdr. With the `auto` theme, the background comes from herdr (the terminal in front). The mod asks herdr at the start and when you change to a different herdr client (with `herdr --remote`, only at the start). Then a change of the terminal's background shows only if the terminal's config or the OS appearance changes too, or at the next change of client. Claude Code sometimes reads herdr's answer first; then the mod asks again, 3 times at most, after which it uses the terminal's config. The font comes from the herdr client that the mod uses: on macOS, the client in the terminal app in front (with two or more clients in that app, the one where you typed last); on Linux, the client where you typed last. On Linux, with two terminals attached, the mod follows the terminal where you typed last, not the terminal that you look at. On macOS, when the app in front is not a terminal with a client (for example, a browser or an editor), the mod keeps the client that it used before. A change shows after the next check (up to 1 s; on Linux, the tty times change only about every 8 s, so it can take up to approximately 9 s). A new client that you attach in the app in front shows after the full check (up to 10 s). With `herdr --remote`, the client is on a different computer, so the mod does not find it and uses no terminal font, as over ssh. If the mod cannot read the processes (`ps`), it uses the variables of the terminal that started the herdr server. With more than one herdr server (named sessions), the mod uses `lsof` to find the clients of its own server; on Linux, `lsof` does not show this, so the mod can use a client of a different session.- **In herdr, the background question can take a key.** The mod asks herdr's pane for its background (OSC 11) with a short `perl` that reads the tty for up to 0.3 s. Claude Code reads the same tty. A key, an answer in a dialog, Esc or a mouse report that comes in these 0.3 s can go to the mod, and Claude Code then does not get it. The mod asks only with the `auto` theme, at the start and when you change to a different herdr client (3 times at most each time), and not within 2 s of a key in the prompt box. It does not see keys in a dialog or mouse reports, so the risk stays there. A theme that is not `auto` stops the question.+- **In herdr on macOS, the variables of the client come from `ps eww`.** Its text has no clear end for each value, so the mod splits it before each ` NAME=` and keeps only the terminal's variables. A value of a different variable that itself contains ` TERM=` or a similar text can thus give part of that value as a terminal variable. On Linux, the mod reads `/proc/<pid>/environ`, where each variable is separate.+- **A long list cut into pages:** each page is set by itself. Thus the numbers of a numbered list can move a little to the right on a page with longer numbers (for example, `9.` and `10.`), and an item alone on a page can lose the larger spacing of a loose list (a list with blank lines between its items).- **herdr in iTerm2:** iTerm2 3.6 and 3.7 count the top of a part of an image (a kitty placement with a source rectangle) from the bottom of the image. herdr sends each row of a picture as such a part, so in iTerm2 the rows of a picture show in the opposite order. When the herdr client that the mod uses is iTerm2, the mod stores each page and each picture with its rows moved, so that iTerm2 shows them in the correct order. The mod decodes and encodes each page again for this, so a page takes more time to show, and its file is larger. Picture select works. These items stay incorrect:- With `herdr --remote`, the client is on a different computer, so the mod does not know that the terminal is iTerm2. The rows of the pictures show in the wrong order. Use Ghostty or kitty for `herdr --remote` with pictures.- If the mod cannot find the herdr client (for example, it cannot read the processes), it does not move the rows. It does not use the variables of the terminal that started the herdr server for this.