mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 23:55:09 +01:00
feat: multiple AI suggestion
This commit is contained in:
parent
dc705545ce
commit
6392118cb6
2 changed files with 6 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ struct Messages {
|
|||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct AISuggest {
|
||||
pub command: String,
|
||||
pub commands: Vec<String>,
|
||||
pub note: String,
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ pub fn ai_suggestion(last_command: &str, error_msg: &str) -> Option<AISuggest> {
|
|||
|
||||
let user_locale = {
|
||||
let locale = std::env::var("_PR_AI_LOCALE")
|
||||
.unwrap_or_else(|_| get_locale().unwrap_or("en".to_string()));
|
||||
.unwrap_or_else(|_| get_locale().unwrap_or("en-us".to_string()));
|
||||
if locale.len() < 2 {
|
||||
"en-US".to_string()
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue