@magmamath/students-features 0.10.0-rc.6 → 0.10.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/celebrations/helpers.js +1 -4
- package/dist/commonjs/features/celebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js +19 -41
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +2 -7
- 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/MessageContent.js +4 -16
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +2 -6
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +4 -17
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +1 -2
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +2 -19
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +11 -32
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +2 -2
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +107 -0
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/t2s.types.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/feedback/model/sockets.js +5 -8
- package/dist/commonjs/features/feedback/model/sockets.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +4 -4
- package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +4 -4
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/Keyboard.js +2 -4
- package/dist/commonjs/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/MainLayout/MainLayout.js +6 -1
- package/dist/commonjs/features/keyboard/components/MainLayout/MainLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/UnitTabs.js +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js +1 -3
- package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +6 -27
- package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.js +1 -9
- package/dist/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/types.js +0 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/types.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/constants.js +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js +1 -2
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js +4 -20
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/commonjs/features/keyboard/helpers.js +0 -7
- package/dist/commonjs/features/keyboard/helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js +3 -20
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/units.js +3 -6
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/units.js.map +1 -1
- package/dist/commonjs/index.js +1 -13
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/CDotIcon/CDotIcon.js +4 -4
- package/dist/commonjs/shared/icons/keyboard/CDotIcon/CDotIcon.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -2
- package/dist/commonjs/shared/translation/localization/de.json +1 -2
- package/dist/commonjs/shared/translation/localization/en.json +1 -2
- package/dist/commonjs/shared/translation/localization/gb.json +1 -2
- package/dist/commonjs/shared/translation/localization/sct.json +1 -2
- package/dist/commonjs/shared/translation/localization/sw.json +1 -2
- package/dist/commonjs/types/common.types.js +0 -4
- package/dist/module/features/celebrations/helpers.js +1 -4
- package/dist/module/features/celebrations/helpers.js.map +1 -1
- package/dist/module/features/chatbot/components/Chat/Chat.js +19 -41
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +2 -5
- 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/MessageContent.js +4 -16
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +2 -6
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +4 -17
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +0 -1
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +2 -19
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +11 -32
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +2 -2
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +102 -0
- package/dist/module/features/chatbot/model/t2s.js.map +1 -0
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/chatbot/types/t2s.types.js.map +1 -1
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/feedback/model/sockets.js +5 -8
- package/dist/module/features/feedback/model/sockets.js.map +1 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +3 -3
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
- package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +4 -4
- package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +2 -2
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +4 -4
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/Keyboard.js +2 -4
- package/dist/module/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/module/features/keyboard/components/KeysList/KeysList.js.map +1 -1
- package/dist/module/features/keyboard/components/MainLayout/MainLayout.js +7 -2
- package/dist/module/features/keyboard/components/MainLayout/MainLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/UnitTabs.js +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/helpers.js +1 -2
- package/dist/module/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +6 -27
- package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/keyboardGroups.js +1 -9
- package/dist/module/features/keyboard/components/UnitsLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/types.js +0 -1
- package/dist/module/features/keyboard/components/UnitsLayout/types.js.map +1 -1
- package/dist/module/features/keyboard/constants/constants.js +1 -1
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js +2 -3
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboardLayouts.js +4 -19
- package/dist/module/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/module/features/keyboard/helpers.js +0 -5
- package/dist/module/features/keyboard/helpers.js.map +1 -1
- package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js +3 -20
- package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
- package/dist/module/features/keyboard/types/MathKeysGroups/units.js +3 -6
- package/dist/module/features/keyboard/types/MathKeysGroups/units.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/keyboard/CDotIcon/CDotIcon.js +4 -4
- package/dist/module/shared/icons/keyboard/CDotIcon/CDotIcon.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -2
- package/dist/module/shared/translation/localization/de.json +1 -2
- package/dist/module/shared/translation/localization/en.json +1 -2
- package/dist/module/shared/translation/localization/gb.json +1 -2
- package/dist/module/shared/translation/localization/sct.json +1 -2
- package/dist/module/shared/translation/localization/sw.json +1 -2
- package/dist/module/types/common.types.js +0 -2
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +2 -6
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +1 -2
- 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 -3
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.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/Chatbot.d.ts +1 -4
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +2 -3
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +3 -5
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +34 -0
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +16 -28
- 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 +11 -14
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +0 -25
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts +1 -4
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/sockets.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts +1 -2
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/MainLayout/MainLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts +7 -4
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/types.d.ts +1 -7
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/constants.d.ts +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts +0 -4
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/helpers.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +0 -10
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/units.d.ts +0 -36
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/units.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -6
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -2
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +0 -2
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +2 -6
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +1 -2
- 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 -3
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -4
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.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/Chatbot.d.ts +1 -4
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +2 -3
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +3 -5
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +34 -0
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +16 -28
- 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 +11 -14
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +0 -25
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/model.d.ts +1 -4
- package/dist/typescript/module/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/sockets.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts +1 -2
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/MainLayout/MainLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts +7 -4
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/types.d.ts +1 -7
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/types.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/constants.d.ts +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts +0 -4
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/helpers.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +0 -10
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/units.d.ts +0 -36
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/units.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -6
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -2
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +0 -2
- package/dist/typescript/module/types/common.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/celebrations/helpers.ts +33 -35
- package/src/features/chatbot/components/Chat/Chat.tsx +22 -48
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +2 -9
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -3
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +3 -25
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +0 -4
- package/src/features/chatbot/components/Chatbot.tsx +2 -19
- package/src/features/chatbot/constants.ts +0 -2
- package/src/features/chatbot/helpers.ts +1 -14
- package/src/features/chatbot/index.ts +2 -17
- package/src/features/chatbot/model/ChatBotModel.ts +13 -51
- package/src/features/chatbot/model/ChatBotThreadManager.ts +4 -12
- package/src/features/chatbot/model/ChatbotApi.ts +1 -1
- package/src/features/chatbot/model/ChatsCacheModel.ts +0 -4
- package/src/features/chatbot/model/t2s.ts +123 -0
- package/src/features/chatbot/types/api.types.ts +19 -25
- package/src/features/chatbot/types/model.types.ts +12 -24
- package/src/features/chatbot/types/t2s.types.ts +0 -33
- package/src/features/feedback/model/model.ts +1 -4
- package/src/features/feedback/model/sockets.ts +6 -8
- package/src/features/keyboard/components/AlgebraLayout/AlgebraLayout.tsx +3 -4
- package/src/features/keyboard/components/BasicLayout/BasicLayout.tsx +2 -2
- package/src/features/keyboard/components/BasicPlusLayout/keyboardGroups.ts +17 -27
- package/src/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.tsx +2 -3
- package/src/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.ts +24 -30
- package/src/features/keyboard/components/Keyboard.tsx +4 -14
- package/src/features/keyboard/components/KeysList/KeysList.tsx +1 -1
- package/src/features/keyboard/components/MainLayout/MainLayout.tsx +6 -2
- package/src/features/keyboard/components/UnitsLayout/UnitTabs.tsx +1 -1
- package/src/features/keyboard/components/UnitsLayout/helpers.tsx +0 -3
- package/src/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.ts +22 -36
- package/src/features/keyboard/components/UnitsLayout/keyboardGroups.ts +0 -11
- package/src/features/keyboard/components/UnitsLayout/types.ts +0 -7
- package/src/features/keyboard/constants/constants.ts +1 -1
- package/src/features/keyboard/constants/keyboardGroupsByLocale.ts +0 -2
- package/src/features/keyboard/constants/keyboardLayouts.ts +1 -18
- package/src/features/keyboard/helpers.ts +0 -6
- package/src/features/keyboard/types/MathKeysGroups/basicOperators.tsx +3 -15
- package/src/features/keyboard/types/MathKeysGroups/units.tsx +0 -3
- package/src/index.ts +0 -1
- package/src/lib/effector/createControllerEffect.ts +1 -1
- package/src/shared/icons/keyboard/CDotIcon/CDotIcon.tsx +2 -2
- package/src/shared/translation/localization/ca.json +1 -2
- package/src/shared/translation/localization/de.json +1 -2
- package/src/shared/translation/localization/en.json +1 -2
- package/src/shared/translation/localization/gb.json +1 -2
- package/src/shared/translation/localization/sct.json +1 -2
- package/src/shared/translation/localization/sw.json +1 -2
- package/src/types/common.types.ts +0 -4
- package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/commonjs/features/chatbot/helpers/ttsHighlight.js +0 -29
- package/dist/commonjs/features/chatbot/helpers/ttsHighlight.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatTTSHighlightModel.js +0 -56
- package/dist/commonjs/features/chatbot/model/ChatTTSHighlightModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatTTSModel.js +0 -154
- package/dist/commonjs/features/chatbot/model/ChatTTSModel.js.map +0 -1
- package/dist/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.js +0 -34
- package/dist/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.js.map +0 -1
- package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js +0 -77
- package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js.map +0 -1
- package/dist/commonjs/features/openEnded/index.js +0 -48
- package/dist/commonjs/features/openEnded/index.js.map +0 -1
- package/dist/commonjs/features/openEnded/oe.helpers.js +0 -26
- package/dist/commonjs/features/openEnded/oe.helpers.js.map +0 -1
- package/dist/commonjs/features/openEnded/oe.types.js +0 -14
- package/dist/commonjs/features/openEnded/oe.types.js.map +0 -1
- package/dist/commonjs/lib/components/ConditionalWrapper.js +0 -23
- package/dist/commonjs/lib/components/ConditionalWrapper.js.map +0 -1
- package/dist/commonjs/shared/common.constants.js +0 -9
- package/dist/commonjs/shared/common.constants.js.map +0 -1
- package/dist/commonjs/shared/icons/TimeIcon.js +0 -37
- package/dist/commonjs/shared/icons/TimeIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js +0 -32
- package/dist/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js +0 -32
- package/dist/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js.map +0 -1
- package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/module/features/chatbot/helpers/ttsHighlight.js +0 -23
- package/dist/module/features/chatbot/helpers/ttsHighlight.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatTTSHighlightModel.js +0 -52
- package/dist/module/features/chatbot/model/ChatTTSHighlightModel.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatTTSModel.js +0 -149
- package/dist/module/features/chatbot/model/ChatTTSModel.js.map +0 -1
- package/dist/module/features/openEnded/components/OpenEndedAttemptsLimit.js +0 -28
- package/dist/module/features/openEnded/components/OpenEndedAttemptsLimit.js.map +0 -1
- package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js +0 -71
- package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js.map +0 -1
- package/dist/module/features/openEnded/index.js +0 -7
- package/dist/module/features/openEnded/index.js.map +0 -1
- package/dist/module/features/openEnded/oe.helpers.js +0 -21
- package/dist/module/features/openEnded/oe.helpers.js.map +0 -1
- package/dist/module/features/openEnded/oe.types.js +0 -10
- package/dist/module/features/openEnded/oe.types.js.map +0 -1
- package/dist/module/lib/components/ConditionalWrapper.js +0 -17
- package/dist/module/lib/components/ConditionalWrapper.js.map +0 -1
- package/dist/module/shared/common.constants.js +0 -5
- package/dist/module/shared/common.constants.js.map +0 -1
- package/dist/module/shared/icons/TimeIcon.js +0 -29
- package/dist/module/shared/icons/TimeIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js +0 -24
- package/dist/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js +0 -24
- package/dist/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/helpers/ttsHighlight.d.ts +0 -8
- package/dist/typescript/commonjs/features/chatbot/helpers/ttsHighlight.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSHighlightModel.d.ts +0 -25
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSHighlightModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSModel.d.ts +0 -38
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.d.ts +0 -7
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedScoreLabel.d.ts +0 -12
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/index.d.ts +0 -5
- package/dist/typescript/commonjs/features/openEnded/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/oe.helpers.d.ts +0 -13
- package/dist/typescript/commonjs/features/openEnded/oe.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/oe.types.d.ts +0 -7
- package/dist/typescript/commonjs/features/openEnded/oe.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts +0 -9
- package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/common.constants.d.ts +0 -2
- package/dist/typescript/commonjs/shared/common.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/TimeIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/TimeIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/helpers/ttsHighlight.d.ts +0 -8
- package/dist/typescript/module/features/chatbot/helpers/ttsHighlight.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatTTSHighlightModel.d.ts +0 -25
- package/dist/typescript/module/features/chatbot/model/ChatTTSHighlightModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatTTSModel.d.ts +0 -38
- package/dist/typescript/module/features/chatbot/model/ChatTTSModel.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/components/OpenEndedAttemptsLimit.d.ts +0 -7
- package/dist/typescript/module/features/openEnded/components/OpenEndedAttemptsLimit.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/components/OpenEndedScoreLabel.d.ts +0 -12
- package/dist/typescript/module/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/index.d.ts +0 -5
- package/dist/typescript/module/features/openEnded/index.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/oe.helpers.d.ts +0 -13
- package/dist/typescript/module/features/openEnded/oe.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/oe.types.d.ts +0 -7
- package/dist/typescript/module/features/openEnded/oe.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts +0 -9
- package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts.map +0 -1
- package/dist/typescript/module/shared/common.constants.d.ts +0 -2
- package/dist/typescript/module/shared/common.constants.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/TimeIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/TimeIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts.map +0 -1
- package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/src/features/chatbot/helpers/ttsHighlight.ts +0 -25
- package/src/features/chatbot/model/ChatTTSHighlightModel.ts +0 -64
- package/src/features/chatbot/model/ChatTTSModel.ts +0 -168
- package/src/features/openEnded/components/OpenEndedAttemptsLimit.tsx +0 -26
- package/src/features/openEnded/components/OpenEndedScoreLabel.tsx +0 -81
- package/src/features/openEnded/index.ts +0 -4
- package/src/features/openEnded/oe.helpers.ts +0 -31
- package/src/features/openEnded/oe.types.ts +0 -6
- package/src/lib/components/ConditionalWrapper.tsx +0 -15
- package/src/shared/common.constants.ts +0 -3
- package/src/shared/icons/TimeIcon.tsx +0 -23
- package/src/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.tsx +0 -18
- package/src/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.tsx +0 -18
|
@@ -14,8 +14,6 @@ export const ReceivedMessage = ({
|
|
|
14
14
|
withIcon,
|
|
15
15
|
colorScheme = ColorScheme.Blue,
|
|
16
16
|
withErrorSpotting,
|
|
17
|
-
highlightedWordIndex,
|
|
18
|
-
TTSHighlightRenderer,
|
|
19
17
|
}: VariantProps) => {
|
|
20
18
|
const text = isTranslated ? message.translatedMessage : message.message
|
|
21
19
|
|
|
@@ -35,8 +33,6 @@ export const ReceivedMessage = ({
|
|
|
35
33
|
text={text ?? ''}
|
|
36
34
|
colorScheme={colorScheme}
|
|
37
35
|
withErrorSpotting={withErrorSpotting}
|
|
38
|
-
highlightedWordIndex={highlightedWordIndex}
|
|
39
|
-
TTSHighlightRenderer={TTSHighlightRenderer}
|
|
40
36
|
/>
|
|
41
37
|
</View>
|
|
42
38
|
</View>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ComponentType, PropsWithChildren
|
|
1
|
+
import React, { ComponentType, PropsWithChildren } from 'react'
|
|
2
2
|
import { useStoreMap, useUnit } from 'effector-react'
|
|
3
3
|
|
|
4
4
|
import { ChatbotModel } from '../model/ChatBotModel'
|
|
@@ -7,7 +7,6 @@ import { ChatControls } from './ChatControls/ChatControls'
|
|
|
7
7
|
import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants'
|
|
8
8
|
import { ChatBotModelContext } from '../context/ChatBotModelContext'
|
|
9
9
|
import { ColorScheme } from '../types/style.types'
|
|
10
|
-
import { TTSHighlightRenderer } from '../types/t2s.types'
|
|
11
10
|
|
|
12
11
|
type ChatbotProps = {
|
|
13
12
|
model: ChatbotModel
|
|
@@ -19,34 +18,22 @@ type ChatbotProps = {
|
|
|
19
18
|
}
|
|
20
19
|
ButtonWrapper?: ComponentType<PropsWithChildren>
|
|
21
20
|
iconSize?: { width: number; height: number } // TODO: use number instead
|
|
22
|
-
isInputDisabled?: boolean
|
|
23
21
|
colorScheme?: ColorScheme
|
|
24
|
-
TTSHighlightRenderer?: TTSHighlightRenderer
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
export const Chatbot = ({
|
|
28
25
|
model,
|
|
29
26
|
isHintFeedback,
|
|
30
27
|
isTextToSpeechEnabled = false,
|
|
31
|
-
isInputDisabled,
|
|
32
28
|
textToSpeechConfig,
|
|
33
29
|
ButtonWrapper,
|
|
34
30
|
iconSize,
|
|
35
31
|
colorScheme = ColorScheme.Blue,
|
|
36
|
-
TTSHighlightRenderer,
|
|
37
32
|
}: ChatbotProps) => {
|
|
38
33
|
const isChatAllowed = useUnit(model.$chatAccess)
|
|
39
34
|
const isAvailable = useStoreMap(model.$currentChatData, ({ isAvailable }) => isAvailable)
|
|
40
35
|
model.t2s.setAudioConfig(textToSpeechConfig ?? null)
|
|
41
36
|
|
|
42
|
-
const shouldAnimateCloseButton = useStoreMap({
|
|
43
|
-
store: model.$currentChatData,
|
|
44
|
-
fn: (chat, [isInputDisabled]) => {
|
|
45
|
-
return isInputDisabled && chat.messages.length === 1
|
|
46
|
-
},
|
|
47
|
-
keys: [isInputDisabled],
|
|
48
|
-
})
|
|
49
|
-
|
|
50
37
|
const openChat = () => model.setIsOpen(true)
|
|
51
38
|
const closeChat = () => model.setIsOpen(false)
|
|
52
39
|
|
|
@@ -61,18 +48,14 @@ export const Chatbot = ({
|
|
|
61
48
|
colorScheme={colorScheme}
|
|
62
49
|
isHintFeedback={isHintFeedback}
|
|
63
50
|
isTextToSpeechEnabled={isTextToSpeechEnabled}
|
|
64
|
-
isInputDisabled={isInputDisabled}
|
|
65
|
-
MessageWrapper={ButtonWrapper}
|
|
66
|
-
TTSHighlightRenderer={TTSHighlightRenderer}
|
|
67
51
|
/>
|
|
68
52
|
|
|
69
53
|
<ChatControls
|
|
70
54
|
model={model}
|
|
71
55
|
onPressChatIcon={openChat}
|
|
72
56
|
onPressClose={closeChat}
|
|
57
|
+
ButtonWrapper={ButtonWrapper}
|
|
73
58
|
iconSize={iconSize}
|
|
74
|
-
ButtonWrapper={isInputDisabled ? undefined : ButtonWrapper}
|
|
75
|
-
shouldAnimateCloseButton={shouldAnimateCloseButton}
|
|
76
59
|
/>
|
|
77
60
|
</ChatBotModelContext.Provider>
|
|
78
61
|
)
|
|
@@ -58,27 +58,17 @@ export function prepareChatRequestPayload(
|
|
|
58
58
|
conversationId,
|
|
59
59
|
freeTextMessage,
|
|
60
60
|
problemDescription,
|
|
61
|
-
problemStandards,
|
|
62
61
|
problemAnswer,
|
|
63
62
|
language,
|
|
64
63
|
imageCdnId,
|
|
65
64
|
imageAltText,
|
|
66
65
|
answerOptions,
|
|
67
66
|
answer,
|
|
68
|
-
chatHistory,
|
|
69
67
|
} = payload
|
|
70
68
|
|
|
71
69
|
if (freeTextMessage) {
|
|
72
70
|
return conversationId
|
|
73
|
-
? {
|
|
74
|
-
type: ChatRequestType.FREETEXT,
|
|
75
|
-
data: {
|
|
76
|
-
conversationId,
|
|
77
|
-
message: freeTextMessage,
|
|
78
|
-
...(chatHistory && { chatHistory }),
|
|
79
|
-
...(!!problemStandards?.length && { problemStandards }),
|
|
80
|
-
},
|
|
81
|
-
}
|
|
71
|
+
? { type: ChatRequestType.FREETEXT, data: { conversationId, message: freeTextMessage } }
|
|
82
72
|
: {
|
|
83
73
|
type: ChatRequestType.FREETEXT,
|
|
84
74
|
data: {
|
|
@@ -86,10 +76,8 @@ export function prepareChatRequestPayload(
|
|
|
86
76
|
correctAnswer: problemAnswer,
|
|
87
77
|
problemDescription,
|
|
88
78
|
language,
|
|
89
|
-
...(chatHistory && { chatHistory }),
|
|
90
79
|
...(imageCdnId && { imageCdnId }),
|
|
91
80
|
...(imageAltText && { altText: imageAltText }),
|
|
92
|
-
...(!!problemStandards?.length && { problemStandards }),
|
|
93
81
|
...(!!answerOptions?.length && { answerOptions }),
|
|
94
82
|
},
|
|
95
83
|
}
|
|
@@ -105,7 +93,6 @@ export function prepareChatRequestPayload(
|
|
|
105
93
|
language,
|
|
106
94
|
...(imageCdnId && { imageCdnId }),
|
|
107
95
|
...(imageAltText && { altText: imageAltText }),
|
|
108
|
-
...(!!problemStandards?.length && { problemStandards }),
|
|
109
96
|
},
|
|
110
97
|
}
|
|
111
98
|
}
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
export { Chatbot } from './components/Chatbot'
|
|
2
2
|
export { ChatbotModel } from './model/ChatBotModel'
|
|
3
|
-
export {
|
|
4
|
-
AudioStatus,
|
|
5
|
-
type AudioProvider,
|
|
6
|
-
type TTSHighlightRenderer,
|
|
7
|
-
type TTSHighlightRendererProps,
|
|
8
|
-
} from './types/t2s.types'
|
|
3
|
+
export { AudioStatus, type AudioProvider } from './types/t2s.types'
|
|
9
4
|
export {
|
|
10
5
|
MessageVariant,
|
|
11
6
|
type ChatbotModelProps,
|
|
12
7
|
type IChatDrawBoardAdapter,
|
|
13
8
|
} from './types/model.types'
|
|
14
|
-
export type {
|
|
15
|
-
export type {
|
|
16
|
-
ChatHintPayload,
|
|
17
|
-
ChatHintResponse,
|
|
18
|
-
ChatHistory,
|
|
19
|
-
GetAlternativesResponse,
|
|
20
|
-
GetAlternativesPayload,
|
|
21
|
-
SendMessagePayload,
|
|
22
|
-
SendMessageResponse,
|
|
23
|
-
PostMessageResponse,
|
|
24
|
-
} from './types/api.types'
|
|
9
|
+
export type { PostMessageResponse } from './types/api.types'
|
|
25
10
|
export { DefaultMessagesCreator } from './model/DefaultMessageCreator'
|
|
26
11
|
export type { ChatAnswer } from './types/units.types'
|
|
27
12
|
export type { ConversationMessage } from './types/units.types'
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
restore,
|
|
8
8
|
sample,
|
|
9
9
|
type Store,
|
|
10
|
-
StoreWritable
|
|
10
|
+
StoreWritable
|
|
11
11
|
} from 'effector'
|
|
12
12
|
import {
|
|
13
13
|
ChatbotContext,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { GetAlternativesResponse } from '../types/api.types'
|
|
24
24
|
import { ChatbotAPI } from './ChatbotApi'
|
|
25
25
|
import { ChatbotTranslation } from './ChatbotTranslation'
|
|
26
|
-
import {
|
|
26
|
+
import { ChatTextToSpeechModel, T2SConfig } from './t2s'
|
|
27
27
|
import { messagesHelper } from './messagesHelper'
|
|
28
28
|
import { ChatBotThreadManager } from './ChatBotThreadManager'
|
|
29
29
|
import { ChatsCacheModel, defaultChatData } from './ChatsCacheModel'
|
|
@@ -34,7 +34,6 @@ import { ChatBotTextManager } from './ChatBoxTextManager'
|
|
|
34
34
|
import { ControlledSample } from '../../../lib/effector/ControlledSample'
|
|
35
35
|
import { transformAlternatives } from '../helpers'
|
|
36
36
|
import { IS_WEB } from '@magmamath/react-native-ui'
|
|
37
|
-
import { T2SConfig } from '../types/t2s.types'
|
|
38
37
|
|
|
39
38
|
export class ChatbotModel {
|
|
40
39
|
public readonly textManager = new ChatBotTextManager()
|
|
@@ -46,7 +45,7 @@ export class ChatbotModel {
|
|
|
46
45
|
public readonly api: ChatbotAPI
|
|
47
46
|
|
|
48
47
|
public readonly translation: ChatbotTranslation
|
|
49
|
-
public readonly t2s:
|
|
48
|
+
public readonly t2s: ChatTextToSpeechModel
|
|
50
49
|
public readonly errorSpotting: ErrorSpottingModel
|
|
51
50
|
public readonly textInput = new ChatBotTextInput()
|
|
52
51
|
|
|
@@ -58,7 +57,7 @@ export class ChatbotModel {
|
|
|
58
57
|
|
|
59
58
|
readonly resetAlternatives = createEvent()
|
|
60
59
|
readonly setAlternatives = createEvent<GetAlternativesResponse | null>()
|
|
61
|
-
readonly $alternatives
|
|
60
|
+
readonly $alternatives: Store<GetAlternativesResponse | null>
|
|
62
61
|
|
|
63
62
|
readonly setIsOpen = createEvent<boolean>()
|
|
64
63
|
readonly toggleOpen = createEvent()
|
|
@@ -87,18 +86,18 @@ export class ChatbotModel {
|
|
|
87
86
|
this.api = new ChatbotAPI({ ...api, postMessage: this.threadManager.postMessage })
|
|
88
87
|
|
|
89
88
|
this.$chatAccess = chatAccess
|
|
90
|
-
if ($key) this.bindKey($key)
|
|
91
89
|
|
|
92
90
|
this.threadManager.setApi({ getHint: api.requestHint, sendMessage: api.sendMessage })
|
|
93
91
|
if (threadMessagesLimit) {
|
|
94
92
|
this.threadManager.setMessagesLimit(threadMessagesLimit)
|
|
95
93
|
}
|
|
96
94
|
|
|
97
|
-
this.$alternatives
|
|
95
|
+
this.$alternatives = createStore<GetAlternativesResponse | null>(null)
|
|
98
96
|
.on(this.api.getAlternativesFx.doneData, (_, payload) => transformAlternatives(payload))
|
|
99
97
|
.on(this.setAlternatives, (_, payload) => transformAlternatives(payload))
|
|
100
98
|
.reset(this.resetAlternatives)
|
|
101
99
|
|
|
100
|
+
this.t2s = new ChatTextToSpeechModel({ api: this.api })
|
|
102
101
|
this.translation = new ChatbotTranslation({
|
|
103
102
|
$context: this.$context,
|
|
104
103
|
defaultMessages: this.defaultMessages,
|
|
@@ -111,16 +110,12 @@ export class ChatbotModel {
|
|
|
111
110
|
chats: this.cache,
|
|
112
111
|
})
|
|
113
112
|
|
|
114
|
-
this.t2s = new ChatTTSModel({
|
|
115
|
-
api: this.api,
|
|
116
|
-
$currentChatData: this.$currentChatData,
|
|
117
|
-
$isTranslated: this.translation.$isTranslated,
|
|
118
|
-
})
|
|
119
|
-
|
|
120
113
|
this.errorSpotting = new ErrorSpottingModel({
|
|
121
114
|
$currentChatData: this.$currentChatData,
|
|
122
115
|
})
|
|
123
116
|
|
|
117
|
+
if ($key) this.bindKey($key)
|
|
118
|
+
|
|
124
119
|
sample({
|
|
125
120
|
source: this.$isOpen.updates,
|
|
126
121
|
filter: (isOpen) => !isOpen,
|
|
@@ -161,12 +156,7 @@ export class ChatbotModel {
|
|
|
161
156
|
...source,
|
|
162
157
|
}),
|
|
163
158
|
effect: createEffect(
|
|
164
|
-
({
|
|
165
|
-
currentChatData,
|
|
166
|
-
initOnly,
|
|
167
|
-
chatAccess,
|
|
168
|
-
withGreetingMessage = true,
|
|
169
|
-
}: StartConversationFxData) => {
|
|
159
|
+
({ currentChatData, initOnly, chatAccess }: StartConversationFxData) => {
|
|
170
160
|
const { key, messages } = currentChatData
|
|
171
161
|
|
|
172
162
|
if (!chatAccess) return
|
|
@@ -176,7 +166,7 @@ export class ChatbotModel {
|
|
|
176
166
|
return this.reinitConversation({ key })
|
|
177
167
|
}
|
|
178
168
|
this.cache.add(key, {
|
|
179
|
-
messages:
|
|
169
|
+
messages: [this.defaultMessages.start],
|
|
180
170
|
isAvailable: true,
|
|
181
171
|
currentThread: null,
|
|
182
172
|
})
|
|
@@ -196,53 +186,29 @@ export class ChatbotModel {
|
|
|
196
186
|
|
|
197
187
|
private createSendHelpRequestFx() {
|
|
198
188
|
const effect = attach({
|
|
199
|
-
source: {
|
|
200
|
-
key: this.$currentKey,
|
|
201
|
-
context: this.$context,
|
|
202
|
-
cache: this.cache.$data,
|
|
203
|
-
alternatives: this.$alternatives,
|
|
204
|
-
},
|
|
189
|
+
source: { key: this.$currentKey, context: this.$context, cache: this.cache.$data },
|
|
205
190
|
mapParams: (params: SendHelpParams, source) => ({
|
|
206
191
|
...params,
|
|
207
192
|
...source,
|
|
208
193
|
}),
|
|
209
194
|
effect: createEffect(
|
|
210
|
-
async ({
|
|
211
|
-
message,
|
|
212
|
-
translatedMessage,
|
|
213
|
-
key,
|
|
214
|
-
context,
|
|
215
|
-
isFreeText,
|
|
216
|
-
cache,
|
|
217
|
-
alternatives,
|
|
218
|
-
}: SendHelpProps) => {
|
|
195
|
+
async ({ message, translatedMessage, key, context, isFreeText, cache }: SendHelpProps) => {
|
|
219
196
|
if (!context) throw new Error('Trying to send message in chat without context')
|
|
220
197
|
this.setLastMessageKey(key)
|
|
221
198
|
this.cache.addMessages(key, {
|
|
222
199
|
messages: [messagesHelper.createOwn({ message, translatedMessage })],
|
|
223
200
|
})
|
|
224
201
|
|
|
225
|
-
const chatHistory =
|
|
226
|
-
context.assignmentId && context.problemId
|
|
227
|
-
? {
|
|
228
|
-
exerciseId: context.assignmentId,
|
|
229
|
-
problemId: context.problemId,
|
|
230
|
-
chatVersion: alternatives?.version ?? '',
|
|
231
|
-
}
|
|
232
|
-
: undefined
|
|
233
|
-
|
|
234
202
|
// Request is overridden by ThreadManager.postMessage (delegates to sendMessage/getHint)
|
|
235
203
|
const response = await this.api.postMessageFx({
|
|
236
204
|
answer: context.answer,
|
|
237
205
|
answerOptions: context.answerOptions,
|
|
238
|
-
problemDescription: context.
|
|
239
|
-
problemStandards: context.problemStandards,
|
|
206
|
+
problemDescription: context.problem,
|
|
240
207
|
problemAnswer: context.problemAnswer,
|
|
241
208
|
language: context.language,
|
|
242
209
|
imageAltText: context.imageDescription,
|
|
243
210
|
imageCdnId: context.imageCdnId,
|
|
244
211
|
conversationId: cache[key].conversationId,
|
|
245
|
-
chatHistory,
|
|
246
212
|
...(isFreeText && { freeTextMessage: message }),
|
|
247
213
|
})
|
|
248
214
|
|
|
@@ -328,10 +294,6 @@ export class ChatbotModel {
|
|
|
328
294
|
this.cache.setSingleMessage(key, { ...message, options })
|
|
329
295
|
}
|
|
330
296
|
|
|
331
|
-
public addMessage({ key, ...message }: SetHintMessageProps) {
|
|
332
|
-
this.cache.addMessages(key, { messages: [message] })
|
|
333
|
-
}
|
|
334
|
-
|
|
335
297
|
public readonly reinitConversation = ({ key }: ReinitConversationProps) => {
|
|
336
298
|
this.cache.reinitChatThread(key, { initialOption: this.defaultMessages.anotherHintOption })
|
|
337
299
|
this.threadManager.reset(key)
|
|
@@ -10,17 +10,10 @@ import {
|
|
|
10
10
|
import { ChatbotMessages, ChatRequestType, IChatDrawBoardAdapter } from '../types/model.types'
|
|
11
11
|
import { CHAT_BOT_MODEL_DEFAULTS } from './constants'
|
|
12
12
|
import { prepareChatRequestPayload } from '../helpers'
|
|
13
|
-
import { RequestOptionalConfig } from 'src/lib/effector/createControllerEffect'
|
|
14
13
|
|
|
15
14
|
type ThreadManagerApi = {
|
|
16
|
-
getHint: (
|
|
17
|
-
|
|
18
|
-
requestConfig?: RequestOptionalConfig,
|
|
19
|
-
) => Promise<ChatHintResponse>
|
|
20
|
-
sendMessage: (
|
|
21
|
-
props: SendMessagePayload,
|
|
22
|
-
requestConfig?: RequestOptionalConfig,
|
|
23
|
-
) => Promise<SendMessageResponse>
|
|
15
|
+
getHint: (props: ChatHintPayload) => Promise<ChatHintResponse>
|
|
16
|
+
sendMessage: (props: SendMessagePayload) => Promise<SendMessageResponse>
|
|
24
17
|
}
|
|
25
18
|
|
|
26
19
|
type ChatBotThreadManagerProps = {
|
|
@@ -76,7 +69,6 @@ export class ChatBotThreadManager {
|
|
|
76
69
|
|
|
77
70
|
public readonly postMessage = async (
|
|
78
71
|
payload: PostMessagePayload,
|
|
79
|
-
requestConfig?: RequestOptionalConfig,
|
|
80
72
|
): Promise<PostMessageResponse> => {
|
|
81
73
|
if (!this.api) {
|
|
82
74
|
throw new Error(
|
|
@@ -88,8 +80,8 @@ export class ChatBotThreadManager {
|
|
|
88
80
|
|
|
89
81
|
const result: SendMessageResponse | ChatHintResponse =
|
|
90
82
|
type === ChatRequestType.FREETEXT
|
|
91
|
-
? await this.api.sendMessage(data
|
|
92
|
-
: await this.api.getHint(data
|
|
83
|
+
? await this.api.sendMessage(data)
|
|
84
|
+
: await this.api.getHint(data)
|
|
93
85
|
|
|
94
86
|
threadItem.history.push(result.message)
|
|
95
87
|
|
|
@@ -13,7 +13,6 @@ export class ChatbotAPI {
|
|
|
13
13
|
constructor(api: ChatbotApiRequests) {
|
|
14
14
|
this.postMessageFx = createControllerEffect(api.postMessage)
|
|
15
15
|
this.getAlternativesFx = createEffect(api.getAlternatives)
|
|
16
|
-
this.textToSpeechTextFx = createEffect(api.postTextToSpeech)
|
|
17
16
|
this.translateTextFx = createEffect(
|
|
18
17
|
async (payload: GoogleTranslatePayload): Promise<GoogleTranslateResponse> => {
|
|
19
18
|
const response = await api.postTranslateText({
|
|
@@ -33,5 +32,6 @@ export class ChatbotAPI {
|
|
|
33
32
|
}
|
|
34
33
|
},
|
|
35
34
|
)
|
|
35
|
+
this.textToSpeechTextFx = createEffect(api.postTextToSpeech)
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { restore, createEvent, createEffect } from 'effector'
|
|
2
|
+
import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants'
|
|
3
|
+
import { AudioProvider, AudioStatus, PlayTextToSpeechProps } from '../types/t2s.types'
|
|
4
|
+
import { ChatbotAPI } from './ChatbotApi'
|
|
5
|
+
|
|
6
|
+
type ChatTextToSpeechModelProps = {
|
|
7
|
+
api: ChatbotAPI
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type T2SConfig = {
|
|
11
|
+
audioProvider?: AudioProvider
|
|
12
|
+
textSanitizer?: (speech: string) => string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type AudioConfig = {
|
|
16
|
+
voice?: typeof DEFAULT_VOICE
|
|
17
|
+
audioConfig?: typeof AUDIO_CONFIG
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class ChatTextToSpeechModel {
|
|
21
|
+
private readonly api: ChatbotAPI
|
|
22
|
+
private readonly audioCache: Record<string, string> = {}
|
|
23
|
+
private audioProvider: AudioProvider | null = null
|
|
24
|
+
|
|
25
|
+
readonly setCurrentPlayingId = createEvent<string | null>()
|
|
26
|
+
readonly $currentPlayingId = restore(this.setCurrentPlayingId, null)
|
|
27
|
+
readonly setStatus = createEvent<AudioStatus>()
|
|
28
|
+
readonly $status = restore(this.setStatus, AudioStatus.STOPPED)
|
|
29
|
+
|
|
30
|
+
private audioConfig: AudioConfig | null = null
|
|
31
|
+
private textSanitizer = (value: string) => value
|
|
32
|
+
|
|
33
|
+
constructor({ api }: ChatTextToSpeechModelProps) {
|
|
34
|
+
this.api = api
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public setAudioConfig(config: AudioConfig | null) {
|
|
38
|
+
this.audioConfig = config
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public setConfig({ audioProvider, textSanitizer }: T2SConfig) {
|
|
42
|
+
if (audioProvider) this.audioProvider = audioProvider
|
|
43
|
+
if (textSanitizer) this.textSanitizer = textSanitizer
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
private getCacheKey = (messageId: string, isTranslated: boolean) => {
|
|
47
|
+
return `${messageId}-${isTranslated ? 'translated' : 'original'}`
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public async play({ message, isTranslated }: PlayTextToSpeechProps) {
|
|
51
|
+
if (!this.audioProvider) throw new Error('Audio provider is not set. Use setConfig.')
|
|
52
|
+
const messageText = isTranslated ? message.translatedMessage! : message.message
|
|
53
|
+
const messageId = message.id
|
|
54
|
+
const text = this.textSanitizer(messageText)
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
const status = this.$status.getState()
|
|
58
|
+
const playingId = this.$currentPlayingId.getState()
|
|
59
|
+
const isPlaying = status === AudioStatus.PLAYING
|
|
60
|
+
const isPaused = status === AudioStatus.PAUSED
|
|
61
|
+
const isCurrentMessage = messageId === playingId
|
|
62
|
+
|
|
63
|
+
if (isPlaying && isCurrentMessage) {
|
|
64
|
+
this.audioProvider.pause()
|
|
65
|
+
this.setStatus(AudioStatus.PAUSED)
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (isPaused && isCurrentMessage) {
|
|
70
|
+
this.audioProvider.resume()
|
|
71
|
+
this.setStatus(AudioStatus.PLAYING)
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (messageId && !isCurrentMessage) {
|
|
76
|
+
this.audioProvider.stop()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const cacheKey = this.getCacheKey(messageId, isTranslated)
|
|
80
|
+
let audioPath = this.audioCache[cacheKey]
|
|
81
|
+
this.setCurrentPlayingId(messageId)
|
|
82
|
+
|
|
83
|
+
if (!audioPath) {
|
|
84
|
+
const config = this.audioConfig
|
|
85
|
+
const response = await this.api.textToSpeechTextFx({
|
|
86
|
+
input: { text },
|
|
87
|
+
voice: config?.voice ?? DEFAULT_VOICE,
|
|
88
|
+
audioConfig: config?.audioConfig ?? AUDIO_CONFIG,
|
|
89
|
+
enableTimePointing: [],
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
// Response might be different type based on provided AUDIO_CONFIG
|
|
93
|
+
if (typeof response.audioContent === 'string') {
|
|
94
|
+
audioPath = `data:audio/mpeg;base64,${response.audioContent}`
|
|
95
|
+
} else {
|
|
96
|
+
audioPath = response?.audioContent ?? ''
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
this.audioCache[cacheKey] = audioPath
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
this.setStatus(AudioStatus.PLAYING)
|
|
103
|
+
await this.audioProvider.play(audioPath, () => {
|
|
104
|
+
this.setStatus(AudioStatus.STOPPED)
|
|
105
|
+
this.setCurrentPlayingId(null)
|
|
106
|
+
})
|
|
107
|
+
} catch (error) {
|
|
108
|
+
this.reset()
|
|
109
|
+
console.error('Error playing text-to-speech: ', error)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
public stop() {
|
|
114
|
+
if (!this.audioProvider) throw new Error('Audio provider is not set. Use setAudioProvider.')
|
|
115
|
+
this.audioProvider.stop()
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
public readonly reset = createEffect(() => {
|
|
119
|
+
this.stop()
|
|
120
|
+
this.setStatus(AudioStatus.STOPPED)
|
|
121
|
+
this.setCurrentPlayingId(null)
|
|
122
|
+
})
|
|
123
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatAnswer, Stroke } from './units.types'
|
|
1
|
+
import { ChatAnswer, FullStrokeData, Stroke } from './units.types'
|
|
2
2
|
|
|
3
3
|
export type GetAlternativesPayload = {
|
|
4
4
|
municipalityId: string
|
|
@@ -10,36 +10,21 @@ export type AlternativesOptions = {
|
|
|
10
10
|
hints: ChatAnswer[]
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export type ChatHistory = { exerciseId: string; chatVersion: string; problemId: string }
|
|
14
|
-
|
|
15
|
-
export type ProblemStandard = {
|
|
16
|
-
id: string
|
|
17
|
-
name: string
|
|
18
|
-
description: string
|
|
19
|
-
numberOfMatchedSkills: number
|
|
20
|
-
}
|
|
21
|
-
|
|
22
13
|
export type GetAlternativesResponse = {
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated chatAccess depends on assignment.lavaChat or class grade
|
|
25
|
-
*/
|
|
26
14
|
chatAccess?: boolean
|
|
27
15
|
isOpenChatEnabled?: boolean
|
|
28
|
-
municipalityChatEnable: boolean
|
|
29
16
|
version: string
|
|
30
17
|
options: AlternativesOptions
|
|
31
18
|
}
|
|
32
19
|
|
|
33
20
|
export type SendMessagePayload = {
|
|
34
|
-
message: string
|
|
35
|
-
altText?: string
|
|
36
|
-
answerOptions?: string[]
|
|
37
|
-
chatHistory?: ChatHistory
|
|
38
|
-
correctAnswer?: string | string[]
|
|
39
|
-
conversationId?: string
|
|
40
21
|
problemDescription?: string
|
|
41
|
-
|
|
22
|
+
correctAnswer?: string | string[]
|
|
23
|
+
answerOptions?: string[]
|
|
24
|
+
altText?: string
|
|
42
25
|
language?: string
|
|
26
|
+
message: string
|
|
27
|
+
conversationId?: string
|
|
43
28
|
}
|
|
44
29
|
|
|
45
30
|
export type SendMessageResponse = {
|
|
@@ -51,14 +36,12 @@ export type PostMessagePayload = {
|
|
|
51
36
|
language: string
|
|
52
37
|
problemAnswer: string[]
|
|
53
38
|
problemDescription: string
|
|
54
|
-
problemStandards?: ProblemStandard[]
|
|
55
39
|
answer?: string | string[]
|
|
56
40
|
answerOptions?: string[]
|
|
57
41
|
imageAltText?: string
|
|
58
42
|
imageCdnId?: string
|
|
59
43
|
freeTextMessage?: string
|
|
60
44
|
conversationId?: string | null
|
|
61
|
-
chatHistory?: ChatHistory
|
|
62
45
|
}
|
|
63
46
|
|
|
64
47
|
export type PostMessageResponse = {
|
|
@@ -83,7 +66,9 @@ export type GoogleTranslateResponse = {
|
|
|
83
66
|
}
|
|
84
67
|
|
|
85
68
|
export type GoogleText2SpeechPayload = {
|
|
86
|
-
input: {
|
|
69
|
+
input: {
|
|
70
|
+
text: string
|
|
71
|
+
}
|
|
87
72
|
voice: {
|
|
88
73
|
languageCode: string
|
|
89
74
|
name: string
|
|
@@ -108,7 +93,6 @@ export type GoogleText2SpeechResponse = {
|
|
|
108
93
|
|
|
109
94
|
export type ChatHintPayload = {
|
|
110
95
|
problemDescription: string
|
|
111
|
-
problemStandards?: ProblemStandard[]
|
|
112
96
|
correctAnswer: string[]
|
|
113
97
|
userAnswer?: string | string[]
|
|
114
98
|
stroke?: Stroke[]
|
|
@@ -124,3 +108,13 @@ export type ChatHintResponse = {
|
|
|
124
108
|
conversationId?: string | null
|
|
125
109
|
errorStrokeIds?: string[]
|
|
126
110
|
}
|
|
111
|
+
export type ErrorSpottingPayload = {
|
|
112
|
+
strokes: FullStrokeData[]
|
|
113
|
+
problemDescription: string
|
|
114
|
+
correctAnswer: string[]
|
|
115
|
+
userAnswer: string | string[]
|
|
116
|
+
hint: string
|
|
117
|
+
}
|
|
118
|
+
export type ErrorSpottingResponse = {
|
|
119
|
+
highlightedStrokeIds: string[]
|
|
120
|
+
}
|