feat(commit): 添加提交消息模板支持

- 移除 config 命令中未使用的 List 子命令及相关显示字段
- 统一 ChangelogCommand 和 CommitCommand 的 ContentGenerator 初始化方式
This commit is contained in:
2026-06-03 15:20:50 +08:00
parent 459670f363
commit 14ebb6857a
17 changed files with 494 additions and 653 deletions

View File

@@ -386,6 +386,22 @@ impl ConfigManager {
self.config.repo_profiles.get(repo_path)
}
/// Find profiles whose repo_patterns match the given repo path
pub fn match_profiles_by_repo_pattern(&self, repo_path: &str) -> Vec<&GitProfile> {
self.config
.profiles
.values()
.filter(|p| {
p.settings.repo_patterns.iter().any(|pattern| {
let trimmed = pattern.trim_matches('*');
repo_path.ends_with(trimmed)
|| repo_path.starts_with(trimmed)
|| repo_path == trimmed
})
})
.collect()
}
// LLM configuration
/// Get LLM provider