[FEATURE]: Keep initial prompt if closing out of the TUI
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I've searched for this feature request by using the terms "save", "recover", "maintain" + "prompt". But I haven't found this suggested anywhere.
Currently if I type an initial prompt and close out of Opencode before sending it to the LLM, it will not be stored as a session. Today, while typing the initial prompt I hit "control+Z" instinctively to undo the last word I typed, and it closed the OC process. When opening Opencode back up, the prompt was gone and I was presented with an empty prompt.
I think this could be quite useful specially for long prompts. If you want a clean prompt you can always "control+x n" to create a new session. Maybe the the best way to implement this is to automatically create a session as soon as something is typed, even if it's not sent to the LLM?
I know the "stash" function, but this will not save me from accidentally closing out OC, or incremental updates to the promt.