Przeglądaj źródła

Ticket #5675 - AI Agents: Manual agent for chatting.

AntonLV 1 miesiąc temu
rodzic
commit
7a1c344104
2 zmienionych plików z 4 dodań i 4 usunięć
  1. 3 3
      studio/js/agents.js
  2. 1 1
      template/scripts/BxBaseServices.php

+ 3 - 3
studio/js/agents.js

@@ -185,11 +185,11 @@ BxDolStudioPageAgents.prototype._openAgentChatThread = function(oBtn) {
 };
 
 BxDolStudioPageAgents.prototype._initWritableAgentChat = function(sSelector, iAgentId, iContext) {
-        if (typeof una === 'undefined' || !una.Chat)
-            return;
+    if (typeof una === 'undefined' || !una.Chat)
+        return;
 
     var sRoot = (typeof sUrlRoot !== 'undefined') ? sUrlRoot : '/';
-    var sEndpoint = sRoot + 'sys-ai-chat.php?id=' + encodeURIComponent(iAgentId);
+    var sEndpoint = sRoot + 'sys-ai-chat/' + encodeURIComponent(iAgentId);
     iContext = parseInt(iContext, 10) || 0;
     if (iContext > 0)
         sEndpoint += '&context=' + encodeURIComponent(iContext);

+ 1 - 1
template/scripts/BxBaseServices.php

@@ -887,7 +887,7 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
             'hidden_first_message' => (string)($aAgent['hidden_first_message'] ?? ''),
             ])];
 
-        $sEndpoint = BX_DOL_URL_ROOT . 'sys-ai-chat.php?id=' . (int)$iId;
+        $sEndpoint = BX_DOL_URL_ROOT . 'sys-ai-chat/' . (int)$iId;
         if ($iContextPid > 0)
             $sEndpoint .= '&context=' . $iContextPid;