@saltcorn/sql 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-skill.js +10 -0
- package/package.json +1 -1
package/agent-skill.js
CHANGED
|
@@ -95,6 +95,7 @@ class SQLQuerySkill {
|
|
|
95
95
|
label: "Tool name",
|
|
96
96
|
type: "String",
|
|
97
97
|
showIf: { mode: "Tool" },
|
|
98
|
+
class: "validate-identifier",
|
|
98
99
|
},
|
|
99
100
|
{
|
|
100
101
|
name: "tool_description",
|
|
@@ -133,6 +134,13 @@ class SQLQuerySkill {
|
|
|
133
134
|
required: true,
|
|
134
135
|
attributes: { options: ["string", "number", "integer", "boolean"] },
|
|
135
136
|
},
|
|
137
|
+
{
|
|
138
|
+
name: "options",
|
|
139
|
+
label: "Options",
|
|
140
|
+
type: "String",
|
|
141
|
+
sublabel: "Optional. Comma-separated list of values",
|
|
142
|
+
showIf: { argtype: "string" },
|
|
143
|
+
},
|
|
136
144
|
],
|
|
137
145
|
}),
|
|
138
146
|
{
|
|
@@ -168,6 +176,8 @@ class SQLQuerySkill {
|
|
|
168
176
|
description: arg.description,
|
|
169
177
|
type: arg.argtype,
|
|
170
178
|
};
|
|
179
|
+
if (arg.options && arg.argtype === "string")
|
|
180
|
+
properties[arg.name].enum = arg.options.split(",").map((s) => s.trim());
|
|
171
181
|
});
|
|
172
182
|
return {
|
|
173
183
|
type: "function",
|