feat: Add 1 and update 3 files
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 33s
Build-Test-Publish / build (linux/arm64) (push) Successful in 2m44s

This commit is contained in:
j
2026-02-21 22:53:53 +13:00
parent dc66c950a1
commit 31fc29fdfb
4 changed files with 73 additions and 1 deletions

View File

@@ -440,6 +440,21 @@
return templates;
}
std::vector<std::pair<std::string, std::string>> template_manager::get_template_list_with_source() const
{
ASSERT(mLoaded && mSources.size() > 0, "Template manager not loaded, or no template sources found.");
std::vector<std::pair<std::string, std::string>> result;
std::set<std::string> seen;
for (const auto& source : mSources) {
auto source_templates = source->get_template_list();
for (const auto& t : source_templates) {
if (seen.insert(t).second)
result.push_back({t, source->get_description()});
}
}
return result;
}
bool template_manager::has_template(const std::string &template_name) const
{
ASSERT(mLoaded && mSources.size() > 0, "Template manager not loaded, or no template sources found.");