Hey!
## Concern:
Currently, when in the chat interface, opening the prompt library causes
any text in the message field to be erased. The mechanism used doesn't
seem to allow for ctrl-z undo.
## Behavior:
User writes full prompt
User opens Prompt Library modal for a potential alternative
→ Prompt in progress is erased.
User decides against using a Library prompt after assessing
User's writing is erased with no means of recovery
---
## Idea:
I understand that this is likely a preparation step for inserting the Library
prompt, but is there a way to mitigate this?
### Potential Behavior 1:
  1. User writes full prompt
  2. User opens Prompt Library modal for a potential alternative
  3. User browses and selects prompt from Library and clicks Use
→ Prompt in progress is erased on Library prompt selection, Library prompt is inserted
### Potential Behavior 2:
User writes full prompt
User opens Prompt Library modal for a potential alternative
User browses and selects prompt from Library and clicks Use
  • If text field empty -> Insert prompt
  • If text field has content -> Show dialog:
[ Replace ] [ Append ] [ Cancel ]
Understandable if not possible, just wanted to toss this out there. Typically I draft in a text app but I always appreciate when text fields have high confidence persistence. TM is great at this otherwise.
Thanks so much for all your work.