@hivegpt/hiveai-angular 0.0.168 → 0.0.169

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.
@@ -806,10 +806,8 @@
806
806
  }, 200);
807
807
  };
808
808
  ChatDrawerComponent.prototype.initializeSocket = function () {
809
- console.log("Socket connection");
810
- console.log(this.botId);
809
+ ;
811
810
  var conversation_id = this.conversation.getKey(this.botId);
812
- console.log(conversation_id);
813
811
  this.socketService.registerUserSpecificHiveSocket(this.botId, conversation_id);
814
812
  };
815
813
  ChatDrawerComponent.prototype.listenSockets = function () {
@@ -990,19 +988,19 @@
990
988
  if (!message || !((message === null || message === void 0 ? void 0 : message.length) > 0)) {
991
989
  return '';
992
990
  }
993
- console.log('here is my message');
994
- console.log(message);
991
+ // console.log('here is my message')
992
+ // console.log(message);
995
993
  message = message.trim();
996
994
  var markdownLinkRegex = /\[([^[]+)]\(([^)]+)\)/g;
997
995
  var urlRegex = /(?<!href=")\bhttps?:\/\/\S+(?<![.,])/gi;
998
996
  if (markdownLinkRegex.test(message)) {
999
997
  var html = message.replace(markdownLinkRegex, '<a href="$2" target="_blank">$1</a>');
1000
- console.log('Sanitized message: ', message);
998
+ //console.log('Sanitized message: ', message);
1001
999
  return this.sanitizeHtml(html);
1002
1000
  }
1003
1001
  if (urlRegex.test(message)) {
1004
1002
  var html = message.replace(urlRegex, '<a href="$&" target="_blank">$&</a>');
1005
- console.log('Sanitized message: ', message);
1003
+ // console.log('Sanitized message: ', message);
1006
1004
  return this.sanitizeHtml(html);
1007
1005
  }
1008
1006
  message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
@@ -1540,7 +1538,7 @@
1540
1538
  };
1541
1539
  ChatDrawerComponent.prototype.onAgentChange = function (agent) {
1542
1540
  //agent.selected = !agent.selected;
1543
- console.log(agent);
1541
+ //console.log(agent);
1544
1542
  var agentFound = this.agents.filter(function (p) { return p.id == agent.id; });
1545
1543
  if (agentFound && agentFound.length > 0) {
1546
1544
  agentFound[0].selected = !agentFound[0].selected;
@@ -1590,25 +1588,25 @@
1590
1588
  console.error('Input Markdown is null or empty');
1591
1589
  return '';
1592
1590
  }
1593
- console.log('Markdown input:', markdown);
1591
+ //console.log('Markdown input:', markdown);
1594
1592
  // Convert Markdown headers to HTML headers
1595
1593
  var html = markdown.replace(/^(#{1,6})\s+(.*)$/gm, function (match, hashes, text) {
1596
1594
  var level = hashes.length;
1597
1595
  return "<h" + level + ">" + text + "</h" + level + ">";
1598
1596
  });
1599
- console.log('After header conversion:', html);
1597
+ // console.log('After header conversion:', html);
1600
1598
  // Convert Markdown links to HTML links
1601
1599
  html = html.replace(/\[([^\]]+)]\(([^)]+)\)/g, '<a href="$2" target="_blank">$1</a>');
1602
- console.log('After link conversion:', html);
1600
+ // console.log('After link conversion:', html);
1603
1601
  // Convert Markdown bold to HTML strong
1604
1602
  html = html.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
1605
- console.log('After bold conversion:', html);
1603
+ //console.log('After bold conversion:', html);
1606
1604
  // Convert new lines to <br> tags
1607
1605
  html = html.replace(/(?:\r\n|\r|\n)/g, '<br>');
1608
- console.log('After line breaks conversion:', html);
1606
+ // console.log('After line breaks conversion:', html);
1609
1607
  // Optional: Sanitize the HTML to prevent XSS
1610
1608
  var sanitizedHtml = this.sanitizeHtml(html);
1611
- console.log('Sanitized HTML:', sanitizedHtml);
1609
+ // console.log('Sanitized HTML:', sanitizedHtml);
1612
1610
  return sanitizedHtml;
1613
1611
  };
1614
1612
  ChatDrawerComponent.prototype.toggleCollapse = function () {