docs(cleanup): remove 'current' as special provider; align UI/messages and migration naming to 'default' and one-time import rule
- App: update auto-import message to '默认供应商' - README: clarify default import only when providers are empty - Plan doc: replace 'current entry' wording with current pointer (manager.current) - Migration: name live-imported item 'default' instead of 'current'
This commit is contained in:
@@ -164,7 +164,7 @@ pub fn migrate_copies_into_config(config: &mut MultiAppConfig) -> Result<bool, S
|
||||
let settings_path = crate::config::get_claude_settings_path();
|
||||
if settings_path.exists() {
|
||||
match crate::config::read_json_file::<Value>(&settings_path) {
|
||||
Ok(val) => Some(("current".to_string(), val)),
|
||||
Ok(val) => Some(("default".to_string(), val)),
|
||||
Err(e) => {
|
||||
log::warn!("读取 Claude live 配置失败: {}", e);
|
||||
None
|
||||
@@ -269,7 +269,7 @@ pub fn migrate_copies_into_config(config: &mut MultiAppConfig) -> Result<bool, S
|
||||
} else {
|
||||
String::new()
|
||||
};
|
||||
Some(("current".to_string(), serde_json::json!({"auth": auth, "config": cfg})))
|
||||
Some(("default".to_string(), serde_json::json!({"auth": auth, "config": cfg})))
|
||||
}
|
||||
Err(e) => {
|
||||
log::warn!("读取 Codex live auth.json 失败: {}", e);
|
||||
@@ -350,7 +350,7 @@ pub fn migrate_copies_into_config(config: &mut MultiAppConfig) -> Result<bool, S
|
||||
}
|
||||
}
|
||||
|
||||
// 若 current 为空,将 live 导入项设为 current
|
||||
// 若当前为空,将 live 导入项设为当前
|
||||
{
|
||||
let manager = config.get_manager_mut(&AppType::Claude).unwrap();
|
||||
if manager.current.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user