@magmamath/students-features 0.3.2 → 0.4.0-rc.0
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/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +12 -4
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +6 -4
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +12 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +5 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/context/ChatBotContext.js +17 -0
- package/dist/commonjs/features/chatbot/context/ChatBotContext.js.map +1 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +58 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +99 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -0
- package/dist/commonjs/features/chatbot/index.js +0 -7
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +136 -117
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js} +28 -17
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/{api.js → ChatbotApi.js} +16 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +110 -0
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +0 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ThreadItem.js +21 -8
- package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/messagesHelper.js +1 -5
- package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +0 -6
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +54 -45
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/api.types.js +4 -0
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/units.types.js +2 -0
- package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -0
- package/dist/commonjs/features/feedback/components/TeacherFeedbackButton/colorSchemes.js +18 -9
- package/dist/commonjs/features/feedback/components/TeacherFeedbackButton/colorSchemes.js.map +1 -1
- package/dist/commonjs/lib/effector/createEntityFieldStore.js +4 -0
- package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/commonjs/lib/helpers/randomElements.js +24 -0
- package/dist/commonjs/lib/helpers/randomElements.js.map +1 -0
- package/dist/commonjs/shared/icons/HighlighterIcon.js +36 -0
- package/dist/commonjs/shared/icons/HighlighterIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/StopIcon.js +33 -0
- package/dist/commonjs/shared/icons/StopIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/icon.types.js +4 -0
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +12 -4
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +6 -4
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +12 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +6 -2
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/context/ChatBotContext.js +12 -0
- package/dist/module/features/chatbot/context/ChatBotContext.js.map +1 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +52 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +94 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -0
- package/dist/module/features/chatbot/index.js +0 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +138 -119
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js} +26 -15
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -0
- package/dist/module/features/chatbot/model/{api.js → ChatbotApi.js} +16 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -0
- package/dist/module/features/chatbot/model/ChatsCacheModel.js +104 -0
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -0
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +0 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/ThreadItem.js +21 -8
- package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/module/features/chatbot/model/messagesHelper.js +1 -5
- package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +1 -7
- package/dist/module/features/chatbot/model/t2s.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +54 -45
- package/dist/module/features/chatbot/model/translation.js.map +1 -1
- package/dist/module/features/chatbot/types/api.types.js +2 -0
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/chatbot/types/units.types.js +2 -0
- package/dist/module/features/chatbot/types/units.types.js.map +1 -0
- package/dist/module/features/feedback/components/TeacherFeedbackButton/colorSchemes.js +18 -9
- package/dist/module/features/feedback/components/TeacherFeedbackButton/colorSchemes.js.map +1 -1
- package/dist/module/lib/effector/createEntityFieldStore.js +4 -0
- package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/module/lib/helpers/randomElements.js +20 -0
- package/dist/module/lib/helpers/randomElements.js.map +1 -0
- package/dist/module/shared/icons/HighlighterIcon.js +29 -0
- package/dist/module/shared/icons/HighlighterIcon.js.map +1 -0
- package/dist/module/shared/icons/StopIcon.js +26 -0
- package/dist/module/shared/icons/StopIcon.js.map +1 -0
- package/dist/module/shared/icons/icon.types.js +2 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts +8 -0
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +3 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +28 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +4 -3
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +19 -14
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/{module/features/chatbot/model/ChatBotMessageHandler.d.ts → commonjs/features/chatbot/model/ChatBotThreadManager.d.ts} +11 -8
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +26 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +3 -2
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +12 -6
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +2 -4
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +7 -8
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +2 -11
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +26 -19
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +31 -0
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedbackButton/colorSchemes.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +2 -0
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts +2 -0
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +2 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts +8 -0
- package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +3 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +28 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/index.d.ts +4 -3
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +19 -14
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/{commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts → module/features/chatbot/model/ChatBotThreadManager.d.ts} +11 -8
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +26 -0
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +3 -2
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +12 -6
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +2 -4
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts +7 -8
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +2 -11
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +26 -19
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +31 -0
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -0
- package/dist/typescript/module/features/feedback/components/TeacherFeedbackButton/colorSchemes.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +2 -0
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/randomElements.d.ts +2 -0
- package/dist/typescript/module/lib/helpers/randomElements.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/StopIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts +2 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +10 -3
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -0
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +3 -0
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +14 -0
- package/src/features/chatbot/components/Chatbot.tsx +3 -2
- package/src/features/chatbot/context/ChatBotContext.ts +18 -0
- package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +53 -0
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +116 -0
- package/src/features/chatbot/index.ts +3 -3
- package/src/features/chatbot/model/ChatBotModel.ts +123 -124
- package/src/features/chatbot/model/{ChatBotMessageHandler.ts → ChatBotThreadManager.ts} +28 -16
- package/src/features/chatbot/model/{api.ts → ChatbotApi.ts} +19 -2
- package/src/features/chatbot/model/ChatsCacheModel.ts +94 -0
- package/src/features/chatbot/model/DefaultMessageCreator.ts +3 -3
- package/src/features/chatbot/model/ThreadItem.ts +20 -9
- package/src/features/chatbot/model/messagesHelper.ts +2 -6
- package/src/features/chatbot/model/t2s.ts +3 -10
- package/src/features/chatbot/model/translation.helpers.ts +2 -1
- package/src/features/chatbot/model/translation.ts +52 -46
- package/src/features/chatbot/types/api.types.ts +2 -12
- package/src/features/chatbot/types/model.types.ts +38 -26
- package/src/features/chatbot/types/translation.types.ts +2 -1
- package/src/features/chatbot/types/units.types.ts +34 -0
- package/src/features/feedback/components/TeacherFeedbackButton/colorSchemes.ts +9 -0
- package/src/lib/effector/createEntityFieldStore.ts +9 -1
- package/src/lib/helpers/randomElements.ts +22 -0
- package/src/shared/icons/HighlighterIcon.tsx +21 -0
- package/src/shared/icons/StopIcon.tsx +17 -0
- package/src/shared/icons/icon.types.ts +9 -6
- package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/api.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
- package/dist/module/features/chatbot/model/api.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/api.d.ts.map +0 -1
package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReceivedMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"ReceivedMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAM5C,eAAO,MAAM,eAAe,mIASzB,YAAY,sBAwBd,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,MAAM,OAAO,CAAA;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIvD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAyB,MAAM,iBAAiB,CAAA;AACpF,OAAO,EAAkB,eAAe,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,MAAM,OAAO,CAAA;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIvD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAyB,MAAM,iBAAiB,CAAA;AACpF,OAAO,EAAkB,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAGzE,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,qBAAqB,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;CACjD,CAAA;AAkBD,eAAO,MAAM,eAAe,yGAOzB,oBAAoB,sBA6EtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,qBAAqB,EAAE,OAAO,CAAA;IAC9B,oBAAoB,EAAE,OAAO,CAAA;IAC7B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;IAChD,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC7C,CAAA;AAED,eAAO,MAAM,OAAO,wJAUjB,YAAY,6BAqCd,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChatbotModel } from '../model/ChatBotModel';
|
|
2
|
+
type ChatBotContextProps = {
|
|
3
|
+
model: ChatbotModel;
|
|
4
|
+
};
|
|
5
|
+
export declare const ChatBotContext: import("react").Context<ChatBotContextProps | null>;
|
|
6
|
+
export declare function useChatModel(): ChatbotModel;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ChatBotContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatBotContext.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/context/ChatBotContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,cAAc,qDAAkD,CAAA;AAE7E,wBAAgB,YAAY,iBAQ3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorSpottingButton.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,eAAO,MAAM,mBAAmB,gCA8B/B,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ChatbotAPI } from '../model/ChatbotApi';
|
|
2
|
+
import { Store } from 'effector';
|
|
3
|
+
import { ChatItem } from '../types/units.types';
|
|
4
|
+
type ErrorSpottingProps = {
|
|
5
|
+
api: ChatbotAPI;
|
|
6
|
+
$currentChatData: Store<ChatItem>;
|
|
7
|
+
};
|
|
8
|
+
type ActiveErrorSpottingData = {
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
isDisabled: boolean;
|
|
11
|
+
strokesIds: string[];
|
|
12
|
+
validationKey: null | string;
|
|
13
|
+
};
|
|
14
|
+
export declare class ErrorSpottingModel {
|
|
15
|
+
private readonly api;
|
|
16
|
+
readonly errorSpottingPressed: import("effector").EventCallable<void>;
|
|
17
|
+
private readonly activeDataChanged;
|
|
18
|
+
readonly $validationKey: import("effector").StoreWritable<string | null>;
|
|
19
|
+
readonly $activeData: import("effector").StoreWritable<ActiveErrorSpottingData | null>;
|
|
20
|
+
readonly $isLoading: Store<boolean>;
|
|
21
|
+
constructor({ api, $currentChatData }: ErrorSpottingProps);
|
|
22
|
+
private toggleActiveSpotting;
|
|
23
|
+
bindStrokesValidation($store: Store<string | null>): this;
|
|
24
|
+
abortPendingRequest(): void;
|
|
25
|
+
reset(): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=ErrorSpottingModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorSpottingModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAkD,KAAK,EAAE,MAAM,UAAU,CAAA;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,UAAU,CAAA;IACf,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;CAClC,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,aAAa,EAAE,IAAI,GAAG,MAAM,CAAA;CAC7B,CAAA;AAOD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;IAEhC,SAAgB,oBAAoB,yCAAgB;IACpD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAI/B;IAEH,SAAgB,cAAc,kDAAmC;IACjE,SAAgB,WAAW,mEASvB;IAEJ,SAAgB,UAAU,iBAAA;gBAEP,EAAE,GAAG,EAAE,gBAAgB,EAAE,EAAE,kBAAkB;IA+ChE,OAAO,CAAC,oBAAoB;IAMrB,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAQlD,mBAAmB;IAKnB,KAAK;CAIb"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { Chatbot } from './components/Chatbot';
|
|
2
2
|
export { ChatbotModel } from './model/ChatBotModel';
|
|
3
3
|
export { AudioStatus, type AudioProvider } from './types/t2s.types';
|
|
4
|
-
export { MessageVariant, type
|
|
5
|
-
export type { PostMessageResponse
|
|
6
|
-
export { ChatMessageHandler } from './model/ChatBotMessageHandler';
|
|
4
|
+
export { MessageVariant, type ChatbotRenderer, type ChatbotModelProps, type IChatDrawBoardAdapter, } from './types/model.types';
|
|
5
|
+
export type { PostMessageResponse } from './types/api.types';
|
|
7
6
|
export { DefaultMessagesCreator } from './model/DefaultMessageCreator';
|
|
7
|
+
export type { ChatAnswer } from './types/units.types';
|
|
8
|
+
export type { ConversationMessage } from './types/units.types';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { type Store } from 'effector';
|
|
2
|
-
import { ChatbotContext, ChatbotModelProps,
|
|
2
|
+
import { ChatbotContext, ChatbotModelProps, IChatDrawBoardAdapter, SendHelpParams, SetHintMessageProps, StartConversationProps } from '../types/model.types';
|
|
3
3
|
import { GetAlternativesResponse } from '../types/api.types';
|
|
4
|
-
import { ChatbotAPI } from './
|
|
4
|
+
import { ChatbotAPI } from './ChatbotApi';
|
|
5
5
|
import { ChatbotTranslation } from './translation';
|
|
6
6
|
import { ChatTextToSpeechModel } from './t2s';
|
|
7
7
|
import { AudioProvider } from '../types/t2s.types';
|
|
8
|
+
import { ChatBotThreadManager } from './ChatBotThreadManager';
|
|
9
|
+
import { ErrorSpottingModel } from '../errorSpotting/ErrorSpottingModel';
|
|
8
10
|
type ReinitConversationProps = {
|
|
9
11
|
key: string;
|
|
10
12
|
};
|
|
11
13
|
export declare class ChatbotModel {
|
|
14
|
+
readonly threadManager: ChatBotThreadManager;
|
|
12
15
|
readonly api: ChatbotAPI;
|
|
13
16
|
readonly translation: ChatbotTranslation;
|
|
14
17
|
readonly t2s: ChatTextToSpeechModel;
|
|
18
|
+
readonly errorSpotting: ErrorSpottingModel;
|
|
15
19
|
readonly $currentKey: import("effector").StoreWritable<string>;
|
|
16
20
|
readonly resetAlternatives: import("effector").EventCallable<void>;
|
|
17
21
|
readonly setAlternatives: import("effector").EventCallable<GetAlternativesResponse | null>;
|
|
@@ -26,25 +30,26 @@ export declare class ChatbotModel {
|
|
|
26
30
|
readonly $context: import("effector").StoreWritable<ChatbotContext | null>;
|
|
27
31
|
readonly setScrollActive: import("effector").EventCallable<boolean>;
|
|
28
32
|
readonly $isScrollActive: import("effector").StoreWritable<boolean>;
|
|
29
|
-
readonly sendHelpRequestFx: import("effector").Effect<SendHelpParams, void, Error>;
|
|
30
33
|
readonly defaultMessages: ChatbotModelProps['messages'];
|
|
31
|
-
readonly
|
|
32
|
-
readonly threadIds: import("../../../lib/effector/createEntityFieldStore").EntityFieldStore<string>;
|
|
33
|
-
readonly availableChats: import("../../../lib/effector/createEntityFieldStore").EntityFieldStore<boolean>;
|
|
34
|
+
private readonly cache;
|
|
34
35
|
readonly $currentChatData: Store<{
|
|
35
|
-
messages: ConversationMessage[];
|
|
36
|
-
threadId: string;
|
|
37
|
-
isAvailable: boolean;
|
|
38
36
|
key: string;
|
|
37
|
+
messages: import("..").ConversationMessage[];
|
|
38
|
+
isAvailable: boolean;
|
|
39
|
+
currentThread: import("../types/units.types").IThreadItem | null;
|
|
39
40
|
}>;
|
|
40
|
-
constructor({ api, messages, $key }: ChatbotModelProps);
|
|
41
|
+
constructor({ api, messages, $key, threadMessagesLimit }: ChatbotModelProps);
|
|
41
42
|
private createSendHelpRequestFx;
|
|
42
|
-
private initChatReplyWatcher;
|
|
43
|
-
readonly startConversation: import("effector").Effect<void | StartConversationProps, void | undefined, Error>;
|
|
44
|
-
setHintMessage({ key, ...message }: SetHintMessageProps): void;
|
|
45
|
-
readonly reinitConversation: import("effector").Effect<ReinitConversationProps, void, Error>;
|
|
46
43
|
bindKey($store: Store<string>): this;
|
|
47
44
|
setT2SAudioProvider(audioProvider: AudioProvider): this;
|
|
45
|
+
setDrawBoardAdapter(adapter: IChatDrawBoardAdapter): this;
|
|
46
|
+
readonly sendHelpRequestFx: import("effector").Effect<SendHelpParams, void, Error>;
|
|
47
|
+
readonly startConversation: import("effector").Effect<void | StartConversationProps, void, Error>;
|
|
48
|
+
setHintMessage({ key, ...message }: SetHintMessageProps): void;
|
|
49
|
+
readonly reinitConversation: ({ key }: ReinitConversationProps) => void;
|
|
50
|
+
disableChat(key: string): void;
|
|
51
|
+
softReset: import("effector").Effect<void, void, Error>;
|
|
52
|
+
readonly reset: () => void;
|
|
48
53
|
}
|
|
49
54
|
export {};
|
|
50
55
|
//# sourceMappingURL=ChatBotModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBotModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotModel.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatBotModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EAEd,mBAAmB,EAEnB,sBAAsB,EACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AAExE,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,qBAAa,YAAY;IACvB,SAAgB,aAAa,EAAE,oBAAoB,CAAA;IACnD,SAAgB,GAAG,EAAE,UAAU,CAAA;IAE/B,SAAgB,WAAW,EAAE,kBAAkB,CAAA;IAC/C,SAAgB,GAAG,EAAE,qBAAqB,CAAA;IAC1C,SAAgB,aAAa,qBAAA;IAE7B,SAAgB,WAAW,2CAAkB;IAE7C,QAAQ,CAAC,iBAAiB,yCAAgB;IAC1C,QAAQ,CAAC,eAAe,mEAAgD;IACxE,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA;IAE7D,QAAQ,CAAC,SAAS,4CAAyB;IAC3C,QAAQ,CAAC,UAAU,yCAAgB;IACnC,QAAQ,CAAC,OAAO,4CAA0E;IAE1F,SAAgB,iBAAiB,yCAAgB;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAwB;IAC1D,SAAgB,eAAe,kDAAwC;IAEvE,SAAgB,UAAU,0DAAuC;IACjE,SAAgB,QAAQ,0DAAiC;IAEzD,QAAQ,CAAC,eAAe,4CAAyB;IACjD,QAAQ,CAAC,eAAe,4CAAuC;IAE/D,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAA;IACvD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAE9C,SAAgB,gBAAgB;;;;;OAG/B;gBAEW,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAAE,iBAAiB;IAqD3E,OAAO,CAAC,uBAAuB;IAoDxB,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;IAS7B,mBAAmB,CAAC,aAAa,EAAE,aAAa;IAKhD,mBAAmB,CAAC,OAAO,EAAE,qBAAqB;IAMzD,SAAgB,iBAAiB,yDAAiC;IAElE,SAAgB,iBAAiB,wEAiB/B;IAEK,cAAc,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,EAAE,mBAAmB;IAK9D,SAAgB,kBAAkB,YAAa,uBAAuB,UAGrE;IAEM,WAAW,CAAC,GAAG,EAAE,MAAM;IAMvB,SAAS,+CAkBd;IAEF,SAAgB,KAAK,aAKpB;CACF"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ThreadItem } from './ThreadItem';
|
|
1
2
|
import { Store } from 'effector';
|
|
2
3
|
import { ChatHintPayload, ChatHintResponse, PostMessagePayload, PostMessageResponse } from '../types/api.types';
|
|
3
4
|
import { ChatbotMessages, IChatDrawBoardAdapter } from '../types/model.types';
|
|
4
|
-
type
|
|
5
|
+
type ChatBotThreadManagerProps = {
|
|
5
6
|
messagesLimit?: number;
|
|
7
|
+
drawBoardAdapter?: IChatDrawBoardAdapter;
|
|
6
8
|
messages: ChatbotMessages;
|
|
7
|
-
drawBoardAdapter: IChatDrawBoardAdapter;
|
|
8
9
|
api: {
|
|
9
10
|
getHint: (props: ChatHintPayload) => Promise<ChatHintResponse>;
|
|
10
11
|
};
|
|
@@ -12,20 +13,22 @@ type ChatMessageHandlerProps = {
|
|
|
12
13
|
type ResetCacheProps = {
|
|
13
14
|
key: string;
|
|
14
15
|
};
|
|
15
|
-
export declare class
|
|
16
|
+
export declare class ChatBotThreadManager {
|
|
16
17
|
private readonly api;
|
|
17
|
-
private
|
|
18
|
+
private drawBoardAdapter;
|
|
18
19
|
private readonly threads;
|
|
20
|
+
readonly $threads: import("effector").StoreWritable<Map<string, ThreadItem>>;
|
|
19
21
|
private readonly messagesLimit;
|
|
20
22
|
private currentKey;
|
|
21
23
|
private currentBinding;
|
|
22
24
|
private readonly defaultMessages;
|
|
23
|
-
constructor({ drawBoardAdapter, api, messagesLimit, messages, }:
|
|
25
|
+
constructor({ drawBoardAdapter, api, messagesLimit, messages, }: ChatBotThreadManagerProps);
|
|
24
26
|
bindKeyStore($store: Store<string>): this;
|
|
25
27
|
private getThreadItem;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
setDrawBoardAdapter(adapter: IChatDrawBoardAdapter): void;
|
|
29
|
+
readonly postMessage: ({ problemAnswer, problem, answer, language, imageAltText, }: PostMessagePayload) => Promise<PostMessageResponse>;
|
|
30
|
+
resetThread: ({ key }: ResetCacheProps) => void;
|
|
28
31
|
resetAll(): void;
|
|
29
32
|
}
|
|
30
33
|
export {};
|
|
31
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=ChatBotThreadManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatBotThreadManager.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotThreadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAe,KAAK,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAG7E,KAAK,yBAAyB,GAAG;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,qBAAqB,CAAA;IACxC,QAAQ,EAAE,eAAe,CAAA;IACzB,GAAG,EAAE;QACH,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;KAC/D,CAAA;CACF,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAA;IACpB,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IAExD,SAAgB,QAAQ,4DAA6C;IAErE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAA;IAC9B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,cAAc,CAA4B;IAElD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAA;gBAEb,EACjB,gBAAgB,EAChB,GAAG,EACH,aAA6D,EAC7D,QAAQ,GACT,EAAE,yBAAyB;IAOrB,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YAQ3B,aAAa;IAqBpB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB;IAIzD,SAAgB,WAAW,gEAMxB,kBAAkB,KAAG,OAAO,CAAC,mBAAmB,CAAC,CAsBnD;IAEM,WAAW,YAAa,eAAe,UAE7C;IAEM,QAAQ;CAGhB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChatbotApiRequests, SpotErrorPayload, SpotErrorResponse } from '../types/model.types';
|
|
2
2
|
import { GoogleTranslatePayload, GoogleTranslateResponse } from '../types/api.types';
|
|
3
3
|
export declare class ChatbotAPI {
|
|
4
4
|
readonly postMessageFx: import("../../../lib/effector/createControllerEffect").ControlledEffect<import("../types/api.types").PostMessagePayload, import("../types/api.types").PostMessageResponse>;
|
|
5
5
|
readonly getAlternativesFx: import("effector").Effect<import("../types/api.types").GetAlternativesPayload, import("../types/api.types").GetAlternativesResponse, Error>;
|
|
6
6
|
readonly translateTextFx: import("effector").Effect<GoogleTranslatePayload, GoogleTranslateResponse, Error>;
|
|
7
7
|
readonly textToSpeechTextFx: import("effector").Effect<import("../types/api.types").GoogleText2SpeechPayload, import("../types/api.types").GoogleText2SpeechResponse, Error>;
|
|
8
|
-
|
|
8
|
+
readonly spotErrorFx: import("../../../lib/effector/createControllerEffect").ControlledEffect<SpotErrorPayload, SpotErrorResponse>;
|
|
9
|
+
constructor(api: ChatbotApiRequests);
|
|
9
10
|
}
|
|
10
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=ChatbotApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatbotApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatbotApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC9F,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAIpF,qBAAa,UAAU;IACrB,SAAgB,aAAa,6KAAA;IAC7B,SAAgB,iBAAiB,8IAAA;IACjC,SAAgB,eAAe,oFAAA;IAC/B,SAAgB,kBAAkB,kJAAA;IAElC,SAAgB,WAAW,+GAAA;gBAEf,GAAG,EAAE,kBAAkB;CAsCpC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChatAnswer, ChatItem, ConversationMessage, IThreadItem } from '../types/units.types';
|
|
2
|
+
type ReinitChatThreadSettings = {
|
|
3
|
+
initialOption: ChatAnswer;
|
|
4
|
+
};
|
|
5
|
+
type UpdateProps = {
|
|
6
|
+
key: string;
|
|
7
|
+
data: Partial<ChatItem>;
|
|
8
|
+
};
|
|
9
|
+
type AddMessagesProps = {
|
|
10
|
+
messages: ConversationMessage[];
|
|
11
|
+
thread?: IThreadItem | null;
|
|
12
|
+
};
|
|
13
|
+
export declare function defaultChatData(props?: Partial<ChatItem>): ChatItem;
|
|
14
|
+
export declare class ChatsCacheModel {
|
|
15
|
+
readonly update: import("effector").EventCallable<UpdateProps>;
|
|
16
|
+
private readonly cache;
|
|
17
|
+
readonly $data: import("effector").StoreWritable<Record<string, ChatItem>>;
|
|
18
|
+
readonly reset: import("effector").EventCallable<void>;
|
|
19
|
+
disableChat(key: string): void;
|
|
20
|
+
reinitChatThread(key: string, { initialOption }: ReinitChatThreadSettings): void;
|
|
21
|
+
setSingleMessage(key: string, message: ConversationMessage): void;
|
|
22
|
+
addMessages(key: string, { messages, thread }: AddMessagesProps): void;
|
|
23
|
+
add(key: string, data: ChatItem): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=ChatsCacheModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatsCacheModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatsCacheModel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAE7F,KAAK,wBAAwB,GAAG;IAC9B,aAAa,EAAE,UAAU,CAAA;CAC1B,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CACxB,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;CAC5B,CAAA;AAED,wBAAgB,eAAe,CAAC,KAAK,GAAE,OAAO,CAAC,QAAQ,CAAM,GAAG,QAAQ,CAOvE;AAED,qBAAa,eAAe;IAC1B,SAAgB,MAAM,gDAA6B;IACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAMrB;IAED,SAAgB,KAAK,6DAAoB;IACzC,SAAgB,KAAK,yCAAmB;IAEjC,WAAW,CAAC,GAAG,EAAE,MAAM;IAQvB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,EAAE,wBAAwB;IAoBzE,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB;IAU1D,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAa,EAAE,EAAE,gBAAgB;IAYtE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ;CAGvC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PostMessageResponse } from '../types/api.types';
|
|
2
|
+
import { ChatAnswer } from '../types/units.types';
|
|
3
|
+
type ChatMessage = Omit<PostMessageResponse, 'thread'> & {
|
|
3
4
|
id: string;
|
|
4
5
|
isOwnMessage: boolean;
|
|
5
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultMessageCreator.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/DefaultMessageCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DefaultMessageCreator.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/DefaultMessageCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,KAAK,WAAW,GAAG,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;IACvD,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,KAAK,0BAA0B,CAAC,CAAC,SAAS,MAAM,IAAI;IAClD,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAA;CAC/B,CAAA;AAED,qBAAa,sBAAsB,CAAC,CAAC,SAAS,MAAM;IAClD,SAAgB,eAAe,yCAAgB;IAE/C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyC;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAA;gBAEX,EAAE,UAAU,EAAE,EAAE,0BAA0B,CAAC,CAAC,CAAC;IAclD,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,KAAa,EAAE,GAAE,sBAA2B;IAWpE,YAAY,CAAC,GAAG,EAAE,CAAC;CAQ3B"}
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FullStrokeData, IThreadItem } from '../types/units.types';
|
|
2
2
|
type ThreadItemProps = {
|
|
3
|
-
strokes
|
|
3
|
+
strokes: FullStrokeData[];
|
|
4
|
+
key: string;
|
|
4
5
|
};
|
|
5
6
|
export declare class ThreadItem {
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
|
|
7
|
+
readonly key: string | null;
|
|
8
|
+
readonly strokes: FullStrokeData[] | null;
|
|
9
|
+
readonly history: string[];
|
|
10
|
+
constructor(props?: ThreadItemProps | null);
|
|
9
11
|
getNextHintProps(): {
|
|
10
12
|
previousHint: string;
|
|
11
13
|
stroke?: undefined;
|
|
12
14
|
} | {
|
|
13
|
-
stroke:
|
|
15
|
+
stroke: {
|
|
16
|
+
x: number[];
|
|
17
|
+
y: number[];
|
|
18
|
+
}[];
|
|
14
19
|
previousHint?: undefined;
|
|
15
20
|
} | {
|
|
16
21
|
previousHint?: undefined;
|
|
17
22
|
stroke?: undefined;
|
|
18
23
|
};
|
|
24
|
+
toObject(): IThreadItem;
|
|
19
25
|
}
|
|
20
26
|
export {};
|
|
21
27
|
//# sourceMappingURL=ThreadItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadItem.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ThreadItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ThreadItem.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ThreadItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElE,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,qBAAa,UAAU;IACrB,SAAgB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAO;IACzC,SAAgB,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAAA;IAChD,SAAgB,OAAO,EAAE,MAAM,EAAE,CAAK;gBAEnB,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI;IAK1C,gBAAgB;;;;;;;;;;;;;IAchB,QAAQ,IAAI,WAAW;CAO/B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateMessageResponse } from '../types/model.types';
|
|
2
|
+
import { ConversationMessage } from '../types/units.types';
|
|
2
3
|
type OwnMessageProps = {
|
|
3
4
|
message?: string;
|
|
4
5
|
translatedMessage?: string;
|
|
5
|
-
threadId?: string | null;
|
|
6
6
|
};
|
|
7
7
|
export declare class messagesHelper {
|
|
8
8
|
static createAnswer(data: CreateMessageResponse): ConversationMessage;
|
|
@@ -12,10 +12,9 @@ export declare class messagesHelper {
|
|
|
12
12
|
translatedMessage: string | undefined;
|
|
13
13
|
isOwnMessage: boolean;
|
|
14
14
|
options: never[];
|
|
15
|
-
threadId: string;
|
|
16
15
|
endMessage: boolean;
|
|
17
16
|
};
|
|
18
|
-
static createOwn({ message, translatedMessage,
|
|
17
|
+
static createOwn({ message, translatedMessage, }: OwnMessageProps): ConversationMessage;
|
|
19
18
|
}
|
|
20
19
|
export {};
|
|
21
20
|
//# sourceMappingURL=messagesHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/messagesHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"messagesHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/messagesHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,qBAAa,cAAc;WACX,YAAY,CAAC,IAAI,EAAE,qBAAqB,GAAG,mBAAmB;WAU9D,UAAU,CAAC,IAAI,EAAE,qBAAqB;;;;;;;;WAWtC,SAAS,CAAC,EACtB,OAAY,EACZ,iBAAiB,GAClB,EAAE,eAAe,GAAG,mBAAmB;CASzC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Store } from 'effector';
|
|
2
1
|
import { AudioProvider, AudioStatus, PlayTextToSpeechProps } from '../types/t2s.types';
|
|
3
|
-
import { ChatbotAPI } from './
|
|
2
|
+
import { ChatbotAPI } from './ChatbotApi';
|
|
4
3
|
type ChatTextToSpeechModelProps = {
|
|
5
|
-
$isOpen: Store<boolean>;
|
|
6
4
|
api: ChatbotAPI;
|
|
7
5
|
};
|
|
8
6
|
export declare class ChatTextToSpeechModel {
|
|
@@ -13,7 +11,7 @@ export declare class ChatTextToSpeechModel {
|
|
|
13
11
|
readonly $currentPlayingId: import("effector").StoreWritable<string | null>;
|
|
14
12
|
readonly setStatus: import("effector").EventCallable<AudioStatus>;
|
|
15
13
|
readonly $status: import("effector").StoreWritable<AudioStatus>;
|
|
16
|
-
constructor({
|
|
14
|
+
constructor({ api }: ChatTextToSpeechModelProps);
|
|
17
15
|
setAudioProvider(audioProvider: AudioProvider): void;
|
|
18
16
|
private getCacheKey;
|
|
19
17
|
play({ text, messageId, isTranslated, config }: PlayTextToSpeechProps): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"t2s.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/t2s.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"t2s.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/t2s.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,KAAK,0BAA0B,GAAG;IAChC,GAAG,EAAE,UAAU,CAAA;CAChB,CAAA;AAED,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;IACxD,OAAO,CAAC,aAAa,CAA6B;IAElD,QAAQ,CAAC,mBAAmB,kDAA+B;IAC3D,QAAQ,CAAC,iBAAiB,kDAA0C;IACpE,QAAQ,CAAC,SAAS,gDAA6B;IAC/C,QAAQ,CAAC,OAAO,gDAA+C;gBAEnD,EAAE,GAAG,EAAE,EAAE,0BAA0B;IAIxC,gBAAgB,CAAC,aAAa,EAAE,aAAa;IAIpD,OAAO,CAAC,WAAW,CAElB;IAEK,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,qBAAqB;IA0DpE,IAAI;IAKX,SAAgB,KAAK,+CAInB;CACH"}
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import { EventCallable, Store } from 'effector';
|
|
2
2
|
import { TranslateMessageFxProps } from '../types/translation.types';
|
|
3
|
-
import { ChatbotContext, ChatbotMessages
|
|
3
|
+
import { ChatbotContext, ChatbotMessages } from '../types/model.types';
|
|
4
4
|
import { GetAlternativesResponse } from '../types/api.types';
|
|
5
|
-
import { ChatbotAPI } from './
|
|
6
|
-
import {
|
|
5
|
+
import { ChatbotAPI } from './ChatbotApi';
|
|
6
|
+
import { ChatsCacheModel } from './ChatsCacheModel';
|
|
7
|
+
import { ConversationMessage } from '../types/units.types';
|
|
7
8
|
type ChatbotTranslationProps = {
|
|
8
9
|
api: ChatbotAPI;
|
|
9
10
|
$key: Store<string>;
|
|
10
11
|
defaultMessages: ChatbotMessages;
|
|
11
|
-
messagesModel: EntityFieldStore<ConversationMessage[]>;
|
|
12
12
|
$context: Store<ChatbotContext | null>;
|
|
13
13
|
alternativesModel: {
|
|
14
14
|
set: EventCallable<GetAlternativesResponse | null>;
|
|
15
15
|
$store: Store<GetAlternativesResponse | null>;
|
|
16
16
|
};
|
|
17
|
+
chats: ChatsCacheModel;
|
|
17
18
|
};
|
|
18
19
|
export declare class ChatbotTranslation {
|
|
19
20
|
private readonly api;
|
|
20
21
|
private readonly $key;
|
|
21
22
|
private readonly $context;
|
|
22
23
|
private readonly defaultMessages;
|
|
23
|
-
private readonly messagesModel;
|
|
24
24
|
private readonly alternativesModel;
|
|
25
25
|
readonly setIsTranslated: EventCallable<boolean>;
|
|
26
26
|
readonly $isTranslated: import("effector").StoreWritable<boolean>;
|
|
27
27
|
readonly translateAllMessagesFx: import("effector").Effect<void, ConversationMessage[], Error>;
|
|
28
|
-
constructor({ api, $key, defaultMessages,
|
|
28
|
+
constructor({ api, $key, defaultMessages, alternativesModel, $context, chats, }: ChatbotTranslationProps);
|
|
29
29
|
private shouldSkipTranslation;
|
|
30
|
-
private initTranslationSamples;
|
|
31
30
|
private translateRequest;
|
|
32
31
|
private addTranslationToAlternatives;
|
|
33
32
|
private readonly translateBatchFx;
|
|
34
|
-
readonly
|
|
33
|
+
readonly applyTranslationFx: import("effector").Effect<Omit<TranslateMessageFxProps, "isTranslated">, ConversationMessage[], Error>;
|
|
35
34
|
reset(): void;
|
|
36
35
|
}
|
|
37
36
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/translation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,aAAa,EAAmB,KAAK,EAAE,MAAM,UAAU,CAAA;AACnG,OAAO,EAGL,uBAAuB,EAExB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/translation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,aAAa,EAAmB,KAAK,EAAE,MAAM,UAAU,CAAA;AACnG,OAAO,EAGL,uBAAuB,EAExB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAOzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,UAAU,CAAA;IACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACnB,eAAe,EAAE,eAAe,CAAA;IAChC,QAAQ,EAAE,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACtC,iBAAiB,EAAE;QACjB,GAAG,EAAE,aAAa,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA;QAClD,MAAM,EAAE,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA;KAC9C,CAAA;IACD,KAAK,EAAE,eAAe,CAAA;CACvB,CAAA;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAA;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAA;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAA;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAA;IAElC,QAAQ,CAAC,eAAe,yBAAyB;IACjD,QAAQ,CAAC,aAAa,4CAAuC;IAE7D,QAAQ,CAAC,sBAAsB,gEAAA;gBAEnB,EACV,GAAG,EACH,IAAI,EACJ,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,uBAAuB;IAyB1B,OAAO,CAAC,qBAAqB;YAef,gBAAgB;IAmB9B,OAAO,CAAC,4BAA4B;IAIpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAkDhC;IAED,SAAgB,kBAAkB,yGAmChC;IAEK,KAAK;CAGb"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AddTranslationToAlternativesProps, GetOptionsProps, GetOptionsResult } from '../types/translation.types';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAlternativesResponse } from '../types/api.types';
|
|
3
|
+
import { ChatAnswer } from '../types/units.types';
|
|
3
4
|
export declare function getOptionsForTranslation({ lastMessage, alternatives, }: GetOptionsProps): GetOptionsResult;
|
|
4
5
|
export declare function addTranslationsToAlternative({ alternatives, translatedHints, translatedDefaults, }: AddTranslationToAlternativesProps): GetAlternativesResponse;
|
|
5
6
|
export declare function addTranslationToOptions(options: ChatAnswer[], translations: string[]): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/translation.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,eAAe,EACf,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"translation.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/translation.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,eAAe,EACf,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,wBAAgB,wBAAwB,CAAC,EACvC,WAAW,EACX,YAAY,GACb,EAAE,eAAe,GAAG,gBAAgB,CAmBpC;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,YAAY,EACZ,eAAe,EACf,kBAAkB,GACnB,EAAE,iCAAiC,GAAG,uBAAuB,CAe7D;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE;;;;IAKpF"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
text: string;
|
|
3
|
-
promptKey: string;
|
|
4
|
-
translatedText?: string;
|
|
5
|
-
};
|
|
1
|
+
import { ChatAnswer, IThreadItem, Stroke } from './units.types';
|
|
6
2
|
export type GetAlternativesPayload = {
|
|
7
3
|
municipalityId: string;
|
|
8
4
|
assignmentClassGrade: number;
|
|
@@ -18,15 +14,14 @@ export type PostMessagePayload = {
|
|
|
18
14
|
language: string;
|
|
19
15
|
problemAnswer: string[];
|
|
20
16
|
answer?: string | string[];
|
|
21
|
-
threadId?: string | null;
|
|
22
17
|
problem: string;
|
|
23
18
|
imageAltText?: string;
|
|
24
19
|
};
|
|
25
20
|
export type PostMessageResponse = {
|
|
26
21
|
message: string;
|
|
27
|
-
threadId: string;
|
|
28
22
|
options: ChatAnswer[];
|
|
29
23
|
endMessage?: boolean;
|
|
24
|
+
thread: IThreadItem;
|
|
30
25
|
};
|
|
31
26
|
export type GoogleTranslatePayload = {
|
|
32
27
|
text: string[];
|
|
@@ -57,10 +52,6 @@ export type GoogleText2SpeechPayload = {
|
|
|
57
52
|
export type GoogleText2SpeechResponse = string | undefined | {
|
|
58
53
|
audioContent?: string;
|
|
59
54
|
};
|
|
60
|
-
export type Stroke = {
|
|
61
|
-
x: number[];
|
|
62
|
-
y: number[];
|
|
63
|
-
};
|
|
64
55
|
export type ChatHintPayload = {
|
|
65
56
|
problemDescription: string;
|
|
66
57
|
correctAnswer: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/api.types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/api.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE/D,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,GAAG,IAAI,CAAA;AAER,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE;QACP,OAAO,EAAE,UAAU,EAAE,CAAA;QACrB,KAAK,EAAE,UAAU,EAAE,CAAA;KACpB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE;QACJ,YAAY,EAAE;YAAE,cAAc,EAAE,MAAM,CAAC;YAAC,sBAAsB,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAC3E,CAAA;CACF,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAA;QACpB,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,WAAW,EAAE;QACX,aAAa,EAAE,MAAM,CAAA;QACrB,KAAK,EAAE,MAAM,CAAA;QACb,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,SAAS,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtF,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA"}
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
import type { Store } from 'effector';
|
|
2
|
-
import {
|
|
2
|
+
import { ChatHintPayload, ChatHintResponse, GetAlternativesPayload, GetAlternativesResponse, GoogleText2SpeechPayload, GoogleText2SpeechResponse, GoogleTranslatePayload, GoogleTranslateResponse, PostMessagePayload, PostMessageResponse } from './api.types';
|
|
3
3
|
import { ExtendWithOptional } from '../../../lib/helpers/types';
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
message: string;
|
|
7
|
-
threadId: string;
|
|
8
|
-
options: ChatAnswer[];
|
|
9
|
-
isOwnMessage: boolean;
|
|
10
|
-
translatedMessage?: string;
|
|
11
|
-
endMessage?: boolean;
|
|
12
|
-
};
|
|
4
|
+
import { ChatAnswer, ConversationMessage, FullStrokeData } from './units.types';
|
|
13
5
|
export type ChatbotMessages = {
|
|
14
6
|
error: ConversationMessage;
|
|
15
7
|
start: ConversationMessage;
|
|
16
8
|
endMessage: ConversationMessage;
|
|
17
9
|
anotherHintOption: ChatAnswer;
|
|
18
10
|
};
|
|
11
|
+
export type SpotErrorPayload = {
|
|
12
|
+
strokes: FullStrokeData[];
|
|
13
|
+
};
|
|
14
|
+
export type SpotErrorResponse = {
|
|
15
|
+
strokesIds: string[];
|
|
16
|
+
};
|
|
17
|
+
export type ChatbotApiRequests = {
|
|
18
|
+
getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>;
|
|
19
|
+
postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>;
|
|
20
|
+
postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>;
|
|
21
|
+
postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>;
|
|
22
|
+
spotError: (props: SpotErrorPayload) => Promise<SpotErrorResponse>;
|
|
23
|
+
};
|
|
19
24
|
export type ChatbotModelProps = {
|
|
20
25
|
$key?: Store<string>;
|
|
21
|
-
api: {
|
|
22
|
-
|
|
23
|
-
postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>;
|
|
24
|
-
postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>;
|
|
25
|
-
postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>;
|
|
26
|
+
api: Omit<ChatbotApiRequests, 'postMessage'> & {
|
|
27
|
+
requestHint: (props: ChatHintPayload) => Promise<ChatHintResponse>;
|
|
26
28
|
};
|
|
27
29
|
messages: ChatbotMessages;
|
|
30
|
+
threadMessagesLimit?: number;
|
|
28
31
|
};
|
|
29
32
|
export type SendHelpParams = {
|
|
30
33
|
message: string;
|
|
@@ -32,8 +35,6 @@ export type SendHelpParams = {
|
|
|
32
35
|
};
|
|
33
36
|
export type SendHelpProps = SendHelpParams & {
|
|
34
37
|
key: string;
|
|
35
|
-
isTranslated: boolean;
|
|
36
|
-
threadId: string;
|
|
37
38
|
context: ChatbotContext | null;
|
|
38
39
|
};
|
|
39
40
|
export type SetHintMessageProps = {
|
|
@@ -55,9 +56,14 @@ export type ChatbotRenderer = {
|
|
|
55
56
|
variant: MessageVariant;
|
|
56
57
|
withTextToSpeech: boolean;
|
|
57
58
|
};
|
|
58
|
-
export type CreateMessageResponse = ExtendWithOptional<PostMessageResponse, ConversationMessage>;
|
|
59
|
+
export type CreateMessageResponse = ExtendWithOptional<Omit<PostMessageResponse, 'thread'>, ConversationMessage>;
|
|
60
|
+
type GetVisibleStrokesResponse = {
|
|
61
|
+
strokes: FullStrokeData[];
|
|
62
|
+
validationKey: string;
|
|
63
|
+
};
|
|
59
64
|
export type IChatDrawBoardAdapter = {
|
|
60
|
-
|
|
65
|
+
$strokesValidationKey: Store<string | null>;
|
|
66
|
+
getVisibleStrokes(): Promise<GetVisibleStrokesResponse | null>;
|
|
61
67
|
};
|
|
62
68
|
export type ChatbotContext = {
|
|
63
69
|
language: string;
|
|
@@ -67,4 +73,5 @@ export type ChatbotContext = {
|
|
|
67
73
|
translationTargetLanguage: string;
|
|
68
74
|
imageDescription?: string;
|
|
69
75
|
};
|
|
76
|
+
export {};
|
|
70
77
|
//# sourceMappingURL=model.types.d.ts.map
|