@hivegpt/hiveai-angular 0.0.217 → 0.0.219
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 +8 -3
- 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 +8 -4
- package/fesm2015/hivegpt-hiveai-angular.js +7 -3
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -769,15 +769,18 @@
|
|
|
769
769
|
// }
|
|
770
770
|
}
|
|
771
771
|
ChatDrawerComponent.prototype.ngOnChanges = function (changes) {
|
|
772
|
+
console.log('ng on changes');
|
|
772
773
|
if (changes.s27Token) {
|
|
774
|
+
console.log('s27Token changed:', changes.s27Token);
|
|
773
775
|
if (changes.s27Token.currentValue != changes.s27Token.previousValue) {
|
|
776
|
+
console.log('s27Token changed previous:', changes.s27Token.previousValue, ' current:', changes.s27Token.currentValue);
|
|
774
777
|
this.s27Token = changes.s27Token.currentValue;
|
|
775
778
|
if (this.is401) {
|
|
776
779
|
if (this.isFetchDataFor) {
|
|
777
780
|
this.fetchDataFor(this.msg, this.chat);
|
|
778
781
|
}
|
|
779
782
|
else {
|
|
780
|
-
this.fetchData();
|
|
783
|
+
this.fetchData(this.msg);
|
|
781
784
|
}
|
|
782
785
|
}
|
|
783
786
|
}
|
|
@@ -1106,10 +1109,11 @@
|
|
|
1106
1109
|
this.fetchData();
|
|
1107
1110
|
this.scrollToBottom();
|
|
1108
1111
|
};
|
|
1109
|
-
ChatDrawerComponent.prototype.fetchData = function () {
|
|
1112
|
+
ChatDrawerComponent.prototype.fetchData = function (msg) {
|
|
1110
1113
|
var _this = this;
|
|
1114
|
+
if (msg === void 0) { msg = null; }
|
|
1111
1115
|
var _a;
|
|
1112
|
-
this.input = (_a = this.input) === null || _a === void 0 ? void 0 : _a.trim();
|
|
1116
|
+
this.input = msg || ((_a = this.input) === null || _a === void 0 ? void 0 : _a.trim());
|
|
1113
1117
|
if (!this.input || this.loading) {
|
|
1114
1118
|
return;
|
|
1115
1119
|
}
|
|
@@ -1151,6 +1155,7 @@
|
|
|
1151
1155
|
.then(function (response) {
|
|
1152
1156
|
if (response.status === 401 || response.status === 403) {
|
|
1153
1157
|
_this.is401 = true;
|
|
1158
|
+
_this.msg = _this.input;
|
|
1154
1159
|
_this.refreshToken.emit();
|
|
1155
1160
|
}
|
|
1156
1161
|
return response.json(); // Continue processing the response
|