mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
chore: cleanup
This commit is contained in:
parent
e5da2e3e6a
commit
91cc44cb5f
2 changed files with 5 additions and 6 deletions
|
|
@ -25,6 +25,10 @@ i18n!("i18n", fallback = "en", minify_key = true);
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), std::io::Error> {
|
async fn main() -> Result<(), std::io::Error> {
|
||||||
|
if std::env::var("_PR_AI_DISABLE").is_ok() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let locale = {
|
let locale = {
|
||||||
let sys_locale = get_locale().unwrap_or("en-US".to_string());
|
let sys_locale = get_locale().unwrap_or("en-US".to_string());
|
||||||
if sys_locale.len() < 2 {
|
if sys_locale.len() < 2 {
|
||||||
|
|
@ -58,7 +62,6 @@ async fn main() -> Result<(), std::io::Error> {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
ai_suggestion(&command, &error).await;
|
ai_suggestion(&command, &error).await;
|
||||||
// if let Some(suggest) = suggest {
|
|
||||||
// }
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,6 @@ struct AiPrompt<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn ai_suggestion(last_command: &str, error_msg: &str) {
|
pub async fn ai_suggestion(last_command: &str, error_msg: &str) {
|
||||||
if std::env::var("_PR_AI_DISABLE").is_ok() {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let conf = match Conf::new() {
|
let conf = match Conf::new() {
|
||||||
Some(conf) => conf,
|
Some(conf) => conf,
|
||||||
None => {
|
None => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue