top | item 46286444

(no title)

vmitro | 2 months ago

If you check out the GitHub issues on the Claude Code repo and sort by comments, you'll see that the first page is littered with the same issue you're talking about.

The answer seems to be in the vendored ink.js, at least in Claude Code's case. I actually asked Claude Code to look into its own minified and abfuscated source code and pointed it to ink.js's repo to try and deduce how and why the bug occurs; the easiest way to reproduce is to already have a few hundred to a couple of thousand lines of chat output ready and enter enough newlines that the height of the inputed text is > the height of the current terminal. But not only input box, but also other ink.js "widgets" have the same problem: everything gets redrawn over and over again (each color change of the flabbergasting... status re-triggers it, forcing terminals that don't handle OSC10/11 codes properly to rescroll from the beginning... or at least that's my interpretation).

Anyway, after a few flabbergastings of its own and my suggestion to make a wrapper around its output via xterm.js to always render a sliding fixed window of terminal_width x terminal_height and manage its scroll internally, as well as mapping the mouse wheel to scrolling / panning horizontally this virtual viewport and I had a basic, scroll-bug-free, 650 LOC node.js app that basically circumvents this issue completely, plus works in Windows Terminal and VS Code terminal. I've been using this as a drop in replacement since about a week or so and the only thing missing is a bit more draw call waiting on terminal resize since it triggers a reflow with visible scroll, but much, much faster than the annoying bug (sub 100ms).

As always, the feature creep is strong, there are som vim bindings now, and Claude, Gemini and Codex are currently working together (I have multiple terminal planes inside the app a la tmux) on implementing FIPA ACL inter agent communication via built-in MCP chat server. You can check it out at github.com/vmitro/bukowski and don't worry about the license, it's satire, it's basically free for any use (and besides, Paddle won't let me set up the $1M "Premium Luxury Enterprise License for Companies valued > $1B that Make non-open-source AI Tools"...)

discuss

order

oblio|2 months ago

Thank you for the tool suggestion, it sounds great, I'll take a look!

At this point I was thinking about setting up https://opencode.ai/ - I think Claude Pro (aka $20 per month) allows it?

I don't want API access (I think), because that's priced per actual usage and I want a capped subscription cost, and I'm fairly sure OpenCode needs API access.

I really want to use the official clients but they're just SO bad.

Which, if you think about it, is the perfect anti-advertisement for AI coding. If the prestige AI shops can't create almost perfect clients for their own tools, then how good really is AI for coding???