From 053d0e2b263f4be48028b7634ccec4b5543a6e69 Mon Sep 17 00:00:00 2001 From: syui Date: Fri, 7 Nov 2025 22:30:55 +0900 Subject: [PATCH] fix config --- src/data.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data.rs b/src/data.rs index f7835b4..2437b74 100644 --- a/src/data.rs +++ b/src/data.rs @@ -8,7 +8,7 @@ use std::io::Write; use std::path::Path; pub fn data_file(s: &str) -> String { - let file = "/.config/ai/"; + let file = "/.config/syui/ai/bot/"; let mut f = shellexpand::tilde("~").to_string(); f.push_str(&file); let path = Path::new(&f); @@ -24,7 +24,7 @@ pub fn data_file(s: &str) -> String { } pub fn log_file(s: &str) -> String { - let file = "/.config/ai/txt/"; + let file = "/.config/syui/ai/bot/txt/"; let mut f = shellexpand::tilde("~").to_string(); f.push_str(&file); let path = Path::new(&f); @@ -263,7 +263,7 @@ pub fn data_refresh(s: &str) -> String { pub fn data_scpt(s: &str) -> String { let s = String::from(s); - let file = "/.config/ai/scpt/".to_owned() + &s + &".zsh"; + let file = "/.config/syui/ai/bot/scpt/".to_owned() + &s + &".zsh"; let mut f = shellexpand::tilde("~").to_string(); f.push_str(&file); return f; @@ -603,7 +603,7 @@ pub fn w_cid(cid: String, file: String, t: bool) -> bool { } pub fn c_follow_all() { - let file = "/.config/ai/scpt/follow_all.zsh"; + let file = "/.config/syui/ai/bot/scpt/follow_all.zsh"; let mut f = shellexpand::tilde("~").to_string(); f.push_str(&file); use std::process::Command; @@ -617,7 +617,7 @@ pub fn c_openai_key(c: &Context) { let api = c.args[0].to_string(); let o = "api='".to_owned() + &api.to_string() + &"'".to_owned(); let o = o.to_string(); - let l = shellexpand::tilde("~") + "/.config/ai/openai.toml"; + let l = shellexpand::tilde("~") + "/.config/syui/ai/bot/openai.toml"; let l = l.to_string(); let mut l = fs::File::create(l).unwrap(); if o != "" { @@ -628,7 +628,7 @@ pub fn c_openai_key(c: &Context) { impl Open { pub fn new() -> Result { - let d = shellexpand::tilde("~") + "/.config/ai/openai.toml"; + let d = shellexpand::tilde("~") + "/.config/syui/ai/bot/openai.toml"; let s = Config::builder() .add_source(File::with_name(&d)) .add_source(config::Environment::with_prefix("APP"))