opencode
opencode copied to clipboard
fix: prevent prompt crash when opening new session with existing prompt
fixes #7541
fixed this fatal error when creating a new session would crash if you had prompt in the textarea.
prompt component in home.tsx is not defined onMount yet, now it handles the timing better and keeps your prompt text (tested with ctrl+x n) when moving to a new session. when selecting new session from the dialog the text is not always preserved.
note: #7702 fixes switched sessions & forks. this fix is for new sessions
before:
https://github.com/user-attachments/assets/01d58e94-002a-4929-b925-4af69b32c4e3
after:
https://github.com/user-attachments/assets/684f27ba-7bb0-4d68-93d9-1e410a962de9