feat: automatic prompt sync with docs #63
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So this solves an itch I have: a lot of clients don't support prompts, and it's a shame people can't use them because of that... However, a lot of clients either allow you to create your own prompt, or you could copy and paste the prompt when needed (or create a snippet with it).
Initially, I included the prompt in the docs, but including it in the prompt means that it can get outdated fast. But we can prevent that with a SCRIPT!
This pr introduces a script that reads the prompts folder and writes the docs based on some variables that are exported directly from the prompt file...this makes all the information about a prompt contained in the prompt file, and that information is also used to generate the text for the docs.
I've also included a GitHub action that generates the docs and opens a pr every time there's a new commit on main that includes a change in the prompt folder and opens a PR to keep the docs up to date AND i've included a snippet to quickly generate a prompt file.
This does make the setup a bit more complex, but the docs look very nice with a
Copy the prompt
details that allow the user to copy that.WDYT? Should we do this?