feat(profile):应用配置文件时自动设置GPG签名和SSH配置

♻️ refactor(generator):移除未使用的导入和剪贴板功能
♻️ refactor(git):清理未使用的导入和优化代码结构
♻️ refactor(i18n):简化翻译模块的导出结构
♻️ refactor(llm):移除未使用的序列化导入
♻️ refactor(openrouter):简化模型验证函数
This commit is contained in:
2026-02-04 10:57:15 +08:00
parent 88324c21c2
commit c9073ff4a7
10 changed files with 31 additions and 31 deletions

View File

@@ -437,10 +437,18 @@ impl ProfileCommand {
let repo_path = repo.path().to_string_lossy().to_string();
manager.set_repo_profile(repo_path, name.to_string())?;
manager.set_repo_profile(repo_path.clone(), name.to_string())?;
// Get the profile and apply it to the repository
let profile = manager.get_profile(name)
.ok_or_else(|| anyhow::anyhow!("Profile '{}' not found", name))?;
profile.apply_to_repo(repo.inner())?;
manager.record_profile_usage(name, Some(repo_path))?;
manager.save()?;
println!("{} Set '{}' for current repository", "".green(), name.cyan());
println!("{} Applied profile '{}' to current repository", "".green(), name.cyan());
Ok(())
}