// Copyright (C) 2024-2026 Petr Mironychev // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include namespace LLMQore { class ToolsManager; } namespace QodeAssist { class ToolContributorRegistry { public: using Contributor = std::function; void add(Contributor contributor) { if (contributor) m_contributors.push_back(std::move(contributor)); } void contribute(LLMQore::ToolsManager *tools) const { if (!tools) return; for (const auto &contributor : m_contributors) contributor(tools); } void clear() { m_contributors.clear(); } private: std::vector m_contributors; }; } // namespace QodeAssist