Repository navigation
Replies: 1 comment
|
+1 on point 1 (cursor position in We render herdr panes in a web canvas from So a client cannot show where the user is editing in the Claude Code prompt. Guessing from the end of the text is right only when the caret is at the end. Checked on 0.8.2 in |
Uh oh!
There was an error while loading. Please reload this page.
Hi! I'm building a GUI companion that shows herdr panes through the socket API. It reads
pane.read {source: "visible", format: "ansi"}and types into panes withpane.send_keys/pane.send_text. On 0.9.0 (protocol 22) this already works well: the ansi output is clean SGR plus CRLF, reads have no side effects, and key encoding follows the app's keyboard mode. Three gaps get in the way of making it feel like a real terminal:Cursor position in
pane.read.PaneReadResulthas no cursor, so a client can't show where the shell's cursor is. TUIs that draw their own highlight are fine; a plain shell prompt shows no cursor at all. Something likecursor: {row, col, visible}relative to the returned text, forsource: "visible", would be enough.Home / End / PageUp / PageDown / Insert / Delete in API key names. On 0.9.0 every spelling I tried returns
invalid_key:home,end,pageup,PageUp,PgUp,pgdn,page_down,insert,delete,Delete,del. It looks like the key-combo parser behindsend_keyshas no names for them. Raw escapes throughsend_textaren't a good substitute, because they bypass the app's keyboard mode and bracketed-paste state. (Minor:f13is accepted but sends nothing.)A
revisionthat changes with the screen, or an output-changed event.revisionis always 0 inpane.readand insession.snapshotpanes, so clients poll and diff the text. A per-pane content revision, or a lightweightpane.output_changedsubscription, would let clients skip unchanged reads.Happy to test any of these. Thanks for herdr!
All reactions