opencode
opencode copied to clipboard
feat: toggle transparent background
Summary
- Added
transparentstate toThemecontext andresolveThemefunction to support transparent background. - Added "Toggle transparency" command to the command palette.
- Updated
useThemeto exposetransparentandsetTransparent.
Why
This change allows users to toggle the background transparency of the TUI, which is useful for integrating the TUI with other tools or for aesthetic preference, as requested by the user. Instead of creating separate transparent themes, this allows any theme to be transparent.
https://github.com/user-attachments/assets/475d5804-59d0-4b1b-9d42-8e96ccb4a2ad
Dynamically switching the text for this menu item from "Enable transparency" to "Disable transparency" to indicate its current state would be a nice touch.