feat: Add execution command tool (#273)

This commit is contained in:
Petr Mironychev
2025-11-23 12:52:20 +01:00
committed by GitHub
parent a15f64a234
commit 07de415346
7 changed files with 321 additions and 1 deletions

View File

@ -28,6 +28,7 @@
#include "BuildProjectTool.hpp"
#include "CreateNewFileTool.hpp"
#include "EditFileTool.hpp"
#include "ExecuteTerminalCommandTool.hpp"
#include "FindAndReadFileTool.hpp"
#include "GetIssuesListTool.hpp"
#include "ListProjectFilesTool.hpp"
@ -50,6 +51,7 @@ void ToolsFactory::registerTools()
registerTool(new CreateNewFileTool(this));
registerTool(new EditFileTool(this));
registerTool(new BuildProjectTool(this));
registerTool(new ExecuteTerminalCommandTool(this));
registerTool(new ProjectSearchTool(this));
registerTool(new FindAndReadFileTool(this));
@ -100,6 +102,11 @@ QJsonArray ToolsFactory::getToolsDefinitions(
continue;
}
if (it.value()->name() == "execute_terminal_command"
&& !settings.enableTerminalCommandTool()) {
continue;
}
const auto requiredPerms = it.value()->requiredPermissions();
if (filter != LLMCore::RunToolsFilter::ALL) {