@magmamath/students-features 1.0.2-rc.10 → 1.0.2-rc.12
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/.idea/workspace.xml +33 -36
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +1 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +12 -4
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ThreadItem.js +32 -34
- package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +1 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +12 -4
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ThreadItem.js +32 -34
- package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +28 -16
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +9 -2
- 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 +1 -2
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +7 -2
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +28 -16
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +9 -2
- 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 +1 -2
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +7 -2
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +3 -1
- package/src/features/chatbot/model/ChatBotThreadManager.ts +12 -4
- package/src/features/chatbot/model/ThreadItem.ts +33 -35
- package/src/features/chatbot/types/api.types.ts +10 -2
- package/src/features/chatbot/types/model.types.ts +1 -2
- package/src/features/chatbot/types/units.types.ts +8 -2
package/.idea/workspace.xml
CHANGED
|
@@ -4,12 +4,8 @@
|
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="ce1b67e5-e42c-4dab-8d84-832433eb9fe4" name="Changes" comment="feat:
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/src/features/chatbot/model/ThreadItem.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/features/chatbot/model/ThreadItem.ts" afterDir="false" />
|
|
10
|
-
<change beforePath="$PROJECT_DIR$/src/features/chatbot/types/api.types.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/features/chatbot/types/api.types.ts" afterDir="false" />
|
|
11
|
-
<change beforePath="$PROJECT_DIR$/src/features/chatbot/types/model.types.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/features/chatbot/types/model.types.ts" afterDir="false" />
|
|
12
|
-
<change beforePath="$PROJECT_DIR$/src/features/chatbot/types/units.types.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/features/chatbot/types/units.types.ts" afterDir="false" />
|
|
7
|
+
<list default="true" id="ce1b67e5-e42c-4dab-8d84-832433eb9fe4" name="Changes" comment="feat: updated hint request for equation writer">
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
13
9
|
</list>
|
|
14
10
|
<option name="SHOW_DIALOG" value="false" />
|
|
15
11
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -213,31 +209,8 @@
|
|
|
213
209
|
<workItem from="1770212419305" duration="4417000" />
|
|
214
210
|
<workItem from="1770219552041" duration="1711000" />
|
|
215
211
|
<workItem from="1770222738142" duration="9354000" />
|
|
216
|
-
<workItem from="1772876014598" duration="
|
|
217
|
-
|
|
218
|
-
<task id="LOCAL-00065" summary="chore: code refactoring">
|
|
219
|
-
<option name="closed" value="true" />
|
|
220
|
-
<created>1759935383469</created>
|
|
221
|
-
<option name="number" value="00065" />
|
|
222
|
-
<option name="presentableId" value="LOCAL-00065" />
|
|
223
|
-
<option name="project" value="LOCAL" />
|
|
224
|
-
<updated>1759935383469</updated>
|
|
225
|
-
</task>
|
|
226
|
-
<task id="LOCAL-00066" summary="chore: code refactoring">
|
|
227
|
-
<option name="closed" value="true" />
|
|
228
|
-
<created>1759937619966</created>
|
|
229
|
-
<option name="number" value="00066" />
|
|
230
|
-
<option name="presentableId" value="LOCAL-00066" />
|
|
231
|
-
<option name="project" value="LOCAL" />
|
|
232
|
-
<updated>1759937619966</updated>
|
|
233
|
-
</task>
|
|
234
|
-
<task id="LOCAL-00067" summary="chore: code refactoring">
|
|
235
|
-
<option name="closed" value="true" />
|
|
236
|
-
<created>1759939014081</created>
|
|
237
|
-
<option name="number" value="00067" />
|
|
238
|
-
<option name="presentableId" value="LOCAL-00067" />
|
|
239
|
-
<option name="project" value="LOCAL" />
|
|
240
|
-
<updated>1759939014081</updated>
|
|
212
|
+
<workItem from="1772876014598" duration="6059000" />
|
|
213
|
+
<workItem from="1773134207627" duration="1768000" />
|
|
241
214
|
</task>
|
|
242
215
|
<task id="LOCAL-00068" summary="chore: code refactoring for localization">
|
|
243
216
|
<option name="closed" value="true" />
|
|
@@ -607,7 +580,31 @@
|
|
|
607
580
|
<option name="project" value="LOCAL" />
|
|
608
581
|
<updated>1770293837925</updated>
|
|
609
582
|
</task>
|
|
610
|
-
<
|
|
583
|
+
<task id="LOCAL-00114" summary="feat: updated hint request">
|
|
584
|
+
<option name="closed" value="true" />
|
|
585
|
+
<created>1772883661092</created>
|
|
586
|
+
<option name="number" value="00114" />
|
|
587
|
+
<option name="presentableId" value="LOCAL-00114" />
|
|
588
|
+
<option name="project" value="LOCAL" />
|
|
589
|
+
<updated>1772883661092</updated>
|
|
590
|
+
</task>
|
|
591
|
+
<task id="LOCAL-00115" summary="feat: updated hint request: added hintNumber and previous responses">
|
|
592
|
+
<option name="closed" value="true" />
|
|
593
|
+
<created>1772885612837</created>
|
|
594
|
+
<option name="number" value="00115" />
|
|
595
|
+
<option name="presentableId" value="LOCAL-00115" />
|
|
596
|
+
<option name="project" value="LOCAL" />
|
|
597
|
+
<updated>1772885612837</updated>
|
|
598
|
+
</task>
|
|
599
|
+
<task id="LOCAL-00116" summary="feat: updated hint request for equation writer">
|
|
600
|
+
<option name="closed" value="true" />
|
|
601
|
+
<created>1773136582395</created>
|
|
602
|
+
<option name="number" value="00116" />
|
|
603
|
+
<option name="presentableId" value="LOCAL-00116" />
|
|
604
|
+
<option name="project" value="LOCAL" />
|
|
605
|
+
<updated>1773136582395</updated>
|
|
606
|
+
</task>
|
|
607
|
+
<option name="localTasksCounter" value="117" />
|
|
611
608
|
<servers />
|
|
612
609
|
</component>
|
|
613
610
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -625,9 +622,6 @@
|
|
|
625
622
|
</option>
|
|
626
623
|
</component>
|
|
627
624
|
<component name="VcsManagerConfiguration">
|
|
628
|
-
<MESSAGE value="feat: added new spreadsheet buttons animation" />
|
|
629
|
-
<MESSAGE value="chore: version change" />
|
|
630
|
-
<MESSAGE value="fix: passed props correctly" />
|
|
631
625
|
<MESSAGE value="chore: changed version" />
|
|
632
626
|
<MESSAGE value="feat: added slash to spreadsheet keyboard layout" />
|
|
633
627
|
<MESSAGE value="chore: updated imports" />
|
|
@@ -650,7 +644,10 @@
|
|
|
650
644
|
<MESSAGE value="chore: code refactoring" />
|
|
651
645
|
<MESSAGE value="feat: added new fields for error spotting" />
|
|
652
646
|
<MESSAGE value="feat: added answerOptions field for error spotting" />
|
|
653
|
-
<
|
|
647
|
+
<MESSAGE value="feat: updated hint request" />
|
|
648
|
+
<MESSAGE value="feat: updated hint request: added hintNumber and previous responses" />
|
|
649
|
+
<MESSAGE value="feat: updated hint request for equation writer" />
|
|
650
|
+
<option name="LAST_COMMIT_MESSAGE" value="feat: updated hint request for equation writer" />
|
|
654
651
|
</component>
|
|
655
652
|
<component name="github-copilot-workspace">
|
|
656
653
|
<instructionFileLocations>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","setIsEnabled","createEvent","$isEnabled","restore","$validationKey","createStore","errorSpottingPressed","spottingHidden","reset","$activeData","on","state","isActive","payload","isDisabled","validationKey","closeTimeout","constructor","$currentChatData","sample","clock","source","activeSpotting","isEnabled","fn","chatData","currentThread","errorStrokesIds","length","key","strokesValidationKey","currentKey","isKeyChanged","strokesIds","target","map","data","watch","scheduleClose","clearTimeout","setTimeout","bindStrokesValidation","$store","enable","disable","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_effector","require","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","setIsEnabled","createEvent","$isEnabled","restore","$validationKey","createStore","errorSpottingPressed","spottingHidden","reset","$activeData","on","state","isActive","payload","isDisabled","validationKey","closeTimeout","constructor","$currentChatData","sample","clock","source","activeSpotting","isEnabled","fn","chatData","currentThread","errorStrokesIds","length","key","strokesValidationKey","currentKey","isKeyChanged","strokesIds","errorChars","target","map","data","watch","scheduleClose","clearTimeout","setTimeout","bindStrokesValidation","$store","enable","disable","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAeA,MAAMC,kBAAkB,GAAG,IAAI;AAMxB,MAAMC,kBAAkB,CAAC;EACdC,YAAY,GAAG,IAAAC,qBAAW,EAAU,CAAC;EACrCC,UAAU,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,YAAY,EAAE,KAAK,CAAC;EAE9CI,cAAc,GAAG,IAAAC,qBAAW,EAAgB,IAAI,CAAC;EAEjDC,oBAAoB,GAAG,IAAAL,qBAAW,EAA4B,CAAC;EAC/DM,cAAc,GAAG,IAAAN,qBAAW,EAAC,CAAC;EAC9BO,KAAK,GAAG,IAAAP,qBAAW,EAAC,CAAC;EACrBQ,WAAW,GAAG,IAAAJ,qBAAW,EAAiC,IAAI,CAAC,CAC5EK,EAAE,CAAC,IAAI,CAACH,cAAc,EAAGI,KAAK,IAAK;IAClC,IAAIA,KAAK,EAAE,OAAO;MAAE,GAAGA,KAAK;MAAEC,QAAQ,EAAE;IAAM,CAAC;IAC/C,OAAO,IAAI;EACb,CAAC,CAAC,CACDF,EAAE,CAAC,IAAI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kBAAA","ignoreList":[]}
|
|
@@ -35,7 +35,6 @@ class ChatBotThreadManager {
|
|
|
35
35
|
const content = await this.drawBoardAdapter.getContent();
|
|
36
36
|
if (!content) return threadItem;
|
|
37
37
|
threadItem.setValidationKey(content.validationKey);
|
|
38
|
-
threadItem.setHintNumber(content.hintNumber);
|
|
39
38
|
threadItem.setStudentInput(content.studentInput);
|
|
40
39
|
if (content.strokes?.length) {
|
|
41
40
|
threadItem.setStrokes(content.strokes);
|
|
@@ -43,8 +42,8 @@ class ChatBotThreadManager {
|
|
|
43
42
|
if (content.spreadSheetContent?.length) {
|
|
44
43
|
threadItem.setSpreadSheetContent(content.spreadSheetContent);
|
|
45
44
|
}
|
|
46
|
-
if (content.
|
|
47
|
-
threadItem.
|
|
45
|
+
if (content.equationContent?.length) {
|
|
46
|
+
threadItem.setEquationContent(content.equationContent);
|
|
48
47
|
}
|
|
49
48
|
if (content.drawBoardImage) {
|
|
50
49
|
threadItem.setDrawBoardImage(content.drawBoardImage);
|
|
@@ -66,7 +65,16 @@ class ChatBotThreadManager {
|
|
|
66
65
|
} = (0, _helpers.prepareChatRequestPayload)(payload, threadItem);
|
|
67
66
|
const result = type === _modelTypes.ChatRequestType.FREETEXT ? await this.api.sendMessage(data, requestConfig) : await this.api.getHint(data, requestConfig);
|
|
68
67
|
threadItem.history.push(result.message);
|
|
69
|
-
if ('
|
|
68
|
+
if ('errorChars' in result && result.errorChars?.length) {
|
|
69
|
+
const errorStrokeIds = result.errorChars.map(c => c.id);
|
|
70
|
+
threadItem.errorStrokesHistory.push(errorStrokeIds);
|
|
71
|
+
threadItem.setErrorStrokesIds(errorStrokeIds);
|
|
72
|
+
threadItem.setErrorChars(result.errorChars);
|
|
73
|
+
} else if ('errorCellIds' in result && result.errorCellIds?.length) {
|
|
74
|
+
threadItem.errorStrokesHistory.push(result.errorCellIds);
|
|
75
|
+
threadItem.setErrorStrokesIds(result.errorCellIds);
|
|
76
|
+
} else if ('errorStrokeIds' in result && result?.errorStrokeIds) {
|
|
77
|
+
threadItem.errorStrokesHistory.push(result.errorStrokeIds);
|
|
70
78
|
threadItem.setErrorStrokesIds(result.errorStrokeIds);
|
|
71
79
|
}
|
|
72
80
|
const nextOptions = threadItem.history.length < this.messagesLimit ? [this.defaultMessages.anotherHintOption] : [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ThreadItem","require","_modelTypes","_constants","_helpers","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","constructor","messagesLimit","CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT","messages","defaultMessages","getThreadItem","key","existingThreadItem","get","threadItem","ThreadItem","set","content","getContent","setValidationKey","validationKey","
|
|
1
|
+
{"version":3,"names":["_ThreadItem","require","_modelTypes","_constants","_helpers","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","constructor","messagesLimit","CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT","messages","defaultMessages","getThreadItem","key","existingThreadItem","get","threadItem","ThreadItem","set","content","getContent","setValidationKey","validationKey","setStudentInput","studentInput","strokes","length","setStrokes","spreadSheetContent","setSpreadSheetContent","equationContent","setEquationContent","drawBoardImage","setDrawBoardImage","setDrawBoardAdapter","adapter","postMessage","payload","requestConfig","Error","type","data","prepareChatRequestPayload","result","ChatRequestType","FREETEXT","sendMessage","getHint","history","push","message","errorChars","errorStrokeIds","map","c","id","errorStrokesHistory","setErrorStrokesIds","setErrorChars","errorCellIds","nextOptions","anotherHintOption","options","endMessage","threadId","conversationId","reset","delete","clear","setMessagesLimit","limit","setApi","setCurrentKey","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotThreadManager.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAqBO,MAAMI,oBAAoB,CAAC;EACxB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A,IAAI,CAACV,OAAO,CAACiE,KAAK,CAAC,CAAC;EACtB;EAEOC,gBAAgBA,CAACC,KAAa,EAAE;IACrC,IAAI,CAAC/D,aAAa,GAAG+D,KAAK;EAC5B;EAEOC,MAAMA,CAACtE,GAAqB,EAAE;IACnC,IAAI,CAACA,GAAG,GAAGA,GAAG;IACd,OAAO,IAAI;EACb;EAEOuE,aAAaA,CAAC3D,GAAW,EAAE;IAChC,IAAI,CAACR,UAAU,GAAGQ,GAAG;EACvB;AACF;AAAC4D,OAAA,CAAAzE,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ThreadItem = void 0;
|
|
7
7
|
var _helpers = require("../../../lib/helpers/helpers.js");
|
|
8
|
-
const DEFAULT_HINT_NUMBER = 0;
|
|
9
8
|
const DEFAULT_STUDENT_INPUT = 'none';
|
|
10
9
|
class ThreadItem {
|
|
11
10
|
id = (0, _helpers.generateRandomId)();
|
|
12
11
|
history = [];
|
|
12
|
+
errorStrokesHistory = [];
|
|
13
13
|
strokesValidationKey = null;
|
|
14
14
|
errorStrokesIds = null;
|
|
15
|
+
errorChars = null;
|
|
15
16
|
constructor(props) {
|
|
16
17
|
this.strokes = props?.strokes ?? null;
|
|
17
18
|
this.strokesValidationKey = props?.key ?? null;
|
|
18
19
|
this.spreadSheetContent = props?.spreadSheetContent;
|
|
19
|
-
this.
|
|
20
|
+
this.equationContent = props?.equationContent;
|
|
20
21
|
this.drawBoardImage = props?.drawBoardImage;
|
|
21
|
-
this.hintNumber = props?.hintNumber ?? DEFAULT_HINT_NUMBER;
|
|
22
22
|
this.studentInput = props?.studentInput ?? DEFAULT_STUDENT_INPUT;
|
|
23
23
|
}
|
|
24
24
|
setStrokes(strokes) {
|
|
@@ -33,62 +33,60 @@ class ThreadItem {
|
|
|
33
33
|
this.errorStrokesIds = ids;
|
|
34
34
|
return this;
|
|
35
35
|
}
|
|
36
|
+
setErrorChars(chars) {
|
|
37
|
+
this.errorChars = chars;
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
36
40
|
setSpreadSheetContent(content) {
|
|
37
41
|
this.spreadSheetContent = content;
|
|
38
42
|
return this;
|
|
39
43
|
}
|
|
40
|
-
|
|
41
|
-
this.
|
|
44
|
+
setEquationContent(content) {
|
|
45
|
+
this.equationContent = content;
|
|
42
46
|
return this;
|
|
43
47
|
}
|
|
44
48
|
setDrawBoardImage(image) {
|
|
45
49
|
this.drawBoardImage = image;
|
|
46
50
|
return this;
|
|
47
51
|
}
|
|
48
|
-
setHintNumber(hintNumber) {
|
|
49
|
-
this.hintNumber = hintNumber;
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
52
|
setStudentInput(studentInput) {
|
|
53
53
|
this.studentInput = studentInput;
|
|
54
54
|
return this;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
hintNumber: this.hintNumber,
|
|
59
|
-
studentInput: this.studentInput,
|
|
60
|
-
...(this.drawBoardImage && {
|
|
61
|
-
drawBoardImage: this.drawBoardImage
|
|
62
|
-
})
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
getNextHintProps() {
|
|
66
|
-
const baseProps = this.getBaseHintProps();
|
|
67
|
-
if (this.history.length) {
|
|
68
|
-
return {
|
|
69
|
-
previousHint: this.history[this.history.length - 1],
|
|
70
|
-
...baseProps
|
|
71
|
-
};
|
|
72
|
-
}
|
|
56
|
+
getContentProps() {
|
|
73
57
|
if (this.strokes?.length) {
|
|
74
58
|
return {
|
|
75
|
-
stroke: this.strokes
|
|
76
|
-
...baseProps
|
|
59
|
+
stroke: this.strokes
|
|
77
60
|
};
|
|
78
61
|
}
|
|
79
62
|
if (this.spreadSheetContent?.length) {
|
|
80
63
|
return {
|
|
81
|
-
spreadSheetContent: this.spreadSheetContent
|
|
82
|
-
...baseProps
|
|
64
|
+
spreadSheetContent: this.spreadSheetContent
|
|
83
65
|
};
|
|
84
66
|
}
|
|
85
|
-
if (this.
|
|
67
|
+
if (this.equationContent?.length) {
|
|
86
68
|
return {
|
|
87
|
-
|
|
88
|
-
...baseProps
|
|
69
|
+
equationContent: this.equationContent
|
|
89
70
|
};
|
|
90
71
|
}
|
|
91
|
-
return
|
|
72
|
+
return {};
|
|
73
|
+
}
|
|
74
|
+
getNextHintProps() {
|
|
75
|
+
const lastErrorStrokeIds = this.errorStrokesHistory.length ? this.errorStrokesHistory[this.errorStrokesHistory.length - 1] : undefined;
|
|
76
|
+
return {
|
|
77
|
+
hintNumber: this.history.length,
|
|
78
|
+
studentInput: this.studentInput,
|
|
79
|
+
...(this.drawBoardImage && {
|
|
80
|
+
drawBoardImage: this.drawBoardImage
|
|
81
|
+
}),
|
|
82
|
+
...this.getContentProps(),
|
|
83
|
+
...(this.history.length && {
|
|
84
|
+
previousHints: [...this.history]
|
|
85
|
+
}),
|
|
86
|
+
...(lastErrorStrokeIds?.length && {
|
|
87
|
+
previousErrorStrokeIds: lastErrorStrokeIds
|
|
88
|
+
})
|
|
89
|
+
};
|
|
92
90
|
}
|
|
93
91
|
}
|
|
94
92
|
exports.ThreadItem = ThreadItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_helpers","require","
|
|
1
|
+
{"version":3,"names":["_helpers","require","DEFAULT_STUDENT_INPUT","ThreadItem","id","generateRandomId","history","errorStrokesHistory","strokesValidationKey","errorStrokesIds","errorChars","constructor","props","strokes","key","spreadSheetContent","equationContent","drawBoardImage","studentInput","setStrokes","setValidationKey","setErrorStrokesIds","ids","setErrorChars","chars","setSpreadSheetContent","content","setEquationContent","setDrawBoardImage","image","setStudentInput","getContentProps","length","stroke","getNextHintProps","lastErrorStrokeIds","undefined","hintNumber","previousHints","previousErrorStrokeIds","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ThreadItem.ts"],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,OAAA;AAWA,MAAMC,qB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A,CAAArC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MessageVariant","exports","ChatRequestType"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;;;;;IA0GYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,
|
|
1
|
+
{"version":3,"names":["MessageVariant","exports","ChatRequestType"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;;;;;IA0GYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IAiDdE,eAAe,GAAAD,OAAA,CAAAC,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEvent","createStore","sample","restore","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","setIsEnabled","$isEnabled","$validationKey","errorSpottingPressed","spottingHidden","reset","$activeData","on","state","isActive","payload","isDisabled","validationKey","closeTimeout","constructor","$currentChatData","clock","source","activeSpotting","isEnabled","fn","chatData","currentThread","errorStrokesIds","length","key","strokesValidationKey","currentKey","isKeyChanged","strokesIds","target","map","data","watch","scheduleClose","clearTimeout","setTimeout","bindStrokesValidation","$store","enable","disable"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,EAAEC,MAAM,EAASC,OAAO,QAAQ,UAAU;
|
|
1
|
+
{"version":3,"names":["createEvent","createStore","sample","restore","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","setIsEnabled","$isEnabled","$validationKey","errorSpottingPressed","spottingHidden","reset","$activeData","on","state","isActive","payload","isDisabled","validationKey","closeTimeout","constructor","$currentChatData","clock","source","activeSpotting","isEnabled","fn","chatData","currentThread","errorStrokesIds","length","key","strokesValidationKey","currentKey","isKeyChanged","strokesIds","errorChars","target","map","data","watch","scheduleClose","clearTimeout","setTimeout","bindStrokesValidation","$store","enable","disable"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,EAAEC,MAAM,EAASC,OAAO,QAAQ,UAAU;AAe3E,MAAMC,kBAAkB,GAAG,IAAI;AAM/B,OAAO,MAAMC,kBAAkB,CAAC;EACdC,YAAY,GAAGN,WAAW,CAAU,CAAC;EACrCO,UAAU,GAAGJ,OAAO,CAAC,IAAI,CAACG,YAAY,EAAE,KAAK,CAAC;EAE9CE,cAAc,GAAGP,WAAW,CAAgB,IAAI,CAAC;EAEjDQ,oBAAoB,GAAGT,WAAW,CAA4B,CAAC;EAC/DU,cAAc,GAAGV,WAAW,CAAC,CAAC;EAC9BW,KAAK,GAAGX,WAAW,CAAC,CAAC;EACrBY,WAAW,GAAGX,WAAW,CAAiC,IAAI,CAAC,CAC5EY,EAAE,CAAC,IAAI,CAACH,cAAc,EAAGI,KAAK,IAAK;IAClC,IAAIA,KAAK,EAAE,OAAO;MAAE,GAAGA,KAAK;MAAEC,QAAQ,EAAE;IAAM,CAAC;IAC/C,OAAO,IAAI;EACb,CAAC,CAAC,CACDF,EAAE,CAAC,IAAI,CAACL,cAAc,EAAE,CAACM,KAAK,EAAEE,OAAO,KAAK;IAC3C,IAAI,CAACF,KAAK,IAAIE,OAAO,KAAK,IAAI,EAAE,OAAOF,KAAK;IAC5C,MAAMG,UAAU,GAAGD,OAAO,KAAKF,KAAK,CAACI,aAAa;IAClD,OAAO;MAAE,GAAGJ,KAAK;MAAEG,UAAU;MAAEF,QAAQ,EAAE,CAACE,UAAU,IAAIH,KAAK,CAACC;IAAS,CAAC;EAC1E,C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AAI,IAAKA,IAAI,EAAExB,QAAQ,IAAI,KAAK,CAAC,CACtCyB,KAAK,CAAEzB,QAAQ,IAAK;MACnB,IAAIA,QAAQ,EAAE,OAAO,IAAI,CAAC0B,aAAa,CAAC,CAAC;MACzC,IAAI,IAAI,CAACtB,YAAY,EAAE;QACrBuB,YAAY,CAAC,IAAI,CAACvB,YAAY,CAAC;QAC/B,IAAI,CAACA,YAAY,GAAG,IAAI;MAC1B;IACF,CAAC,CAAC;EACN;EAEQsB,aAAaA,CAAA,EAAG;IACtB,IAAI,IAAI,CAACtB,YAAY,EAAEuB,YAAY,CAAC,IAAI,CAACvB,YAAY,CAAC;IACtD,IAAI,CAACA,YAAY,GAAGwB,UAAU,CAAC,MAAM;MACnC,IAAI,CAACjC,cAAc,CAAC,CAAC;MACrB,IAAI,CAACS,YAAY,GAAG,IAAI;IAC1B,CAAC,EAAEf,kBAAkB,CAAC;EACxB;EAEOwC,qBAAqBA,CAACC,MAA4B,EAAE;IACzD3C,MAAM,CAAC;MACLqB,MAAM,EAAEsB,MAAM;MACdR,MAAM,EAAE,IAAI,CAAC7B;IACf,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEOsC,MAAMA,CAAA,EAAG;IACd,IAAI,CAACxC,YAAY,CAAC,IAAI,CAAC;EACzB;EAEOyC,OAAOA,CAAA,EAAG;IACf,IAAI,CAACzC,YAAY,CAAC,KAAK,CAAC;EAC1B;AACF","ignoreList":[]}
|
|
@@ -31,7 +31,6 @@ export class ChatBotThreadManager {
|
|
|
31
31
|
const content = await this.drawBoardAdapter.getContent();
|
|
32
32
|
if (!content) return threadItem;
|
|
33
33
|
threadItem.setValidationKey(content.validationKey);
|
|
34
|
-
threadItem.setHintNumber(content.hintNumber);
|
|
35
34
|
threadItem.setStudentInput(content.studentInput);
|
|
36
35
|
if (content.strokes?.length) {
|
|
37
36
|
threadItem.setStrokes(content.strokes);
|
|
@@ -39,8 +38,8 @@ export class ChatBotThreadManager {
|
|
|
39
38
|
if (content.spreadSheetContent?.length) {
|
|
40
39
|
threadItem.setSpreadSheetContent(content.spreadSheetContent);
|
|
41
40
|
}
|
|
42
|
-
if (content.
|
|
43
|
-
threadItem.
|
|
41
|
+
if (content.equationContent?.length) {
|
|
42
|
+
threadItem.setEquationContent(content.equationContent);
|
|
44
43
|
}
|
|
45
44
|
if (content.drawBoardImage) {
|
|
46
45
|
threadItem.setDrawBoardImage(content.drawBoardImage);
|
|
@@ -62,7 +61,16 @@ export class ChatBotThreadManager {
|
|
|
62
61
|
} = prepareChatRequestPayload(payload, threadItem);
|
|
63
62
|
const result = type === ChatRequestType.FREETEXT ? await this.api.sendMessage(data, requestConfig) : await this.api.getHint(data, requestConfig);
|
|
64
63
|
threadItem.history.push(result.message);
|
|
65
|
-
if ('
|
|
64
|
+
if ('errorChars' in result && result.errorChars?.length) {
|
|
65
|
+
const errorStrokeIds = result.errorChars.map(c => c.id);
|
|
66
|
+
threadItem.errorStrokesHistory.push(errorStrokeIds);
|
|
67
|
+
threadItem.setErrorStrokesIds(errorStrokeIds);
|
|
68
|
+
threadItem.setErrorChars(result.errorChars);
|
|
69
|
+
} else if ('errorCellIds' in result && result.errorCellIds?.length) {
|
|
70
|
+
threadItem.errorStrokesHistory.push(result.errorCellIds);
|
|
71
|
+
threadItem.setErrorStrokesIds(result.errorCellIds);
|
|
72
|
+
} else if ('errorStrokeIds' in result && result?.errorStrokeIds) {
|
|
73
|
+
threadItem.errorStrokesHistory.push(result.errorStrokeIds);
|
|
66
74
|
threadItem.setErrorStrokesIds(result.errorStrokeIds);
|
|
67
75
|
}
|
|
68
76
|
const nextOptions = threadItem.history.length < this.messagesLimit ? [this.defaultMessages.anotherHintOption] : [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ThreadItem","ChatRequestType","CHAT_BOT_MODEL_DEFAULTS","prepareChatRequestPayload","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","constructor","messagesLimit","THREAD_MESSAGES_LIMIT","messages","defaultMessages","getThreadItem","key","existingThreadItem","get","threadItem","set","content","getContent","setValidationKey","validationKey","
|
|
1
|
+
{"version":3,"names":["ThreadItem","ChatRequestType","CHAT_BOT_MODEL_DEFAULTS","prepareChatRequestPayload","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","constructor","messagesLimit","THREAD_MESSAGES_LIMIT","messages","defaultMessages","getThreadItem","key","existingThreadItem","get","threadItem","set","content","getContent","setValidationKey","validationKey","setStudentInput","studentInput","strokes","length","setStrokes","spreadSheetContent","setSpreadSheetContent","equationContent","setEquationContent","drawBoardImage","setDrawBoardImage","setDrawBoardAdapter","adapter","postMessage","payload","requestConfig","Error","type","data","result","FREETEXT","sendMessage","getHint","history","push","message","errorChars","errorStrokeIds","map","c","id","errorStrokesHistory","setErrorStrokesIds","setErrorChars","errorCellIds","nextOptions","anotherHintOption","options","endMessage","threadId","conversationId","reset","delete","clear","setMessagesLimit","limit","setApi","setCurrentKey"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotThreadManager.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAc;AASzC,SAA0BC,eAAe,QAA+B,yBAAsB;AAC9F,SAASC,uBAAuB,QAAQ,gBAAa;AACrD,SAASC,yBAAyB,QAAQ,eAAY;AAqBtD,OAAO,MAAMC,oBAAoB,CAAC;EACxBC,GAAG,GAA4B,IAAI;EACnCC,gBAAgB,GAAiC,IAAI;EAC5CC,OAAO,GAAG,IAAIC,GAAG,CAAqB,CAAC;EAGhDC,UAAU,GAAG,EAAE;EAIhBC,WAAWA,CAAC;IACjBJ,gBAAgB;IAChBD,GAAG;IACHM,aAAa,GAAGT,uBAAuB,CAACU,qBAAqB;IAC7DC;EACyB,CAAC,EAAE;IAC5B,IAAIR,GAAG,EAAE,IAAI,CAACA,GAAG,GAAGA,GAAG;IACvB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,IAAI,IAAI;IAChD,IAAI,CAACK,aAAa,GAAGA,aAAa;IAClC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Id } from "../../../lib/helpers/helpers.js";
|
|
4
|
-
const DEFAULT_HINT_NUMBER = 0;
|
|
5
4
|
const DEFAULT_STUDENT_INPUT = 'none';
|
|
6
5
|
export class ThreadItem {
|
|
7
6
|
id = generateRandomId();
|
|
8
7
|
history = [];
|
|
8
|
+
errorStrokesHistory = [];
|
|
9
9
|
strokesValidationKey = null;
|
|
10
10
|
errorStrokesIds = null;
|
|
11
|
+
errorChars = null;
|
|
11
12
|
constructor(props) {
|
|
12
13
|
this.strokes = props?.strokes ?? null;
|
|
13
14
|
this.strokesValidationKey = props?.key ?? null;
|
|
14
15
|
this.spreadSheetContent = props?.spreadSheetContent;
|
|
15
|
-
this.
|
|
16
|
+
this.equationContent = props?.equationContent;
|
|
16
17
|
this.drawBoardImage = props?.drawBoardImage;
|
|
17
|
-
this.hintNumber = props?.hintNumber ?? DEFAULT_HINT_NUMBER;
|
|
18
18
|
this.studentInput = props?.studentInput ?? DEFAULT_STUDENT_INPUT;
|
|
19
19
|
}
|
|
20
20
|
setStrokes(strokes) {
|
|
@@ -29,62 +29,60 @@ export class ThreadItem {
|
|
|
29
29
|
this.errorStrokesIds = ids;
|
|
30
30
|
return this;
|
|
31
31
|
}
|
|
32
|
+
setErrorChars(chars) {
|
|
33
|
+
this.errorChars = chars;
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
32
36
|
setSpreadSheetContent(content) {
|
|
33
37
|
this.spreadSheetContent = content;
|
|
34
38
|
return this;
|
|
35
39
|
}
|
|
36
|
-
|
|
37
|
-
this.
|
|
40
|
+
setEquationContent(content) {
|
|
41
|
+
this.equationContent = content;
|
|
38
42
|
return this;
|
|
39
43
|
}
|
|
40
44
|
setDrawBoardImage(image) {
|
|
41
45
|
this.drawBoardImage = image;
|
|
42
46
|
return this;
|
|
43
47
|
}
|
|
44
|
-
setHintNumber(hintNumber) {
|
|
45
|
-
this.hintNumber = hintNumber;
|
|
46
|
-
return this;
|
|
47
|
-
}
|
|
48
48
|
setStudentInput(studentInput) {
|
|
49
49
|
this.studentInput = studentInput;
|
|
50
50
|
return this;
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
return {
|
|
54
|
-
hintNumber: this.hintNumber,
|
|
55
|
-
studentInput: this.studentInput,
|
|
56
|
-
...(this.drawBoardImage && {
|
|
57
|
-
drawBoardImage: this.drawBoardImage
|
|
58
|
-
})
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
getNextHintProps() {
|
|
62
|
-
const baseProps = this.getBaseHintProps();
|
|
63
|
-
if (this.history.length) {
|
|
64
|
-
return {
|
|
65
|
-
previousHint: this.history[this.history.length - 1],
|
|
66
|
-
...baseProps
|
|
67
|
-
};
|
|
68
|
-
}
|
|
52
|
+
getContentProps() {
|
|
69
53
|
if (this.strokes?.length) {
|
|
70
54
|
return {
|
|
71
|
-
stroke: this.strokes
|
|
72
|
-
...baseProps
|
|
55
|
+
stroke: this.strokes
|
|
73
56
|
};
|
|
74
57
|
}
|
|
75
58
|
if (this.spreadSheetContent?.length) {
|
|
76
59
|
return {
|
|
77
|
-
spreadSheetContent: this.spreadSheetContent
|
|
78
|
-
...baseProps
|
|
60
|
+
spreadSheetContent: this.spreadSheetContent
|
|
79
61
|
};
|
|
80
62
|
}
|
|
81
|
-
if (this.
|
|
63
|
+
if (this.equationContent?.length) {
|
|
82
64
|
return {
|
|
83
|
-
|
|
84
|
-
...baseProps
|
|
65
|
+
equationContent: this.equationContent
|
|
85
66
|
};
|
|
86
67
|
}
|
|
87
|
-
return
|
|
68
|
+
return {};
|
|
69
|
+
}
|
|
70
|
+
getNextHintProps() {
|
|
71
|
+
const lastErrorStrokeIds = this.errorStrokesHistory.length ? this.errorStrokesHistory[this.errorStrokesHistory.length - 1] : undefined;
|
|
72
|
+
return {
|
|
73
|
+
hintNumber: this.history.length,
|
|
74
|
+
studentInput: this.studentInput,
|
|
75
|
+
...(this.drawBoardImage && {
|
|
76
|
+
drawBoardImage: this.drawBoardImage
|
|
77
|
+
}),
|
|
78
|
+
...this.getContentProps(),
|
|
79
|
+
...(this.history.length && {
|
|
80
|
+
previousHints: [...this.history]
|
|
81
|
+
}),
|
|
82
|
+
...(lastErrorStrokeIds?.length && {
|
|
83
|
+
previousErrorStrokeIds: lastErrorStrokeIds
|
|
84
|
+
})
|
|
85
|
+
};
|
|
88
86
|
}
|
|
89
87
|
}
|
|
90
88
|
//# sourceMappingURL=ThreadItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["generateRandomId","
|
|
1
|
+
{"version":3,"names":["generateRandomId","DEFAULT_STUDENT_INPUT","ThreadItem","id","history","errorStrokesHistory","strokesValidationKey","errorStrokesIds","errorChars","constructor","props","strokes","key","spreadSheetContent","equationContent","drawBoardImage","studentInput","setStrokes","setValidationKey","setErrorStrokesIds","ids","setErrorChars","chars","setSpreadSheetContent","content","setEquationContent","setDrawBoardImage","image","setStudentInput","getContentProps","length","stroke","getNextHintProps","lastErrorStrokeIds","undefined","hintNumber","previousHints","previousErrorStrokeIds"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ThreadItem.ts"],"mappings":";;AAOA,SAASA,gBAAgB,QAAQ,iCAA8B;AAW/D,MAAMC,qBAAqB,GAAG,MAAM;AAEpC,OAAO,MAAMC,UAAU,CAAwB;EAC7BC,EAAE,GAAGH,gBAAgB,CAAC,CAAC;EACvBI,OAAO,GAAa,EAAE;EACtBC,mBAAmB,GAAe,EAAE;EAC7CC,oBAAoB,GAAkB,IAAI;EAE1CC,eAAe,GAAoB,IAAI;EACvCC,UAAU,GAAuB,IAAI;EAMrCC,WAAWA,CAACC,KAA8B,EAAE;IACjD,IAAI,CAACC,OAAO,GAAGD,KAAK,EAAEC,OAAO,IAAI,IAAI;IACrC,IAAI,CAACL,oBAAoB,GAAGI,KAAK,EAAEE,GAAG,IAAI,IAAI;IAC9C,IAAI,CAACC,kBAAkB,GAAGH,KAAK,EAAEG,kBAAkB;IACnD,IAAI,CAACC,eAAe,GAAGJ,KAAK,EAAEI,eA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hB,eAAe,EAAE,IAAI,CAACA;MAAgB,CAAC;IAClD;IACA,OAAO,CAAC,CAAC;EACX;EAEOkB,gBAAgBA,CAAA,EAAG;IACxB,MAAMC,kBAAkB,GAAG,IAAI,CAAC5B,mBAAmB,CAACyB,MAAM,GACtD,IAAI,CAACzB,mBAAmB,CAAC,IAAI,CAACA,mBAAmB,CAACyB,MAAM,GAAG,CAAC,CAAC,GAC7DI,SAAS;IAEb,OAAO;MACLC,UAAU,EAAE,IAAI,CAAC/B,OAAO,CAAC0B,MAAM;MAC/Bd,YAAY,EAAE,IAAI,CAACA,YAAY;MAC/B,IAAI,IAAI,CAACD,cAAc,IAAI;QAAEA,cAAc,EAAE,IAAI,CAACA;MAAe,CAAC,CAAC;MACnE,GAAG,IAAI,CAACc,eAAe,CAAC,CAAC;MACzB,IAAI,IAAI,CAACzB,OAAO,CAAC0B,MAAM,IAAI;QAAEM,aAAa,EAAE,CAAC,GAAG,IAAI,CAAChC,OAAO;MAAE,CAAC,CAAC;MAChE,IAAI6B,kBAAkB,EAAEH,MAAM,IAAI;QAAEO,sBAAsB,EAAEJ;MAAmB,CAAC;IAClF,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MessageVariant","ChatRequestType"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;AA0GA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;
|
|
1
|
+
{"version":3,"names":["MessageVariant","ChatRequestType"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;AA0GA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAiD1B,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Store } from 'effector';
|
|
2
|
-
import { ChatItem, ConversationMessage } from '../types/units.types';
|
|
2
|
+
import { ChatItem, ConversationMessage, ErrorChar } from '../types/units.types';
|
|
3
3
|
type ErrorSpottingProps = {
|
|
4
4
|
$currentChatData: Store<ChatItem>;
|
|
5
5
|
};
|
|
@@ -8,6 +8,7 @@ type ActiveErrorSpottingData = {
|
|
|
8
8
|
isDisabled: boolean;
|
|
9
9
|
strokesIds: string[];
|
|
10
10
|
validationKey: null | string;
|
|
11
|
+
errorChars: ErrorChar[] | null;
|
|
11
12
|
};
|
|
12
13
|
type ErrorSpottingPressedProps = {
|
|
13
14
|
message: ConversationMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorSpottingModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,EAAW,MAAM,UAAU,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"ErrorSpottingModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,EAAW,MAAM,UAAU,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAE/E,KAAK,kBAAkB,GAAG;IACxB,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;IAC5B,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;CAC/B,CAAA;AAID,KAAK,yBAAyB,GAAG;IAC/B,OAAO,EAAE,mBAAmB,CAAA;CAC7B,CAAA;AAED,qBAAa,kBAAkB;IAC7B,SAAgB,YAAY,4CAAyB;IACrD,SAAgB,UAAU,4CAAoC;IAE9D,SAAgB,cAAc,kDAAmC;IAEjE,SAAgB,oBAAoB,8DAA2C;IAC/E,SAAgB,cAAc,yCAAgB;IAC9C,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,WAAW,mEAaP;IAEpB,OAAO,CAAC,YAAY,CAA8B;gBAE/B,EAAE,gBAAgB,EAAE,EAAE,kBAAkB;IAqC3D,OAAO,CAAC,aAAa;IAQd,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAQlD,MAAM;IAIN,OAAO;CAGf"}
|