Introduce prompt override script and adjust names (#16094)

This PR introduces a new script for iterative development of prompt
overrides in Zed.

Just `script/prompts link` and your running Zed should start using
prompts from `zed/assets/prompts`. Use `script/prompts unlink` to undo.
You can also link with `script/prompts link --worktree` to store the
prompts to a `../zed_prompts` worktree that's a sibling of your repo, in
case you don't want to mess with your working copy. Just don't forget
about it!

Key changes:
- Add new `script/prompts` for managing prompt overrides
- Rename `prompt_templates_dir` to `prompt_overrides_dir` for clarity
- Update paths to use `~/.config/zed/prompt_overrides` instead of
`~/.config/zed/prompts/templates`
- Adjust `PromptBuilder` to use the new `prompt_overrides_dir` function

These changes simplify the process of customizing prompts and provide a
more intuitive naming convention for override-related functionality.

Release Notes:

- N/A
This commit is contained in:
Nathan Sobo 2024-08-11 17:21:17 -06:00 committed by GitHub
parent 10937c6e37
commit 355aebd0e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 61 additions and 4 deletions

View file

@ -54,7 +54,7 @@ impl PromptBuilder {
cx: &gpui::AppContext,
handlebars: Arc<Mutex<Handlebars<'static>>>,
) {
let templates_dir = paths::prompt_templates_dir();
let templates_dir = paths::prompt_overrides_dir();
cx.background_executor()
.spawn(async move {