@hivegpt/hiveai-angular 0.0.220 → 0.0.222

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.
@@ -775,6 +775,7 @@
775
775
  if (changes.s27Token.currentValue != changes.s27Token.previousValue) {
776
776
  console.log('s27Token changed previous:', changes.s27Token.previousValue, ' current:', changes.s27Token.currentValue);
777
777
  this.s27Token = changes.s27Token.currentValue;
778
+ console.log('isFetchDataFor: ', this.isFetchDataFor);
778
779
  console.log('msg: ', this.msg);
779
780
  console.log('chat: ', this.chat);
780
781
  if (this.is401) {
@@ -1116,6 +1117,7 @@
1116
1117
  if (msg === void 0) { msg = null; }
1117
1118
  var _a;
1118
1119
  this.input = msg || ((_a = this.input) === null || _a === void 0 ? void 0 : _a.trim());
1120
+ this.msg = this.input;
1119
1121
  if (!this.input || this.loading) {
1120
1122
  return;
1121
1123
  }
@@ -1157,14 +1159,15 @@
1157
1159
  .then(function (response) {
1158
1160
  if (response.status === 401 || response.status === 403) {
1159
1161
  _this.is401 = true;
1160
- _this.msg = _this.input;
1161
1162
  _this.refreshToken.emit();
1162
1163
  }
1164
+ else {
1165
+ _this.is401 = false;
1166
+ }
1163
1167
  return response.json(); // Continue processing the response
1164
1168
  })
1165
1169
  .then(function (data) {
1166
1170
  // Handle the response data
1167
- _this.is401 = false;
1168
1171
  console.log(data);
1169
1172
  })
1170
1173
  .catch(function (err) {
@@ -1221,11 +1224,13 @@
1221
1224
  _this.isFetchDataFor = true;
1222
1225
  _this.refreshToken.emit();
1223
1226
  }
1227
+ else {
1228
+ _this.is401 = false;
1229
+ }
1224
1230
  return response.json(); // Continue processing the response
1225
1231
  })
1226
1232
  .then(function (data) {
1227
1233
  // Handle the response data
1228
- _this.is401 = false;
1229
1234
  console.log(data);
1230
1235
  })
1231
1236
  .catch(function (err) {