fix(config): create settings.json on first run; keep legacy claude.json read compatibility
This commit is contained in:
@@ -17,8 +17,13 @@ pub fn get_claude_settings_path() -> PathBuf {
|
|||||||
if settings.exists() {
|
if settings.exists() {
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
// 兼容旧版命名:claude.json
|
// 兼容旧版命名:若存在旧文件则继续使用
|
||||||
dir.join("claude.json")
|
let legacy = dir.join("claude.json");
|
||||||
|
if legacy.exists() {
|
||||||
|
return legacy;
|
||||||
|
}
|
||||||
|
// 默认新建:回落到标准文件名 settings.json(不再生成 claude.json)
|
||||||
|
settings
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取应用配置目录路径 (~/.cc-switch)
|
/// 获取应用配置目录路径 (~/.cc-switch)
|
||||||
|
|||||||
Reference in New Issue
Block a user