✨ feat(profile):应用配置文件时自动设置GPG签名和SSH配置
♻️ refactor(generator):移除未使用的导入和剪贴板功能 ♻️ refactor(git):清理未使用的导入和优化代码结构 ♻️ refactor(i18n):简化翻译模块的导出结构 ♻️ refactor(llm):移除未使用的序列化导入 ♻️ refactor(openrouter):简化模型验证函数
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user