Verification
Description
OpenCode currently hardcodes terminal escape sequences that force a block cursor shape, ignoring the native terminal cursor configuration (commonly beam/vertical line in Terminal.app, iTerm2, and other emulators). The TUI initialization in @opentui/core sets terminal raw mode and emits default escape sequences that reset user cursor preferences.
Proposed Solution
Expose a cursor_style key in tui.json config that accepts one of three values - beam, underline, or block - and emits the corresponding DECSCUSR escape codes during terminal initialization.
Example config:
{
"$schema": "https://opencode.ai/tui.json",
"cursor_style": "beam"
}
Alternative solutions
- A settings popup in the TUI itself.
- Using an environment variable to configure cursor shape.
Verification
Description
OpenCode currently hardcodes terminal escape sequences that force a block cursor shape, ignoring the native terminal cursor configuration (commonly beam/vertical line in Terminal.app, iTerm2, and other emulators). The TUI initialization in
@opentui/coresets terminal raw mode and emits default escape sequences that reset user cursor preferences.Proposed Solution
Expose a
cursor_stylekey intui.jsonconfig that accepts one of three values -beam,underline, orblock- and emits the corresponding DECSCUSR escape codes during terminal initialization.Example config:
{ "$schema": "https://opencode.ai/tui.json", "cursor_style": "beam" }Alternative solutions