opencode
opencode copied to clipboard
fix(opentui): prevent crash on Up arrow with empty history
Fixes #3414 Related: #3221
Pressing Up/Down arrow with empty input history crashes the TUI.
Changes:
- Added explicit return type to
history.move() - Changed implicit
returnto explicitreturn undefined - Added validation before using history items
- Added regression tests