mario-education 2.4.487-feedback → 2.4.488-ai
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/components/icons/ArrowBackIcon.d.ts +4 -0
- package/dist/components/icons/ArrowRightIcon.d.ts +2 -0
- package/dist/components/icons/DarkIcon.d.ts +4 -0
- package/dist/components/icons/IdentifyIcon.d.ts +2 -0
- package/dist/components/icons/LightIcon.d.ts +4 -0
- package/dist/components/icons/MarioAIIcon.d.ts +2 -0
- package/dist/components/icons/MoreIcon.d.ts +2 -0
- package/dist/components/icons/SummarizeIcon.d.ts +2 -0
- package/dist/components/icons/UnderstandIcon.d.ts +2 -0
- package/dist/containers/MarioAi/cofigs/constants.d.ts +14 -1
- package/dist/containers/MarioAi/cofigs/type.d.ts +94 -0
- package/dist/containers/MarioAi/components/CardHeader.d.ts +4 -0
- package/dist/containers/MarioAi/components/ChatContent.d.ts +9 -0
- package/dist/containers/MarioAi/components/ChatHeader.d.ts +10 -0
- package/dist/containers/MarioAi/components/ChatMessage.d.ts +8 -0
- package/dist/containers/MarioAi/components/HeaderAI.d.ts +3 -0
- package/dist/containers/MarioAi/components/ListPrompts.d.ts +17 -0
- package/dist/containers/MarioAi/hooks/useAIChat.d.ts +12 -0
- package/dist/containers/MarioAi/hooks/useAIMario.d.ts +19 -0
- package/dist/containers/MarioAi/hooks/useHistoryPrompt.d.ts +10 -0
- package/dist/containers/MarioAi/views/AIMario.d.ts +2 -0
- package/dist/containers/MarioAi/views/ChatWithAI.d.ts +2 -0
- package/dist/containers/MarioAi/views/ViewHistoryPrompt.d.ts +2 -0
- package/dist/containers/SurveyDashboard/hooks/useListSurvey.d.ts +1 -4
- package/dist/containers/TemplateSurvey/hooks/useTemplateCateDetail.d.ts +0 -2
- package/dist/containers/TemplateSurvey/hooks/useTemplateCateList.d.ts +1 -1
- package/dist/index.css +478 -475
- package/dist/index.d.ts +5 -2
- package/dist/index.js +1321 -407
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1318 -407
- package/dist/index.modern.js.map +1 -1
- package/dist/services/dashboardService.d.ts +0 -1
- package/dist/services/geminiAiService.d.ts +8 -0
- package/dist/services/questionCategoryService.d.ts +1 -1
- package/package.json +5 -3
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
import { IOptionDate } from "./type";
|
|
1
|
+
import { ICardAI, IOptionDate } from "./type";
|
|
2
2
|
export declare const CALENDAR_OPTIONS: IOptionDate[];
|
|
3
|
+
export declare const promptIcons: (() => JSX.Element)[];
|
|
4
|
+
export declare const CARD_AI_HEADER: ICardAI[];
|
|
5
|
+
export declare const THEME: {
|
|
6
|
+
LIGHT: string;
|
|
7
|
+
DARK: string;
|
|
8
|
+
};
|
|
9
|
+
export declare enum MessageRole {
|
|
10
|
+
System = 0,
|
|
11
|
+
User = 1,
|
|
12
|
+
Model = 2
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_START_DATE: number;
|
|
15
|
+
export declare const DEFAULT_END_DATE: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MessageRole } from "./constants";
|
|
1
2
|
export interface ISummarizeResponse {
|
|
2
3
|
studentName: string;
|
|
3
4
|
answer: string;
|
|
@@ -11,3 +12,96 @@ export interface IOptionDate {
|
|
|
11
12
|
startDate: number;
|
|
12
13
|
endDate: number;
|
|
13
14
|
}
|
|
15
|
+
export interface ICardAI {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
icon: any;
|
|
19
|
+
link?: string;
|
|
20
|
+
id: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ICardHeader {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
goToChat: Function;
|
|
27
|
+
icon: any;
|
|
28
|
+
}
|
|
29
|
+
export interface IChat {
|
|
30
|
+
message: string;
|
|
31
|
+
text?: string;
|
|
32
|
+
time: string;
|
|
33
|
+
isUser: boolean;
|
|
34
|
+
options?: IOptionDate[];
|
|
35
|
+
}
|
|
36
|
+
export interface IPrompt {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
temperature: number;
|
|
40
|
+
maxOutputTokens: number;
|
|
41
|
+
stopSequences: string;
|
|
42
|
+
topP: number;
|
|
43
|
+
topK: number;
|
|
44
|
+
frequencyPenalty: number;
|
|
45
|
+
presencePenalty: number;
|
|
46
|
+
aiModel: string;
|
|
47
|
+
messages: IMessage[];
|
|
48
|
+
id: number;
|
|
49
|
+
instruction: instructionType;
|
|
50
|
+
sampleData: string;
|
|
51
|
+
question: string;
|
|
52
|
+
}
|
|
53
|
+
export interface IMessage {
|
|
54
|
+
role: MessageRole;
|
|
55
|
+
message: string;
|
|
56
|
+
}
|
|
57
|
+
export declare enum instructionType {
|
|
58
|
+
CheckIn = 0,
|
|
59
|
+
OneToOne = 1,
|
|
60
|
+
Conference = 2,
|
|
61
|
+
CheckInAndOneToOne = 3
|
|
62
|
+
}
|
|
63
|
+
export interface IHeaderAi {
|
|
64
|
+
prompts: IPrompt[];
|
|
65
|
+
goToChat: Function;
|
|
66
|
+
generateIcons: Function;
|
|
67
|
+
}
|
|
68
|
+
export interface IHistoryPrompt {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
temperature: number;
|
|
72
|
+
maxOutputTokens: number;
|
|
73
|
+
stopSequences: string;
|
|
74
|
+
topP: number;
|
|
75
|
+
topK: number;
|
|
76
|
+
frequencyPenalty: number;
|
|
77
|
+
presencePenalty: number;
|
|
78
|
+
aiModel: string;
|
|
79
|
+
messages: IChat[];
|
|
80
|
+
id?: number;
|
|
81
|
+
instruction: instructionType;
|
|
82
|
+
question: string;
|
|
83
|
+
startTime?: number;
|
|
84
|
+
endTime?: number;
|
|
85
|
+
startDate?: string;
|
|
86
|
+
endDate?: string;
|
|
87
|
+
grade: string;
|
|
88
|
+
promptId: number;
|
|
89
|
+
output: string;
|
|
90
|
+
calendar: string;
|
|
91
|
+
createdAt: string;
|
|
92
|
+
}
|
|
93
|
+
export interface IPromptParams {
|
|
94
|
+
schoolId?: number;
|
|
95
|
+
startDate?: number;
|
|
96
|
+
endDate?: number;
|
|
97
|
+
grade?: string;
|
|
98
|
+
question?: string;
|
|
99
|
+
calendar?: string;
|
|
100
|
+
instruction?: instructionType;
|
|
101
|
+
}
|
|
102
|
+
export interface IAnswer {
|
|
103
|
+
answer: string;
|
|
104
|
+
fullName: string;
|
|
105
|
+
grade: string;
|
|
106
|
+
question: string;
|
|
107
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IHistoryPrompt } from '../cofigs/type';
|
|
3
|
+
interface IProps {
|
|
4
|
+
maxHeight: number;
|
|
5
|
+
historyPrompts: IHistoryPrompt[];
|
|
6
|
+
handleClickAction: Function;
|
|
7
|
+
handleCloseAction: Function;
|
|
8
|
+
anchorEl: HTMLButtonElement | null;
|
|
9
|
+
popoverId?: string;
|
|
10
|
+
openPopover: boolean;
|
|
11
|
+
removeData: Function;
|
|
12
|
+
selectId: number | null;
|
|
13
|
+
goToViewHistory: Function;
|
|
14
|
+
generateIcons: Function;
|
|
15
|
+
}
|
|
16
|
+
declare const ListPrompts: FC<IProps>;
|
|
17
|
+
export default ListPrompts;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IChat, IOptionDate, IPrompt } from "../cofigs/type";
|
|
3
|
+
declare const useAIChat: () => {
|
|
4
|
+
theme: string;
|
|
5
|
+
setTheme: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
6
|
+
goBack: () => void;
|
|
7
|
+
isOpenSideBar: any;
|
|
8
|
+
prompt: IPrompt | undefined;
|
|
9
|
+
chats: IChat[];
|
|
10
|
+
handleSelectTime: (value: IOptionDate) => void;
|
|
11
|
+
};
|
|
12
|
+
export default useAIChat;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IHistoryPrompt, IPrompt } from "../cofigs/type";
|
|
3
|
+
declare const useAIMario: () => {
|
|
4
|
+
handleClickAction: (event: React.MouseEvent<HTMLButtonElement>, id: number) => void;
|
|
5
|
+
handleCloseAction: () => void;
|
|
6
|
+
anchorEl: HTMLButtonElement | null;
|
|
7
|
+
popoverId: string | undefined;
|
|
8
|
+
openPopover: boolean;
|
|
9
|
+
goToChat: (id: number) => void;
|
|
10
|
+
isOpenSideBar: any;
|
|
11
|
+
height: number;
|
|
12
|
+
aiMarioRef: import("react").RefObject<HTMLDivElement>;
|
|
13
|
+
prompts: IPrompt[];
|
|
14
|
+
historyPrompts: IHistoryPrompt[];
|
|
15
|
+
removeData: (id: number) => Promise<void>;
|
|
16
|
+
selectId: number | null;
|
|
17
|
+
goToViewHistory: (id: number) => void;
|
|
18
|
+
};
|
|
19
|
+
export default useAIMario;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IHistoryPrompt } from "../cofigs/type";
|
|
3
|
+
declare const useHistoryPrompt: () => {
|
|
4
|
+
theme: string;
|
|
5
|
+
setTheme: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
6
|
+
goBack: () => void;
|
|
7
|
+
isOpenSideBar: any;
|
|
8
|
+
prompt: IHistoryPrompt | undefined;
|
|
9
|
+
};
|
|
10
|
+
export default useHistoryPrompt;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FILTER_SURVEY, SURVEY_RESPONSE, TOTAL_TYPE } from "../configs/types";
|
|
3
3
|
import { TYPE_SURVEY_OPTION } from "../configs/constants";
|
|
4
4
|
import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
|
|
5
|
-
declare const useListSurvey: (
|
|
5
|
+
declare const useListSurvey: () => {
|
|
6
6
|
itemSelectedId: number;
|
|
7
7
|
itemSelectedStudentId: number;
|
|
8
8
|
changeFilters: (updatedFilters: any) => void;
|
|
@@ -44,8 +44,5 @@ declare const useListSurvey: (pageSize?: number | undefined) => {
|
|
|
44
44
|
handleCloseModelLink: () => void;
|
|
45
45
|
handleCopyToClipboard: (text: string) => void;
|
|
46
46
|
linkAnonymousSurvey: string;
|
|
47
|
-
goToTemplateSurvey: () => void;
|
|
48
|
-
goToDashboardSurvey: () => void;
|
|
49
|
-
goToSurveyList: () => void;
|
|
50
47
|
};
|
|
51
48
|
export default useListSurvey;
|