fix(deps): update module github.com/charmbracelet/bubbletea to v2 #9

Open
renovate-bot wants to merge 1 commit from renovate/github.com-charmbracelet-bubbletea-2.x into main
Collaborator

This PR contains the following updates:

Package Change Age Confidence
github.com/charmbracelet/bubbletea v1.3.10 → v2.2.0 age confidence

⚠️ Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

charmbracelet/bubbletea (github.com/charmbracelet/bubbletea)

v2.2.0

Compare Source

Resume your programs

This new protocol for Rex came out 12 hours ago and…Bubble Tea supports it! ✌️

OSC 7577: Program Resume Protocol

Demo

Bubble Tea programs can now tell the terminal how to bring them back after it restarts. Set ProgramResume on your view with the command that restarts your program, and optionally the folder to run it in:

func (m model) View() tea.View {
	v := tea.NewView(m.render())
	if !m.quitting {
		v.ProgramResume = &tea.ProgramResume{
			Args: []string{m.exe, "--session", m.sessionID},
			Dir:  m.dir,
		}
	}
	return v
}

Put everything the program needs to pick up where it left off in the command, like a session ID or the path to a state file.

Detecting support

Terminals that support the protocol set OSC7577_TOKEN. Bubble Tea sends you a tea.EnvMsg at startup, so check for it there:

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {
	case tea.EnvMsg:
		m.canResume = msg.Getenv("OSC7577_TOKEN") != ""
	}
	return m, nil
}

You only need the tea.EnvMsg check if your app should act differently depending on support, for example to show "this session will survive a restart" or to skip saving resume state.

Read the spec for all the details.

Have a nice week,
Charm ⭐

Changelog

New!
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.3

Compare Source

Another bugfix release 🩹

A patch release full of stability fixes, mostly from our favorite contributors!

Security

Fixed a crash on malformed escape sequences. An ANSI sequence with more than 32 parameters (e.g. \x1b[1;1;1;…m) could panic the renderer with an index-out-of-range error. Any app that shows text it doesn't control, like logs, file contents, chat messages or LLM output, could be crashed by a single crafted line. If you render untrusted text, we recommend upgrading.

There are more fixes below 👇🏻

Have a nice week,
Charm ⭐

Changelog

Fixed
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.2

Compare Source

Calmer, cooler, sturdier 🧋

A patch release, but it's a good one! Idle Bubble Tea programs now really sit idle, the terminal gets restored after just about anything goes wrong, and a long list of renderer bugs is gone.

Rest light!

The renderer no longer redraws when there's nothing to draw. After about half a second without changes, the frame ticker stops, and it picks right back up the moment something does change. Views that are empty or taller than the screen also skip redraws when they haven't changed.

Restoring in many more cases!

Bubble Tea now cleans up properly when:

  • A command in Batch or Sequence panics
  • Run returns early with an error
  • RestoreTerminal swaps the input reader
  • Run finishes and the TTY files it opened for input need closing

And when you come back from suspending a program, Unicode mode comes back with it, so wide characters and emoji line up just like before!

Smoother rendering

  • Resizing the terminal no longer flashes a stale frame.
  • The view's height is right from the very first frame.
  • Lines printed above your view keep their exact width, and they're measured the same way as the rest of your program.
  • Running a subprocess with Exec clears your view first, so it doesn't leave a ghost behind.

Big thanks to everyone who contributed to this release, and especially to the many first-time contributors! 💘

Read more below! 👇🏻

Have a nice day,
Charm XX 🌟

Changelog

Fixed
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.1

Compare Source

Terminal size query vulnerability

This patch version fixes a vulnerability reported by @​Reload3d. You can find the details of the exploit here.

Best regards,
Charm XX 💫

Changelog

Fixed
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.0

Compare Source

Hello OSC 7501

The exciting news in this release is support for the brand new Program Status Protocol, otherwise known as OSC 7501, released just a few days ago. The protocol is designed to allow terminal applications to report what they're doing (e.g. idle, working, waiting on the user, finished, or failed) and why.

The obvious case for the design is AI agents, but are lots of other use cases for this, and we’re excited to see what you build with it.

It’s subtle, but here’s Crush in Superlogical’s Rex with the feature integrated (notice the dot in the first tab).

Bugfixes

Also, this release brings some very important fixes done by @​AdamMagued, @​simpleqt and @​GreedyC.

Cheers!
Charm 🌞

Changelog

New!
Fixed
Docs
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.10

Compare Source

Change to no input programs

This is a small change to programs with no WithInput. Removed capability queries, which resulted in leaking of raw ANSI escape sequences.

Changelog

Fixed
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.9

Compare Source

Small patches 🩹

Keybinds missing!

MouseButton11 and media record buttons were improperly handled, now fixed! (thanks to @​Ricardo-M-L and @​bunlongheng)

Weird UI artifacts with some terminals 👽

Sometimes, when switching between tabs in your terminal for example, the screen would not clear, now fixed!

... And some small corrections to docs!

Happy coding 🤖

Changelog

Fixed
Docs
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.8

Compare Source

Graphemes, schmraphemes

No terminal can render emojis perfectly, but we can try. This release improves some very specific edge cases around emoji rendering. Enjoy!

Changelog

  • db569ad: fix(deps): bump ultraviolet for emoji-related rendering improvements

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.7

Compare Source

A few lil’ stability patches

Hi! This is a patch release with a few solid improvements around stability and correctness.

  • @​lrstanley, one of our faves, fixed a race condition around mice in the Cursed Renderer
  • @​lawrence3699 fixed a panic that could happen when input's not available
  • We fixed a correctness issue with regard to mouse releases when Kitty Keyboard was active (thanks, @​mitchellh)

Thanks for using Bubble Tea, and if you see anything awry please do let us know!

—Charm 👋

Changelog

Fixed

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.6

Compare Source

This release fixes an issue with how Bubble Tea handled wide characters. Before, a wide character might be skipped or cause an infinite loop causing the CPU to spike. See fdcd0cf and charmbracelet/ultraviolet#109 for more details.


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.5

Compare Source

A small release to remove accidental unwanted debug log file. See 1ed724a and charmbracelet/ultraviolet@b516641 for details.


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.4

Compare Source

This release includes a small fix related to width calculation in x/ansi. See c788fe9 and charmbracelet/x@6921c75 for more details.


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.3

Compare Source

Extra Extra Extended Keyboard Enhancements!

This release adds support for the full set of Keyboard Enhancements. Now you can enable any enhancements on top of the default disambiguate one.

func (m model) View() tea.View {
  var v tea.View
  v.KeyboardEnhancements.ReportAlternateKeys = true
  v.KeyboardEnhancements.ReportAllKeysAsEscapeCodes = true
  return v
}

Smarter Renderer

We also fixed a few renderer related bugs and made the Cursed Renderer smarter. Now, we always reset the terminal tab stops for the Bubble Tea program process context. People using tabs -N in their shell profiles shouldn't be affected.

See the full changelog below.

Changelog

New!
Fixed
Docs
Other stuff

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.2

Compare Source

This release contains a small patch fixing a rendering that might affect Wish users running on Unix platforms.

Changelog

Fixed

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.1

Compare Source

A small patch release to fix opening the proper default stdin file for input.

Changelog

Fixed
Docs

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.0

Compare Source

bubbletea-v2-block

What's New in Bubble Tea v2

We're very excited to announce the second major release of Bubble Tea!

If you (or your LLM) are just looking for technical details on on migrating from v1, please check out the Upgrade Guide.

[!NOTE]
We don't take API changes lightly and strive to make the upgrade process as simple as possible. We believe the changes bring necessary improvements as well as pave the way for the future. If something feels way off, let us know.

❤️ Charm Land Import Path

We've updated our import paths to use vanity domains and use our domain to import Go packages.

// Before
import tea "github.com/charmbracelet/bubbletea"

// After
import tea "charm.land/bubbletea/v2"

Everything else stays the same 🙂

👾 The Cursed Renderer

Bubble Tea v2 ships with the all-new Cursed Renderer which was built from the ground up. It's based on the ncurses rendering algorithm and is highly optimized for speed, efficiency, and accuracy and is built on an enormous amount of research and development.

Optimized renders also means that Wish users get big performance benefits and lower bandwidth usage by orders of magnitude.

To take advantage of the new Cursed Renderer you don't need to do anything at all except keep on using the Bubble Tea you know and love.

✌️ Key handling is way better now

Newer terminals can now take advantage of all sorts keyboard input via progressive keyboard enhancements. You can now map all sorts of keys and modifiers like shift+enter and super+space. You can also detect key releases (we're looking at you, game developers).

It's easy to detect support for supporting terminals and add fallbacks for those that don't. For details, see keyboard enhancements below.

🥊 No more fighting

In the past, Bubble Tea and Lip Gloss would often fight over i/o. Bubble Tea wanted to read keyboard input and Lip Gloss wanted to query for the background color. This means that things could get messy. Not anymore! In v2, Lip Gloss is now pure, which means, Bubble Tea manages i/o and gives orders to Lip Gloss. In short, we only need one lib to call the shots, and in the context of this relationship, that lib is Bubble Tea.

But what about color downsampling? That's a great question.

👨🏻‍🎨 Built-in Color Downsampling

We sneakily released a little library called colorprofile that will detect the terminal's color profile and auto-downsample any ANSI styling that flows through it to the best available color profile. This means that color will "just work" (and not misbehave) no matter where the ANSI styling comes from.

Downsampling is built-into Bubble Tea and is automatically enabled.

🧘 Declarative, Not Imperative

This is a big one. In v1, you'd toggle terminal features on and off with commands like tea.EnterAltScreen, tea.EnableMouseCellMotion, tea.EnableReportFocus, and so on. In v2, all of that is gone and replaced by fields on the View struct. You just declare what you want your view to look like and Bubble Tea takes care of the rest.

This means no more fighting over startup options and commands. Just set the fields and forget about it. For example, to enter full screen mode:

func (m Model) View() tea.View {
    v := tea.NewView("Hello, full screen!")
    v.AltScreen = true
    return v
}

The same goes for mouse mode, bracketed paste, focus reporting, window title, keyboard enhancements, and more. See A Declarative View below for the full picture.

Keyboard Enhancements

Progressive keyboard enhancements allow you to receive key events not normally possible in traditional terminals. For example, you can now listen for the ctrl+m key, as well as previously unavailable key combinations like shift+enter.

Bubble Tea v2 will always try to enable basic keyboard enhancements that disambiguate keys. If your terminal supports it, your program will receive a tea.KeyboardEnhancementsMsg message that indicates support for requested features.

func (m Model) View() tea.View {
    var v tea.View
    // ...
    v.KeyboardEnhancements.ReportEventTypes = true           // Enable key release events
    return v
}

Historically, certain key combinations in terminals map to control codes. For example, ctrl+h outputs a backspace by default, which means you can't normally bind a key event to ctrl+h. With key disambiguation, you can now actually bind events to those key combinations.

You can detect if a terminal supports keyboard enhancements by listening for tea.KeyboardEnhancementsMsg.

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.KeyboardEnhancementsMsg:
        if msg.SupportsKeyDisambiguation() {
            // More keys, please!
        }
    }
}
Which terminals support progressive enhancement?

