mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
chore: quick return for empty runtime key
This commit is contained in:
parent
d1b42d1c59
commit
e15ff2d2b4
2 changed files with 8 additions and 3 deletions
|
|
@ -50,7 +50,12 @@ pub fn ai_suggestion(last_command: &str, error_msg: &str) -> Option<AISuggest> {
|
|||
};
|
||||
|
||||
let api_key = match api_key {
|
||||
Some(key) => key,
|
||||
Some(key) => {
|
||||
if key.is_empty() {
|
||||
return None;
|
||||
}
|
||||
key
|
||||
}
|
||||
None => {
|
||||
return None;
|
||||
}
|
||||
|
|
@ -81,7 +86,7 @@ You run the command `{last_command}` and get the following error message: `{erro
|
|||
```
|
||||
{{"command":"your suggestion","note":"why you think this command will fix the error"}}
|
||||
```
|
||||
{set_locale}If you don't know the answer or can't provide a good suggestion, please reply the command field with `None` and a explanation in note
|
||||
{set_locale}If you can't provide a good suggestion, please reply the command field with `None` and a explanation in note
|
||||
"#
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue