You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/components/modai/src/Tools/EditChunk.php
+13-8Lines changed: 13 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ public static function getSuggestedName(): string
14
14
return'edit_chunk';
15
15
}
16
16
17
-
publicstaticfunctiongetDescription(): string
17
+
publicstaticfunctiongetPrompt(): string
18
18
{
19
19
return"Edits an existing Chunk, which is a reusable piece of HTML or other code that can be inserted into pages, templates, or other elements. Use when explicitly asked to create a chunk or when creating templates to break up reusable pieces. Get the current content to edit using the get_chunks tool. Chunks can be used by adding [[\$name_of_chunk]] in a template or elsewhere. ALWAYS ask for explicit user confirmation with the chunk name, description, and category name in a separate message BEFORE calling this function.";
20
20
}
@@ -48,7 +48,7 @@ public static function getParameters(): array
48
48
];
49
49
}
50
50
51
-
publicstaticfunctiongetConfig(): array
51
+
publicstaticfunctiongetConfig(modX$modx): array
52
52
{
53
53
return [];
54
54
}
@@ -59,25 +59,25 @@ public function __construct(modX $modx, array $config)
59
59
}
60
60
61
61
/**
62
-
* @param array $parameters
62
+
* @param array $arguments
63
63
* @return string
64
64
*/
65
-
publicfunctionrunTool($parameters): string
65
+
publicfunctionrunTool($arguments): string
66
66
{
67
67
if (!self::checkPermissions($this->modx)) {
68
68
returnjson_encode(['success' => false, "message" => "You do not have permission to use this tool."]);
69
69
}
70
70
71
-
if (empty($parameters)) {
71
+
if (empty($arguments)) {
72
72
returnjson_encode(['success' => false, 'message' => 'Parameters are required.']);
Copy file name to clipboardExpand all lines: core/components/modai/src/Tools/EditTemplate.php
+13-8Lines changed: 13 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ public static function getSuggestedName(): string
14
14
return'edit_template';
15
15
}
16
16
17
-
publicstaticfunctiongetDescription(): string
17
+
publicstaticfunctiongetPrompt(): string
18
18
{
19
19
return"Edits an existing template, which is used to render a resource on the front-end of the website. Use when explicitly asked to edit a template. In most cases, you should also check other templates to see the preferred coding style and structure of the website. Get the current content of the template with the get_templates tool. ALWAYS ask for explicit user confirmation with the template name and a summary of the changes you are making BEFORE calling this function.";
20
20
}
@@ -48,7 +48,7 @@ public static function getParameters(): array
48
48
];
49
49
}
50
50
51
-
publicstaticfunctiongetConfig(): array
51
+
publicstaticfunctiongetConfig(modX$modx): array
52
52
{
53
53
return [];
54
54
}
@@ -59,25 +59,25 @@ public function __construct(modX $modx, array $config)
59
59
}
60
60
61
61
/**
62
-
* @param array $parameters
62
+
* @param array $arguments
63
63
* @return string
64
64
*/
65
-
publicfunctionrunTool($parameters): string
65
+
publicfunctionrunTool($arguments): string
66
66
{
67
67
if (!self::checkPermissions($this->modx)) {
68
68
returnjson_encode(['success' => false, "message" => "You do not have permission to use this tool."]);
69
69
}
70
70
71
-
if (empty($parameters)) {
71
+
if (empty($arguments)) {
72
72
returnjson_encode(['success' => false, 'message' => 'Parameters are required.']);
0 commit comments