@hivegpt/hiveai-angular 0.0.460 → 0.0.462

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.
@@ -818,7 +818,7 @@
818
818
 
819
819
  var prod_environment = {
820
820
  USERS_API: 'https://es-user.social27.com/api',
821
- BASE_URL: 'https://1009-2405-201-5c02-991e-f16d-8654-3279-82a6.ngrok-free.app',
821
+ BASE_URL: 'https://agent-api.hivegpt.ai',
822
822
  AGENTS_API: 'https://hive-ai.social27.com/api',
823
823
  API_KEY: '82595783-dc9c-4513-8204-709818d51be3',
824
824
  SocketUrl: 'https://notif-v2-ws.social27.com/'
@@ -1666,7 +1666,6 @@
1666
1666
  'eventurl': eventUrl,
1667
1667
  'hive-bot-id': botId,
1668
1668
  'x-api-key': apiKey,
1669
- "ngrok-skip-browser-warning": "true"
1670
1669
  };
1671
1670
  return [4 /*yield*/, fetch(postUrl, {
1672
1671
  method: 'POST',
@@ -1756,32 +1755,36 @@
1756
1755
  .subscribe(function (stream) {
1757
1756
  _this.audioAnalyzer.start(stream);
1758
1757
  });
1759
- // Speaking state from Daily only (NOT from AudioAnalyzer).
1760
- // User speaking overrides bot talking: if user speaks while bot talks, state = listening.
1761
1758
  this.subscriptions.add(this.dailyClient.userSpeaking$.subscribe(function (s) { return _this.isUserSpeakingSubject.next(s); }));
1762
1759
  this.subscriptions.add(rxjs.combineLatest([
1763
1760
  this.dailyClient.speaking$,
1764
1761
  this.dailyClient.userSpeaking$,
1765
1762
  ]).subscribe(function (_a) {
1766
1763
  var _b = __read(_a, 2), bot = _b[0], user = _b[1];
1764
+ var current = _this.callStateSubject.value;
1765
+ if (current === 'connecting' && !bot) {
1766
+ return;
1767
+ }
1768
+ if (current === 'connecting' && bot) {
1769
+ console.log("[VoiceDebug] First bot audio arrived \u2014 transitioning to talking \u2014 " + new Date().toISOString());
1770
+ _this.callStartTime = Date.now();
1771
+ _this.startDurationTimer();
1772
+ _this.callStateSubject.next('talking');
1773
+ return;
1774
+ }
1767
1775
  if (user) {
1768
1776
  _this.callStateSubject.next('listening');
1769
1777
  }
1770
1778
  else if (bot) {
1771
- console.log("[VoiceDebug] Agent starts speaking (callState \u2192 talking) \u2014 " + new Date().toISOString());
1772
1779
  _this.callStateSubject.next('talking');
1773
1780
  }
1774
- else if (_this.callStateSubject.value === 'talking' ||
1775
- _this.callStateSubject.value === 'listening') {
1781
+ else if (current === 'talking' || current === 'listening') {
1776
1782
  _this.callStateSubject.next('connected');
1777
1783
  }
1778
1784
  }));
1779
1785
  this.subscriptions.add(this.dailyClient.micMuted$.subscribe(function (muted) { return _this.isMicMutedSubject.next(muted); }));
1780
- console.log("[VoiceDebug] Room fully connected (callState \u2192 connected) \u2014 " + new Date().toISOString());
1781
- this.callStateSubject.next('connected');
1782
- this.statusTextSubject.next('Connected');
1783
- this.callStartTime = Date.now();
1784
- this.startDurationTimer();
1786
+ console.log("[VoiceDebug] Room joined, staying in connecting until bot speaks \u2014 " + new Date().toISOString());
1787
+ this.statusTextSubject.next('Connecting...');
1785
1788
  return [2 /*return*/];
1786
1789
  }
1787
1790
  });
@@ -4007,7 +4010,6 @@
4007
4010
  'domain-authority': this.domainAuthorityValue,
4008
4011
  eventUrl: this.eventUrl,
4009
4012
  eventToken: this.eventToken,
4010
- "ngrok-skip-browser-warning": "true"
4011
4013
  };
4012
4014
  if (this.workspaceToken) {
4013
4015
  headers['workspaceToken'] = this.workspaceToken;
@@ -4071,7 +4073,6 @@
4071
4073
  'x-api-key': this.apiKey,
4072
4074
  'hive-bot-id': this.botId,
4073
4075
  'domain-authority': this.domainAuthorityValue,
4074
- "ngrok-skip-browser-warning": "true"
4075
4076
  });
4076
4077
  this.http.post(url, body, { headers: headers }).subscribe({
4077
4078
  next: function (data) {