refactor: Separate and simplified tools (#340)

This commit is contained in:
Petr Mironychev
2026-04-19 18:12:15 +02:00
committed by GitHub
parent ede2c01eb7
commit 2891b313d2
16 changed files with 465 additions and 245 deletions

View File

@@ -49,10 +49,10 @@ QString CreateNewFileTool::displayName() const
QString CreateNewFileTool::description() const
{
return "Create a new empty file at the specified path. "
"If the directory path does not exist, it will be created automatically. "
"Provide absolute file path. After creating files, add the file "
"to the project file";
return "Create a new empty file at the given absolute path. Any missing parent directories "
"are created automatically. The file is written to disk only — it is NOT added to the "
"project's build system automatically; the user must register it in CMakeLists.txt or "
"the equivalent project file. Use `edit_file` afterwards to populate its content.";
}
QJsonObject CreateNewFileTool::parametersSchema() const
@@ -61,7 +61,9 @@ QJsonObject CreateNewFileTool::parametersSchema() const
QJsonObject filepathProperty;
filepathProperty["type"] = "string";
filepathProperty["description"] = "The absolute path where the new file should be created";
filepathProperty["description"]
= "Absolute path where the new file should be created. Parent directories are made if "
"missing. Relative paths are rejected.";
properties["filepath"] = filepathProperty;
QJsonObject definition;