chore: format llm c files
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 9s
JS/TS / lint (pull_request) Successful in 9s
JS/TS / fmt (pull_request) Successful in 16s
C++ / clang-tidy (pull_request) Failing after 43s
Python / static (pull_request) Failing after 57s
Rust / fmt (pull_request) Successful in 1m30s
Rust / build (pull_request) Successful in 2m5s
Rust / clippy (pull_request) Successful in 1m55s
Python / verify (pull_request) Successful in 2m23s
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 9s
JS/TS / lint (pull_request) Successful in 9s
JS/TS / fmt (pull_request) Successful in 16s
C++ / clang-tidy (pull_request) Failing after 43s
Python / static (pull_request) Failing after 57s
Rust / fmt (pull_request) Successful in 1m30s
Rust / build (pull_request) Successful in 2m5s
Rust / clippy (pull_request) Successful in 1m55s
Python / verify (pull_request) Successful in 2m23s
This commit is contained in:
@@ -22,29 +22,25 @@ QJsonObject LlmTool::specification() const {
|
||||
ToolRegistry::ToolRegistry(QObject* parent) : QObject(parent) {}
|
||||
|
||||
void ToolRegistry::setEnabled(bool value) {
|
||||
if (m_enabled == value)
|
||||
return;
|
||||
if (m_enabled == value) return;
|
||||
m_enabled = value;
|
||||
Q_EMIT enabledChanged();
|
||||
}
|
||||
|
||||
void ToolRegistry::registerTool(LlmTool* tool) {
|
||||
if (!tool || m_tools.contains(tool))
|
||||
return;
|
||||
if (!tool || m_tools.contains(tool)) return;
|
||||
tool->setParent(this);
|
||||
m_tools.append(tool);
|
||||
}
|
||||
|
||||
LlmTool* ToolRegistry::tool(const QString& name) const {
|
||||
for (const auto* tool : m_tools)
|
||||
if (tool->name() == name)
|
||||
return const_cast<LlmTool*>(tool);
|
||||
if (tool->name() == name) return const_cast<LlmTool*>(tool);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QJsonArray ToolRegistry::specifications() const {
|
||||
if (!m_enabled)
|
||||
return {};
|
||||
if (!m_enabled) return {};
|
||||
QJsonArray specs;
|
||||
for (const auto* tool : m_tools)
|
||||
specs.append(tool->specification());
|
||||
|
||||
Reference in New Issue
Block a user