bibot 1.0.42 → 1.0.45

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,8 @@
1
1
  import React from 'react';
2
- import { BiBotProps, ChatBubbleConfigProps, predefinedQuestionsType } from '../types/coreInterfaces';
2
+ import { BiBotProps, ChatBubbleConfigProps, MESSAGES, predefinedQuestionsType } from '../types/coreInterfaces';
3
3
  declare const useBiBotChatBot: ({ clientId, client_session_id, test }: BiBotProps) => {
4
4
  chatIsOpen: boolean;
5
- messages: {
6
- sender: 'user' | 'bot';
7
- text: string;
8
- }[];
5
+ messages: MESSAGES;
9
6
  isLoading: boolean;
10
7
  messageEndRef: React.RefObject<HTMLDivElement>;
11
8
  userInput: string;
package/dist/index.js CHANGED
@@ -3637,7 +3637,8 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
3637
3637
  client_id: clientId,
3638
3638
  q: input,
3639
3639
  session_id: client_session_id ? client_session_id : state.sessionId,
3640
- chat_id: v4()
3640
+ chat_id: v4(),
3641
+ chat_history: messages
3641
3642
  })).then(function (response) {
3642
3643
  setMessages(function (messages) {
3643
3644
  return [].concat(messages, [{