bibot 1.0.54 → 1.0.56

Sign up to get free protection for your applications and to get access to all the features.
@@ -3283,7 +3283,11 @@ var createPluginAxiosInstance = function createPluginAxiosInstance(baseURL, para
3283
3283
  try {
3284
3284
  var errMsg = 'An unknown error occurred';
3285
3285
  if (error.response) {
3286
- errMsg = error.response.data.message;
3286
+ if (error.response.status === 504) {
3287
+ errMsg = 'Timeout error occurred';
3288
+ } else {
3289
+ errMsg = error.response.data.message || error.response.statusText;
3290
+ }
3287
3291
  } else if (error.request) {
3288
3292
  errMsg = 'No response received from the server.';
3289
3293
  } else {
@@ -3592,7 +3596,7 @@ var askBiBot = function askBiBot(pluginAxiosInstance, data) {
3592
3596
  }
3593
3597
  });
3594
3598
  }, function (error) {
3595
- if (error.response && error.response.status === 504) {
3599
+ if (error.message === timeoutMessage) {
3596
3600
  return Promise.resolve(handleRetries(pluginAxiosInstance, data, 1));
3597
3601
  } else {
3598
3602
  return {
@@ -3612,7 +3616,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
3612
3616
  return response.data;
3613
3617
  });
3614
3618
  }, function (error) {
3615
- if (error.response && error.response.status === 504) {
3619
+ if (error.message === timeoutMessage) {
3616
3620
  return {
3617
3621
  message: defaultSlacker
3618
3622
  };
@@ -3627,6 +3631,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
3627
3631
  }
3628
3632
  };
3629
3633
  var defaultSlacker = "BiBot_Retry_Later";
3634
+ var timeoutMessage = 'Timeout error occurred';
3630
3635
 
3631
3636
  var useBiBotChatBot = function useBiBotChatBot(bibotProps) {
3632
3637
  var sendInputInquiry = function sendInputInquiry() {
@@ -4223,8 +4228,8 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4223
4228
  position: 'absolute',
4224
4229
  bottom: '60px',
4225
4230
  right: '25px',
4226
- width: 350,
4227
- height: 500,
4231
+ width: 370,
4232
+ height: 550,
4228
4233
  borderRadius: 10,
4229
4234
  display: 'flex',
4230
4235
  flexDirection: 'column',
@@ -4352,8 +4357,8 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4352
4357
  alignItems: 'center',
4353
4358
  borderTop: '1px solid #d7d7d7',
4354
4359
  padding: 10,
4355
- borderBottomLeftRadius: 8,
4356
- borderBottomRightRadius: 8,
4360
+ borderBottomLeftRadius: 10,
4361
+ borderBottomRightRadius: 10,
4357
4362
  backgroundColor: '#fff'
4358
4363
  }
4359
4364
  }, createElement("input", {
@@ -4396,8 +4401,14 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4396
4401
  fontSize: '12px',
4397
4402
  color: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
4398
4403
  textAlign: 'left',
4399
- marginRight: '8px',
4400
- whiteSpace: 'nowrap'
4404
+ marginRight: '5px',
4405
+ whiteSpace: 'nowrap',
4406
+ backgroundColor: '#fff',
4407
+ padding: 15,
4408
+ borderTopRightRadius: 30,
4409
+ borderTopLeftRadius: 10,
4410
+ borderBottomLeftRadius: 10,
4411
+ marginBottom: 50
4401
4412
  }
4402
4413
  }, greeting), createElement("button", {
4403
4414
  onClick: toggleChat,