@hivegpt/hiveai-angular 0.0.167 → 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.
- package/bundles/hivegpt-hiveai-angular.umd.js +12 -15
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +13 -15
- package/esm2015/lib/components/socket-service.service.js +1 -2
- package/fesm2015/hivegpt-hiveai-angular.js +12 -15
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/lib/components/socket-service.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -630,7 +630,6 @@
|
|
|
630
630
|
console.log('Registering user-specific Hive socket with botId:' + botId);
|
|
631
631
|
console.log('and conversation_id:' + conversation_id);
|
|
632
632
|
this.notificationSocket.emit('joinData', {
|
|
633
|
-
userId: '66ac75cd6e30981904ab74ab',
|
|
634
633
|
groupId: "Hive_AI_Notifs_" + botId + "_" + conversation_id,
|
|
635
634
|
});
|
|
636
635
|
this.notificationSocket
|
|
@@ -807,10 +806,8 @@
|
|
|
807
806
|
}, 200);
|
|
808
807
|
};
|
|
809
808
|
ChatDrawerComponent.prototype.initializeSocket = function () {
|
|
810
|
-
|
|
811
|
-
console.log(this.botId);
|
|
809
|
+
;
|
|
812
810
|
var conversation_id = this.conversation.getKey(this.botId);
|
|
813
|
-
console.log(conversation_id);
|
|
814
811
|
this.socketService.registerUserSpecificHiveSocket(this.botId, conversation_id);
|
|
815
812
|
};
|
|
816
813
|
ChatDrawerComponent.prototype.listenSockets = function () {
|
|
@@ -991,19 +988,19 @@
|
|
|
991
988
|
if (!message || !((message === null || message === void 0 ? void 0 : message.length) > 0)) {
|
|
992
989
|
return '';
|
|
993
990
|
}
|
|
994
|
-
console.log('here is my message')
|
|
995
|
-
console.log(message);
|
|
991
|
+
// console.log('here is my message')
|
|
992
|
+
// console.log(message);
|
|
996
993
|
message = message.trim();
|
|
997
994
|
var markdownLinkRegex = /\[([^[]+)]\(([^)]+)\)/g;
|
|
998
995
|
var urlRegex = /(?<!href=")\bhttps?:\/\/\S+(?<![.,])/gi;
|
|
999
996
|
if (markdownLinkRegex.test(message)) {
|
|
1000
997
|
var html = message.replace(markdownLinkRegex, '<a href="$2" target="_blank">$1</a>');
|
|
1001
|
-
console.log('Sanitized message: ', message);
|
|
998
|
+
//console.log('Sanitized message: ', message);
|
|
1002
999
|
return this.sanitizeHtml(html);
|
|
1003
1000
|
}
|
|
1004
1001
|
if (urlRegex.test(message)) {
|
|
1005
1002
|
var html = message.replace(urlRegex, '<a href="$&" target="_blank">$&</a>');
|
|
1006
|
-
console.log('Sanitized message: ', message);
|
|
1003
|
+
// console.log('Sanitized message: ', message);
|
|
1007
1004
|
return this.sanitizeHtml(html);
|
|
1008
1005
|
}
|
|
1009
1006
|
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
|
@@ -1541,7 +1538,7 @@
|
|
|
1541
1538
|
};
|
|
1542
1539
|
ChatDrawerComponent.prototype.onAgentChange = function (agent) {
|
|
1543
1540
|
//agent.selected = !agent.selected;
|
|
1544
|
-
console.log(agent);
|
|
1541
|
+
//console.log(agent);
|
|
1545
1542
|
var agentFound = this.agents.filter(function (p) { return p.id == agent.id; });
|
|
1546
1543
|
if (agentFound && agentFound.length > 0) {
|
|
1547
1544
|
agentFound[0].selected = !agentFound[0].selected;
|
|
@@ -1591,25 +1588,25 @@
|
|
|
1591
1588
|
console.error('Input Markdown is null or empty');
|
|
1592
1589
|
return '';
|
|
1593
1590
|
}
|
|
1594
|
-
console.log('Markdown input:', markdown);
|
|
1591
|
+
//console.log('Markdown input:', markdown);
|
|
1595
1592
|
// Convert Markdown headers to HTML headers
|
|
1596
1593
|
var html = markdown.replace(/^(#{1,6})\s+(.*)$/gm, function (match, hashes, text) {
|
|
1597
1594
|
var level = hashes.length;
|
|
1598
1595
|
return "<h" + level + ">" + text + "</h" + level + ">";
|
|
1599
1596
|
});
|
|
1600
|
-
console.log('After header conversion:', html);
|
|
1597
|
+
// console.log('After header conversion:', html);
|
|
1601
1598
|
// Convert Markdown links to HTML links
|
|
1602
1599
|
html = html.replace(/\[([^\]]+)]\(([^)]+)\)/g, '<a href="$2" target="_blank">$1</a>');
|
|
1603
|
-
console.log('After link conversion:', html);
|
|
1600
|
+
// console.log('After link conversion:', html);
|
|
1604
1601
|
// Convert Markdown bold to HTML strong
|
|
1605
1602
|
html = html.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
|
1606
|
-
console.log('After bold conversion:', html);
|
|
1603
|
+
//console.log('After bold conversion:', html);
|
|
1607
1604
|
// Convert new lines to <br> tags
|
|
1608
1605
|
html = html.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
|
1609
|
-
console.log('After line breaks conversion:', html);
|
|
1606
|
+
// console.log('After line breaks conversion:', html);
|
|
1610
1607
|
// Optional: Sanitize the HTML to prevent XSS
|
|
1611
1608
|
var sanitizedHtml = this.sanitizeHtml(html);
|
|
1612
|
-
console.log('Sanitized HTML:', sanitizedHtml);
|
|
1609
|
+
// console.log('Sanitized HTML:', sanitizedHtml);
|
|
1613
1610
|
return sanitizedHtml;
|
|
1614
1611
|
};
|
|
1615
1612
|
ChatDrawerComponent.prototype.toggleCollapse = function () {
|