-
Notifications
You must be signed in to change notification settings - Fork 453
feat(tea): add provisional support for customizing tea runtime options #914
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?
Conversation
094f3fe to
fa3704e
Compare
|
Hey, thanks for the input and for the PR! As a small note, we try to start things as discussions, so we can think about things from a cleaner slate. That being said, I believe this feature can be kind of hidden, probably only reading from env, e.g. I would also add a comment to where this is implemented (e.g. the
So, tl;dr on that:
Finally, if you don't mind me asking, what's the use case of that many gum instances in parallel? Without more info, it sounds like this could probably be its own app, but anyway, I'm curious :) Thank you! |
Just to confirm, is there a contribution guide I should follow? I’d like to avoid submitting another PR that doesn’t align with the project’s expectations
I'm working on a some sort of terminal multiplexer... that's about all I can say for now :P
Would you be interested in me updating the PR based on your suggestions? If so, I’ll go ahead. |
|
Ah, that's odd, it should be showing you this: https://github.com/charmbracelet/.github/blob/main/CONTRIBUTING.md Will look into it internally.
interesting... 🤔
sure, go for it :) |
|
Hey! I was thinking about two different ways to implement this and wanted to get your take. The first (and simpler) one is what I went with: just read The other option I considered was making those part of the main So yeah, wanted to check what you think. Stick with the current env-only approach? Or do you think it’s worth letting kong handle it, even if it means moving some things around? |
|
yes I would keep the env only only approach... we can always move it later if it makes sense. |
fa3704e to
8dd853c
Compare
Add `gumtea.Options` struct and `gumtea.NewProgram` wrapper to configure `tea.ProgramOptions` such as `WithFPS` and `WithAltScreen`. This enables tuning behavior across all tea-based gum commands. This change preserves defaults and is opt-in. Non-tea commands remain unaffected. Note: This is provisional and may be removed or replaced in future. Signed-off-by: Luis Gustavo S. Barreto <gustavosbarreto@gmail.com>
8dd853c to
477f76c
Compare
This adds support for changing some tea options (
WithFPSandWithAltScreen) via options for all tea-based gum commands.Context
I'm working on a TUI that spawns many gum instances in parallel, potentially hundreds, depending on the number of users. In this context, reducing FPS is essential because gum/tea default to 60fps, but we found 20fps gives a good balance between responsiveness and CPU usage.
We also needed to force alternate screen mode in some tea-based gum commands that don’t use it by default to improve integration in full window environments.