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 -
+
```