Allow saving prompts from the Prompt Manager (#12359)

Adds the following features to the prompt manager:

- New prompt – Create a new prompt from the UI. It will only persist if
it is saved.
- Save prompt – Save a prompt by clicking the save button in the UI. A
keybinding will be added for this in the future.
- Reveal prompt - Show the selected prompt on the file system. Only
available for saved prompts.

New prompts that are saved will use the
`{slugified_title}_{ver}_{id}.md` format which all imported prompts will
move to in the near future.

Also orders prompts in alphabetical order by default.

Release Notes:

- N/A
This commit is contained in:
Nate Butler 2024-05-27 13:48:21 -04:00 committed by GitHub
parent 345361cd38
commit a6dd2ca694
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 476 additions and 89 deletions

View file

@ -164,6 +164,8 @@ pub enum IconName {
ReplaceNext,
ReplyArrowRight,
Return,
Reveal,
Save,
Screen,
SelectAll,
Server,
@ -277,10 +279,12 @@ impl IconName {
IconName::Quote => "icons/quote.svg",
IconName::Regex => "icons/regex.svg",
IconName::Replace => "icons/replace.svg",
IconName::Reveal => "icons/reveal.svg",
IconName::ReplaceAll => "icons/replace_all.svg",
IconName::ReplaceNext => "icons/replace_next.svg",
IconName::ReplyArrowRight => "icons/reply_arrow_right.svg",
IconName::Return => "icons/return.svg",
IconName::Save => "icons/save.svg",
IconName::Screen => "icons/desktop.svg",
IconName::SelectAll => "icons/select_all.svg",
IconName::Server => "icons/server.svg",