@saltcorn/agents 0.6.1 → 0.6.2
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-view.js +4 -1
- package/common.js +4 -3
- package/package.json +1 -1
- package/skills/EmbeddingRetrieval.js +4 -0
package/agent-view.js
CHANGED
|
@@ -629,7 +629,9 @@ const run = async (
|
|
|
629
629
|
if(res.run_id && (!$runidin.val() || $runidin.val()=="undefined"))
|
|
630
630
|
$runidin.val(res.run_id);
|
|
631
631
|
const wrapSegment = (html, who) => '<div class="interaction-segment"><span class="badge bg-secondary">'+who+'</span>'+html+'</div>'
|
|
632
|
-
$("
|
|
632
|
+
const user_input = $("textarea[name=userinput]").val()
|
|
633
|
+
if(user_input)
|
|
634
|
+
$("#copilotinteractions").append(wrapSegment('<p>'+user_input+'</p>'+fileBadge, "You"))
|
|
633
635
|
$("textarea[name=userinput]").val("")
|
|
634
636
|
$('form.agent-view div.next_response_scratch').html("")
|
|
635
637
|
window['stream scratch ${viewname} ${rndid}'] = []
|
|
@@ -806,6 +808,7 @@ const interact = async (table_id, viewname, config, body, { req, res }) => {
|
|
|
806
808
|
db.getTenantSchema(),
|
|
807
809
|
{
|
|
808
810
|
error: e?.message || e,
|
|
811
|
+
page_load_tag: req?.headers?.["page-load-tag"],
|
|
809
812
|
},
|
|
810
813
|
[req.user.id],
|
|
811
814
|
);
|
package/common.js
CHANGED
|
@@ -242,13 +242,14 @@ const process_interaction = async (
|
|
|
242
242
|
db.getTenantSchema(),
|
|
243
243
|
{
|
|
244
244
|
eval_js: `processCopilotResponse({response: ${JSON.stringify(resp)}, run_id: ${run.id}})`,
|
|
245
|
+
page_load_tag: req?.headers?.["page-load-tag"],
|
|
245
246
|
},
|
|
246
247
|
[req.user.id],
|
|
247
248
|
);
|
|
248
249
|
else responses.push(resp);
|
|
249
250
|
await addToContext(run, {
|
|
250
|
-
|
|
251
|
-
|
|
251
|
+
html_interactions: [resp],
|
|
252
|
+
});
|
|
252
253
|
};
|
|
253
254
|
if (answer && typeof answer === "object" && answer.image_calls) {
|
|
254
255
|
for (const image_call of answer.image_calls) {
|
|
@@ -359,7 +360,7 @@ const process_interaction = async (
|
|
|
359
360
|
req,
|
|
360
361
|
});
|
|
361
362
|
if (rendered)
|
|
362
|
-
|
|
363
|
+
add_response(
|
|
363
364
|
wrapSegment(
|
|
364
365
|
wrapCard(
|
|
365
366
|
tool.skill.skill_label ||
|
package/package.json
CHANGED