docs: Fix assistant prompt_overrides template directory (#20434)
Update docs to reflect the correct path for prompt handlebars templates. Link to git repo for prompts rather than including an out of date version inline. Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
parent
050ce919ba
commit
4c8c6c08fe
1 changed files with 5 additions and 67 deletions
|
@ -138,7 +138,6 @@ Zed has the following internal prompt templates:
|
|||
- `content_prompt.hbs`: Used for generating content in the editor.
|
||||
- `terminal_assistant_prompt.hbs`: Used for the terminal assistant feature.
|
||||
- `suggest_edits.hbs`: Used for generating the model instructions for the XML Suggest Edits should return.
|
||||
- `step_resolution.hbs`: Used for generating the step resolution prompt.
|
||||
|
||||
At this point it is unknown if we will expand templates further to be user-creatable.
|
||||
|
||||
|
@ -146,78 +145,17 @@ At this point it is unknown if we will expand templates further to be user-creat
|
|||
|
||||
> **Note:** It is not recommended to override templates unless you know what you are doing. Editing templates will break your assistant if done incorrectly.
|
||||
|
||||
Zed allows you to override the default prompts used for various assistant features by placing custom Handlebars (.hbs) templates in your `~/.config/zed/prompts/templates` directory.
|
||||
Zed allows you to override the default prompts used for various assistant features by placing custom Handlebars (.hbs) templates in your `~/.config/zed/prompt_overrides` directory.
|
||||
|
||||
The following templates can be overridden:
|
||||
|
||||
1. `content_prompt.hbs`: Used for generating content in the editor.
|
||||
Format:
|
||||
1. [`content_prompt.hbs`](https://github.com/zed-industries/zed/tree/main/assets/prompts/content_prompt.hbs): Used for generating content in the editor.
|
||||
|
||||
```handlebars
|
||||
You are an AI programming assistant. Your task is to
|
||||
{{#if is_insert}}insert{{else}}rewrite{{/if}}
|
||||
{{content_type}}{{#if language_name}} in {{language_name}}{{/if}}
|
||||
based on the following context and user request. Context:
|
||||
{{#if is_truncated}}
|
||||
[Content truncated...]
|
||||
{{/if}}
|
||||
{{document_content}}
|
||||
{{#if is_truncated}}
|
||||
[Content truncated...]
|
||||
{{/if}}
|
||||
2. [`terminal_assistant_prompt.hbs`](https://github.com/zed-industries/zed/tree/main/assets/prompts/terminal_assistant_prompt.hbs): Used for the terminal assistant feature.
|
||||
|
||||
User request:
|
||||
{{user_prompt}}
|
||||
3. [`suggest_edits.hbs`](https://github.com/zed-industries/zed/tree/main/assets/prompts/suggest_edits.hbs): Used for generating the model instructions for the XML Suggest Edits should return.
|
||||
|
||||
{{#if rewrite_section}}
|
||||
Please rewrite the section enclosed in
|
||||
<rewrite_this></rewrite_this>
|
||||
tags.
|
||||
{{else}}
|
||||
Please insert your response at the
|
||||
<insert_here></insert_here>
|
||||
tag.
|
||||
{{/if}}
|
||||
|
||||
Provide only the
|
||||
{{content_type}}
|
||||
content in your response, without any additional explanation.
|
||||
```
|
||||
|
||||
2. `terminal_assistant_prompt.hbs`: Used for the terminal assistant feature.
|
||||
Format:
|
||||
|
||||
```handlebars
|
||||
You are an AI assistant for a terminal emulator. Provide helpful responses to
|
||||
user queries about terminal commands, file systems, and general computer
|
||||
usage. System information: - Operating System:
|
||||
{{os}}
|
||||
- Architecture:
|
||||
{{arch}}
|
||||
{{#if shell}}
|
||||
- Shell:
|
||||
{{shell}}
|
||||
{{/if}}
|
||||
{{#if working_directory}}
|
||||
- Current Working Directory:
|
||||
{{working_directory}}
|
||||
{{/if}}
|
||||
|
||||
Latest terminal output:
|
||||
{{#each latest_output}}
|
||||
{{this}}
|
||||
{{/each}}
|
||||
|
||||
User query:
|
||||
{{user_prompt}}
|
||||
|
||||
Provide a clear and concise response to the user's query, considering the
|
||||
given system information and latest terminal output if relevant.
|
||||
```
|
||||
|
||||
3. `suggest_edits.hbs`: Used for generating the model instructions for the XML Suggest Edits should return.
|
||||
|
||||
4. `step_resolution.hbs`: Used for generating the step resolution prompt.
|
||||
4. [`project_slash_command.hbs`](https://github.com/zed-industries/zed/tree/main/assets/prompts/project_slash_command.hbs)
|
||||
|
||||
> **Note:** Be sure you want to override these, as you'll miss out on iteration on our built-in features. This should be primarily used when developing Zed.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue