From 2056c679f4c0befbdd6f74bdd031f6127c7e3a51 Mon Sep 17 00:00:00 2001 From: iff Date: Wed, 9 Apr 2025 15:51:56 +0200 Subject: [PATCH] chore: prompt tweaks --- module-request-ai/src/requests.rs | 4 ++-- module-request-ai/templates/prompt.txt | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module-request-ai/src/requests.rs b/module-request-ai/src/requests.rs index 86f73e3..d2f3d0f 100644 --- a/module-request-ai/src/requests.rs +++ b/module-request-ai/src/requests.rs @@ -194,8 +194,8 @@ pub async fn ai_suggestion(last_command: &str, error_msg: &str) { .trim() .trim_end_matches("```") .trim() - .trim_start_matches("") - .trim_end_matches("") + .trim_start_matches("") + .trim_end_matches("") .replace("
", "<_PR_BR>"); println!("{}", suggestions); diff --git a/module-request-ai/templates/prompt.txt b/module-request-ai/templates/prompt.txt index 2f2857a..cfc6215 100644 --- a/module-request-ai/templates/prompt.txt +++ b/module-request-ai/templates/prompt.txt @@ -1,15 +1,15 @@ {{ 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. -Only provide commands in the section. Do not include any additional text. -No other text allowed outside the and sections. +`{{ 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 section. Do not include any additional text. +No other text allowed outside the and sections. Your answer should be in the following format: ``` Anything other than the commands should be included in this section. Explain why your suggestions can be helpful{{ set_locale }}. - + command
command -
+
```