chore: prompt tweaks

This commit is contained in:
iff 2025-04-09 15:51:56 +02:00
parent b2a01a97db
commit 2056c679f4
2 changed files with 7 additions and 7 deletions

View file

@ -194,8 +194,8 @@ pub async fn ai_suggestion(last_command: &str, error_msg: &str) {
.trim() .trim()
.trim_end_matches("```") .trim_end_matches("```")
.trim() .trim()
.trim_start_matches("<suggestions>") .trim_start_matches("<suggest>")
.trim_end_matches("</suggestions>") .trim_end_matches("</suggest>")
.replace("<br>", "<_PR_BR>"); .replace("<br>", "<_PR_BR>");
println!("{}", suggestions); println!("{}", suggestions);

View file

@ -1,15 +1,15 @@
{{ additional_prompt }} {{ additional_prompt }}
`{{ last_command }}` returns the following error message: `{{ error_msg }}`. Guess the intention of the command and provide possible commands to solve the issue. `{{ last_command }}` returns the following message: `{{ error_msg }}`. Guess the intention of the command and provide possible commands to solve the issue.
Only provide commands in the <suggestions> section. Do not include any additional text. Only provide commands in the <suggest> section. Do not include any additional text.
No other text allowed outside the <note> and <suggestions> sections. No other text allowed outside the <note> and <suggest> sections.
Your answer should be in the following format: Your answer should be in the following format:
``` ```
<note> <note>
Anything other than the commands should be included in this section. Explain why your suggestions can be helpful{{ set_locale }}. Anything other than the commands should be included in this section. Explain why your suggestions can be helpful{{ set_locale }}.
</note> </note>
<suggestions> <suggest>
command command
<br> <br>
command command
</suggestions> </suggest>
``` ```