@oscloudlab/vgen-agent-assistant 0.0.3 → 0.0.5
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/types/src/components/VgenAgent/type.d.ts +4 -1
- package/dist/vgen-agent-assistant.css +1 -1
- package/dist/vgen-agent-assistant.css.gz +0 -0
- package/dist/vgen-agent-assistant.es.js +107 -47
- package/dist/vgen-agent-assistant.es.js.gz +0 -0
- package/dist/vgen-agent-assistant.umd.js +2 -2
- package/dist/vgen-agent-assistant.umd.js.gz +0 -0
- package/package.json +1 -1
|
Binary file
|
|
@@ -21509,6 +21509,7 @@ var msgType$1 = /* @__PURE__ */ ((msgType2) => {
|
|
|
21509
21509
|
msgType2["RECOMMEND_VIDEO"] = "recommend_video";
|
|
21510
21510
|
msgType2["LEARN_PATH_TREE"] = "learn_path_tree";
|
|
21511
21511
|
msgType2["REL_LEARN_TASK"] = "rel_learn_task";
|
|
21512
|
+
msgType2["INVISIBLE_TEXT"] = "invisible_text";
|
|
21512
21513
|
return msgType2;
|
|
21513
21514
|
})(msgType$1 || {});
|
|
21514
21515
|
var agentScene$1 = /* @__PURE__ */ ((agentScene2) => {
|
|
@@ -61027,6 +61028,7 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
61027
61028
|
viewMode = "default",
|
|
61028
61029
|
courseInfo,
|
|
61029
61030
|
videoInfo,
|
|
61031
|
+
initPos,
|
|
61030
61032
|
initStyle,
|
|
61031
61033
|
hoverTip
|
|
61032
61034
|
} = props;
|
|
@@ -61103,7 +61105,13 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
61103
61105
|
currentPage: 1,
|
|
61104
61106
|
pageSize: 20,
|
|
61105
61107
|
dataBtype: 10,
|
|
61106
|
-
dataId: videoInfo.recordId
|
|
61108
|
+
dataId: videoInfo.recordId,
|
|
61109
|
+
orders: [
|
|
61110
|
+
{
|
|
61111
|
+
key: "create_time",
|
|
61112
|
+
asc: false
|
|
61113
|
+
}
|
|
61114
|
+
]
|
|
61107
61115
|
}).then((res) => {
|
|
61108
61116
|
if (!res.dataList.length) {
|
|
61109
61117
|
createSession({
|
|
@@ -61112,6 +61120,7 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
61112
61120
|
dataId: videoInfo.recordId
|
|
61113
61121
|
}).then((res2) => {
|
|
61114
61122
|
setChatId(res2);
|
|
61123
|
+
sceneMsgSend(res2);
|
|
61115
61124
|
toGetHistoryList(res2);
|
|
61116
61125
|
});
|
|
61117
61126
|
} else {
|
|
@@ -61833,6 +61842,20 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
61833
61842
|
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center text-xs text-gray-400", children: "暂无历史记录" }) })
|
|
61834
61843
|
] });
|
|
61835
61844
|
}, [sessionList, chatId]);
|
|
61845
|
+
const sceneMsgSend = (chatIdHere) => {
|
|
61846
|
+
switch (viewMode) {
|
|
61847
|
+
case "video":
|
|
61848
|
+
saveMsg({
|
|
61849
|
+
role: "user",
|
|
61850
|
+
content: (videoInfo == null ? void 0 : videoInfo.description) || "",
|
|
61851
|
+
onlyPost: true,
|
|
61852
|
+
toPost: true,
|
|
61853
|
+
chatId: chatIdHere,
|
|
61854
|
+
messageType: msgType$1.INVISIBLE_TEXT
|
|
61855
|
+
});
|
|
61856
|
+
break;
|
|
61857
|
+
}
|
|
61858
|
+
};
|
|
61836
61859
|
const addNewSession = () => {
|
|
61837
61860
|
switch (viewMode) {
|
|
61838
61861
|
case "video":
|
|
@@ -61842,6 +61865,7 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
61842
61865
|
dataId: videoInfo == null ? void 0 : videoInfo.recordId
|
|
61843
61866
|
}).then((res) => {
|
|
61844
61867
|
setChatId(res);
|
|
61868
|
+
sceneMsgSend(res);
|
|
61845
61869
|
toGetHistoryList(res);
|
|
61846
61870
|
getSessionListByBiz({
|
|
61847
61871
|
currentPage: 1,
|
|
@@ -61888,12 +61912,23 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
61888
61912
|
},
|
|
61889
61913
|
className: "fixed pointer-events-auto cursor-grab active:cursor-grabbing flex flex-col items-center justify-center group z-50",
|
|
61890
61914
|
style: {
|
|
61891
|
-
...
|
|
61915
|
+
...initPos
|
|
61892
61916
|
},
|
|
61893
61917
|
children: [
|
|
61894
61918
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: hoverTip || "", children: /* @__PURE__ */ jsxRuntimeExports.jsx(motion.div, { className: "relative flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex flex-col items-center z-10", children: [
|
|
61895
61919
|
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: CookieLife, className: "w-24 h-24 select-none pointer-events-none", draggable: "false" }),
|
|
61896
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
61920
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
61921
|
+
"div",
|
|
61922
|
+
{
|
|
61923
|
+
className: "text-white text-[14px] px-6 py-2 rounded-full font-bold border border-white/30 whitespace-nowrap",
|
|
61924
|
+
style: {
|
|
61925
|
+
marginTop: "-28px",
|
|
61926
|
+
background: "linear-gradient(to right, #4461f2, #bc2df3)",
|
|
61927
|
+
boxShadow: "0 8px 20px rgba(68,97,242,0.3)"
|
|
61928
|
+
},
|
|
61929
|
+
children: "AI 学伴"
|
|
61930
|
+
}
|
|
61931
|
+
)
|
|
61897
61932
|
] }) }) }),
|
|
61898
61933
|
/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {})
|
|
61899
61934
|
]
|
|
@@ -61924,8 +61959,13 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
61924
61959
|
scale: 0.9,
|
|
61925
61960
|
y: 50
|
|
61926
61961
|
},
|
|
61927
|
-
className: "fixed
|
|
61962
|
+
className: "fixed pointer-events-auto bg-white rounded-2xl border border-gray-100 flex flex-col overflow-hidden cursor-default z-50",
|
|
61928
61963
|
style: {
|
|
61964
|
+
maxHeight: "90vh",
|
|
61965
|
+
width: "440px",
|
|
61966
|
+
height: "760px",
|
|
61967
|
+
boxShadow: "0 20px 50px rgba(0,0,0,0.15)",
|
|
61968
|
+
...initPos,
|
|
61929
61969
|
...initStyle
|
|
61930
61970
|
},
|
|
61931
61971
|
children: [
|
|
@@ -62140,41 +62180,52 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
62140
62180
|
onClick: () => setIsMoreActionsOpen(false)
|
|
62141
62181
|
}
|
|
62142
62182
|
),
|
|
62143
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
62144
|
-
|
|
62145
|
-
|
|
62146
|
-
|
|
62147
|
-
|
|
62148
|
-
|
|
62149
|
-
|
|
62150
|
-
|
|
62183
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
62184
|
+
"div",
|
|
62185
|
+
{
|
|
62186
|
+
className: "absolute mb-2 w-48 bg-white rounded-xl border border-gray-100 p-2 z-[60] animate-in fade-in slide-in-from-bottom-2 duration-200",
|
|
62187
|
+
style: {
|
|
62188
|
+
boxShadow: "0 10px 30px rgba(0,0,0,0.2)",
|
|
62189
|
+
right: "0",
|
|
62190
|
+
bottom: "30px"
|
|
62151
62191
|
},
|
|
62152
|
-
|
|
62153
|
-
|
|
62154
|
-
|
|
62155
|
-
|
|
62156
|
-
|
|
62157
|
-
|
|
62158
|
-
|
|
62159
|
-
|
|
62160
|
-
|
|
62161
|
-
|
|
62162
|
-
|
|
62163
|
-
|
|
62164
|
-
|
|
62165
|
-
|
|
62166
|
-
|
|
62167
|
-
|
|
62168
|
-
|
|
62169
|
-
|
|
62170
|
-
|
|
62171
|
-
|
|
62192
|
+
children: [
|
|
62193
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[10px] font-bold text-gray-400 px-2 py-1 mb-1 uppercase", children: "Vgen 进阶功能" }),
|
|
62194
|
+
[
|
|
62195
|
+
{
|
|
62196
|
+
label: "生成学习路径",
|
|
62197
|
+
desc: "帮我生成学习路径",
|
|
62198
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(GitBranch, { className: "w-3.5 h-3.5" }),
|
|
62199
|
+
color: "text-blue-500"
|
|
62200
|
+
},
|
|
62201
|
+
{
|
|
62202
|
+
label: "AI智能出题",
|
|
62203
|
+
desc: "帮我出三道练习题",
|
|
62204
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FileCode, { className: "w-3.5 h-3.5" }),
|
|
62205
|
+
color: "text-indigo-500"
|
|
62206
|
+
}
|
|
62207
|
+
// {
|
|
62208
|
+
// label: "能力测评",
|
|
62209
|
+
// icon: <Trophy className="w-3.5 h-3.5" />,
|
|
62210
|
+
// color: "text-amber-500",
|
|
62211
|
+
// },
|
|
62212
|
+
].map((link2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
62213
|
+
"button",
|
|
62214
|
+
{
|
|
62215
|
+
onClick: () => {
|
|
62216
|
+
handleSend({ input: link2.desc });
|
|
62217
|
+
},
|
|
62218
|
+
className: "w-full flex items-center gap-2.5 px-2 py-2 rounded-lg hover:bg-gray-50 text-[12px] text-gray-600 transition-colors",
|
|
62219
|
+
children: [
|
|
62220
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: link2.color, children: link2.icon }),
|
|
62221
|
+
link2.label
|
|
62222
|
+
]
|
|
62223
|
+
},
|
|
62172
62224
|
link2.label
|
|
62173
|
-
|
|
62174
|
-
|
|
62175
|
-
|
|
62176
|
-
|
|
62177
|
-
] })
|
|
62225
|
+
))
|
|
62226
|
+
]
|
|
62227
|
+
}
|
|
62228
|
+
)
|
|
62178
62229
|
] })
|
|
62179
62230
|
] })
|
|
62180
62231
|
] }) }),
|
|
@@ -62197,19 +62248,28 @@ const VgenAgent = forwardRef((props, ref) => {
|
|
|
62197
62248
|
)
|
|
62198
62249
|
] }),
|
|
62199
62250
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex items-center gap-2", children: [
|
|
62200
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
62201
|
-
|
|
62251
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
62252
|
+
"div",
|
|
62202
62253
|
{
|
|
62203
|
-
|
|
62204
|
-
|
|
62205
|
-
|
|
62206
|
-
placeholder: inputPlaceholder,
|
|
62207
|
-
sendMsg: () => {
|
|
62208
|
-
handleSend({ input: inputValue });
|
|
62254
|
+
className: "w-full px-4 pb-1 pt-1.5 bg-white rounded-[12px] cursor-text border border-gray-100 focus-within:border-blue-200 transition-all overflow-hidden",
|
|
62255
|
+
style: {
|
|
62256
|
+
paddingTop: "6px"
|
|
62209
62257
|
},
|
|
62210
|
-
|
|
62258
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
62259
|
+
TagsTextarea,
|
|
62260
|
+
{
|
|
62261
|
+
minHeight: 30,
|
|
62262
|
+
maxHeight: 120,
|
|
62263
|
+
onChange: tagsTextareaValueChange,
|
|
62264
|
+
placeholder: inputPlaceholder,
|
|
62265
|
+
sendMsg: () => {
|
|
62266
|
+
handleSend({ input: inputValue });
|
|
62267
|
+
},
|
|
62268
|
+
ref: tagsTextareaRef
|
|
62269
|
+
}
|
|
62270
|
+
)
|
|
62211
62271
|
}
|
|
62212
|
-
)
|
|
62272
|
+
),
|
|
62213
62273
|
answerIsDone ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
62214
62274
|
Button,
|
|
62215
62275
|
{
|
|
Binary file
|