@posiwise/shared-components 0.0.188 → 0.0.189
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.
|
@@ -799,7 +799,17 @@ class PwBrainChatComponent {
|
|
|
799
799
|
this.handleError(event);
|
|
800
800
|
}
|
|
801
801
|
},
|
|
802
|
-
error: err => this.handleError(err)
|
|
802
|
+
error: err => this.handleError(err),
|
|
803
|
+
// Safety net: the stream can complete without ever emitting a
|
|
804
|
+
// terminal `result`/`error` frame (e.g. the backend generator
|
|
805
|
+
// aborts mid-pipeline on an unexpected exception). `loading`
|
|
806
|
+
// still being true here means no terminal frame cleared it —
|
|
807
|
+
// surface a failure instead of spinning forever (AI54).
|
|
808
|
+
complete: () => {
|
|
809
|
+
if (this.loading) {
|
|
810
|
+
this.handleError(new Error(`${this.brandName} Brain did not return a response.`));
|
|
811
|
+
}
|
|
812
|
+
}
|
|
803
813
|
});
|
|
804
814
|
}
|
|
805
815
|
approve(message) {
|