-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Textual TUI #2462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Textual TUI #2462
Conversation
This looks amazing! Very excited to see it land! |
Hi @willmcgugan, before we proceed, there's a few fundamental things I want to make sure we're aligned on.
![]() |
The default MacOS terminal is old, slow, and limited to 256 colors (which is why it looks bad). All other terminal support 16.7 million colors and have done for years. I could encourage you to switch to iTerm2, Kitty, wezterm, or Ghostty which are miles better and actively developed. It wouldn't be difficult to pick a default theme that looks better in 256 colors, and save it as a setting. Or you could wait for the forthcoming macOS Tahoe this year, which should finally have an update to the terminal.
I suspect you are alluding to it working the way Rich live works, by updating the scrollback buffer. Doing it that way is slow and prone to flicker. You also can't copy without also copying hard line breaks and other non-text characters. If you want a half decent UX then the TUI needs to use the "alternate buffer", which allows the app to manage the "screen".
ctrl+q to quit. You could add that to the footer.
macOS terminal doesn't support the copy to clipboard extension. Virtually all other terminals you can use ctrl+C to copy. |
You can use ansi colors (i.e. the color theme you set in your terminal), by setting |
This adds a Textual TUI for CLAI.
This has more or less feature parity with the existing TUI.
There is probably a little more work to do for error handling. And tools aren't yet implemented. Consider this a foundation to build upon.