Skip to content

(v2) Bubble Tea v2 #1118

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

Draft
wants to merge 473 commits into
base: main
Choose a base branch
from
Draft

(v2) Bubble Tea v2 #1118

wants to merge 473 commits into from

Conversation

aymanbagabas
Copy link
Member

@aymanbagabas aymanbagabas commented Aug 28, 2024

This PR will keep track of the changes upcoming in Bubble Tea v2

  • Input sequence parser
  • Kitty keyboard
  • Xterm modifyOtherKeys
  • Mode 2027 (grapheme clustering)
  • Setting/getting terminal background/foreground/cursor colors
  • Setting/getting the clipboard using OSC52
  • Make Init() return the model
  • New Key/Mouse API (v2) Use KeyMsg/MouseMsg interfaces #1111

@aymanbagabas aymanbagabas changed the title V2 exp (v2) Bubble Tea API Aug 28, 2024
@aymanbagabas aymanbagabas added this to the v2.0.0 milestone Aug 29, 2024
@aymanbagabas aymanbagabas force-pushed the v2-exp branch 7 times, most recently from d2bffc5 to 84b68c5 Compare September 20, 2024 20:09
This was a hack to detect if the terminal supports keyboard
enhancements. It hardcoded a timeout of 100ms to wait for the keyboard
enhancements to be read from the terminal before sending an empty
message. This is wrong because it assumes a fixed timeout for all
terminals. While this is fine for now, we would never know if this
timeout works for all terminals or if it is too short for something like
an SSH session.

Thus, we remove this hack and let the program handle message detection.
A program can simply have a custom timeout message that gets fired after
a certain time after sending all the terminal query commands.
Copy link

@agca52 agca52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

andreynering and others added 13 commits May 30, 2025 17:22
This commit refactors the keyboard enhancements functionality by
splitting the `WithKeyboardEnhancements` function into three separate
functions:
- `WithKeyReleases`: Enables support for reporting key release events.
- `WithUniformKeyLayout`: Enables support for reporting key events in a
  uniform layout format.
- `RequestKeyDisambiguation`: Enables support for disambiguated key events.

This change improves clarity and usability by allowing users to enable
specific keyboard enhancements individually, rather than requiring them
to use a single function with multiple options.
* feat: create a panic trace file

When Bubble Tea panics, it is really useful to have a trace file that
contains the panic message and the stack trace. This does that exactly.

* feat: make panic trace optional via TEA_DEBUG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants