@hivegpt/hiveai-angular 0.0.400 → 0.0.401
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 +46 -25
- 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 +6 -2
- package/esm2015/lib/components/voice-agent/components/voice-agent-modal/voice-agent-modal.component.js +19 -7
- package/esm2015/lib/components/voice-agent/services/voice-agent.service.js +7 -2
- package/esm2015/lib/components/voice-agent/voice-modal-tokens.js +1 -1
- package/fesm2015/hivegpt-hiveai-angular.js +29 -8
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/hivegpt-hiveai-angular.metadata.json +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/lib/components/voice-agent/components/voice-agent-modal/voice-agent-modal.component.d.ts +4 -0
- package/lib/components/voice-agent/components/voice-agent-modal/voice-agent-modal.component.d.ts.map +1 -1
- package/lib/components/voice-agent/services/voice-agent.service.d.ts +1 -1
- package/lib/components/voice-agent/services/voice-agent.service.d.ts.map +1 -1
- package/lib/components/voice-agent/voice-modal-tokens.d.ts +4 -0
- package/lib/components/voice-agent/voice-modal-tokens.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1209,7 +1209,7 @@
|
|
|
1209
1209
|
this.statusTextSubject.next('');
|
|
1210
1210
|
this.durationSubject.next('00:00');
|
|
1211
1211
|
};
|
|
1212
|
-
VoiceAgentService.prototype.connect = function (apiUrl, token, botId, conversationId) {
|
|
1212
|
+
VoiceAgentService.prototype.connect = function (apiUrl, token, botId, conversationId, apiKey, eventToken, eventUrl, domainAuthority) {
|
|
1213
1213
|
var _a;
|
|
1214
1214
|
return __awaiter(this, void 0, void 0, function () {
|
|
1215
1215
|
var baseUrl, connectUrl, headers, startBotParams, tracks, error_1;
|
|
@@ -1230,6 +1230,11 @@
|
|
|
1230
1230
|
headers = new Headers();
|
|
1231
1231
|
headers.set('Authorization', "Bearer " + token);
|
|
1232
1232
|
headers.set('Content-Type', 'application/json');
|
|
1233
|
+
headers.set('domain-authority', domainAuthority);
|
|
1234
|
+
headers.set('eventtoken', eventToken);
|
|
1235
|
+
headers.set('eventurl', eventUrl);
|
|
1236
|
+
headers.set('hive-bot-id', botId);
|
|
1237
|
+
headers.set('x-api-key', apiKey);
|
|
1233
1238
|
startBotParams = {
|
|
1234
1239
|
endpoint: connectUrl,
|
|
1235
1240
|
headers: headers,
|
|
@@ -1397,6 +1402,10 @@
|
|
|
1397
1402
|
this.audioAnalyzer = audioAnalyzer;
|
|
1398
1403
|
this.injector = injector;
|
|
1399
1404
|
this.close = new i0.EventEmitter();
|
|
1405
|
+
this.apiKey = '';
|
|
1406
|
+
this.eventToken = '';
|
|
1407
|
+
this.eventUrl = '';
|
|
1408
|
+
this.domainAuthority = 'prod-lite';
|
|
1400
1409
|
this.agentName = 'AI Assistant';
|
|
1401
1410
|
this.agentRole = 'AI Agent Specialist';
|
|
1402
1411
|
this.injectedConfig = null;
|
|
@@ -1413,7 +1422,7 @@
|
|
|
1413
1422
|
}
|
|
1414
1423
|
VoiceAgentModalComponent.prototype.ngOnInit = function () {
|
|
1415
1424
|
var _this = this;
|
|
1416
|
-
var _a, _b;
|
|
1425
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1417
1426
|
// When opened via Overlay, config is provided by injection
|
|
1418
1427
|
this.injectedConfig = this.injector.get(VOICE_MODAL_CONFIG, null);
|
|
1419
1428
|
this.onCloseCallback = this.injector.get(VOICE_MODAL_CLOSE_CALLBACK, null);
|
|
@@ -1422,8 +1431,12 @@
|
|
|
1422
1431
|
this.token = this.injectedConfig.token;
|
|
1423
1432
|
this.botId = this.injectedConfig.botId;
|
|
1424
1433
|
this.conversationId = this.injectedConfig.conversationId;
|
|
1425
|
-
this.
|
|
1426
|
-
this.
|
|
1434
|
+
this.apiKey = (_a = this.injectedConfig.apiKey) !== null && _a !== void 0 ? _a : '';
|
|
1435
|
+
this.eventToken = (_b = this.injectedConfig.eventToken) !== null && _b !== void 0 ? _b : '';
|
|
1436
|
+
this.eventUrl = (_c = this.injectedConfig.eventUrl) !== null && _c !== void 0 ? _c : '';
|
|
1437
|
+
this.domainAuthority = (_d = this.injectedConfig.domainAuthority) !== null && _d !== void 0 ? _d : 'prod-lite';
|
|
1438
|
+
this.agentName = (_e = this.injectedConfig.agentName) !== null && _e !== void 0 ? _e : this.agentName;
|
|
1439
|
+
this.agentRole = (_f = this.injectedConfig.agentRole) !== null && _f !== void 0 ? _f : this.agentRole;
|
|
1427
1440
|
this.agentAvatar = this.injectedConfig.agentAvatar;
|
|
1428
1441
|
}
|
|
1429
1442
|
// Subscribe to observables
|
|
@@ -1456,21 +1469,21 @@
|
|
|
1456
1469
|
VoiceAgentModalComponent.prototype.startCall = function () {
|
|
1457
1470
|
return __awaiter(this, void 0, void 0, function () {
|
|
1458
1471
|
var error_1;
|
|
1459
|
-
return __generator(this, function (
|
|
1460
|
-
switch (
|
|
1472
|
+
return __generator(this, function (_g) {
|
|
1473
|
+
switch (_g.label) {
|
|
1461
1474
|
case 0:
|
|
1462
1475
|
if (this.isConnecting || (this.callState !== 'idle' && this.callState !== 'ended'))
|
|
1463
1476
|
return [2 /*return*/];
|
|
1464
1477
|
this.isConnecting = true;
|
|
1465
|
-
|
|
1478
|
+
_g.label = 1;
|
|
1466
1479
|
case 1:
|
|
1467
|
-
|
|
1468
|
-
return [4 /*yield*/, this.voiceAgentService.connect(this.apiUrl, this.token, this.botId, this.conversationId)];
|
|
1480
|
+
_g.trys.push([1, 3, 4, 5]);
|
|
1481
|
+
return [4 /*yield*/, this.voiceAgentService.connect(this.apiUrl, this.token, this.botId, this.conversationId, this.apiKey, this.eventToken, this.eventUrl, this.domainAuthority)];
|
|
1469
1482
|
case 2:
|
|
1470
|
-
|
|
1483
|
+
_g.sent();
|
|
1471
1484
|
return [3 /*break*/, 5];
|
|
1472
1485
|
case 3:
|
|
1473
|
-
error_1 =
|
|
1486
|
+
error_1 = _g.sent();
|
|
1474
1487
|
console.error('Failed to connect voice agent:', error_1);
|
|
1475
1488
|
return [3 /*break*/, 5];
|
|
1476
1489
|
case 4:
|
|
@@ -1483,11 +1496,11 @@
|
|
|
1483
1496
|
};
|
|
1484
1497
|
VoiceAgentModalComponent.prototype.disconnect = function () {
|
|
1485
1498
|
return __awaiter(this, void 0, void 0, function () {
|
|
1486
|
-
return __generator(this, function (
|
|
1487
|
-
switch (
|
|
1499
|
+
return __generator(this, function (_g) {
|
|
1500
|
+
switch (_g.label) {
|
|
1488
1501
|
case 0: return [4 /*yield*/, this.voiceAgentService.disconnect()];
|
|
1489
1502
|
case 1:
|
|
1490
|
-
|
|
1503
|
+
_g.sent();
|
|
1491
1504
|
return [2 /*return*/];
|
|
1492
1505
|
}
|
|
1493
1506
|
});
|
|
@@ -1507,8 +1520,8 @@
|
|
|
1507
1520
|
VoiceAgentModalComponent.decorators = [
|
|
1508
1521
|
{ type: i0.Component, args: [{
|
|
1509
1522
|
selector: 'hivegpt-voice-agent-modal',
|
|
1510
|
-
template: "<div class=\"voice-agent-modal-overlay\" (click)=\"endCall()\">\n <div class=\"voice-agent-modal\" (click)=\"$event.stopPropagation()\">\n <!-- Header -->\n <div class=\"modal-header\">\n <div class=\"header-left\">\n <div class=\"voice-icon\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 1C8.13 1 5 4.13 5 8V14C5 17.87 8.13 21 12 21C15.87 21 19 17.87 19 14V8C19 4.13 15.87 1 12 1Z\" fill=\"currentColor\"/>\n <path d=\"M12 23C10.34 23 9 21.66 9 20H15C15 21.66 13.66 23 12 23Z\" fill=\"currentColor\"/>\n </svg>\n </div>\n <span class=\"voice-label\">Voice</span>\n </div>\n <button class=\"close-button\" (click)=\"endCall()\" type=\"button\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18 6L6 18M6 6L18 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n </button>\n </div>\n\n <!-- Agent Avatar -->\n <div class=\"agent-avatar-container\">\n <div class=\"agent-avatar\" [class.speaking]=\"isSpeaking\">\n <img *ngIf=\"agentAvatar\" [src]=\"agentAvatar\" [alt]=\"agentName\" />\n <div *ngIf=\"!agentAvatar\" class=\"avatar-placeholder\">\n {{ agentName.charAt(0) }}\n </div>\n </div>\n </div>\n\n <!-- Agent Info -->\n <div class=\"agent-info\">\n <div class=\"agent-name-row\">\n <h2 class=\"agent-name\">{{ agentName }}</h2>\n <span class=\"ai-badge\">AI</span>\n </div>\n <p class=\"agent-role\">{{ agentRole }}</p
|
|
1511
|
-
styles: [":host{display:block}.voice-agent-modal-overlay{align-items:flex-end;backdrop-filter:blur(4px);background:rgba(0,0,0,.5);bottom:0;display:flex;justify-content:flex-end;left:0;padding:24px;position:fixed;right:0;top:0;z-index:
|
|
1523
|
+
template: "<div class=\"voice-agent-modal-overlay\" (click)=\"endCall()\">\n <div class=\"voice-agent-modal\" (click)=\"$event.stopPropagation()\">\n <!-- Header -->\n <div class=\"modal-header\">\n <div class=\"header-left\">\n <div class=\"voice-icon\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 1C8.13 1 5 4.13 5 8V14C5 17.87 8.13 21 12 21C15.87 21 19 17.87 19 14V8C19 4.13 15.87 1 12 1Z\" fill=\"currentColor\"/>\n <path d=\"M12 23C10.34 23 9 21.66 9 20H15C15 21.66 13.66 23 12 23Z\" fill=\"currentColor\"/>\n </svg>\n </div>\n <span class=\"voice-label\">Voice</span>\n </div>\n <button class=\"close-button\" (click)=\"endCall()\" type=\"button\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18 6L6 18M6 6L18 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n </button>\n </div>\n\n <!-- Agent Avatar -->\n <div class=\"agent-avatar-container\">\n <div class=\"agent-avatar\" [class.speaking]=\"isSpeaking\">\n <img *ngIf=\"agentAvatar\" [src]=\"agentAvatar\" [alt]=\"agentName\" />\n <div *ngIf=\"!agentAvatar\" class=\"avatar-placeholder\">\n {{ agentName.charAt(0) }}\n </div>\n </div>\n </div>\n\n <!-- Agent Info -->\n <div class=\"agent-info\">\n <div class=\"agent-name-row\">\n <h2 class=\"agent-name\">{{ agentName }}</h2>\n <span class=\"ai-badge\">AI</span>\n </div>\n <!-- <p class=\"agent-role\">{{ agentRole }}</p> -->\n </div>\n\n <!-- Start Call / Retry (when idle or ended) -->\n <div *ngIf=\"callState === 'idle' || callState === 'ended'\" class=\"start-call-section\">\n <p *ngIf=\"statusText === 'Connection failed'\" class=\"error-message\">{{ statusText }}</p>\n <button\n class=\"start-call-button\"\n type=\"button\"\n [disabled]=\"isConnecting\"\n (click)=\"startCall()\"\n >\n <span *ngIf=\"isConnecting\">Connecting...</span>\n <span *ngIf=\"!isConnecting && statusText === 'Connection failed'\">Retry</span>\n <span *ngIf=\"!isConnecting && statusText !== 'Connection failed'\">Start Call</span>\n </button>\n </div>\n\n <!-- Status (when connecting or connected) -->\n <div class=\"status-section\" *ngIf=\"callState !== 'idle' && callState !== 'ended'\">\n <div *ngIf=\"callState === 'connecting'\" class=\"connecting-spinner\">\n <svg class=\"spinner\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-dasharray=\"31.416\" stroke-dashoffset=\"31.416\">\n <animate attributeName=\"stroke-dasharray\" dur=\"2s\" values=\"0 31.416;15.708 15.708;0 31.416;0 31.416\" repeatCount=\"indefinite\"/>\n <animate attributeName=\"stroke-dashoffset\" dur=\"2s\" values=\"0;-15.708;-31.416;-31.416\" repeatCount=\"indefinite\"/>\n </circle>\n </svg>\n <span class=\"status-text\">{{ statusText }}</span>\n </div>\n <div *ngIf=\"callState !== 'connecting'\" class=\"status-connected\">\n <span class=\"status-text\">{{ statusText || 'Connected' }}</span>\n <span class=\"duration\">{{ duration }}</span>\n </div>\n </div>\n\n <!-- Waveform Visualization -->\n <div *ngIf=\"callState === 'connected' || callState === 'listening' || callState === 'talking'\" class=\"waveform-container\">\n <div class=\"waveform-bars\">\n <div\n *ngFor=\"let level of audioLevels; let i = index\"\n class=\"waveform-bar\"\n [style.height.%]=\"level || 10\"\n [style.animation-delay.ms]=\"i * 20\"\n ></div>\n </div>\n </div>\n\n <!-- Call Controls (only when connected) -->\n <div class=\"call-controls\" *ngIf=\"callState === 'connected' || callState === 'listening' || callState === 'talking'\">\n <button\n class=\"control-button mute-button\"\n [class.muted]=\"isMicMuted\"\n (click)=\"toggleMic()\"\n type=\"button\"\n [title]=\"isMicMuted ? 'Unmute' : 'Mute'\"\n >\n <svg *ngIf=\"!isMicMuted\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 1C8.13 1 5 4.13 5 8V14C5 17.87 8.13 21 12 21C15.87 21 19 17.87 19 14V8C19 4.13 15.87 1 12 1Z\" fill=\"currentColor\"/>\n <path d=\"M12 23C10.34 23 9 21.66 9 20H15C15 21.66 13.66 23 12 23Z\" fill=\"currentColor\"/>\n </svg>\n <svg *ngIf=\"isMicMuted\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 1C8.13 1 5 4.13 5 8V14C5 17.87 8.13 21 12 21C15.87 21 19 17.87 19 14V8C19 4.13 15.87 1 12 1Z\" fill=\"currentColor\"/>\n <path d=\"M12 23C10.34 23 9 21.66 9 20H15C15 21.66 13.66 23 12 23Z\" fill=\"currentColor\"/>\n <path d=\"M3 3L21 21M9 9L15 15\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n <span class=\"control-label\">Mute</span>\n </button>\n\n <button\n class=\"control-button end-call-button\"\n (click)=\"endCall()\"\n type=\"button\"\n title=\"End Call\"\n >\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18 6L6 18M6 6L18 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n <span class=\"control-label\">End Call</span>\n </button>\n </div>\n </div>\n</div>\n",
|
|
1524
|
+
styles: [":host{display:block}.voice-agent-modal-overlay{align-items:flex-end;backdrop-filter:blur(4px);background:rgba(0,0,0,.5);bottom:0;display:flex;justify-content:flex-end;left:0;padding:24px;position:fixed;right:0;top:0;z-index:99999999999!important}.voice-agent-modal{animation:modalEnter .3s ease-out;background:#fff;border-radius:24px;box-shadow:0 20px 60px rgba(0,0,0,.3);max-height:calc(100vh - 48px);max-width:480px;overflow-y:auto;padding:32px;width:90%}@keyframes modalEnter{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.modal-header{justify-content:space-between;margin-bottom:24px}.header-left,.modal-header{align-items:center;display:flex}.header-left{gap:8px}.voice-icon{align-items:center;color:#17235b;display:flex;height:32px;justify-content:center;width:32px}.voice-label{color:#333;font-size:16px;font-weight:600}.close-button{align-items:center;background:none;border:none;color:#666;cursor:pointer;display:flex;justify-content:center;padding:8px;transition:color .2s}.close-button:hover{color:#000}.agent-avatar-container{display:flex;justify-content:center;margin-bottom:24px}.agent-avatar{border:3px solid #e0f2fe;border-radius:50%;height:120px;overflow:hidden;position:relative;transition:all .3s ease;width:120px}.agent-avatar.speaking{animation:speakingGlow 1.5s ease-in-out infinite;border-color:#0ea5e9;box-shadow:0 0 20px rgba(14,165,233,.4)}.agent-avatar img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}.avatar-placeholder{align-items:center;background:linear-gradient(135deg,#0ea5e9,#06b6d4);color:#fff;display:flex;font-size:48px;font-weight:600;height:100%;justify-content:center;width:100%}@keyframes speakingGlow{0%,to{box-shadow:0 0 20px rgba(14,165,233,.4)}50%{box-shadow:0 0 30px rgba(14,165,233,.6)}}.agent-info{margin-bottom:24px;text-align:center}.agent-name-row{align-items:center;display:flex;gap:12px;justify-content:center;margin-bottom:8px}.agent-name{color:#1f2937;font-size:28px;font-weight:700;margin:0}.ai-badge{background:#0ea5e9;border-radius:12px;color:#fff;font-size:12px;font-weight:600;padding:4px 12px}.agent-role{color:#6b7280;font-size:14px;margin:0}.start-call-section{align-items:center;display:flex;flex-direction:column;gap:16px;margin-bottom:24px}.error-message{color:#dc2626;font-size:14px;margin:0}.start-call-button{background:#0ea5e9;border:none;border-radius:12px;color:#fff;cursor:pointer;font-size:16px;font-weight:600;padding:14px 32px;transition:background .2s}.start-call-button:hover:not(:disabled){background:#0284c7}.start-call-button:disabled{cursor:not-allowed;opacity:.7}.status-section{flex-direction:column;margin-bottom:24px}.connecting-spinner,.status-section{align-items:center;display:flex;gap:12px}.spinner{animation:spin 1s linear infinite;color:#0ea5e9}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.status-connected{align-items:center;display:flex;flex-direction:column;gap:8px}.status-text{color:#4b5563;font-size:16px;font-weight:500}.duration{color:#9ca3af;font-family:monospace;font-size:14px}.waveform-container{margin-bottom:32px;width:100%}.waveform-bars{align-items:center;display:flex;gap:4px;height:60px;justify-content:center}.waveform-bar{animation:waveformPulse 1s ease-in-out infinite;background:linear-gradient(0deg,#0ea5e9,#06b6d4);border-radius:2px;min-height:10%;transition:height .1s ease;width:4px}@keyframes waveformPulse{0%,to{opacity:.6}50%{opacity:1}}.call-controls{gap:24px}.call-controls,.control-button{display:flex;justify-content:center}.control-button{align-items:center;border:none;border-radius:50%;cursor:pointer;flex-direction:column;gap:8px;height:80px;padding:16px;transition:all .2s;width:80px}.mute-button{background:#f3f4f6;color:#4b5563}.mute-button:hover{background:#e5e7eb}.mute-button.muted{background:#fee2e2;color:#dc2626}.end-call-button{background:#ef4444;color:#fff}.end-call-button:hover{background:#dc2626}.control-label{font-size:12px;font-weight:500;margin-top:4px}"]
|
|
1512
1525
|
},] }
|
|
1513
1526
|
];
|
|
1514
1527
|
VoiceAgentModalComponent.ctorParameters = function () { return [
|
|
@@ -1522,6 +1535,10 @@
|
|
|
1522
1535
|
token: [{ type: i0.Input }],
|
|
1523
1536
|
botId: [{ type: i0.Input }],
|
|
1524
1537
|
conversationId: [{ type: i0.Input }],
|
|
1538
|
+
apiKey: [{ type: i0.Input }],
|
|
1539
|
+
eventToken: [{ type: i0.Input }],
|
|
1540
|
+
eventUrl: [{ type: i0.Input }],
|
|
1541
|
+
domainAuthority: [{ type: i0.Input }],
|
|
1525
1542
|
agentName: [{ type: i0.Input }],
|
|
1526
1543
|
agentRole: [{ type: i0.Input }],
|
|
1527
1544
|
agentAvatar: [{ type: i0.Input }]
|
|
@@ -1762,7 +1779,7 @@
|
|
|
1762
1779
|
console.log(res);
|
|
1763
1780
|
// Check if OtherFields exists in the response
|
|
1764
1781
|
if ((_b = (_a = res === null || res === void 0 ? void 0 : res.m) === null || _a === void 0 ? void 0 : _a.OtherFields) === null || _b === void 0 ? void 0 : _b.workflow_id) {
|
|
1765
|
-
var
|
|
1782
|
+
var _l = (_c = res === null || res === void 0 ? void 0 : res.m) === null || _c === void 0 ? void 0 : _c.OtherFields, percentage = _l.percentage, output = _l.output, action_name = _l.action_name, current_action_name_1 = _l.current_action_name, workflow_execution_id = _l.workflow_execution_id, time_stamp = _l.time_stamp;
|
|
1766
1783
|
_this.currentWorkflowActionProgress = percentage;
|
|
1767
1784
|
_this.currentWorkflowAction = action_name;
|
|
1768
1785
|
var actionIndex = _this.workflowExecutionDetails.Actions.findIndex(function (a) { return a.Name == current_action_name_1; });
|
|
@@ -1786,7 +1803,7 @@
|
|
|
1786
1803
|
_this.cdr.detectChanges();
|
|
1787
1804
|
}
|
|
1788
1805
|
else if ((_d = res === null || res === void 0 ? void 0 : res.m) === null || _d === void 0 ? void 0 : _d.OtherFields) {
|
|
1789
|
-
var
|
|
1806
|
+
var _m = (_e = res === null || res === void 0 ? void 0 : res.m) === null || _e === void 0 ? void 0 : _e.OtherFields, conversation_id = _m.conversation_id, bot_id = _m.bot_id, message_id_1 = _m.message_id, answer = _m.answer, web_results = _m.web_results, search_results = _m.search_results, graphs = _m.graphs, execution_graphs = _m.execution_graphs, suggestions = _m.suggestions;
|
|
1790
1807
|
console.log('message_id1');
|
|
1791
1808
|
console.log((_f = res === null || res === void 0 ? void 0 : res.m) === null || _f === void 0 ? void 0 : _f.OtherFields);
|
|
1792
1809
|
var currentChatMessage = _this.chatLog.find(function (p) { return p._id == message_id_1; });
|
|
@@ -2187,8 +2204,8 @@
|
|
|
2187
2204
|
};
|
|
2188
2205
|
ChatDrawerComponent.prototype.pump = function (controller, reader, allSuggestions) {
|
|
2189
2206
|
var _this = this;
|
|
2190
|
-
reader.read().then(function (
|
|
2191
|
-
var done =
|
|
2207
|
+
reader.read().then(function (_l) {
|
|
2208
|
+
var done = _l.done, value = _l.value;
|
|
2192
2209
|
var _a, _b, _c, _d;
|
|
2193
2210
|
var lastItem = _this.chatLog[_this.chatLog.length - 1];
|
|
2194
2211
|
if (done) {
|
|
@@ -3131,7 +3148,7 @@
|
|
|
3131
3148
|
this.cdr.markForCheck();
|
|
3132
3149
|
};
|
|
3133
3150
|
ChatDrawerComponent.prototype.generateMarkdown = function (title, obj) {
|
|
3134
|
-
var e_1,
|
|
3151
|
+
var e_1, _l;
|
|
3135
3152
|
var _a;
|
|
3136
3153
|
// Initialize markdown with the title
|
|
3137
3154
|
var markdown = "## " + title + "\n";
|
|
@@ -3142,15 +3159,15 @@
|
|
|
3142
3159
|
var this_1 = this, key_label;
|
|
3143
3160
|
try {
|
|
3144
3161
|
// Loop through the object and append the field names and values
|
|
3145
|
-
for (var
|
|
3146
|
-
var
|
|
3162
|
+
for (var _m = __values(Object.entries(obj)), _o = _m.next(); !_o.done; _o = _m.next()) {
|
|
3163
|
+
var _p = __read(_o.value, 2), key = _p[0], value = _p[1];
|
|
3147
3164
|
_loop_1(key, value);
|
|
3148
3165
|
}
|
|
3149
3166
|
}
|
|
3150
3167
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3151
3168
|
finally {
|
|
3152
3169
|
try {
|
|
3153
|
-
if (
|
|
3170
|
+
if (_o && !_o.done && (_l = _m.return)) _l.call(_m);
|
|
3154
3171
|
}
|
|
3155
3172
|
finally { if (e_1) throw e_1.error; }
|
|
3156
3173
|
}
|
|
@@ -3255,7 +3272,7 @@
|
|
|
3255
3272
|
};
|
|
3256
3273
|
ChatDrawerComponent.prototype.openVoiceModal = function () {
|
|
3257
3274
|
var _this = this;
|
|
3258
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3275
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3259
3276
|
var conversationId = (_b = (_a = this.conversationKey) !== null && _a !== void 0 ? _a : this.conversationService.getKey(this.botId, false)) !== null && _b !== void 0 ? _b : '';
|
|
3260
3277
|
this.voiceModalConversationId = conversationId;
|
|
3261
3278
|
this.setupVoiceTranscripts();
|
|
@@ -3270,6 +3287,10 @@
|
|
|
3270
3287
|
token: (_e = this.s27Token) !== null && _e !== void 0 ? _e : '',
|
|
3271
3288
|
botId: (_f = this.botId) !== null && _f !== void 0 ? _f : '',
|
|
3272
3289
|
conversationId: conversationId,
|
|
3290
|
+
apiKey: (_g = this.apiKey) !== null && _g !== void 0 ? _g : '',
|
|
3291
|
+
eventToken: (_h = this.eventToken) !== null && _h !== void 0 ? _h : '',
|
|
3292
|
+
eventUrl: (_j = this.eventUrl) !== null && _j !== void 0 ? _j : '',
|
|
3293
|
+
domainAuthority: (_k = this.domainAuthorityValue) !== null && _k !== void 0 ? _k : 'prod-lite',
|
|
3273
3294
|
agentName: this.botName || 'AI Assistant',
|
|
3274
3295
|
agentRole: this.botSkills || 'AI Agent Specialist',
|
|
3275
3296
|
agentAvatar: this.botIcon,
|