@saltcorn/agents 0.7.12 → 0.7.13

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.
Files changed (2) hide show
  1. package/agent-view.js +6 -1
  2. package/package.json +1 -1
package/agent-view.js CHANGED
@@ -1475,10 +1475,15 @@ const execute_user_action = async (
1475
1475
  const dyn_updates = getState().getConfig("enable_dynamic_updates", true);
1476
1476
 
1477
1477
  if (dyn_updates && uadata.click_replace_text) {
1478
+ const { layout } = config;
1479
+
1480
+ const resp = JSON.stringify(
1481
+ wrapSegment(uadata.click_replace_text, "You", true, layout),
1482
+ );
1478
1483
  getState().emitDynamicUpdate(
1479
1484
  db.getTenantSchema(),
1480
1485
  {
1481
- eval_js: `spin_send_button();${`$("button[data-useraction-id=${uadata.rndid}]").replaceWith("${uadata.click_replace_text}")`}`,
1486
+ eval_js: `spin_send_button();$("button[data-useraction-id=${uadata.rndid}]").replaceWith("");processCopilotResponse({response: ${resp}, run_id: ${run.id}}, true)`,
1482
1487
  page_load_tag: req?.headers?.["page-load-tag"],
1483
1488
  },
1484
1489
  [req.user.id],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/agents",
3
- "version": "0.7.12",
3
+ "version": "0.7.13",
4
4
  "description": "AI agents for Saltcorn",
5
5
  "main": "index.js",
6
6
  "dependencies": {