@oscloudlab/vgen-agent-assistant 0.0.1
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/README.md +189 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/src/api/index.d.ts +94 -0
- package/dist/types/src/components/AnalyzeUrl/index.d.ts +34 -0
- package/dist/types/src/components/BiliRecommend/index.d.ts +23 -0
- package/dist/types/src/components/MyReactMarldown/index.d.ts +5 -0
- package/dist/types/src/components/TagsTextarea/index.d.ts +24 -0
- package/dist/types/src/components/VgenAgent/components/CourseContinueMsg.d.ts +14 -0
- package/dist/types/src/components/VgenAgent/components/CourseStartMsg.d.ts +14 -0
- package/dist/types/src/components/VgenAgent/components/MessageContent.d.ts +35 -0
- package/dist/types/src/components/VgenAgent/components/VideoContinueMsg.d.ts +14 -0
- package/dist/types/src/components/VgenAgent/components/VideoStartMsg.d.ts +14 -0
- package/dist/types/src/components/VgenAgent/components/defalutWelcomeMsg.d.ts +8 -0
- package/dist/types/src/components/VgenAgent/index.d.ts +4 -0
- package/dist/types/src/components/VgenAgent/type.d.ts +217 -0
- package/dist/types/src/components/VgenModal/index.d.ts +13 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/vgen-agent-assistant.css +1 -0
- package/dist/vgen-agent-assistant.css.gz +0 -0
- package/dist/vgen-agent-assistant.es.js +62291 -0
- package/dist/vgen-agent-assistant.es.js.gz +0 -0
- package/dist/vgen-agent-assistant.umd.js +74 -0
- package/dist/vgen-agent-assistant.umd.js.gz +0 -0
- package/package.json +83 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface VgenAgentProps {
|
|
4
|
+
token: string;
|
|
5
|
+
viewMode?: viewModeType;
|
|
6
|
+
courseInfo?: courseInfoProps;
|
|
7
|
+
videoInfo?: videoInfoProps;
|
|
8
|
+
initStyle?: CSSProperties;
|
|
9
|
+
hoverTip?: string;
|
|
10
|
+
}
|
|
11
|
+
export type viewModeType = 'video' | 'course' | 'default';
|
|
12
|
+
export interface videoInfoProps {
|
|
13
|
+
name: string;
|
|
14
|
+
recordId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface courseInfoProps {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
chapter: string;
|
|
20
|
+
section: string;
|
|
21
|
+
}
|
|
22
|
+
export declare enum msgType {
|
|
23
|
+
TEXT = "text",// 文本消息
|
|
24
|
+
NODE = "node",// 节点消息
|
|
25
|
+
FROM_QUESTION = "form_question",// 生题表单
|
|
26
|
+
FROM_LEARN_PATH = "form_learn_path",// 学习路径表单
|
|
27
|
+
FROM_PARSE_VIDEO = "form_parse_video",// 视频解析表单
|
|
28
|
+
FROM_KNOWLEDGE_CARD = "form_knowledge_card",// 知识卡片表单
|
|
29
|
+
FROM_LEARN_TASK = "form_learn_task",// 创建任务表单
|
|
30
|
+
REL_RECORD = "rel_record",// 视频解析锚点
|
|
31
|
+
REL_QUESTION = "rel_question",// 练习题锚点
|
|
32
|
+
REL_LEARN_PATH = "rel_learn_path",// 学习路径锚点
|
|
33
|
+
REL_KNOWLEDGE_CARD = "rel_knowledge_card",// 知识卡片锚点
|
|
34
|
+
RECOMMEND_VIDEO = "recommend_video",// 视频推荐
|
|
35
|
+
LEARN_PATH_TREE = "learn_path_tree",// 学习路径树数据
|
|
36
|
+
REL_LEARN_TASK = "rel_learn_task"
|
|
37
|
+
}
|
|
38
|
+
export interface MessageProps {
|
|
39
|
+
id: number | string;
|
|
40
|
+
role: string;
|
|
41
|
+
content: string | ReactNode;
|
|
42
|
+
messageType?: msgType;
|
|
43
|
+
extraInfo?: any;
|
|
44
|
+
formData?: {
|
|
45
|
+
subject: string;
|
|
46
|
+
goal: string;
|
|
47
|
+
level: string;
|
|
48
|
+
duration: string;
|
|
49
|
+
};
|
|
50
|
+
pathData?: {
|
|
51
|
+
id: string;
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
nodes: number;
|
|
55
|
+
};
|
|
56
|
+
videoData?: {
|
|
57
|
+
id: string;
|
|
58
|
+
title: string;
|
|
59
|
+
thumbnail: string;
|
|
60
|
+
duration: string;
|
|
61
|
+
summary: string;
|
|
62
|
+
};
|
|
63
|
+
knowledgePoints?: Array<{
|
|
64
|
+
id: string;
|
|
65
|
+
title: string;
|
|
66
|
+
description: string;
|
|
67
|
+
difficulty: '入门' | '进阶' | '专家';
|
|
68
|
+
}>;
|
|
69
|
+
practiceData?: {
|
|
70
|
+
id: string;
|
|
71
|
+
title: string;
|
|
72
|
+
questionCount: number;
|
|
73
|
+
estimatedTime: string;
|
|
74
|
+
tags: string[];
|
|
75
|
+
};
|
|
76
|
+
codeSpaceData?: {
|
|
77
|
+
id: string;
|
|
78
|
+
title: string;
|
|
79
|
+
language: string;
|
|
80
|
+
description: string;
|
|
81
|
+
filesCount: number;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface resourceType {
|
|
85
|
+
id: number | string;
|
|
86
|
+
type: msgType;
|
|
87
|
+
extraInfo: any;
|
|
88
|
+
}
|
|
89
|
+
export interface recommendVideosProps {
|
|
90
|
+
bvid: string;
|
|
91
|
+
cid: string;
|
|
92
|
+
pic: string;
|
|
93
|
+
recordId: string;
|
|
94
|
+
title: string;
|
|
95
|
+
views: number;
|
|
96
|
+
createTime: string;
|
|
97
|
+
viewDetail: boolean;
|
|
98
|
+
shareUserId: string;
|
|
99
|
+
}
|
|
100
|
+
export declare enum agentScene {
|
|
101
|
+
/** 问答问答场景 */
|
|
102
|
+
QA_SCENE = "qa_scene",
|
|
103
|
+
/** 生题场景 */
|
|
104
|
+
QUESTION_GENERATION = "question_generation_scene",
|
|
105
|
+
/** 图片识别场景 */
|
|
106
|
+
IMAGE_RECOGNITION = "image_recognition_scene",
|
|
107
|
+
/** 图片转问题场景 */
|
|
108
|
+
IMAGE_TO_QUESTION = "image_to_question_scene",
|
|
109
|
+
/** 代码诊断场景 */
|
|
110
|
+
CODE_DIAGNOSE = "code_diagnosis_scene",
|
|
111
|
+
/** 生成知识点场景 */
|
|
112
|
+
SKILL_TO_KNOWLEDGE = "skill_to_knowledge_scene",
|
|
113
|
+
/** 前后知识点生成场景 */
|
|
114
|
+
FR_KNOWLEDGE = "fr_knowledge_scene",
|
|
115
|
+
/** 知识点动画生成场景 */
|
|
116
|
+
GEN_KNOWLEDGE_ANIMATION = "gen_knowledge_animation_scene",
|
|
117
|
+
/** 视频解析场景 */
|
|
118
|
+
VIDEO_PARSE = "video_parse_scene",
|
|
119
|
+
/** 系统化学习场景(路径树生成) */
|
|
120
|
+
SYSTEMATIZE_LEARNING = "systematize_learning_scene",
|
|
121
|
+
/** 创建任务场景 */
|
|
122
|
+
DAILY_TASK_REMINDER_SCENE = "daily_task_reminder_scene",
|
|
123
|
+
/** 创建评测任务场景 */
|
|
124
|
+
EVALUATION_TASK_SCENE = "evaluation_task_scene",
|
|
125
|
+
/** 根据评测数据生题 */
|
|
126
|
+
EVALUATION_QUESTION_SCENE = "evaluation_question_scene"
|
|
127
|
+
}
|
|
128
|
+
export interface chatMsgResProps {
|
|
129
|
+
messages: MessageProps[];
|
|
130
|
+
hasMoreAfter: boolean;
|
|
131
|
+
hasMoreBefore: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface saveMsgProps {
|
|
134
|
+
role: string;
|
|
135
|
+
content: string;
|
|
136
|
+
currnetMsgId?: number;
|
|
137
|
+
toPost: boolean;
|
|
138
|
+
onlyPost?: boolean;
|
|
139
|
+
chatId?: number;
|
|
140
|
+
messageType?: msgType;
|
|
141
|
+
extraInfo?: any;
|
|
142
|
+
}
|
|
143
|
+
export interface SearchResult {
|
|
144
|
+
id: string;
|
|
145
|
+
title: string;
|
|
146
|
+
duration: string;
|
|
147
|
+
upic: string;
|
|
148
|
+
typename: string;
|
|
149
|
+
play: number;
|
|
150
|
+
pubdate: number;
|
|
151
|
+
description: string;
|
|
152
|
+
arcurl: string;
|
|
153
|
+
cid?: string;
|
|
154
|
+
bvid: string;
|
|
155
|
+
tag: string;
|
|
156
|
+
showAllTag: boolean;
|
|
157
|
+
}
|
|
158
|
+
export declare enum analyzeStatus {
|
|
159
|
+
QUEUE = "QUEUE",
|
|
160
|
+
INITIALIZED = "INITIALIZED",
|
|
161
|
+
DOWNLOADING = "DOWNLOADING",
|
|
162
|
+
DOWNLOADED = "DOWNLOADED",
|
|
163
|
+
GENERATING_SUBTITLE = "GENERATING_SUBTITLE",
|
|
164
|
+
SUBTITLE_COMPLETED = "SUBTITLE_COMPLETED",
|
|
165
|
+
EXTRACTING_META = "EXTRACTING_META",
|
|
166
|
+
META_COMPLETED = "META_COMPLETED",
|
|
167
|
+
GENERATING_SUMMARY = "GENERATING_SUMMARY",
|
|
168
|
+
SUMMARY_COMPLETED = "SUMMARY_COMPLETED",
|
|
169
|
+
GENERATING_PROMPT = "GENERATING_PROMPT",
|
|
170
|
+
PROMPT_COMPLETED = "PROMPT_COMPLETED",
|
|
171
|
+
GENERATING_EXAMPLE = "GENERATING_EXAMPLE",
|
|
172
|
+
EXAMPLE_COMPLETED = "EXAMPLE_COMPLETED",
|
|
173
|
+
COMPLETED = "COMPLETED",
|
|
174
|
+
FAILED = "FAILED",
|
|
175
|
+
CANCEL = "CANCEL"
|
|
176
|
+
}
|
|
177
|
+
export interface KnowledgeProps {
|
|
178
|
+
uuid: string;
|
|
179
|
+
dataId: number;
|
|
180
|
+
parentUuid: string;
|
|
181
|
+
knowledgeId: number;
|
|
182
|
+
title: string;
|
|
183
|
+
type: string;
|
|
184
|
+
content: string;
|
|
185
|
+
canGenAnimation: boolean;
|
|
186
|
+
editPermission: boolean;
|
|
187
|
+
url: string;
|
|
188
|
+
videoCode: number;
|
|
189
|
+
t: string;
|
|
190
|
+
recordId?: string;
|
|
191
|
+
bvid?: string;
|
|
192
|
+
cid?: string;
|
|
193
|
+
frontName?: string;
|
|
194
|
+
rearName?: string;
|
|
195
|
+
recordTitle?: string;
|
|
196
|
+
learnStatus?: number;
|
|
197
|
+
children?: any;
|
|
198
|
+
showShare?: number;
|
|
199
|
+
shareLastedUpdateTime?: string;
|
|
200
|
+
viewDetail?: boolean;
|
|
201
|
+
shareUserId?: string;
|
|
202
|
+
}
|
|
203
|
+
export interface LearningPath {
|
|
204
|
+
id: number;
|
|
205
|
+
name: string;
|
|
206
|
+
desc: string;
|
|
207
|
+
createTime: string;
|
|
208
|
+
modifyTime: string;
|
|
209
|
+
progress?: number;
|
|
210
|
+
viewDetail?: boolean;
|
|
211
|
+
shareUserId?: string;
|
|
212
|
+
}
|
|
213
|
+
export interface sessionProps {
|
|
214
|
+
createTime: string;
|
|
215
|
+
id: number;
|
|
216
|
+
summary: string;
|
|
217
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ModalFuncProps } from 'antd';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ModalProps extends ModalFuncProps {
|
|
5
|
+
contentType?: 'center' | 'left';
|
|
6
|
+
onCancelCallback?: () => void;
|
|
7
|
+
noIcon?: boolean;
|
|
8
|
+
destroyOnHidden?: boolean;
|
|
9
|
+
blackMode?: boolean;
|
|
10
|
+
isTip?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const VgenModal: React.FC<ModalProps>;
|
|
13
|
+
export default VgenModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|