Key Messages

Key messages are now split into tea.KeyPressMsg and tea.KeyReleaseMsg. Use tea.KeyMsg to match against both. We've also replaced key.Type and key.Runes with key.Code and key.Text. Modifiers live in key.Mod now instead of being separate booleans. Oh, and space bar returns "space" instead of " ".

The easiest way to match against key press events is to use msg.String():

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.KeyPressMsg:
        switch msg.String() {
        case "space":
            // Space bar returns "space" now :D
            return m, tea.Println("You pressed the space bar!")
        case "ctrl+c":
            return m, tea.SetClipboard("Howdy")
        case "shift+enter":
            // Awesome, right?
        case "ctrl+alt+super+enter":
            // Yes, you can do that now!
        }
    }
}

The Key struct also has some nice new fields:

  • key.BaseCode — the key according to a standard US PC-101 layout. Handy for international keyboards where the physical key might differ.
  • key.IsRepeat — tells you if the key is being held down and auto-repeating. Only available with the Kitty Keyboard Protocol or Windows Console API.
  • key.Keystroke() — a new method that returns the keystroke representation (e.g., "ctrl+shift+alt+a"). Unlike String(), it always includes modifier info.

For the full list of changes and before/after code samples, see the Upgrade Guide.

Paste Messages

Paste events used to arrive as tea.KeyMsg with a confusing msg.Paste flag. Now they're their own thing:

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.PasteMsg:
        // Here comes a paste!
        m.text += msg.Content
    case tea.PasteStartMsg:
        // The user started pasting.
    case tea.PasteEndMsg:
        // The user stopped pasting.
    }
}

Mouse Messages

We've improved the mouse API. Mouse messages are now split into tea.MouseClickMsg, tea.MouseReleaseMsg, tea.MouseWheelMsg, and tea.MouseMotionMsg. And mouse mode is set declaratively in your View():

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.MouseClickMsg:
        if msg.Button == tea.MouseLeft {
            // Clickety click
        }
    case tea.MouseWheelMsg:
        // Scroll, scroll, scrollllll
    }
    return m, nil
}

func (m model) View() tea.View {
    v := tea.NewView("Move that mouse around!")
    v.MouseMode = tea.MouseModeAllMotion // or tea.MouseModeCellMotion
    return v
}

A Declarative View

In v1, View() returned a string. In v2, it returns a tea.View struct that lets you declare everything about your view — content, cursor, alt screen, mouse mode, colors, window title, progress bar, and more:

type View struct {
	Content                   string
	OnMouse                   func(msg MouseMsg) Cmd
	Cursor                    *Cursor
	BackgroundColor           color.Color
	ForegroundColor           color.Color
	WindowTitle               string
	ProgressBar               *ProgressBar
	AltScreen                 bool
	ReportFocus               bool
	DisableBracketedPasteMode bool
	MouseMode                 MouseMode
	KeyboardEnhancements      KeyboardEnhancements
}

No more fighting over options and commands! Just set the fields:

func (m Model) View() tea.View {
  v := tea.NewView(fmt.Sprintf("Hello, world!"))
  v.AltScreen = true
  v.MouseMode = tea.MouseModeCellMotion
  v.ReportFocus = true
  v.WindowTitle = "My Awesome App"
  return v
}

An Actual Cursor

You can now control the cursor position, color, and shape right from your view function. Want it hidden? Just set view.Cursor = nil.

func (m Model) View() tea.View {
	var v tea.View
	if m.showCursor {
		v.Cursor = &tea.Cursor{
			Position: tea.Position{
				X: 14, // At the 14th column
				Y: 0,  // On the first row
			},
			Shape: tea.CursorBlock, // Just give me a block cursor '█'
			Blink: true,            // Blink baby, blink!
			Color: lipgloss.Green,  // Green cursor, because why not?
		}
	}
	v.SetContent(fmt.Sprintf("Hello, world!"))
	return v
}

You can also use tea.NewCursor(x, y) for a quick block cursor with default settings.

Progress Bar Support

Now you can ask Bubble Tea to render a native progress bar for your application. Just set the view.ProgressBar field and Bubble Tea will take care of the rest.

func (m Model) View() tea.View {
    var v tea.View
    v.SetContent("Downloading...")
    v.ProgressBar = tea.NewProgressBar(tea.ProgressBarDefault, m.downloadProgress)
    return v
}

Synchronized Updates (Mode 2026)

Bubble Tea will try and use mode 2026 to push updates to the terminal. This mode helps reduce tearing and cursor flickering by atomically updating the terminal window once all the update sequences are pushed out and read by the terminal. This is enabled by default and there's nothing you need to do.

Better Terminal Unicode Support (mode 2027)

Now Bubble Tea will automatically enable mode 2027
on terminals that support it. This mode allows the terminal to properly handle wide Unicode
characters and emojis without breaking the layout of your app. Again, this is
enabled by default and there's nothing you need to do.

Native Clipboard Support

Bubble Tea now supports native clipboard operations, also known as OSC52. This means you can even copy and paste over SSH!

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.KeyPressMsg:
        switch msg.String() {
        case "ctrl+c":
            return m, tea.SetClipboard("Howdy")
        case "ctrl+v":
            return m, tea.ReadClipboard()
        }
    case tea.ClipboardMsg:
        fmt.Printf("Clipboard contents: %s\n", msg.String())
    }
}

X11 and Wayland users can also use tea.SetPrimaryClipboard to set the primary clipboard. Note that this is a very niche sort of thing and may or may not work on macOS, Windows, and other platforms without the notion of more than one clipboard.

Terminal Colors

You can now read and set the terminal's foreground, background, and cursor colors. To change them, set view.ForegroundColor, view.BackgroundColor, and view.Cursor.Color in your View() function.

func (m Model) Init() tea.Cmd {
    return tea.Batch(
        tea.RequestForegroundColor,
        tea.RequestBackgroundColor,
        tea.RequestCursorColor,
    )
}

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.BackgroundColorMsg:
        return m, tea.Printf("Background color: %s\n", msg)
    case tea.ForegroundColorMsg:
        return m, tea.Printf("Foreground color: %s\n", msg)
    case tea.CursorColorMsg:
        return m, tea.Printf("Cursor color: %s\n", msg)
    case tea.KeyPressMsg:
        switch msg.String() {
        case "enter":
            m.fg, m.bg, m.cursor = ansi.Red, ansi.Green, ansi.Blue
        case "esc":
            return m, tea.Quit
        }
    }
    return m, nil
}

func (m Model) View() tea.View {
    var v tea.View
    v.SetContent("\nPress Enter to change terminal colors, Esc to quit.")
    v.ForegroundColor = m.fg
    v.BackgroundColor = m.bg
    if m.cursor != nil {
        v.Cursor = tea.NewCursor(0, 1)
        v.Cursor.Color = m.cursor
    }
    return v
}

🌍 Environment Variables

Bubble Tea now sends you a tea.EnvMsg at startup with the environment variables. This is especially handy for SSH apps where os.Getenv would give you the server's environment, not the client's.

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.EnvMsg:
        m.term = msg.Getenv("TERM") // the client's TERM, not the server's!
    }
    return m, nil
}

🔮 Raw Escape Sequences

For the power users out there, you can now send raw escape sequences directly to the terminal with tea.Raw. This is great for querying terminal capabilities or doing things Bubble Tea doesn't have a built-in for (yet).

return m, tea.Raw(ansi.RequestPrimaryDeviceAttributes)

Responses from the terminal will come back as messages in Update. Just be sure you know what you're doing — with great power comes great terminal weirdness.

📍 Cursor Position Queries

Need to know where the cursor is? Now you can ask.

func (m model) Init() tea.Cmd {
    return tea.RequestCursorPosition
}

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.CursorPositionMsg:
        m.cursorX, m.cursorY = msg.X, msg.Y
    }
    return m, nil
}

📊 Terminal Mode Reports

You can query whether the terminal supports specific modes (like focus events or synchronized output) using DECRPM mode reports. Send a raw DECRQM request and listen for tea.ModeReportMsg.

func (m model) Init() tea.Cmd {
    return tea.Raw(ansi.RequestModeFocusEvent)
}

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.ModeReportMsg:
        if msg.Mode == ansi.ModeFocusEvent && !msg.Value.IsNotRecognized() {
            m.supportsFocus = true
        }
    }
    return m, nil
}

Terminal Version and Name

Don't know what terminal you're running in? $TERM is too vague? Bubble Tea now has a tea.RequestTerminalVersion command that queries the terminal for its name and version using the XTVERSION escape sequence.

[!NOTE]
This feature is not supported by all terminals.

func (m Model) Init() tea.Cmd {
    return tea.RequestTerminalVersion
}

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.TerminalVersionMsg:
        fmt.Printf("Terminal: %s\n", string(msg))
    }
}

Terminfo and Termcap Capabilities

Sometimes you need to know what capabilities the terminal has. Bubble Tea now has a tea.RequestCapability command that queries the terminal for a specific terminfo/termcap capability.

[!NOTE]
This feature is not supported by all terminals.

func (m Model) Init() tea.Cmd {
    return tea.RequestCapability("RGB") // RGB is the terminfo capability for direct colors
}

Detecting the Color Profile

Need to use the detected color profile in your app? Listen to tea.ColorProfileMsg in Update:

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    switch msg := msg.(type) {
    case tea.ColorProfileMsg:
        m.colorProfile = msg.Profile // gottem!
    }
    return m, nil
}

Manually Applying a Color Profile

Want to manually set a color profile for testing? Now you can, on the program level.

import (
    tea "charm.land/bubbletea/v2"
    "github.com/charmbracelet/colorprofile"
)

p := colorprofile.TrueColor // i love colors. lets' use 16,777,216 of 'em
p = colorprofile.ANSI256    // jk, 256 colors are plenty
p = colorprofile.ANSI       // actually let's juse use 16 colors
p = colorprofile.Ascii      // nm, no colors, but keep things like bold, italics, etc.
p = colorprofile.NoTTY      // lol actually strip all ANSI sequences

