2
0

refactor(config): unify config to ai.syui.log/config.json, remove gpt config dependency

This commit is contained in:
2026-03-24 16:23:50 +09:00
parent 185e773a2c
commit 6c1aff6d8d
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ pub fn shared_config_path() -> String {
format!("{}/ai.syui.log/config.json", config_dir()) format!("{}/ai.syui.log/config.json", config_dir())
} }
/// Path to aigpt config: $cfg/ai.syui.gpt/config.json /// Path to aigpt config (same content as shared, may be symlink)
pub fn gpt_config_path() -> String { pub fn gpt_config_path() -> String {
format!("{}/ai.syui.gpt/config.json", config_dir()) format!("{}/ai.syui.gpt/config.json", config_dir())
} }

View File

@@ -575,7 +575,7 @@ fn save_to_aigpt_memory(decision: &str, agents: &[serde_json::Value]) {
} }
fn aigpt_memory_dir() -> Option<String> { fn aigpt_memory_dir() -> Option<String> {
let config_path = config::gpt_config_path(); let config_path = config::shared_config_path();
let content = std::fs::read_to_string(&config_path).ok()?; let content = std::fs::read_to_string(&config_path).ok()?;
let config: serde_json::Value = serde_json::from_str(&content).ok()?; let config: serde_json::Value = serde_json::from_str(&content).ok()?;