Update LLMQore to v0.0.4 (#339)

This commit is contained in:
Petr Mironychev
2026-04-19 11:58:54 +02:00
committed by GitHub
parent 6c05f0d594
commit ede2c01eb7
91 changed files with 381 additions and 2225 deletions

View File

@@ -18,7 +18,8 @@
*/
#include "ListProjectFilesTool.hpp"
#include "ToolExceptions.hpp"
#include <LLMQore/ToolExceptions.hpp>
#include <logger/Logger.hpp>
#include <projectexplorer/project.h>
@@ -63,15 +64,15 @@ QJsonObject ListProjectFilesTool::parametersSchema() const
return definition;
}
QFuture<QString> ListProjectFilesTool::executeAsync(const QJsonObject &input)
QFuture<LLMQore::ToolResult> ListProjectFilesTool::executeAsync(const QJsonObject &input)
{
Q_UNUSED(input)
return QtConcurrent::run([this]() -> QString {
return QtConcurrent::run([this]() -> LLMQore::ToolResult {
QList<ProjectExplorer::Project *> projects = ProjectExplorer::ProjectManager::projects();
if (projects.isEmpty()) {
QString error = "No projects found";
throw ToolRuntimeError(error);
throw LLMQore::ToolRuntimeError(error);
}
QString result;
@@ -123,7 +124,7 @@ QFuture<QString> ListProjectFilesTool::executeAsync(const QJsonObject &input)
result += "\n";
}
return result.trimmed();
return LLMQore::ToolResult::text(result.trimmed());
});
}