prog := tea.NewProgram(model, tea.WithColorProfile(p))

Want to hard detect the color profile in Wish? We bet you do.

func main() {
    var s ssh.Session
    pty, _, _ := s.Pty()

    // Get the environment...
    envs := append(s.Environ(), "TERM="+pty.Term)

    // ...and give it to Bubble Tea so it can detect the color profile.
    opt := tea.WithEnvironment(envs)

    p := tea.NewProgram(model,
        tea.WithInput(pty.Slave),
        tea.WithOutput(pty.Slave),
        opt, // wow
    )
}

🪟 Window Size for Testing

When running tests or in non-interactive environments, you can now set the initial terminal size:

p := tea.NewProgram(model, tea.WithWindowSize(80, 24))

No more mocking terminals just to run your tests. Nice!

Use the Terminal's TTY

Sometimes your program will write to stdout while it's being piped or
redirected. In these cases, you might want to write directly to the terminal's
TTY instead of stdout because stdout might not be a terminal. Or your program
expects to read from stdin but stdin is being piped from another program.

In Bubble Tea v1, there wasn't a good way to do this. In the latter case, you
could use the WithInputTTY() option to read from the terminal's TTY instead
of stdin. However, there was no easy way to write to the terminal's TTY instead
of stdout without fiddling with file descriptors.

In Bubble Tea v2, you can now simply use the global OpenTTY() to open the
terminal's TTY for reading and writing. You can then pass the TTY file handles
to the WithInput() and WithOutput() options.

Note that Bubble Tea v2 will always use the TTY for input when input is not specified
via WithInput(...).

ttyIn, ttyOut, err := tea.OpenTTY()
if err != nil {
    log.Fatal(err)
}

p := tea.NewProgram(model,
    tea.WithInput(ttyIn),
    tea.WithOutput(ttyOut),
)

Changelog

