opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(opentui): prevent crash on Up arrow with empty history

Open Ashwinhegde19 opened this issue 3 weeks ago • 0 comments

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 return to explicit return undefined
  • Added validation before using history items
  • Added regression tests

Ashwinhegde19 avatar Dec 30 '25 19:12 Ashwinhegde19