@saltcorn/sql 0.5.4 → 0.5.5
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 +11 -3
- package/package.json +1 -1
package/agent-skill.js
CHANGED
|
@@ -157,6 +157,12 @@ class SQLQuerySkill {
|
|
|
157
157
|
type: "String",
|
|
158
158
|
fieldview: "textarea",
|
|
159
159
|
},
|
|
160
|
+
{
|
|
161
|
+
name: "display_result",
|
|
162
|
+
label: "Display result",
|
|
163
|
+
type: "Bool",
|
|
164
|
+
sublabel: "Show rows from the query in JSON format",
|
|
165
|
+
},
|
|
160
166
|
{
|
|
161
167
|
name: "row_format",
|
|
162
168
|
label: "Row format",
|
|
@@ -187,9 +193,11 @@ class SQLQuerySkill {
|
|
|
187
193
|
/*renderToolCall({ phrase }, { req }) {
|
|
188
194
|
return div({ class: "border border-primary p-2 m-2" }, phrase);
|
|
189
195
|
},*/
|
|
190
|
-
renderToolResponse:
|
|
191
|
-
|
|
192
|
-
|
|
196
|
+
renderToolResponse: this.display_result
|
|
197
|
+
? async (response, { req }) => {
|
|
198
|
+
return div({ class: "border border-success p-2 m-2" }, response);
|
|
199
|
+
}
|
|
200
|
+
: undefined,
|
|
193
201
|
function: {
|
|
194
202
|
name: this.tool_name,
|
|
195
203
|
description: this.tool_description,
|