New!
  • 742b944f78af9b62e774a98855cb324dfe3313be: feat(render): enable Unicode mode (2027) for accurate width calculation (#​1584) (@​aymanbagabas)
  • 724479d6d5be45005d5a405e3cb6c0b6e8b1fd0e: feat(renderer): add modifyOtherKeys support (#​1579) (@​erikstmartin)
  • 1f48289368a38a670c6cb47929a4e33a2e7d5c1b: feat(renderer): enable both modifyOtherKeys 1 and 2 (@​aymanbagabas)
  • 0b472523eae41c772236ceab8531878f20972e31: feat: add view callback support (@​aymanbagabas)
Fixed
  • 323a3936e4b5f8c08aa638ca2917097c7c58bdeb: fix(ci): use local golangci-lint config (@​aymanbagabas)
  • b65daeb9d46142d2f428303eb77de3d3b65c2956: fix(examples): capability make sure input is focused on start (@​aymanbagabas)
  • 76f2e6d81219acce9d8eccb61845d20a77216cf1: fix(render): always assume raw mode for terminal output (@​aymanbagabas)
  • 61a3f5ccf812adb44eb1d62a2a3032af52fe4330: fix(render): execute insert above immediately (#​1576) (@​aymanbagabas)
  • fdb86513b5e15c6d4a7886221aa2e452738c0e57: fix(renderer): always move cursor to bottom on close (@​aymanbagabas)
  • 819e2e89c62ee26dc01a81546f099e633ab3c704: fix(renderer): flush after moving cursor on close (@​aymanbagabas)
  • fb790535cc28bec18b58c9947d46cb39515a0a74: fix(renderer): make sure we don't skip prepended lines on no-op frames (@​aymanbagabas)
  • 99c33bc3007094d114b7b5e412be03fae71728f8: fix(renderer): move cursor to bottom before disabling alt screen (@​aymanbagabas)
  • 6595041da277654876da2e5458eeed687ba4687c: fix(renderer): no need to enable both modifyOtherKeys protocols (@​aymanbagabas)
  • 59807cf07c8fd071cb252d2319604b22c711dd29: fix(renderer): reset kitty keyboard protocol on alt screen switch (#​1554) (@​aymanbagabas)
  • 2a0096c500a7ee38a5f244f6a80a1d50e6a76014: fix(renderer): restore state when restarting cursed renderer (#​1553) (@​aymanbagabas)
  • 1ff0a470e0d938dc6e8a1b3c659f98a73d042df8: fix(tea): don't query for synchronized output if the renderer is disabled (@​aymanbagabas)
  • ec0d820c3439f58cc92d4461edfc9fd8482f34de: fix(tea): only send actual mouse events to renderer on mouse callback (@​aymanbagabas)
  • b3661ce3d63f003545323b721212562c28647e0f: fix: always open the TTY for input (@​aymanbagabas)
  • ba8f60582376c0b45a93c0277de1949325cbca9c: fix: go.mod and go.sum to use lipgloss v2 (@​aymanbagabas)
  • faa0b9c36ba2d2ed00d8b9e16b8ff61bd7f28e0b: fix: lint issues (@​aymanbagabas)
Docs
  • fd7b0071c582d18d7e059c81d17fda03804ccade: docs(readme): add note about v2 upgrade guide (@​meowgorithm)
  • 07a69fbcf1e3649a797a929d724f94170d6affc3: docs(readme): update bubbles callout image (@​meowgorithm)
  • 3499dac84886f5a54f7ccfc7f3446a361bf2da2e: docs(readme): update header image (@​meowgorithm)
  • ceab368db0d8fe42f8beac3c28bc14f6d95a34d2: docs(readme): updates for v2 (#​1589) (@​aymanbagabas)
  • 59ca08b21ca50c466cba0af717158df20aef5043: docs: add v2 upgrade and changes guide (#​1585) (@​aymanbagabas)
  • 46b608f1528a7a8f51e2ba767c884acfa75c0269: docs: update OnMouse callback to use msg parameter (@​aymanbagabas)
  • 105959b37b4f80600cff83b67187a266cbd5b0be: docs: update mascot header image with a cleaner one (@​aymanbagabas)
  • 5a41615aa4ff78da82ca901b540c3202fa810df3: docs: view cursor api typo (#​1557) (@​bountis)
Other stuff
  • 764923436993564e6e31ae39746e8eaf0e7ad5e6: ci: sync dependabot config (#​1505) (@​charmcli)
  • d1cf96d0d3c9119e422383c2993705fd148cdd86: refactor: limit view callback to onMouse for mouse events (@​aymanbagabas)
  • 14519253d503b2782910f5527f35f08cda5df5de: refactor: omit unnecessary reassignment (#​1515) (@​goldlinker)
  • ece00b4f40c5863709daa28786d0887560811fa5: refactor: remove unused max func (#​1537) (@​sunnyraindy)

🌈 More on Bubble Tea v2

Ready to migrate? Head over to the Upgrade Guide for the full migration checklist.

Feedback

Have thoughts on Bubble Tea v2? We'd love to hear about it. Let us know on…


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) | `v1.3.10` → `v2.2.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcharmbracelet%2fbubbletea/v2.2.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcharmbracelet%2fbubbletea/v1.3.10/v2.2.0?slim=true) | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/3) for more information. --- ### Release Notes <details> <summary>charmbracelet/bubbletea (github.com/charmbracelet/bubbletea)</summary> ### [`v2.2.0`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.2.0) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.1.3...v2.2.0) ### Resume your programs This new protocol for Rex came out 12 hours ago and…Bubble Tea supports it! ✌️ #### OSC 7577: Program Resume Protocol <p><img width="800" alt="Demo" src="https://github.com/user-attachments/assets/6e6facd0-f88b-4e72-a087-89ce04454e1f" /></p> Bubble Tea programs can now tell the terminal how to bring them back after it restarts. Set `ProgramResume` on your view with the command that restarts your program, and optionally the folder to run it in: ```go func (m model) View() tea.View { v := tea.NewView(m.render()) if !m.quitting { v.ProgramResume = &tea.ProgramResume{ Args: []string{m.exe, "--session", m.sessionID}, Dir: m.dir, } } return v } ``` Put everything the program needs to pick up where it left off in the command, like a session ID or the path to a state file. ##### Detecting support Terminals that support the protocol set `OSC7577_TOKEN`. Bubble Tea sends you a `tea.EnvMsg` at startup, so check for it there: ```go func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.EnvMsg: m.canResume = msg.Getenv("OSC7577_TOKEN") != "" } return m, nil } ``` You only need the `tea.EnvMsg` check if your app should act differently depending on support, for example to show "this session will survive a restart" or to skip saving resume state. Read the [spec](https://www.superlogical.com/rex/docs/build/program-resume) for all the details. Have a nice week, Charm ⭐ #### Changelog ##### New! - [`bb45cb6`](https://github.com/charmbracelet/bubbletea/commit/bb45cb61b7642babc469c8e21950d2a0ec1e11a2): feat: program resume protocol (OSC 7577) ([#&#8203;1908](https://github.com/charmbracelet/bubbletea/issues/1908)) ([@&#8203;andrinoff](https://github.com/andrinoff)) ##### Other stuff - [`f510168`](https://github.com/charmbracelet/bubbletea/commit/f510168f189558d57c36ea990c4509c7ba9778f1): v2.2.0 ([@&#8203;andrinoff](https://github.com/andrinoff)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.1.3`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.1.3) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.1.2...v2.1.3) ### Another bugfix release 🩹 A patch release full of stability fixes, mostly from our favorite contributors! #### Security Fixed a crash on malformed escape sequences. An ANSI sequence with more than 32 parameters (e.g. `\x1b[1;1;1;…m`) could panic the renderer with an index-out-of-range error. Any app that shows text it doesn't control, like logs, file contents, chat messages or LLM output, could be crashed by a single crafted line. If you render untrusted text, we recommend upgrading. There are more fixes below 👇🏻 Have a nice week, Charm ⭐ #### Changelog ##### Fixed - [`b681f23`](https://github.com/charmbracelet/bubbletea/commit/b681f235592084b01a4cb2d21847a767970627b8): fix(renderer): flush queued view before insert above ([#&#8203;1741](https://github.com/charmbracelet/bubbletea/issues/1741)) ([@&#8203;yanmxa](https://github.com/yanmxa)) - [`7ab4335`](https://github.com/charmbracelet/bubbletea/commit/7ab4335dac96d99bd8970191c97692cd8ec406f6): fix: don't panic on uncomparable color.Color values ([#&#8203;1852](https://github.com/charmbracelet/bubbletea/issues/1852)) ([@&#8203;drawmeanelephant](https://github.com/drawmeanelephant)) - [`585149e`](https://github.com/charmbracelet/bubbletea/commit/585149e50e7c3f1002db5d0fc3912c44bbc6ef92): fix: drain terminal query replies before releasing the terminal ([#&#8203;1894](https://github.com/charmbracelet/bubbletea/issues/1894)) ([@&#8203;andrinoff](https://github.com/andrinoff)) - [`7dd9c4c`](https://github.com/charmbracelet/bubbletea/commit/7dd9c4c46ecca90a13e2967f21bc4aeb4d8c4227): fix: keep signal subscription alive through shutdown ([#&#8203;1853](https://github.com/charmbracelet/bubbletea/issues/1853)) ([@&#8203;drawmeanelephant](https://github.com/drawmeanelephant)) - [`9c65983`](https://github.com/charmbracelet/bubbletea/commit/9c6598361dc9d09f6116f0c67d5de781bfe36a16): fix: return write errors from Program.Run ([#&#8203;1879](https://github.com/charmbracelet/bubbletea/issues/1879)) ([@&#8203;janearc](https://github.com/janearc)) - [`bc55190`](https://github.com/charmbracelet/bubbletea/commit/bc551904811cbbaf4954988a3757abde2633f41c): fix: synchronize canceled input cleanup ([#&#8203;1876](https://github.com/charmbracelet/bubbletea/issues/1876)) ([@&#8203;johnnychen94](https://github.com/johnnychen94)) ##### Other stuff - [`4d61172`](https://github.com/charmbracelet/bubbletea/commit/4d611720dd2bb4036932f29519d519fb4ce8af41): v2.1.3 ([@&#8203;andrinoff](https://github.com/andrinoff)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.1.2`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.1.2) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.1.1...v2.1.2) ### Calmer, cooler, sturdier 🧋 A patch release, but it's a good one! Idle Bubble Tea programs now really sit idle, the terminal gets restored after just about anything goes wrong, and a long list of renderer bugs is gone. #### Rest light! The renderer no longer redraws when there's nothing to draw. After about half a second without changes, the frame ticker stops, and it picks right back up the moment something does change. Views that are empty or taller than the screen also skip redraws when they haven't changed. #### Restoring in many more cases! Bubble Tea now cleans up properly when: - A command in `Batch` or `Sequence` panics - `Run` returns early with an error - `RestoreTerminal` swaps the input reader - `Run` finishes and the TTY files it opened for input need closing And when you come back from suspending a program, Unicode mode comes back with it, so wide characters and emoji line up just like before! #### Smoother rendering - Resizing the terminal no longer flashes a stale frame. - The view's height is right from the very first frame. - Lines printed above your view keep their exact width, and they're measured the same way as the rest of your program. - Running a subprocess with `Exec` clears your view first, so it doesn't leave a ghost behind. Big thanks to everyone who contributed to this release, and especially to the many first-time contributors! 💘 Read more below! 👇🏻 Have a nice day, Charm XX 🌟 #### Changelog ##### Fixed - [`9806b0c`](https://github.com/charmbracelet/bubbletea/commit/9806b0c763fb391cc2c4ffbb3aa243b901a812ef): fix(exec): clear View before releasing terminal for subprocess ([#&#8203;1762](https://github.com/charmbracelet/bubbletea/issues/1762)) ([@&#8203;zhaoxinyi02](https://github.com/zhaoxinyi02)) - [`418cada`](https://github.com/charmbracelet/bubbletea/commit/418cada8885b84de11160f103534a5bba0fd2d5d): fix(logging): preserve Unicode prefix spacing ([#&#8203;1759](https://github.com/charmbracelet/bubbletea/issues/1759)) ([@&#8203;Ricardo-M-L](https://github.com/Ricardo-M-L)) - [`94d45c8`](https://github.com/charmbracelet/bubbletea/commit/94d45c807dde21d7e46d14f3916ff4e3fac437f8): fix(renderer): prevent emitting stale frame on resize ([#&#8203;1856](https://github.com/charmbracelet/bubbletea/issues/1856)) ([@&#8203;Guurdeep](https://github.com/Guurdeep)) - [`4853fda`](https://github.com/charmbracelet/bubbletea/commit/4853fdaaa066e5d2fe0f93de543020eddd660e18): fix(renderer): skip redraws when empty or tall views haven't changed ([#&#8203;1897](https://github.com/charmbracelet/bubbletea/issues/1897)) ([@&#8203;janearc](https://github.com/janearc)) - [`6b30ecf`](https://github.com/charmbracelet/bubbletea/commit/6b30ecf3280d88d949dcc916bb91fc5e9d56f667): fix(renderer): use view height before first flush ([#&#8203;1766](https://github.com/charmbracelet/bubbletea/issues/1766)) ([@&#8203;fzlzjerry](https://github.com/fzlzjerry)) - [`55ba0f6`](https://github.com/charmbracelet/bubbletea/commit/55ba0f6de3ba6348597360690c008f7528d5813f): fix: allow Program.Run to be called again after the program exits ([#&#8203;1890](https://github.com/charmbracelet/bubbletea/issues/1890)) ([@&#8203;simpleqt](https://github.com/simpleqt)) - [`7a446b7`](https://github.com/charmbracelet/bubbletea/commit/7a446b73f6f1cae03a91160e97e040bce334beba): fix: avoid blocking prints after program exit ([#&#8203;1758](https://github.com/charmbracelet/bubbletea/issues/1758)) ([@&#8203;Ricardo-M-L](https://github.com/Ricardo-M-L)) - [`1b8005f`](https://github.com/charmbracelet/bubbletea/commit/1b8005fc10b235970f0414788339b18bcb6d6885): fix: avoid terminal wait without input ([#&#8203;1829](https://github.com/charmbracelet/bubbletea/issues/1829)) ([@&#8203;lowgame](https://github.com/lowgame)) - [`13fb42d`](https://github.com/charmbracelet/bubbletea/commit/13fb42d8ea1ac91e7eec2bd6717922802c1a0f48): fix: close the TTY files opened for input when Run returns ([#&#8203;1855](https://github.com/charmbracelet/bubbletea/issues/1855)) ([@&#8203;drawmeanelephant](https://github.com/drawmeanelephant)) - [`56a2fe7`](https://github.com/charmbracelet/bubbletea/commit/56a2fe7fed8ae475f315da0491fe4ce0c03b7041): fix: close the replaced cancel reader on RestoreTerminal ([#&#8203;1821](https://github.com/charmbracelet/bubbletea/issues/1821)) ([@&#8203;drmzperx](https://github.com/drmzperx)) - [`18d6fa3`](https://github.com/charmbracelet/bubbletea/commit/18d6fa3b34c84f3b773cd307a5d7b0a56b12c72a): fix: close trace file after program run ([#&#8203;1844](https://github.com/charmbracelet/bubbletea/issues/1844)) ([@&#8203;lowgame](https://github.com/lowgame)) - [`5982a61`](https://github.com/charmbracelet/bubbletea/commit/5982a61ef5e5d078255b2a67c45fd182ff54ec3c): fix: data race with Kill() and Run() ([#&#8203;1774](https://github.com/charmbracelet/bubbletea/issues/1774)) ([@&#8203;andrinoff](https://github.com/andrinoff)) - [`f3d74b7`](https://github.com/charmbracelet/bubbletea/commit/f3d74b724c7d8f2dc5a9d272f12e4942daaa1817): fix: ensure terminal state is restored after panics in Batch/Sequence commands ([#&#8203;1818](https://github.com/charmbracelet/bubbletea/issues/1818)) ([@&#8203;dajiaohuang](https://github.com/dajiaohuang)) - [`b9e7454`](https://github.com/charmbracelet/bubbletea/commit/b9e7454fd49640ed1eac9c29dc59d2ec86463ae2): fix: make Quit a no-op before Run starts ([#&#8203;1840](https://github.com/charmbracelet/bubbletea/issues/1840)) ([@&#8203;tianrking](https://github.com/tianrking)) - [`df137de`](https://github.com/charmbracelet/bubbletea/commit/df137dee9a2e6fc009cd2d837d0b0dae68b23c0e): fix: measure insertAbove lines with the active width method ([#&#8203;1861](https://github.com/charmbracelet/bubbletea/issues/1861)) ([@&#8203;Sanjays2402](https://github.com/Sanjays2402)) - [`bd09ae6`](https://github.com/charmbracelet/bubbletea/commit/bd09ae6834335499ac8422be16ff4215050ca94e): fix: preserve exact-width lines printed above the view ([#&#8203;1888](https://github.com/charmbracelet/bubbletea/issues/1888)) ([@&#8203;imharjot](https://github.com/imharjot)) - [`12b7b4d`](https://github.com/charmbracelet/bubbletea/commit/12b7b4d0eb0874e0f63d949ac33fd2d9022baa77): fix: restore terminal state on Run error paths ([#&#8203;1854](https://github.com/charmbracelet/bubbletea/issues/1854)) ([@&#8203;drawmeanelephant](https://github.com/drawmeanelephant)) - [`8675fd8`](https://github.com/charmbracelet/bubbletea/commit/8675fd8a858d4d82766509eb1aaffcd80085881b): fix: restore unicode mode on resume ([#&#8203;1896](https://github.com/charmbracelet/bubbletea/issues/1896)) ([@&#8203;janearc](https://github.com/janearc)) ##### Other stuff - [`73b79b3`](https://github.com/charmbracelet/bubbletea/commit/73b79b3737b9a68c76f3f2e6c49bf1bae327ee96): Provide the platform input/signal stubs on wasip1/wasip2 ([#&#8203;1767](https://github.com/charmbracelet/bubbletea/issues/1767)) ([@&#8203;calvinrp](https://github.com/calvinrp)) - [`e4d617e`](https://github.com/charmbracelet/bubbletea/commit/e4d617e7e0c0dd595cc553a856236221c678470f): perf(renderer): stop the frame ticker while nothing changes ([#&#8203;1832](https://github.com/charmbracelet/bubbletea/issues/1832)) ([@&#8203;viktordanov](https://github.com/viktordanov)) - [`38ddf5f`](https://github.com/charmbracelet/bubbletea/commit/38ddf5f58cfb4d14bfe607bcac5af502ab9ed6d6): v2.1.2 ([@&#8203;andrinoff](https://github.com/andrinoff)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.1.1`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.1.1) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.1.0...v2.1.1) ### Terminal size query vulnerability This patch version fixes a vulnerability reported by [@&#8203;Reload3d](https://github.com/Reload3d). You can find the details of the exploit [here](https://github.com/charmbracelet/bubbletea/security/advisories/GHSA-qc58-pfg9-7pph). Best regards, Charm XX 💫 #### Changelog ##### Fixed - [`9c6c325`](https://github.com/charmbracelet/bubbletea/commit/9c6c325f83348ee7215fb7a7aca3bc6316217056): fix: ingnore implausible terminal resize reports ([#&#8203;1887](https://github.com/charmbracelet/bubbletea/issues/1887)) ([@&#8203;andrinoff](https://github.com/andrinoff)) ##### Other stuff - [`67b4c7a`](https://github.com/charmbracelet/bubbletea/commit/67b4c7a8a2b34a0b1ce15261b0c705bc7e1a04b7): v2.1.1 ([@&#8203;andrinoff](https://github.com/andrinoff)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.1.0`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.1.0) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.10...v2.1.0) ### Hello OSC 7501 The exciting news in this release is support for the brand new [Program Status Protocol](https://www.superlogical.com/rex/docs/build/program-status), otherwise known as `OSC 7501`, released just a few days ago. The protocol is designed to allow terminal applications to report what they're doing (e.g. idle, working, waiting on the user, finished, or failed) and why. The obvious case for the design is AI agents, but are lots of other use cases for this, and we’re excited to see what you build with it. It’s subtle, but here’s [Crush](https://github.com/charmbracelet/crush) in Superlogical’s [Rex](https://www.superlogical.com/updates/public-testing-beginning) with the feature integrated (notice the dot in the first tab). <p><img width="700" src="https://github.com/user-attachments/assets/85680681-9397-456b-8283-4eed19635681" /></p> #### Bugfixes Also, this release brings some very important fixes done by [@&#8203;AdamMagued](https://github.com/AdamMagued), [@&#8203;simpleqt](https://github.com/simpleqt) and [@&#8203;GreedyC](https://github.com/GreedyC). Cheers! Charm 🌞 #### Changelog ##### New! - [`41bc626`](https://github.com/charmbracelet/bubbletea/commit/41bc6265643a4709ad355581b01e6bb70b2ed8ea): feat: OSC 7501 ([#&#8203;1841](https://github.com/charmbracelet/bubbletea/issues/1841)) ([@&#8203;andrinoff](https://github.com/andrinoff)) ##### Fixed - [`96d69d2`](https://github.com/charmbracelet/bubbletea/commit/96d69d2f7eb182bb311be08fc56ed2c208239aff): fix(tty): fall back to default dimensions when terminal size is 0x0 ([#&#8203;1836](https://github.com/charmbracelet/bubbletea/issues/1836)) ([@&#8203;AdamMagued](https://github.com/AdamMagued)) - [`ff51ba4`](https://github.com/charmbracelet/bubbletea/commit/ff51ba4c51f85875761b15a64f9ab9aa0eaa9fa1): fix: prevent signal goroutine deadlock on shutdown ([#&#8203;1806](https://github.com/charmbracelet/bubbletea/issues/1806)) ([@&#8203;simpleqt](https://github.com/simpleqt)) ##### Docs - [`33f6a40`](https://github.com/charmbracelet/bubbletea/commit/33f6a40ec035111bc11d5fd5304cac1359af44e0): docs: fix command and environment godoc examples ([#&#8203;1833](https://github.com/charmbracelet/bubbletea/issues/1833)) ([@&#8203;GreedyC](https://github.com/GreedyC)) ##### Other stuff - [`f9df43c`](https://github.com/charmbracelet/bubbletea/commit/f9df43c4f2c021d8740a2628d59cd810a862eb98): v2.1.0 ([@&#8203;andrinoff](https://github.com/andrinoff)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.10`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.10) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.9...v2.0.10) ### Change to no input programs This is a small change to programs with no `WithInput`. Removed capability queries, which resulted in leaking of raw ANSI escape sequences. #### Changelog ##### Fixed - [`8b10e22`](https://github.com/charmbracelet/bubbletea/commit/8b10e22689cdaf2c6f7adc70c8fe2241fe0f9404): fix: skip capability queries when input is disabled ([#&#8203;1801](https://github.com/charmbracelet/bubbletea/issues/1801)) ([@&#8203;drawmeanelephant](https://github.com/drawmeanelephant)) ##### Other stuff - [`d5bfd5c`](https://github.com/charmbracelet/bubbletea/commit/d5bfd5c2ff7480a6b94536c1cf4e73569b8d523e): v2.0.10 ([@&#8203;andrinoff](https://github.com/andrinoff)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.9`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.9) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.8...v2.0.9) ### Small patches 🩹 #### Keybinds missing! MouseButton11 and media record buttons were improperly handled, now fixed! (thanks to [@&#8203;Ricardo-M-L](https://github.com/Ricardo-M-L) and [@&#8203;bunlongheng](https://github.com/bunlongheng)) #### Weird UI artifacts with some terminals 👽 Sometimes, when switching between tabs in your terminal for example, the screen would not clear, now fixed! ... And some small corrections to docs! Happy coding 🤖 #### Changelog ##### Fixed - [`dc4b017`](https://github.com/charmbracelet/bubbletea/commit/dc4b01750c5262f511164148e24de2cc7aabff47): fix(key): map media record to ultraviolet code ([#&#8203;1757](https://github.com/charmbracelet/bubbletea/issues/1757)) ([@&#8203;Ricardo-M-L](https://github.com/Ricardo-M-L)) - [`1862dfb`](https://github.com/charmbracelet/bubbletea/commit/1862dfba1151de8f583b598d2ed1cfedf3f5b405): fix: assign MouseButton11 = uv.MouseButton11 ([#&#8203;1754](https://github.com/charmbracelet/bubbletea/issues/1754)) ([@&#8203;bunlongheng](https://github.com/bunlongheng)) - [`930e18c`](https://github.com/charmbracelet/bubbletea/commit/930e18c9668417db1908c7a694ee49676116b46e): fix: don't panic in ProgressBarState.String() for out-of-range values ([#&#8203;1748](https://github.com/charmbracelet/bubbletea/issues/1748)) ([@&#8203;ankit090701](https://github.com/ankit090701)) - [`faf4dcf`](https://github.com/charmbracelet/bubbletea/commit/faf4dcf54a92bab2fe3bf6f4715adf44f2fc245d): fix: pendingErase in cursedRenderer ([#&#8203;1755](https://github.com/charmbracelet/bubbletea/issues/1755)) ([@&#8203;andrinoff](https://github.com/andrinoff)) - [`0d3e281`](https://github.com/charmbracelet/bubbletea/commit/0d3e281d1436499b40df085a352bb81b3c9de7d0): fix: restore kitty keyboard stack on exit ([#&#8203;1750](https://github.com/charmbracelet/bubbletea/issues/1750)) ([@&#8203;deepakganesh78](https://github.com/deepakganesh78)) - [`0ef9fc9`](https://github.com/charmbracelet/bubbletea/commit/0ef9fc90dcb665e6ecfb160fa2b3fb4652b9b04c): fix: typo in doc ([#&#8203;1756](https://github.com/charmbracelet/bubbletea/issues/1756)) ([@&#8203;andrinoff](https://github.com/andrinoff)) ##### Docs - [`d40db14`](https://github.com/charmbracelet/bubbletea/commit/d40db141fa4dc3644d116fcea819e1b94ea15b19): docs: fix background color detection example in doc comment ([@&#8203;meowgorithm](https://github.com/meowgorithm)) - [`882727b`](https://github.com/charmbracelet/bubbletea/commit/882727b7304802aebf4513bde83a2d7751c81687): docs: fix links to tutorials & examples ([#&#8203;1645](https://github.com/charmbracelet/bubbletea/issues/1645)) ([@&#8203;mhdna](https://github.com/mhdna)) ##### Other stuff - [`708ee75`](https://github.com/charmbracelet/bubbletea/commit/708ee757a83cec3dcff684f7d9837479ec567ef1): ci: fix examples workflow ([#&#8203;1734](https://github.com/charmbracelet/bubbletea/issues/1734)) ([@&#8203;kobihikri](https://github.com/kobihikri)) - [`351d215`](https://github.com/charmbracelet/bubbletea/commit/351d2159f8d8a85613aa2a6e98c8c63df3c98623): ci: sync dependabot config ([#&#8203;1763](https://github.com/charmbracelet/bubbletea/issues/1763)) ([@&#8203;charmcli](https://github.com/charmcli)) - [`6fb1f47`](https://github.com/charmbracelet/bubbletea/commit/6fb1f47b6c7b598835f5d56597877f10cb980e9e): examples/sequence: fix milisecond typo in SleepPrintln ([@&#8203;makoto-developer](https://github.com/makoto-developer)) - [`73b6d91`](https://github.com/charmbracelet/bubbletea/commit/73b6d91ac1c3854dd4af046ab5f9e51d3b3b4290): v2.0.9 ([@&#8203;andrinoff](https://github.com/andrinoff)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.8`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.8) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.7...v2.0.8) ### Graphemes, schmraphemes No terminal can render emojis perfectly, but we can try. This release improves some very specific edge cases around emoji rendering. Enjoy! #### Changelog - [`db569ad`](https://github.com/charmbracelet/bubbletea/commit/db569adcb41d0eae251587e6a5f0cc3c7d77e8eb): fix(deps): bump ultraviolet for emoji-related rendering improvements *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.7`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.7) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.6...v2.0.7) ### A few lil’ stability patches Hi! This is a patch release with a few solid improvements around stability and correctness. - [@&#8203;lrstanley](https://github.com/lrstanley), one of our faves, fixed a race condition around mice in the Cursed Renderer - [@&#8203;lawrence3699](https://github.com/lawrence3699) fixed a panic that could happen when input's not available - We fixed a correctness issue with regard to mouse releases when Kitty Keyboard was active (thanks, [@&#8203;mitchellh](https://github.com/mitchellh)) Thanks for using Bubble Tea, and if you see anything awry please do let us know! —Charm 👋 #### Changelog ##### Fixed - [`c60f0c5`](https://github.com/charmbracelet/bubbletea/commit/c60f0c53042238305ec13b486326588f12aea0ec): fix: prevent data race with cursedRenderer.onMouse ([#&#8203;1691](https://github.com/charmbracelet/bubbletea/issues/1691)) ([@&#8203;lrstanley](https://github.com/lrstanley)) - [`074596e`](https://github.com/charmbracelet/bubbletea/commit/074596e14e2f5ca5e3986ee72e7c08f1569c4178): fix: skip input reader restore when input is disabled ([#&#8203;1680](https://github.com/charmbracelet/bubbletea/issues/1680)) ([@&#8203;lawrence3699](https://github.com/lawrence3699)) - [`878d7df`](https://github.com/charmbracelet/bubbletea/commit/878d7df2f2b02f3ca8db177fa8553834bc35ea7c): fix(deps): bump ultraviolet for kitty keyboard fix ([@&#8203;meowgorithm](https://github.com/meowgorithm)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.6`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.6) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.5...v2.0.6) This release fixes an issue with how Bubble Tea handled wide characters. Before, a wide character might be skipped or cause an infinite loop causing the CPU to spike. See [`fdcd0cf`](https://github.com/charmbracelet/bubbletea/commit/fdcd0cfd598195e7043c18ab1bc65dcae03588f5) and [charmbracelet/ultraviolet#109](https://github.com/charmbracelet/ultraviolet/pull/109) for more details. *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.5`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.5) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.4...v2.0.5) A small release to remove accidental unwanted debug log file. See [`1ed724a`](https://github.com/charmbracelet/bubbletea/commit/1ed724a2d1316ace504f87a2f0bbbcc189d280f6) and [charmbracelet/ultraviolet@`b516641`](https://github.com/charmbracelet/ultraviolet/commit/b516641c662e2094c163ebc3a992983061b979ca) for details. *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.4`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.4) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.3...v2.0.4) This release includes a small fix related to width calculation in [x/ansi](https://github.com/charmbracelet/x/tree/main/ansi). See [`c788fe9`](https://github.com/charmbracelet/bubbletea/commit/c788fe932e8aa4d99322101730a7e97a74684d51) and [charmbracelet/x@`6921c75`](https://github.com/charmbracelet/x/commit/6921c759c9134ae68bd1a6ff6e171bf470664aaf) for more details. *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.3`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.3) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.2...v2.0.3) ### Extra Extra Extended Keyboard Enhancements! This release adds support for the full set of Keyboard Enhancements. Now you can enable any enhancements on top of the default disambiguate one. ```go func (m model) View() tea.View { var v tea.View v.KeyboardEnhancements.ReportAlternateKeys = true v.KeyboardEnhancements.ReportAllKeysAsEscapeCodes = true return v } ``` ### Smarter Renderer We also fixed a few renderer related bugs and made the Cursed Renderer smarter. Now, we always reset the terminal tab stops for the Bubble Tea program process context. People using `tabs -N` in their shell profiles shouldn't be affected. See the full changelog below. #### Changelog ##### New! - [`05df5ae`](https://github.com/charmbracelet/bubbletea/commit/05df5aecf81f67ba8dd312367246bc1c9465adfa): feat: support extended keyboard enhancements ([#&#8203;1626](https://github.com/charmbracelet/bubbletea/issues/1626)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) ##### Fixed - [`a3d7807`](https://github.com/charmbracelet/bubbletea/commit/a3d78073b74c2ddb2b8820e9751ad6dca485a6d5): fix(ci): only run build-examples on non-dependabot PRs ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`7df1e65`](https://github.com/charmbracelet/bubbletea/commit/7df1e650b31224cc8cc6e80f9854551c9dccde10): fix(examples): migrate imports to charm.land for the glamour example ([#&#8203;1642](https://github.com/charmbracelet/bubbletea/issues/1642)) ([@&#8203;mhdna](https://github.com/mhdna)) - [`ee06e98`](https://github.com/charmbracelet/bubbletea/commit/ee06e98c4174012046bd35c0f869e875131859b2): fix(examples): resolve nil pointer dereference ([#&#8203;1663](https://github.com/charmbracelet/bubbletea/issues/1663)) ([@&#8203;mattpcaswell](https://github.com/mattpcaswell)) - [`ac355fe`](https://github.com/charmbracelet/bubbletea/commit/ac355fe194c3e9f07c0d2b061bcf51ad802103fb): fix(renderer): restore tab stops if hard tabs are enabled ([#&#8203;1677](https://github.com/charmbracelet/bubbletea/issues/1677)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`729f05c`](https://github.com/charmbracelet/bubbletea/commit/729f05c315343faa36902cedff46d135b6a4b3c7): fix: add missing signal.Stop in suspendProcess to prevent signal channel leak (Closes [#&#8203;1673](https://github.com/charmbracelet/bubbletea/issues/1673)) ([#&#8203;1674](https://github.com/charmbracelet/bubbletea/issues/1674)) ([@&#8203;kuishou68](https://github.com/kuishou68)) ##### Docs - [`bbe4faf`](https://github.com/charmbracelet/bubbletea/commit/bbe4faf35db767a2657396f25da0f1c7c8fa0c03): docs(example): add textarea dynamic height example ([#&#8203;1639](https://github.com/charmbracelet/bubbletea/issues/1639)) ([@&#8203;meowgorithm](https://github.com/meowgorithm)) - [`e19d255`](https://github.com/charmbracelet/bubbletea/commit/e19d2554f50eb61396baab18e4872562bc7b5cdc): docs: fix README wording ([#&#8203;1624](https://github.com/charmbracelet/bubbletea/issues/1624)) ([@&#8203;Rohan5commit](https://github.com/Rohan5commit)) ##### Other stuff - [`65c3978`](https://github.com/charmbracelet/bubbletea/commit/65c397863ffdca680845eb036c6a164719415fd3): ci: sync golangci-lint config ([#&#8203;1556](https://github.com/charmbracelet/bubbletea/issues/1556)) ([@&#8203;github-actions](https://github.com/github-actions)\[bot]) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.2`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.2) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.1...v2.0.2) This release contains a small patch fixing a rendering that might affect Wish users running on Unix platforms. #### Changelog ##### Fixed - [`f25595a`](https://github.com/charmbracelet/bubbletea/commit/f25595a848eb11a87631a9e43ffe078d713c2236): fix(renderer): use mapNl optimization when not on Windows and no PTY input ([#&#8203;1615](https://github.com/charmbracelet/bubbletea/issues/1615)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.1`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.1) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v2.0.0...v2.0.1) A small patch release to fix opening the proper default stdin file for input. #### Changelog ##### Fixed - [`110a919`](https://github.com/charmbracelet/bubbletea/commit/110a91911314541601ff156fa96904350a4cd07f): fix(examples): add missing `WithWidth` to table example ([#&#8203;1598](https://github.com/charmbracelet/bubbletea/issues/1598)) ([@&#8203;shv-ng](https://github.com/shv-ng)) - [`66b7abd`](https://github.com/charmbracelet/bubbletea/commit/66b7abdecfad6cc67a5b408e66d54170a063ff89): fix: check if os.Stdin is a terminal before opening the TTY ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) ##### Docs - [`c751374`](https://github.com/charmbracelet/bubbletea/commit/c7513746b118758a3412895bad933dcccba8893d): docs: correct whats new link ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`736fba2`](https://github.com/charmbracelet/bubbletea/commit/736fba22c570ddccbc325b2e33af04c457fa7591): docs: upgrade guide: correct badge url ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) *** <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@charmcli), [Bluesky](https://bsky.app/profile/charm.land). ### [`v2.0.0`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.0) [Compare Source](https://github.com/charmbracelet/bubbletea/compare/v1.3.10...v2.0.0) ![bubbletea-v2-block](https://github.com/user-attachments/assets/99d2edd1-283c-4e1f-8758-14eea6ee36d6) ### What's New in Bubble Tea v2 We're very excited to announce the second major release of Bubble Tea! If you (or your LLM) are just looking for technical details on on migrating from v1, please check out the [Upgrade Guide](UPGRADE_GUIDE_V2.md). > \[!NOTE] > We don't take API changes lightly and strive to make the upgrade process as simple as possible. We believe the changes bring necessary improvements as well as pave the way for the future. If something feels way off, let us know. #### ❤️ Charm Land Import Path We've updated our import paths to use vanity domains and use our domain to import Go packages. ```go // Before import tea "github.com/charmbracelet/bubbletea" // After import tea "charm.land/bubbletea/v2" ``` Everything else stays the same 🙂 #### 👾 The Cursed Renderer Bubble Tea v2 ships with the all-new Cursed Renderer which was built from the ground up. It's based on the ncurses rendering algorithm and is highly optimized for speed, efficiency, and accuracy and is built on an *enormous* amount of research and development. Optimized renders also means that [Wish][wish] users get big performance benefits and lower bandwidth usage by orders of magnitude. To take advantage of the new Cursed Renderer you don't need to do anything at all except keep on using the Bubble Tea you know and love. #### ✌️ Key handling is way better now Newer terminals can now take advantage of all sorts keyboard input via [progressive keyboard enhancements][kitty-keyboard]. You can now map all sorts of keys and modifiers like <kbd>shift+enter</kbd> and <kbd>super+space</kbd>. You can also detect key releases (we're looking at you, game developers). It's easy to detect support for supporting terminals and add fallbacks for those that don't. For details, see [keyboard enhancements](#keyboard-enhancements) below. #### 🥊 No more fighting In the past, Bubble Tea and [Lip Gloss][lg] would often fight over i/o. Bubble Tea wanted to read keyboard input and Lip Gloss wanted to query for the background color. This means that things could get messy. Not anymore! In v2, Lip Gloss is now pure, which means, Bubble Tea manages i/o and gives orders to Lip Gloss. In short, we only need one lib to call the shots, and in the context of this relationship, that lib is Bubble Tea. But what about color downsampling? That's a great question. [lg]: https://charm.land/lipgloss [wish]: https://charm.land/wish [cp]: https://charm.land/wish [kitty-keyboard]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/ #### 👨🏻‍🎨 Built-in Color Downsampling We sneakily released a little library called [colorprofile][cp] that will detect the terminal's color profile and auto-downsample *any* ANSI styling that flows through it to the best available color profile. This means that color will "just work" (and not misbehave) no matter where the ANSI styling comes from. Downsampling is built-into Bubble Tea and is automatically enabled. #### 🧘 Declarative, Not Imperative This is a big one. In v1, you'd toggle terminal features on and off with commands like `tea.EnterAltScreen`, `tea.EnableMouseCellMotion`, `tea.EnableReportFocus`, and so on. In v2, all of that is gone and replaced by fields on the `View` struct. You just *declare* what you want your view to look like and Bubble Tea takes care of the rest. This means no more fighting over startup options and commands. Just set the fields and forget about it. For example, to enter full screen mode: ```go func (m Model) View() tea.View { v := tea.NewView("Hello, full screen!") v.AltScreen = true return v } ``` The same goes for mouse mode, bracketed paste, focus reporting, window title, keyboard enhancements, and more. See [A Declarative View](#a-declarative-view) below for the full picture. #### Keyboard Enhancements [Progressive keyboard enhancements][kitty-keyboard] allow you to receive key events not normally possible in traditional terminals. For example, you can now listen for the <kbd>ctrl+m</kbd> key, as well as previously unavailable key combinations like <kbd>shift+enter</kbd>. Bubble Tea v2 will always try to enable basic keyboard enhancements that disambiguate keys. If your terminal supports it, your program will receive a `tea.KeyboardEnhancementsMsg` message that indicates support for requested features. ```go func (m Model) View() tea.View { var v tea.View // ... v.KeyboardEnhancements.ReportEventTypes = true // Enable key release events return v } ``` Historically, certain key combinations in terminals map to control codes. For example, <kbd>ctrl+h</kbd> outputs a backspace by default, which means you can't normally bind a key event to <kbd>ctrl+h</kbd>. With key disambiguation, you can now actually bind events to those key combinations. You can detect if a terminal supports keyboard enhancements by listening for `tea.KeyboardEnhancementsMsg`. ```go func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyboardEnhancementsMsg: if msg.SupportsKeyDisambiguation() { // More keys, please! } } } ``` <details> <summary>Which terminals support progressive enhancement?</summary> - [Ghostty](https://mitchellh.com/ghostty) - [Kitty](https://sw.kovidgoyal.net/kitty/) - [Alacritty](https://alacritty.org) - [iTerm2](https://iterm2.com) - [Foot](https://codeberg.org/dnkl/foot) - [WezTerm](https://wezfurlong.org/wezterm/) - [Rio](https://raphamorim.io/rio/) - [Contour Terminal](https://github.com/contour-terminal/contour) </details> #### Key Messages Key messages are now split into `tea.KeyPressMsg` and `tea.KeyReleaseMsg`. Use `tea.KeyMsg` to match against both. We've also replaced `key.Type` and `key.Runes` with `key.Code` and `key.Text`. Modifiers live in `key.Mod` now instead of being separate booleans. Oh, and space bar returns `"space"` instead of `" "`. The easiest way to match against key press events is to use `msg.String()`: ```go func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyPressMsg: switch msg.String() { case "space": // Space bar returns "space" now :D return m, tea.Println("You pressed the space bar!") case "ctrl+c": return m, tea.SetClipboard("Howdy") case "shift+enter": // Awesome, right? case "ctrl+alt+super+enter": // Yes, you can do that now! } } } ``` The `Key` struct also has some nice new fields: - **`key.BaseCode`** — the key according to a standard US PC-101 layout. Handy for international keyboards where the physical key might differ. - **`key.IsRepeat`** — tells you if the key is being held down and auto-repeating. Only available with the Kitty Keyboard Protocol or Windows Console API. - **`key.Keystroke()`** — a new method that returns the keystroke representation (e.g., `"ctrl+shift+alt+a"`). Unlike `String()`, it always includes modifier info. For the full list of changes and before/after code samples, see the [Upgrade Guide](UPGRADE_V2.md#key-messages). #### Paste Messages Paste events used to arrive as `tea.KeyMsg` with a confusing `msg.Paste` flag. Now they're their own thing: ```go func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.PasteMsg: // Here comes a paste! m.text += msg.Content case tea.PasteStartMsg: // The user started pasting. case tea.PasteEndMsg: // The user stopped pasting. } } ``` #### Mouse Messages We've improved the mouse API. Mouse messages are now split into `tea.MouseClickMsg`, `tea.MouseReleaseMsg`, `tea.MouseWheelMsg`, and `tea.MouseMotionMsg`. And mouse mode is set declaratively in your `View()`: ```go func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.MouseClickMsg: if msg.Button == tea.MouseLeft { // Clickety click } case tea.MouseWheelMsg: // Scroll, scroll, scrollllll } return m, nil } func (m model) View() tea.View { v := tea.NewView("Move that mouse around!") v.MouseMode = tea.MouseModeAllMotion // or tea.MouseModeCellMotion return v } ``` #### A Declarative View In v1, `View()` returned a `string`. In v2, it returns a `tea.View` struct that lets you declare everything about your view — content, cursor, alt screen, mouse mode, colors, window title, progress bar, and more: ```go type View struct { Content string OnMouse func(msg MouseMsg) Cmd Cursor *Cursor BackgroundColor color.Color ForegroundColor color.Color WindowTitle string ProgressBar *ProgressBar AltScreen bool ReportFocus bool DisableBracketedPasteMode bool MouseMode MouseMode KeyboardEnhancements KeyboardEnhancements } ``` No more fighting over options and commands! Just set the fields: ```go func (m Model) View() tea.View { v := tea.NewView(fmt.Sprintf("Hello, world!")) v.AltScreen = true v.MouseMode = tea.MouseModeCellMotion v.ReportFocus = true v.WindowTitle = "My Awesome App" return v } ``` #### An Actual Cursor You can now control the cursor position, color, and shape right from your view function. Want it hidden? Just set `view.Cursor = nil`. ```go func (m Model) View() tea.View { var v tea.View if m.showCursor { v.Cursor = &tea.Cursor{ Position: tea.Position{ X: 14, // At the 14th column Y: 0, // On the first row }, Shape: tea.CursorBlock, // Just give me a block cursor '█' Blink: true, // Blink baby, blink! Color: lipgloss.Green, // Green cursor, because why not? } } v.SetContent(fmt.Sprintf("Hello, world!")) return v } ``` You can also use `tea.NewCursor(x, y)` for a quick block cursor with default settings. #### Progress Bar Support Now you can ask Bubble Tea to render a native progress bar for your application. Just set the `view.ProgressBar` field and Bubble Tea will take care of the rest. ```go func (m Model) View() tea.View { var v tea.View v.SetContent("Downloading...") v.ProgressBar = tea.NewProgressBar(tea.ProgressBarDefault, m.downloadProgress) return v } ``` #### Synchronized Updates (Mode 2026) Bubble Tea will try and use mode 2026 to push updates to the terminal. This mode helps reduce tearing and cursor flickering by atomically updating the terminal window once all the update sequences are pushed out and read by the terminal. This is enabled by default and there's nothing you need to do. #### Better Terminal Unicode Support (mode 2027) Now Bubble Tea will automatically enable [mode 2027](https://github.com/contour-terminal/terminal-unicode-core) on terminals that support it. This mode allows the terminal to properly handle wide Unicode characters and emojis without breaking the layout of your app. Again, this is enabled by default and there's nothing you need to do. #### Native Clipboard Support Bubble Tea now supports native clipboard operations, also known as OSC52. **This means you can even copy and paste over SSH!** ```go func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyPressMsg: switch msg.String() { case "ctrl+c": return m, tea.SetClipboard("Howdy") case "ctrl+v": return m, tea.ReadClipboard() } case tea.ClipboardMsg: fmt.Printf("Clipboard contents: %s\n", msg.String()) } } ``` X11 and Wayland users can also use `tea.SetPrimaryClipboard` to set the primary clipboard. Note that this is a very niche sort of thing and may or may not work on macOS, Windows, and other platforms without the notion of more than one clipboard. #### Terminal Colors You can now read and set the terminal's foreground, background, and cursor colors. To change them, set `view.ForegroundColor`, `view.BackgroundColor`, and `view.Cursor.Color` in your `View()` function. ```go func (m Model) Init() tea.Cmd { return tea.Batch( tea.RequestForegroundColor, tea.RequestBackgroundColor, tea.RequestCursorColor, ) } func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.BackgroundColorMsg: return m, tea.Printf("Background color: %s\n", msg) case tea.ForegroundColorMsg: return m, tea.Printf("Foreground color: %s\n", msg) case tea.CursorColorMsg: return m, tea.Printf("Cursor color: %s\n", msg) case tea.KeyPressMsg: switch msg.String() { case "enter": m.fg, m.bg, m.cursor = ansi.Red, ansi.Green, ansi.Blue case "esc": return m, tea.Quit } } return m, nil } func (m Model) View() tea.View { var v tea.View v.SetContent("\nPress Enter to change terminal colors, Esc to quit.") v.ForegroundColor = m.fg v.BackgroundColor = m.bg if m.cursor != nil { v.Cursor = tea.NewCursor(0, 1) v.Cursor.Color = m.cursor } return v } ``` #### 🌍 Environment Variables Bubble Tea now sends you a `tea.EnvMsg` at startup with the environment variables. This is especially handy for SSH apps where `os.Getenv` would give you the *server's* environment, not the client's. ```go func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.EnvMsg: m.term = msg.Getenv("TERM") // the client's TERM, not the server's! } return m, nil } ``` #### 🔮 Raw Escape Sequences For the power users out there, you can now send raw escape sequences directly to the terminal with `tea.Raw`. This is great for querying terminal capabilities or doing things Bubble Tea doesn't have a built-in for (yet). ```go return m, tea.Raw(ansi.RequestPrimaryDeviceAttributes) ``` Responses from the terminal will come back as messages in `Update`. Just be sure you know what you're doing — with great power comes great terminal weirdness. #### 📍 Cursor Position Queries Need to know where the cursor is? Now you can ask. ```go func (m model) Init() tea.Cmd { return tea.RequestCursorPosition } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.CursorPositionMsg: m.cursorX, m.cursorY = msg.X, msg.Y } return m, nil } ``` #### 📊 Terminal Mode Reports You can query whether the terminal supports specific modes (like focus events or synchronized output) using DECRPM mode reports. Send a raw DECRQM request and listen for `tea.ModeReportMsg`. ```go func (m model) Init() tea.Cmd { return tea.Raw(ansi.RequestModeFocusEvent) } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.ModeReportMsg: if msg.Mode == ansi.ModeFocusEvent && !msg.Value.IsNotRecognized() { m.supportsFocus = true } } return m, nil } ``` #### Terminal Version and Name Don't know what terminal you're running in? `$TERM` is too vague? Bubble Tea now has a `tea.RequestTerminalVersion` command that queries the terminal for its name and version using the *XTVERSION* escape sequence. > \[!NOTE] > This feature is not supported by all terminals. ```go func (m Model) Init() tea.Cmd { return tea.RequestTerminalVersion } func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.TerminalVersionMsg: fmt.Printf("Terminal: %s\n", string(msg)) } } ``` #### Terminfo and Termcap Capabilities Sometimes you need to know what capabilities the terminal has. Bubble Tea now has a `tea.RequestCapability` command that queries the terminal for a specific terminfo/termcap capability. > \[!NOTE] > This feature is not supported by all terminals. ```go func (m Model) Init() tea.Cmd { return tea.RequestCapability("RGB") // RGB is the terminfo capability for direct colors } ``` #### Detecting the Color Profile Need to use the detected color profile in your app? Listen to `tea.ColorProfileMsg` in `Update`: ```go func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.ColorProfileMsg: m.colorProfile = msg.Profile // gottem! } return m, nil } ``` #### Manually Applying a Color Profile Want to manually set a color profile for testing? Now you can, on the program level. ```go import ( tea "charm.land/bubbletea/v2" "github.com/charmbracelet/colorprofile" ) p := colorprofile.TrueColor // i love colors. lets' use 16,777,216 of 'em p = colorprofile.ANSI256 // jk, 256 colors are plenty p = colorprofile.ANSI // actually let's juse use 16 colors p = colorprofile.Ascii // nm, no colors, but keep things like bold, italics, etc. p = colorprofile.NoTTY // lol actually strip all ANSI sequences prog := tea.NewProgram(model, tea.WithColorProfile(p)) ``` Want to hard detect the color profile in [Wish][wish]? We bet you do. ```go func main() { var s ssh.Session pty, _, _ := s.Pty() // Get the environment... envs := append(s.Environ(), "TERM="+pty.Term) // ...and give it to Bubble Tea so it can detect the color profile. opt := tea.WithEnvironment(envs) p := tea.NewProgram(model, tea.WithInput(pty.Slave), tea.WithOutput(pty.Slave), opt, // wow ) } ``` #### 🪟 Window Size for Testing When running tests or in non-interactive environments, you can now set the initial terminal size: ```go p := tea.NewProgram(model, tea.WithWindowSize(80, 24)) ``` No more mocking terminals just to run your tests. Nice! #### Use the Terminal's TTY Sometimes your program will write to stdout while it's being piped or redirected. In these cases, you might want to write directly to the terminal's TTY instead of stdout because stdout might not be a terminal. Or your program expects to read from stdin but stdin is being piped from another program. In Bubble Tea v1, there wasn't a good way to do this. In the latter case, you could use the `WithInputTTY()` option to read from the terminal's TTY instead of stdin. However, there was no easy way to write to the terminal's TTY instead of stdout without fiddling with file descriptors. In Bubble Tea v2, you can now simply use the global `OpenTTY()` to open the terminal's TTY for reading and writing. You can then pass the TTY file handles to the `WithInput()` and `WithOutput()` options. Note that Bubble Tea v2 will always use the TTY for input when input is not specified via `WithInput(...)`. ```go ttyIn, ttyOut, err := tea.OpenTTY() if err != nil { log.Fatal(err) } p := tea.NewProgram(model, tea.WithInput(ttyIn), tea.WithOutput(ttyOut), ) ``` <details> <summary> #### Changelog </summary> ##### New! * 742b944f78af9b62e774a98855cb324dfe3313be: feat(render): enable Unicode mode (2027) for accurate width calculation (#&#8203;1584) (@&#8203;aymanbagabas) * 724479d6d5be45005d5a405e3cb6c0b6e8b1fd0e: feat(renderer): add modifyOtherKeys support (#&#8203;1579) (@&#8203;erikstmartin) * 1f48289368a38a670c6cb47929a4e33a2e7d5c1b: feat(renderer): enable both modifyOtherKeys 1 and 2 (@&#8203;aymanbagabas) * 0b472523eae41c772236ceab8531878f20972e31: feat: add view callback support (@&#8203;aymanbagabas) ##### Fixed * 323a3936e4b5f8c08aa638ca2917097c7c58bdeb: fix(ci): use local golangci-lint config (@&#8203;aymanbagabas) * b65daeb9d46142d2f428303eb77de3d3b65c2956: fix(examples): capability make sure input is focused on start (@&#8203;aymanbagabas) * 76f2e6d81219acce9d8eccb61845d20a77216cf1: fix(render): always assume raw mode for terminal output (@&#8203;aymanbagabas) * 61a3f5ccf812adb44eb1d62a2a3032af52fe4330: fix(render): execute insert above immediately (#&#8203;1576) (@&#8203;aymanbagabas) * fdb86513b5e15c6d4a7886221aa2e452738c0e57: fix(renderer): always move cursor to bottom on close (@&#8203;aymanbagabas) * 819e2e89c62ee26dc01a81546f099e633ab3c704: fix(renderer): flush after moving cursor on close (@&#8203;aymanbagabas) * fb790535cc28bec18b58c9947d46cb39515a0a74: fix(renderer): make sure we don't skip prepended lines on no-op frames (@&#8203;aymanbagabas) * 99c33bc3007094d114b7b5e412be03fae71728f8: fix(renderer): move cursor to bottom before disabling alt screen (@&#8203;aymanbagabas) * 6595041da277654876da2e5458eeed687ba4687c: fix(renderer): no need to enable both modifyOtherKeys protocols (@&#8203;aymanbagabas) * 59807cf07c8fd071cb252d2319604b22c711dd29: fix(renderer): reset kitty keyboard protocol on alt screen switch (#&#8203;1554) (@&#8203;aymanbagabas) * 2a0096c500a7ee38a5f244f6a80a1d50e6a76014: fix(renderer): restore state when restarting cursed renderer (#&#8203;1553) (@&#8203;aymanbagabas) * 1ff0a470e0d938dc6e8a1b3c659f98a73d042df8: fix(tea): don't query for synchronized output if the renderer is disabled (@&#8203;aymanbagabas) * ec0d820c3439f58cc92d4461edfc9fd8482f34de: fix(tea): only send actual mouse events to renderer on mouse callback (@&#8203;aymanbagabas) * b3661ce3d63f003545323b721212562c28647e0f: fix: always open the TTY for input (@&#8203;aymanbagabas) * ba8f60582376c0b45a93c0277de1949325cbca9c: fix: go.mod and go.sum to use lipgloss v2 (@&#8203;aymanbagabas) * faa0b9c36ba2d2ed00d8b9e16b8ff61bd7f28e0b: fix: lint issues (@&#8203;aymanbagabas) ##### Docs * fd7b0071c582d18d7e059c81d17fda03804ccade: docs(readme): add note about v2 upgrade guide (@&#8203;meowgorithm) * 07a69fbcf1e3649a797a929d724f94170d6affc3: docs(readme): update bubbles callout image (@&#8203;meowgorithm) * 3499dac84886f5a54f7ccfc7f3446a361bf2da2e: docs(readme): update header image (@&#8203;meowgorithm) * ceab368db0d8fe42f8beac3c28bc14f6d95a34d2: docs(readme): updates for v2 (#&#8203;1589) (@&#8203;aymanbagabas) * 59ca08b21ca50c466cba0af717158df20aef5043: docs: add v2 upgrade and changes guide (#&#8203;1585) (@&#8203;aymanbagabas) * 46b608f1528a7a8f51e2ba767c884acfa75c0269: docs: update OnMouse callback to use msg parameter (@&#8203;aymanbagabas) * 105959b37b4f80600cff83b67187a266cbd5b0be: docs: update mascot header image with a cleaner one (@&#8203;aymanbagabas) * 5a41615aa4ff78da82ca901b540c3202fa810df3: docs: view cursor api typo (#&#8203;1557) (@&#8203;bountis) ##### Other stuff * 764923436993564e6e31ae39746e8eaf0e7ad5e6: ci: sync dependabot config (#&#8203;1505) (@&#8203;charmcli) * d1cf96d0d3c9119e422383c2993705fd148cdd86: refactor: limit view callback to onMouse for mouse events (@&#8203;aymanbagabas) * 14519253d503b2782910f5527f35f08cda5df5de: refactor: omit unnecessary reassignment (#&#8203;1515) (@&#8203;goldlinker) * ece00b4f40c5863709daa28786d0887560811fa5: refactor: remove unused max func (#&#8203;1537) (@&#8203;sunnyraindy) </details> #### 🌈 More on Bubble Tea v2 Ready to migrate? Head over to the [Upgrade Guide](UPGRADE_GUIDE_V2.md) for the full migration checklist. [v2]: https://github.com/charmbracelet/bubbletea/discussions/1374 #### Feedback Have thoughts on Bubble Tea v2? We'd *love* to hear about it. Let us know on… - [Discord](https://charm.land/chat) - [Matrix](https://charm.land/matrix) - [Email](mailto:vt100@&#8203;charm.land) *** Part of [Charm](https://charm.land). <a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDcuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjI0Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
fix(deps): update module github.com/charmbracelet/bubbletea to v2
Some checks failed
CI / integration-1 (pull_request) Has been skipped
CI / e2e (pull_request) Has been skipped
renovate/artifacts Artifact file update failure
CI / integration (pull_request) Failing after 41s
CI / build (pull_request) Failing after 20s
CI / generate (pull_request) Failing after 23s
CI / lint (pull_request) Failing after 1m13s
CI / unit (pull_request) Failing after 58s
CI / ci (pull_request) Failing after 0s
0dcd8c4438
renovate-bot scheduled this pull request to auto merge when all checks succeed 2026-11-29 23:00:53 +00:00
Author
Collaborator

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
go: github.com/charmbracelet/bubbletea/v2@v2.2.0: parsing go.mod:
	module declares its path as: charm.land/bubbletea/v2
	        but was required as: github.com/charmbracelet/bubbletea/v2

### ⚠️ Artifact update problem Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: go.sum ``` go: github.com/charmbracelet/bubbletea/v2@v2.2.0: parsing go.mod: module declares its path as: charm.land/bubbletea/v2 but was required as: github.com/charmbracelet/bubbletea/v2 ```
Some checks failed
CI / integration-1 (pull_request) Has been skipped
Required
Details
CI / e2e (pull_request) Has been skipped
Required
Details
renovate/artifacts Artifact file update failure
CI / integration (pull_request) Failing after 41s
Required
Details
CI / build (pull_request) Failing after 20s
Required
Details
CI / generate (pull_request) Failing after 23s
Required
Details
CI / lint (pull_request) Failing after 1m13s
Required
Details
CI / unit (pull_request) Failing after 58s
Required
Details
CI / ci (pull_request) Failing after 0s
Required
Details
Some required checks were not successful.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'renovate/github.com-charmbracelet-bubbletea-2.x:renovate/github.com-charmbracelet-bubbletea-2.x'
git switch 'renovate/github.com-charmbracelet-bubbletea-2.x'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hmajid2301/optinix!9
No description provided.