@exotel-npm-dev/exotel-ai-assist 1.1.9 → 1.2.0

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.
@@ -1685,7 +1685,8 @@ class ExotelAIAssistController extends EventEmitter {
1685
1685
  break;
1686
1686
  case "DISCONNECTED":
1687
1687
  if (this.connectionEstablished) {
1688
- if (this.readyFired) {
1688
+ const wasThrottled = this._streamState === "throttled";
1689
+ if (this.readyFired && !wasThrottled) {
1689
1690
  this.readyFired = false;
1690
1691
  this.emit("onReady", false);
1691
1692
  }
package/dist/index.js CHANGED
@@ -21103,7 +21103,8 @@ class ExotelAIAssistController extends EventEmitter {
21103
21103
  break;
21104
21104
  case "DISCONNECTED":
21105
21105
  if (this.connectionEstablished) {
21106
- if (this.readyFired) {
21106
+ const wasThrottled = this._streamState === "throttled";
21107
+ if (this.readyFired && !wasThrottled) {
21107
21108
  this.readyFired = false;
21108
21109
  this.emit("onReady", false);
21109
21110
  }
@@ -6389,7 +6389,8 @@ class ExotelAIAssistController extends EventEmitter {
6389
6389
  break;
6390
6390
  case "DISCONNECTED":
6391
6391
  if (this.connectionEstablished) {
6392
- if (this.readyFired) {
6392
+ const wasThrottled = this._streamState === "throttled";
6393
+ if (this.readyFired && !wasThrottled) {
6393
6394
  this.readyFired = false;
6394
6395
  this.emit("onReady", false);
6395
6396
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exotel-npm-dev/exotel-ai-assist",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "AI-powered real-time suggestions, transcript, and sentiment for agent calls",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -120,7 +120,8 @@ export class ExotelAIAssistController extends EventEmitter<ControllerEvents> {
120
120
 
121
121
  case "DISCONNECTED":
122
122
  if (this.connectionEstablished) {
123
- if (this.readyFired) {
123
+ const wasThrottled = this._streamState === "throttled";
124
+ if (this.readyFired && !wasThrottled) {
124
125
  this.readyFired = false;
125
126
  this.emit("onReady", false);
126
127
  }