cody
cody copied to clipboard
Edit: Persist a users prompt until submitted or deleted
What:
- The Edit input can be hidden quite easily, this means a user could possibly lose their prompt that they have been writing.
How:
- Once the input is dirty, save the prompt to local storage until it is either: removed from the input, or submitted.
- This way, users are still able to access a partially written prompt even if they close the Edit input.
- We should ensure that we properly save the prompt, including any
contextItemsin local storage. We can enrich the Edit input with these values using theinitialValuesobject.