Загрузка видео...

Не удалось загрузить видео

На главную

Made some progress on putting renderables onto the main scrollback buffer in OpenTUI. Still have some work left on the internals, but making progress. We want to make this direct render mode available as `opencode run --interactive` - as a minimal mode that is optimized for embedding OpenCode or...

19,192 просмотров • 6 месяцев назад •via X (Twitter)

Комментарии: 6

Фото профиля Миша Љевћенко
Миша Љевћенко6 месяцев назад

This + cc's vim mode would be a killer

Фото профиля Simon Klee
Simon Klee6 месяцев назад

Exactly. Have been testing the vim oc plugin and it would benefit from this mode

Фото профиля Tommy D. Rossi
Tommy D. Rossi6 месяцев назад

awesome. I would call it --scrollback

Фото профиля Luke Parker
Luke Parker6 месяцев назад

Dude this is awesome

Фото профиля مُحَمَّد 🍉
مُحَمَّد 🍉6 месяцев назад

liked the footer much better than the existing one

Фото профиля Simon Klee
Simon Klee6 месяцев назад

Oh no, this is just my testbed in OpenTUI. @iamdavidhill does the design and it will be on brand 😉

Похожие видео

Got flash banged by OpenCode recently? Yeah, that was me. Here's what happened: OpenCode/OpenTUI detects terminal theme mode (light or dark) by querying OSC 10/11 for the terminal’s foreground/background colors and deriving the mode from those values. OpenTUI also enables DEC Private Mode 2031 to receive theme-change notifications. When that mode is enabled, terminals can send CSI 997 when the system theme changes. OpenTUI treated the 997 payload as authoritative and let it override the OSC 10/11-derived result. That turned out to be wrong. In some terminals, the 997 payload is simply unreliable: it can report light while the queried terminal colors clearly indicate a dark theme. That’s what caused the flash bangs. The fix seemed straightforward: stop trusting the 997 payload as the actual theme mode and use it only as a trigger to re-query OSC 10/11, then derive the mode from the returned foreground/background colors. That works great. Except OpenTUI had also started using OSC 11 to set the terminal’s default background color, so the terminal gutter around the drawn TUI matched the app background instead of the terminal’s own default background. This was introduced recently in OpenTUI. That created a new problem: if you use OSC 11 to override the terminal background, then later query OSC 11, you are just reading back your own override instead of the terminal’s real theme background. No problem. Reset the terminal background with OSC 111, query OSC 10/11, derive the mode, then restore the renderer background again. Oh wait. Turns out Ghostty has a bug. Once this background reset/override path is used, later OSC 11 background reporting can get stuck and stop tracking system theme changes correctly. Even though theme-change notifications still fire and OSC 10 foreground updates continue. This would cause further issues where the OSC 10/11 derivation would be wrong again. So for now: no using OSC 11 to set the terminal background color just to fill the gutter. TL;DR: OpenTUI must treat CSI 997 only as a hint that the terminal theme may have changed and rely exclusively on OSC 10/11 color queries for actual theme mode detection, while avoiding terminal background mutation via OSC 11/111 because that breaks correctness in some terminals like Ghostty.

kmdr

30,311 просмотров • 5 месяцев назад