@oscloudlab/vgen-agent-assistant 0.0.19 → 0.0.21

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.
@@ -1,7 +1,7 @@
1
1
  import require$$0, { memo, useState, useEffect, useMemo, useRef, forwardRef, useImperativeHandle, useCallback } from "react";
2
- import { message, Spin, Badge, Button, ConfigProvider, Modal, TimePicker, Select, Collapse, Form, Input, Checkbox, Tree, Dropdown, Tooltip, Popconfirm, Popover } from "antd";
3
- import { FileText, FishSymbol, Target, GraduationCap, Video, BookOpen, Lightbulb, Code2, Search, X, RefreshCw, ArrowRight, Play, Eye, Zap, FileDiff, User, Pencil, Check, Copy, Wand2, RefreshCcw, BookOpenText, Star, GitBranch, FileCode, Trophy, MessageCircleQuestion, Sparkles, ChevronDown, ChevronUp, Paperclip, StopCircle, Send, PanelLeftClose, PanelLeftOpen, Folder, Trash2, Cookie, Plus, History, Minimize2 } from "lucide-react";
4
- import pako from "pako";
2
+ import { message, Spin, Badge, Button, ConfigProvider, Modal, TimePicker, Select, Collapse, Form, Input, Checkbox, Tree, Tooltip, Segmented, Dropdown, Popconfirm, Popover } from "antd";
3
+ import { FileText, FishSymbol, Target, GraduationCap, Video, BookOpen, Lightbulb, Code2, Search, X, RefreshCw, ArrowRight, Play, Eye, Zap, FileDiff, User, Pencil, Check, Copy, RefreshCcw, BookOpenText, Star, GitBranch, FileCode, Trophy, MessageCircleQuestion, Sparkles, ChevronDown, ChevronUp, Paperclip, StopCircle, Send, PanelLeftClose, PanelLeftOpen, Folder, Trash2, Cookie, Plus, History, Minimize2 } from "lucide-react";
4
+ import "pako";
5
5
  import { twMerge } from "tailwind-merge";
6
6
  import "moment";
7
7
  import { motion, AnimatePresence, useDragControls } from "framer-motion";
@@ -987,43 +987,6 @@ const debounce = (func, wait = 500, immediate = false) => {
987
987
  }
988
988
  };
989
989
  };
990
- const textToBase64 = (text2) => {
991
- const encoder = new TextEncoder();
992
- const uint8Array = encoder.encode(text2);
993
- let binary = "";
994
- for (let i = 0; i < uint8Array.length; i++) {
995
- binary += String.fromCharCode(uint8Array[i]);
996
- }
997
- return btoa(binary);
998
- };
999
- function dataTobase64(data) {
1000
- try {
1001
- const strData = typeof data !== "string" ? JSON.stringify(data) : data;
1002
- const str = textToBase64(strData);
1003
- return str;
1004
- } catch (error) {
1005
- console.log(error);
1006
- return null;
1007
- }
1008
- }
1009
- function compress_pako(data) {
1010
- try {
1011
- const strData = typeof data !== "string" ? JSON.stringify(data) : data;
1012
- const compressedData = pako.deflate(strData);
1013
- const str = Buffer.from(compressedData).toString("base64");
1014
- return str;
1015
- } catch (error) {
1016
- return null;
1017
- }
1018
- }
1019
- const defaultEncodeType = "BASE64";
1020
- function encryptData(data, encodeType = defaultEncodeType) {
1021
- if (encodeType === "BASE64") {
1022
- return dataTobase64(data);
1023
- } else if (encodeType === "PAKO") {
1024
- return compress_pako(data);
1025
- }
1026
- }
1027
990
  const getUrlParams = (url) => {
1028
991
  const queryString = url.includes("?") ? url.split("?")[1] : "";
1029
992
  const params = {};
@@ -1845,7 +1808,7 @@ function sseForChat(config, events) {
1845
1808
  let evaluationQuesData = [];
1846
1809
  let resourceEditList = [];
1847
1810
  fetch(fullUrl, {
1848
- method: config.method || "GET",
1811
+ method: config.method,
1849
1812
  headers: {
1850
1813
  ...body ? { "Content-Type": "application/json" } : {},
1851
1814
  ...config.headers
@@ -2097,28 +2060,6 @@ const getSesstionList = (params) => {
2097
2060
  const getTraceId = (params) => {
2098
2061
  return axiosInstance.post("/api/v1/trace/get", params);
2099
2062
  };
2100
- const chatSseSaas = (query, params, receiverObj, traceId) => {
2101
- const controller = sseForChat(
2102
- {
2103
- url: "/saas/chat/sse",
2104
- method: "POST",
2105
- // headers: { Authorization: 'Bearer token' },
2106
- body: {
2107
- ...params
2108
- },
2109
- query: {
2110
- ...query
2111
- },
2112
- headers: {
2113
- "x-run-id": traceId || ""
2114
- }
2115
- },
2116
- {
2117
- ...receiverObj
2118
- }
2119
- );
2120
- return controller;
2121
- };
2122
2063
  const chatAgent = (query, params, receiverObj, enableGlobalSearch, traceId) => {
2123
2064
  const controller = sseForChat(
2124
2065
  {
@@ -2142,9 +2083,6 @@ const chatAgent = (query, params, receiverObj, enableGlobalSearch, traceId) => {
2142
2083
  );
2143
2084
  return controller;
2144
2085
  };
2145
- const saveKnowledges = (params) => {
2146
- return axiosInstance.post(`/api/v1.0/knowledge/save`, params);
2147
- };
2148
2086
  const getVideoStatus = (id) => {
2149
2087
  return axiosInstance.get(`/api/v1.0/record/${id}/status`);
2150
2088
  };
@@ -15401,6 +15339,13 @@ const ThinkingContent = memo((props) => {
15401
15339
  }
15402
15340
  return content2;
15403
15341
  }, [recommendScene]);
15342
+ const thinkContentRef = useRef(null);
15343
+ useEffect(() => {
15344
+ const el = thinkContentRef.current;
15345
+ if (el) {
15346
+ el.scrollTop = el.scrollHeight;
15347
+ }
15348
+ }, [thinkContent]);
15404
15349
  const preheatContentMap = useMemo(() => {
15405
15350
  let content2 = "";
15406
15351
  switch (recommendScene) {
@@ -15455,7 +15400,14 @@ const ThinkingContent = memo((props) => {
15455
15400
  ) }),
15456
15401
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
15457
15402
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-base font-black italic text-slate-900 tracking-tight", children: createingMap }),
15458
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-bold text-primary animate-pulse", children: thinkContent })
15403
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
15404
+ "p",
15405
+ {
15406
+ ref: thinkContentRef,
15407
+ className: "text-xs font-bold text-primary animate-pulse max-h-[50px] overflow-y-auto max-w-[40vw]",
15408
+ children: thinkContent
15409
+ }
15410
+ )
15459
15411
  ] })
15460
15412
  ] }),
15461
15413
  preheatContentMap ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-[#FAFBFC] rounded-3xl p-6 border border-border/40 relative group overflow-hidden", children: [
@@ -15779,25 +15731,13 @@ const MessageContent = (props) => {
15779
15731
  const [sessionToKnowledgeModalVisible, setSessionToKnowledgeModalVisible] = useState(false);
15780
15732
  const [sessionToKnowledgeLoading, setSessionToKnowledgeLoading] = useState(false);
15781
15733
  const [sessionToKnowledgeLoadingText, setSessionToKnowledgeLoadingText] = useState("");
15782
- const transfromTextRef = useRef("");
15734
+ useRef("");
15783
15735
  const transfromTextController = useRef("");
15784
15736
  const transformFinishKnowledgeId = useRef("");
15785
15737
  const [messagesHere, setMessagesHere] = useState([]);
15786
15738
  useEffect(() => {
15787
15739
  setMessagesHere(messages);
15788
15740
  }, [messages]);
15789
- const toGetTraceId = async () => {
15790
- const extraObj = {
15791
- sessionId: "-1",
15792
- enableSearch: false
15793
- };
15794
- const traceRes = await getTraceId({
15795
- app: "vgen-web",
15796
- btype: "button-event",
15797
- extra: JSON.stringify(extraObj)
15798
- });
15799
- return (traceRes == null ? void 0 : traceRes.data) || "";
15800
- };
15801
15741
  const sendChangeTimeMsg = (extraInfo) => {
15802
15742
  saveMsg == null ? void 0 : saveMsg({
15803
15743
  content: "",
@@ -15809,76 +15749,6 @@ const MessageContent = (props) => {
15809
15749
  })
15810
15750
  });
15811
15751
  };
15812
- const sesseionTransformKnowledge = async (content2) => {
15813
- var _a, _b;
15814
- setSessionToKnowledgeModalVisible(true);
15815
- setSessionToKnowledgeLoading(true);
15816
- transfromTextController.current && ((_a = transfromTextController.current) == null ? void 0 : _a.close());
15817
- transformFinishKnowledgeId.current = "";
15818
- transfromTextRef.current = content2;
15819
- try {
15820
- const systemText = "<session>" + textToBase64(content2) + "</session>";
15821
- const params = {
15822
- system: systemText,
15823
- // 上下文
15824
- message: `将该会话转化成知识点`
15825
- };
15826
- message.warning("开始生成知识点,请稍后...");
15827
- const traceId = await toGetTraceId();
15828
- const controller = chatSseSaas(
15829
- {
15830
- sessionId: "-1"
15831
- },
15832
- {
15833
- ...params
15834
- },
15835
- {
15836
- onProgress: (message2) => {
15837
- setSessionToKnowledgeLoadingText(message2);
15838
- },
15839
- onError: (error) => {
15840
- console.error("ai回答发生错误:", error);
15841
- setSessionToKnowledgeLoading(false);
15842
- setSessionToKnowledgeLoadingText("");
15843
- },
15844
- onComplete: ({ sessionKnowledgeData }) => {
15845
- var _a2;
15846
- setSessionToKnowledgeLoading(false);
15847
- try {
15848
- const data = tryParseJSON(sessionKnowledgeData || "");
15849
- if (data == null ? void 0 : data.content) {
15850
- const params2 = {
15851
- btype: 1,
15852
- // knowledgeList: [data],
15853
- data: encryptData([data])
15854
- };
15855
- saveKnowledges(params2).then((res) => {
15856
- var _a3, _b2;
15857
- const list2 = (res == null ? void 0 : res.knowledgeList) || [];
15858
- if ((_a3 = list2[0]) == null ? void 0 : _a3.knowledgeId) {
15859
- transformFinishKnowledgeId.current = (_b2 = list2[0]) == null ? void 0 : _b2.knowledgeId;
15860
- }
15861
- });
15862
- }
15863
- } catch (error) {
15864
- console.error("解析知识点代码发生错误:", error);
15865
- setSessionToKnowledgeModalVisible(false);
15866
- setSessionToKnowledgeLoading(false);
15867
- transfromTextController.current && ((_a2 = transfromTextController.current) == null ? void 0 : _a2.close());
15868
- }
15869
- }
15870
- },
15871
- traceId
15872
- );
15873
- transfromTextController.current = controller;
15874
- } catch (error) {
15875
- console.error("知识点转化失败:", error);
15876
- message.error(error.message || "知识点转化失败");
15877
- setSessionToKnowledgeModalVisible(false);
15878
- setSessionToKnowledgeLoading(false);
15879
- transfromTextController.current && ((_b = transfromTextController.current) == null ? void 0 : _b.close());
15880
- }
15881
- };
15882
15752
  useEffect(() => {
15883
15753
  var _a;
15884
15754
  if (!sessionToKnowledgeModalVisible) {
@@ -15964,7 +15834,7 @@ const MessageContent = (props) => {
15964
15834
  return null;
15965
15835
  }
15966
15836
  const isLast = index2 === messagesHere.length - 1;
15967
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
15837
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
15968
15838
  motion.div,
15969
15839
  {
15970
15840
  initial: { opacity: 0, y: 10 },
@@ -15973,540 +15843,499 @@ const MessageContent = (props) => {
15973
15843
  "flex gap-2",
15974
15844
  msg.role === "user" ? "flex-row-reverse" : "flex-row"
15975
15845
  ),
15976
- children: [
15977
- /* @__PURE__ */ jsxRuntimeExports.jsx(
15978
- "div",
15979
- {
15980
- className: cn(
15981
- "w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 shadow-sm",
15982
- msg.role === "user" ? "text-white" : "bg-primary-200 border border-gray-100"
15983
- ),
15984
- children: msg.role === "user" ? (userInfo == null ? void 0 : userInfo.avatar) ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: userInfo == null ? void 0 : userInfo.avatar, className: "w-8 h-8", referrerPolicy: "no-referrer" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(User, { className: "w-6 h-6" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: CookieLife, className: "w-10 h-10" })
15985
- }
15986
- ),
15987
- thinkContent && !answerIsDone && isLast ? /* @__PURE__ */ jsxRuntimeExports.jsx(
15988
- ThinkingContent,
15989
- {
15990
- thinkContent,
15991
- answerIsDone,
15992
- isLast,
15993
- recommendScene,
15994
- cookieConsume,
15995
- progress
15996
- }
15997
- ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
15998
- "div",
15999
- {
16000
- className: cn(
16001
- "flex flex-col gap-2 max-w-[85%] group mt-1",
16002
- msg.role === "user" ? "items-end" : "items-start",
16003
- msg.role === "ai" && msg.messageType !== msgType.TEXT ? "mb-4" : ""
16004
- ),
16005
- children: [
16006
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16007
- "div",
16008
- {
16009
- className: cn(
16010
- "w-full px-4 rounded-[24px] text-[13px] leading-relaxed shadow-sm",
16011
- msg.role === "user" ? "bg-primary-600 text-white rounded-tr-none" : "bg-white text-gray-800 border border-gray-100 rounded-tl-none"
16012
- ),
16013
- children: [
16014
- msg.messageType === msgType.NODE && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-1 py-2 whitespace-pre-wrap break-words", children: msg.content }),
16015
- (msg.messageType === msgType.TEXT || !msg.messageType) && typeof (msg == null ? void 0 : msg.content) === "string" && ((_a = msg == null ? void 0 : msg.content) == null ? void 0 : _a.indexOf("<think>")) === -1 ? msg.role === "user" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-1 py-2 whitespace-pre-wrap break-words", children: /* @__PURE__ */ jsxRuntimeExports.jsx(RenderContentWithQuotes, { content: msg.content, role: msg.role }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MyReactMarkdown, { children: msg.content }) }) : msg.messageType === msgType.TEXT || !msg.messageType ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-4 text-red-400", children: "思考已中断..." }) : null,
16016
- msg.messageType === msgType.FROM_PARSE_VIDEO && (extraInfo == null ? void 0 : extraInfo.form) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-4 italic text-purple-600", children: extraInfo.form.url ? "视频解析请求" : "视频推荐" }),
16017
- msg.messageType === msgType.RECOMMEND_VIDEO && (extraInfo == null ? void 0 : extraInfo.form) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-4 italic text-purple-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16018
- BiliRecommend$1,
16019
- {
16020
- searchKey: extraInfo.form.searchKey,
16021
- selectCallback: handleSelectSearchResult
16022
- }
16023
- ) }),
16024
- msg.messageType === msgType.FROM_LEARN_TASK && (extraInfo == null ? void 0 : extraInfo.form) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "my-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16025
- Collapse,
16026
- {
16027
- defaultActiveKey: extraInfo.needClarify === true ? [msg.id] : [],
16028
- items: [
16029
- {
16030
- key: msg.id,
16031
- label: "创建任务信息确认",
16032
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white", children: [
16033
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-b border-gray-100 pb-3 mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-sm font-bold text-gray-900 flex items-center", children: [
16034
- /* @__PURE__ */ jsxRuntimeExports.jsx(User, { className: "h-4 w-4 mr-2 text-primary" }),
16035
- "定制你的专属任务"
16036
- ] }) }),
16037
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16038
- Form,
16039
- {
16040
- layout: "inline",
16041
- className: "space-y-4",
16042
- labelCol: { span: 8 },
16043
- wrapperCol: { span: 16 },
16044
- onFinish: taskFormSubmit,
16045
- autoComplete: "off",
16046
- children: [
16047
- TaskFormFields == null ? void 0 : TaskFormFields.map((item) => {
16048
- var _a2, _b2, _c2;
16049
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
16050
- Form.Item,
16051
- {
16052
- initialValue: ((_a2 = extraInfo == null ? void 0 : extraInfo.form) == null ? void 0 : _a2[item.name]) || void 0,
16053
- label: item.display,
16054
- name: item.name,
16055
- rules: item.required ? [
16056
- {
16057
- required: true,
16058
- message: `${item.type === "str" ? "请输入" : "请选择"}${item.display}`
16059
- }
16060
- ] : [],
16061
- style: {
16062
- marginTop: item.type === "str" ? "16px" : "12px",
16063
- width: "320px"
16064
- },
16065
- children: item.type === "str" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
16066
- Input,
16067
- {
16068
- placeholder: item.desc || item.display,
16069
- style: { width: "140px" }
16070
- }
16071
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
16072
- Checkbox.Group,
16073
- {
16074
- options: item.name === "pathNames" ? ((_b2 = extraInfo == null ? void 0 : extraInfo.form) == null ? void 0 : _b2["pathNames"]) || [] : item.name === "pathOptions" ? ((_c2 = extraInfo == null ? void 0 : extraInfo.form) == null ? void 0 : _c2["pathOptions"].map((item2) => item2.skillName)) || [] : item.options || [],
16075
- style: { width: "140px" }
16076
- }
16077
- )
15846
+ children: thinkContent && !answerIsDone && isLast ? /* @__PURE__ */ jsxRuntimeExports.jsx(
15847
+ ThinkingContent,
15848
+ {
15849
+ thinkContent,
15850
+ answerIsDone,
15851
+ isLast,
15852
+ recommendScene,
15853
+ cookieConsume,
15854
+ progress
15855
+ }
15856
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
15857
+ "div",
15858
+ {
15859
+ className: cn(
15860
+ "flex flex-col gap-2 max-w-[85%] group mt-1",
15861
+ msg.role === "user" ? "items-end" : "items-start",
15862
+ msg.role === "ai" && msg.messageType !== msgType.TEXT ? "mb-4" : ""
15863
+ ),
15864
+ children: [
15865
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
15866
+ "div",
15867
+ {
15868
+ className: cn(
15869
+ "w-full px-4 rounded-[24px] text-[13px] leading-relaxed shadow-sm",
15870
+ msg.role === "user" ? "bg-primary-600 text-white rounded-tr-none" : "bg-white text-gray-800 border border-gray-100 rounded-tl-none"
15871
+ ),
15872
+ children: [
15873
+ msg.messageType === msgType.NODE && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-1 py-2 whitespace-pre-wrap break-words", children: msg.content }),
15874
+ (msg.messageType === msgType.TEXT || !msg.messageType) && typeof (msg == null ? void 0 : msg.content) === "string" && ((_a = msg == null ? void 0 : msg.content) == null ? void 0 : _a.indexOf("<think>")) === -1 ? msg.role === "user" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-1 py-2 whitespace-pre-wrap break-words", children: /* @__PURE__ */ jsxRuntimeExports.jsx(RenderContentWithQuotes, { content: msg.content, role: msg.role }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MyReactMarkdown, { children: msg.content }) }) : msg.messageType === msgType.TEXT || !msg.messageType ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-4 text-red-400", children: "思考已中断..." }) : null,
15875
+ msg.messageType === msgType.FROM_PARSE_VIDEO && (extraInfo == null ? void 0 : extraInfo.form) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-4 italic text-purple-600", children: extraInfo.form.url ? "视频解析请求" : "视频推荐" }),
15876
+ msg.messageType === msgType.RECOMMEND_VIDEO && (extraInfo == null ? void 0 : extraInfo.form) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-4 italic text-purple-600", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
15877
+ BiliRecommend$1,
15878
+ {
15879
+ searchKey: extraInfo.form.searchKey,
15880
+ selectCallback: handleSelectSearchResult
15881
+ }
15882
+ ) }),
15883
+ msg.messageType === msgType.FROM_LEARN_TASK && (extraInfo == null ? void 0 : extraInfo.form) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "my-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
15884
+ Collapse,
15885
+ {
15886
+ defaultActiveKey: extraInfo.needClarify === true ? [msg.id] : [],
15887
+ items: [
15888
+ {
15889
+ key: msg.id,
15890
+ label: "创建任务信息确认",
15891
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white", children: [
15892
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-b border-gray-100 pb-3 mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-sm font-bold text-gray-900 flex items-center", children: [
15893
+ /* @__PURE__ */ jsxRuntimeExports.jsx(User, { className: "h-4 w-4 mr-2 text-primary" }),
15894
+ "定制你的专属任务"
15895
+ ] }) }),
15896
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
15897
+ Form,
15898
+ {
15899
+ layout: "inline",
15900
+ className: "space-y-4",
15901
+ labelCol: { span: 8 },
15902
+ wrapperCol: { span: 16 },
15903
+ onFinish: taskFormSubmit,
15904
+ autoComplete: "off",
15905
+ children: [
15906
+ TaskFormFields == null ? void 0 : TaskFormFields.map((item) => {
15907
+ var _a2, _b2, _c2;
15908
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
15909
+ Form.Item,
15910
+ {
15911
+ initialValue: ((_a2 = extraInfo == null ? void 0 : extraInfo.form) == null ? void 0 : _a2[item.name]) || void 0,
15912
+ label: item.display,
15913
+ name: item.name,
15914
+ rules: item.required ? [
15915
+ {
15916
+ required: true,
15917
+ message: `${item.type === "str" ? "请输入" : "请选择"}${item.display}`
15918
+ }
15919
+ ] : [],
15920
+ style: {
15921
+ marginTop: item.type === "str" ? "16px" : "12px",
15922
+ width: "320px"
16078
15923
  },
16079
- item.name
16080
- );
16081
- }),
16082
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full flex align-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
16083
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", htmlType: "submit", children: formSubmitTextMap[msg.messageType] }),
16084
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { htmlType: "reset", children: "清空" })
16085
- ] }) })
16086
- ]
16087
- }
16088
- )
16089
- ] })
15924
+ children: item.type === "str" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
15925
+ Input,
15926
+ {
15927
+ placeholder: item.desc || item.display,
15928
+ style: { width: "140px" }
15929
+ }
15930
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
15931
+ Checkbox.Group,
15932
+ {
15933
+ options: item.name === "pathNames" ? ((_b2 = extraInfo == null ? void 0 : extraInfo.form) == null ? void 0 : _b2["pathNames"]) || [] : item.name === "pathOptions" ? ((_c2 = extraInfo == null ? void 0 : extraInfo.form) == null ? void 0 : _c2["pathOptions"].map((item2) => item2.skillName)) || [] : item.options || [],
15934
+ style: { width: "140px" }
15935
+ }
15936
+ )
15937
+ },
15938
+ item.name
15939
+ );
15940
+ }),
15941
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full flex align-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
15942
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", htmlType: "submit", children: formSubmitTextMap[msg.messageType] }),
15943
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { htmlType: "reset", children: "清空" })
15944
+ ] }) })
15945
+ ]
15946
+ }
15947
+ )
15948
+ ] })
15949
+ }
15950
+ ]
15951
+ }
15952
+ ) }),
15953
+ msg.messageType === msgType.LEARN_PATH_TREE && getObjType(extraInfo) === "[object Array]" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4", children: [
15954
+ extraInfo.map((item, index22) => {
15955
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-4", children: [
15956
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-bold mb-2", children: `${index22 + 1}. ${item.name}` }),
15957
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500 mb-2", children: item.desc }),
15958
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
15959
+ Tree,
15960
+ {
15961
+ treeData: item.data,
15962
+ fieldNames: {
15963
+ title: "name",
15964
+ key: "name"
15965
+ },
15966
+ showLine: true
16090
15967
  }
15968
+ )
15969
+ ] }, item.name);
15970
+ }),
15971
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
15972
+ Button,
15973
+ {
15974
+ onClick: () => saveStudyPath == null ? void 0 : saveStudyPath(extraInfo),
15975
+ type: "primary",
15976
+ disabled: studyPathSaving,
15977
+ loading: studyPathSaving,
15978
+ className: "w-full bg-primary-600 mt-2 flex items-center justify-center px-4 py-4 text-white text-sm font-bold shadow-md hover:shadow-lg disabled:opacity-50 disabled:shadow-none transform active:scale-[0.98]",
15979
+ children: [
15980
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4 mr-2" }),
15981
+ "保存路径"
16091
15982
  ]
16092
15983
  }
16093
- ) }),
16094
- msg.messageType === msgType.LEARN_PATH_TREE && getObjType(extraInfo) === "[object Array]" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4", children: [
16095
- extraInfo.map((item, index22) => {
16096
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-4", children: [
16097
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-bold mb-2", children: `${index22 + 1}. ${item.name}` }),
16098
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500 mb-2", children: item.desc }),
16099
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16100
- Tree,
16101
- {
16102
- treeData: item.data,
16103
- fieldNames: {
16104
- title: "name",
16105
- key: "name"
16106
- },
16107
- showLine: true
16108
- }
16109
- )
16110
- ] }, item.name);
16111
- }),
15984
+ )
15985
+ ] }),
15986
+ msg.messageType === msgType.REL_LEARN_PATH && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
15987
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
15988
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.name }),
15989
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
15990
+ "button",
15991
+ {
15992
+ onClick: () => toCheckStudyPath(extraInfo),
15993
+ className: "p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 transition-all opacity-0 group-hover:opacity-100",
15994
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "w-3.5 h-3.5" })
15995
+ }
15996
+ )
15997
+ ] }),
15998
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.desc }),
15999
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16000
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16001
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16002
+ "button",
16003
+ {
16004
+ onClick: () => {
16005
+ const url = `${vgenBaseUrl}/studyMap/${extraInfo.id}`;
16006
+ window.open(url, "_blank");
16007
+ },
16008
+ className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16009
+ children: "进入学习"
16010
+ }
16011
+ )
16012
+ ] })
16013
+ ] }),
16014
+ msg.messageType === msgType.REL_PLAN_TASK && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
16015
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start justify-between mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.name }) }),
16016
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.desc }),
16017
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16018
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16112
16019
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
16113
- Button,
16020
+ "button",
16114
16021
  {
16115
- onClick: () => saveStudyPath == null ? void 0 : saveStudyPath(extraInfo),
16116
- type: "primary",
16117
- disabled: studyPathSaving,
16118
- loading: studyPathSaving,
16119
- className: "w-full bg-primary-600 mt-2 flex items-center justify-center px-4 py-4 text-white text-sm font-bold shadow-md hover:shadow-lg disabled:opacity-50 disabled:shadow-none transform active:scale-[0.98]",
16022
+ onClick: () => {
16023
+ const url = `${vgenBaseUrl}/myStudyPath?planId=${extraInfo.id}`;
16024
+ window.open(url, "_blank");
16025
+ },
16026
+ className: "flex items-center bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16120
16027
  children: [
16121
- /* @__PURE__ */ jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4 mr-2" }),
16122
- "保存路径"
16028
+ "查看计划",
16029
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16123
16030
  ]
16124
16031
  }
16125
16032
  )
16126
- ] }),
16127
- msg.messageType === msgType.REL_LEARN_PATH && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
16128
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
16129
- /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.name }),
16130
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16131
- "button",
16132
- {
16133
- onClick: () => toCheckStudyPath(extraInfo),
16134
- className: "p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 transition-all opacity-0 group-hover:opacity-100",
16135
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "w-3.5 h-3.5" })
16136
- }
16137
- )
16033
+ ] })
16034
+ ] }),
16035
+ msg.messageType === msgType.REL_KNOWLEDGE_CARD && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 max-w-[300px]", children: [
16036
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { title: extraInfo.title, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.title }) }),
16037
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.content, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.content }),
16038
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16039
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16040
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16041
+ "button",
16042
+ {
16043
+ onClick: () => {
16044
+ const url = `${vgenBaseUrl}/knowledgeDetailPage/${extraInfo.knowledgeId}`;
16045
+ window.open(url, "_blank");
16046
+ },
16047
+ className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16048
+ children: "立即查看"
16049
+ }
16050
+ )
16051
+ ] })
16052
+ ] }),
16053
+ msg.messageType === msgType.REL_QUESTION && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 max-w-[300px]", children: [
16054
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { className: "text-[16px] font-bold text-gray-900", children: [
16055
+ "题目批次ID:",
16056
+ extraInfo == null ? void 0 : extraInfo.batchId
16057
+ ] }) }),
16058
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16059
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16060
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
16061
+ "button",
16062
+ {
16063
+ onClick: (e) => {
16064
+ e.stopPropagation();
16065
+ toCheckQuestions == null ? void 0 : toCheckQuestions(extraInfo);
16066
+ },
16067
+ className: "whitespace-nowrap bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16068
+ children: [
16069
+ "去答题 (共",
16070
+ extraInfo.questionCenterIds.length,
16071
+ "题)"
16072
+ ]
16073
+ }
16074
+ )
16075
+ ] })
16076
+ ] }),
16077
+ msg.messageType === msgType.REL_RECORD && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4", children: [
16078
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pt-4 max-w-[300px]", children: [
16079
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 items-start mb-2", children: [
16080
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Video, { className: "w-[44px] h-[26px] text-primary-400" }),
16081
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { title: extraInfo.title, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.title })
16138
16082
  ] }),
16139
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.desc }),
16140
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16141
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16142
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16143
- "button",
16144
- {
16145
- onClick: () => {
16146
- const url = `${vgenBaseUrl}/studyMap/${extraInfo.id}`;
16147
- window.open(url, "_blank");
16148
- },
16149
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16150
- children: "进入学习"
16151
- }
16152
- )
16153
- ] })
16154
- ] }),
16155
- msg.messageType === msgType.REL_PLAN_TASK && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
16156
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start justify-between mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.name }) }),
16157
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.desc }),
16083
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: "点击查看视频分析结果,获取详细的视频内容解析和学习建议。" }),
16158
16084
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16159
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16160
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16161
- "button",
16162
- {
16163
- onClick: () => {
16164
- const url = `${vgenBaseUrl}/myStudyPath?planId=${extraInfo.id}`;
16165
- window.open(url, "_blank");
16166
- },
16167
- className: "flex items-center bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16168
- children: [
16169
- "查看计划",
16170
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16171
- ]
16172
- }
16173
- )
16174
- ] })
16175
- ] }),
16176
- msg.messageType === msgType.REL_KNOWLEDGE_CARD && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 max-w-[300px]", children: [
16177
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { title: extraInfo.title, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.title }) }),
16178
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.content, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.content }),
16179
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16180
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16181
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16182
- "button",
16183
- {
16184
- onClick: () => {
16185
- const url = `${vgenBaseUrl}/knowledgeDetailPage/${extraInfo.knowledgeId}`;
16186
- window.open(url, "_blank");
16187
- },
16188
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16189
- children: "立即查看"
16190
- }
16191
- )
16192
- ] })
16193
- ] }),
16194
- msg.messageType === msgType.REL_QUESTION && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 max-w-[300px]", children: [
16195
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { className: "text-[16px] font-bold text-gray-900", children: [
16196
- "题目批次ID:",
16197
- extraInfo == null ? void 0 : extraInfo.batchId
16198
- ] }) }),
16199
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16200
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16085
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[12px] font-bold text-primary-400 uppercase tracking-wider" }),
16201
16086
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
16202
16087
  "button",
16203
16088
  {
16204
16089
  onClick: (e) => {
16205
16090
  e.stopPropagation();
16206
- toCheckQuestions == null ? void 0 : toCheckQuestions(extraInfo);
16091
+ toCheckVideo == null ? void 0 : toCheckVideo(extraInfo.recordId || extraInfo.id);
16207
16092
  },
16208
- className: "whitespace-nowrap bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16093
+ className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16209
16094
  children: [
16210
- "去答题 (共",
16211
- extraInfo.questionCenterIds.length,
16212
- "题)"
16095
+ "查看视频",
16096
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16213
16097
  ]
16214
16098
  }
16215
16099
  )
16216
16100
  ] })
16217
16101
  ] }),
16218
- msg.messageType === msgType.REL_RECORD && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4", children: [
16219
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pt-4 max-w-[300px]", children: [
16220
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 items-start mb-2", children: [
16221
- /* @__PURE__ */ jsxRuntimeExports.jsx(Video, { className: "w-[44px] h-[26px] text-primary-400" }),
16222
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { title: extraInfo.title, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.title })
16223
- ] }),
16224
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: "点击查看视频分析结果,获取详细的视频内容解析和学习建议。" }),
16225
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16226
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[12px] font-bold text-primary-400 uppercase tracking-wider" }),
16227
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16228
- "button",
16229
- {
16230
- onClick: (e) => {
16231
- e.stopPropagation();
16232
- toCheckVideo == null ? void 0 : toCheckVideo(extraInfo.recordId || extraInfo.id);
16233
- },
16234
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16235
- children: [
16236
- "查看视频",
16237
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16238
- ]
16239
- }
16240
- )
16241
- ] })
16102
+ (recommendVideos == null ? void 0 : recommendVideos.length) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 max-w-[300px] pt-4 border-t border-gray-100", children: [
16103
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
16104
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-1 h-4 bg-gradient-to-b from-primary-400 to-primary-600 rounded-full" }),
16105
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-bold text-gray-800", children: "视频拼命解析中,先来看看这些吧~" })
16242
16106
  ] }),
16243
- (recommendVideos == null ? void 0 : recommendVideos.length) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 max-w-[300px] pt-4 border-t border-gray-100", children: [
16244
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
16245
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-1 h-4 bg-gradient-to-b from-primary-400 to-primary-600 rounded-full" }),
16246
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-bold text-gray-800", children: "视频拼命解析中,先来看看这些吧~" })
16247
- ] }),
16248
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: recommendVideos.map((video) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
16249
- "div",
16250
- {
16251
- className: "flex items-center gap-3 p-2.5 rounded-xl bg-gradient-to-r from-gray-50 to-white hover:from-primary-50 hover:to-primary-50 transition-all duration-200 cursor-pointer group/item border border-gray-100 hover:border-primary-200 hover:shadow-md",
16252
- onClick: (e) => {
16253
- e.stopPropagation();
16254
- recommendVideoSelect(video);
16255
- },
16256
- children: [
16257
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16258
- "img",
16259
- {
16260
- referrerPolicy: "no-referrer",
16261
- className: "w-24 h-16 rounded-lg group-hover/item:scale-105 transition-transform",
16262
- src: video.pic
16263
- }
16264
- ),
16265
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
16266
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { title: video.title, className: "text-sm font-semibold text-gray-900 line-clamp-2 group-hover/item:text-primary-600 transition-colors", children: video.title }),
16267
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
16268
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-500 whitespace-nowrap", children: video.createTime.split(" ")[0] }),
16269
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-300", children: "•" }),
16270
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-gray-500 whitespace-nowrap", children: [
16271
- formatViewCount(video.views),
16272
- "次观看"
16273
- ] })
16274
- ] })
16275
- ] }),
16276
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "opacity-0 group-hover/item:opacity-100 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-4 h-4 text-primary-500" }) })
16277
- ]
16107
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: recommendVideos.map((video) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
16108
+ "div",
16109
+ {
16110
+ className: "flex items-center gap-3 p-2.5 rounded-xl bg-gradient-to-r from-gray-50 to-white hover:from-primary-50 hover:to-primary-50 transition-all duration-200 cursor-pointer group/item border border-gray-100 hover:border-primary-200 hover:shadow-md",
16111
+ onClick: (e) => {
16112
+ e.stopPropagation();
16113
+ recommendVideoSelect(video);
16278
16114
  },
16279
- video.recordId
16280
- )) })
16281
- ] })
16282
- ] }),
16283
- msg.messageType === msgType.REL_LEARN_TASK && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group min-w-[300px] max-w-[400px]", children: [
16284
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
16285
- /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: [
16286
- "任务名称:",
16287
- extraInfo.taskName
16288
- ] }),
16289
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16290
- "button",
16291
- {
16292
- onClick: () => toEditTask(extraInfo),
16293
- className: "p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 transition-all opacity-0 group-hover:opacity-100",
16294
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "w-3.5 h-3.5" })
16295
- }
16296
- )
16297
- ] }),
16298
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: [
16299
- "推送周期:",
16300
- cycleDayFormat(extraInfo.cycleDays || [])
16301
- ] }),
16302
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: [
16303
- "提醒时间:",
16304
- extraInfo.reminderTimeDesc || "无"
16115
+ children: [
16116
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16117
+ "img",
16118
+ {
16119
+ referrerPolicy: "no-referrer",
16120
+ className: "w-24 h-16 rounded-lg group-hover/item:scale-105 transition-transform",
16121
+ src: video.pic
16122
+ }
16123
+ ),
16124
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
16125
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { title: video.title, className: "text-sm font-semibold text-gray-900 line-clamp-2 group-hover/item:text-primary-600 transition-colors", children: video.title }),
16126
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
16127
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-500 whitespace-nowrap", children: video.createTime.split(" ")[0] }),
16128
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-300", children: "•" }),
16129
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-gray-500 whitespace-nowrap", children: [
16130
+ formatViewCount(video.views),
16131
+ "次观看"
16132
+ ] })
16133
+ ] })
16134
+ ] }),
16135
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "opacity-0 group-hover/item:opacity-100 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-4 h-4 text-primary-500" }) })
16136
+ ]
16137
+ },
16138
+ video.recordId
16139
+ )) })
16140
+ ] })
16141
+ ] }),
16142
+ msg.messageType === msgType.REL_LEARN_TASK && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group min-w-[300px] max-w-[400px]", children: [
16143
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
16144
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: [
16145
+ "任务名称:",
16146
+ extraInfo.taskName
16305
16147
  ] }),
16306
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16307
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider", children: [
16308
- "生效时间:",
16309
- extraInfo.effectiveDate
16310
- ] }),
16311
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16312
- "button",
16313
- {
16314
- onClick: () => {
16315
- const url = `${vgenBaseUrl}/taskManagement`;
16316
- window.open(url, "_blank");
16317
- },
16318
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16319
- children: [
16320
- "查看任务",
16321
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16322
- ]
16323
- }
16324
- )
16325
- ] })
16148
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16149
+ "button",
16150
+ {
16151
+ onClick: () => toEditTask(extraInfo),
16152
+ className: "p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 transition-all opacity-0 group-hover:opacity-100",
16153
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "w-3.5 h-3.5" })
16154
+ }
16155
+ )
16326
16156
  ] }),
16327
- msg.messageType === msgType.REL_EVALUATION && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, { spinning: (msg == null ? void 0 : msg.evaStatus) === 10, tip: "题目生成中...", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
16328
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start justify-between mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { title: extraInfo.title, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: [
16329
- "测评方向:",
16330
- extraInfo.title
16331
- ] }) }),
16332
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: [
16333
- "测评等级:",
16334
- extraInfo.level
16157
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: [
16158
+ "推送周期:",
16159
+ cycleDayFormat(extraInfo.cycleDays || [])
16160
+ ] }),
16161
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: [
16162
+ "提醒时间:",
16163
+ extraInfo.reminderTimeDesc || "无"
16164
+ ] }),
16165
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16166
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider", children: [
16167
+ "生效时间:",
16168
+ extraInfo.effectiveDate
16335
16169
  ] }),
16336
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16337
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16338
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16339
- "button",
16340
- {
16341
- onClick: () => toCheckEvaluation(extraInfo),
16342
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16343
- children: [
16344
- "进入测评",
16345
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16346
- ]
16347
- }
16348
- )
16349
- ] })
16350
- ] }) }),
16351
- msg.messageType === msgType.REL_RESOURCE_EDIT && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(
16352
- ResourceEditMsg,
16353
- {
16354
- extraInfo,
16355
- customDiffViewer,
16356
- handleSend
16357
- }
16358
- ),
16359
- msg.messageType === msgType.TASK_TIP && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-2 flex items-center gap-1", children: [
16360
- "学习计划已经定了,明天 ",
16361
- extraInfo == null ? void 0 : extraInfo.reminderTimeDesc,
16362
- " 我叫你接着学,好吗?",
16363
16170
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
16364
- "div",
16171
+ "button",
16365
16172
  {
16366
- className: "whitespace-nowrap text-green-500 cursor-pointer hover:text-green-400 hover:underline text-[11px] flex items-center gap-1 px-2.5 py-0.5 border border-green-500 rounded-full",
16367
16173
  onClick: () => {
16368
- const url = `${vgenBaseUrl}/todayTasks/taskManagement`;
16174
+ const url = `${vgenBaseUrl}/taskManagement`;
16369
16175
  window.open(url, "_blank");
16370
16176
  },
16177
+ className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16371
16178
  children: [
16372
- "已经在日程里了",
16373
- /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "w-3.5 h-3.5" })
16179
+ "查看任务",
16180
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16374
16181
  ]
16375
16182
  }
16376
16183
  )
16184
+ ] })
16185
+ ] }),
16186
+ msg.messageType === msgType.REL_EVALUATION && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, { spinning: (msg == null ? void 0 : msg.evaStatus) === 10, tip: "题目生成中...", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
16187
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start justify-between mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { title: extraInfo.title, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: [
16188
+ "测评方向:",
16189
+ extraInfo.title
16190
+ ] }) }),
16191
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: [
16192
+ "测评等级:",
16193
+ extraInfo.level
16377
16194
  ] }),
16378
- msg.messageType === msgType.TASK_EDIT && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageEditTask$1, { extraInfo })
16379
- ]
16380
- }
16381
- ),
16382
- msg.role === "ai" && msg.messageType === msgType.TEXT && typeof msg.content === "string" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 px-1", children: [
16383
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16384
- "button",
16385
- {
16386
- onClick: () => copyText(msg.content),
16387
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16388
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "w-3.5 h-3.5" })
16389
- }
16390
- ),
16391
- !isTaskPage && /* @__PURE__ */ jsxRuntimeExports.jsx(
16392
- Dropdown,
16393
- {
16394
- menu: {
16395
- items: [
16195
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16196
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16197
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
16198
+ "button",
16396
16199
  {
16397
- key: "convert-to-knowledge",
16398
- label: "转化为知识点",
16399
- onClick: () => {
16400
- sesseionTransformKnowledge(msg.content);
16401
- }
16200
+ onClick: () => toCheckEvaluation(extraInfo),
16201
+ className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16202
+ children: [
16203
+ "进入测评",
16204
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16205
+ ]
16402
16206
  }
16403
- ]
16404
- },
16405
- trigger: ["hover"],
16406
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16407
- "button",
16408
- {
16409
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16410
- onClick: (e) => {
16411
- e.stopPropagation();
16412
- },
16413
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Wand2, { className: "w-3.5 h-3.5" })
16414
- }
16415
- )
16416
- }
16417
- )
16418
- ] }),
16419
- msg.role === "user" && msg.messageType === msgType.TEXT && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full flex items-center justify-end gap-2 px-1", children: [
16420
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16421
- "button",
16422
- {
16423
- onClick: () => copyText(msg.content),
16424
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16425
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "w-3.5 h-3.5" })
16426
- }
16427
- ),
16428
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "重新发送", placement: "bottom", arrow: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16429
- "button",
16430
- {
16431
- onClick: () => {
16432
- handleSend({ input: msg.content });
16433
- },
16434
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16435
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCcw, { className: "w-3.5 h-3.5" })
16436
- }
16437
- ) })
16438
- ] }),
16439
- ((_b = extraInfo == null ? void 0 : extraInfo.buttonList) == null ? void 0 : _b.length) && isLast ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full max-w-2xl mb-2 flex gap-4", children: extraInfo == null ? void 0 : extraInfo.buttonList.map((item, index22) => {
16440
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
16441
- motion.div,
16442
- {
16443
- initial: { opacity: 0, x: -20 },
16444
- animate: { opacity: 1, x: 0 },
16445
- transition: { delay: index22 * 0.1, duration: 0.4 },
16446
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16447
- "button",
16448
- {
16449
- onClick: () => {
16450
- if (item.action === "sendTopic") {
16451
- handleSend({ input: item.topic });
16452
- }
16453
- },
16454
- className: "w-full group/recommend flex items-center justify-between px-4 py-2 bg-white/80 backdrop-blur-sm border border-slate-100 rounded-xl hover:border-primary-200 hover:bg-primary-50/30 transition-all duration-300 text-left shadow-sm hover:shadow-md",
16455
- children: item.topic
16456
- }
16457
- )
16458
- },
16459
- item.topic + index22
16460
- );
16461
- }) }) : null,
16462
- ((_c = extraInfo == null ? void 0 : extraInfo.recommendList) == null ? void 0 : _c.length) && isLast ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full max-w-2xl mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3", children: extraInfo == null ? void 0 : extraInfo.recommendList.map((item, index22) => {
16463
- var _a2, _b2;
16464
- const Icon = sceneIconMap[item.scene];
16465
- const wholeTip = ((_a2 = sceneTipFixMap == null ? void 0 : sceneTipFixMap[item.scene]) == null ? void 0 : _a2.pre) + "《" + item.topic + "》" + ((_b2 = sceneTipFixMap == null ? void 0 : sceneTipFixMap[item.scene]) == null ? void 0 : _b2.after);
16466
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
16467
- motion.div,
16468
- {
16469
- initial: { opacity: 0, x: -20 },
16470
- animate: { opacity: 1, x: 0 },
16471
- transition: { delay: index22 * 0.1, duration: 0.4 },
16472
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
16473
- "button",
16207
+ )
16208
+ ] })
16209
+ ] }) }),
16210
+ msg.messageType === msgType.REL_RESOURCE_EDIT && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(
16211
+ ResourceEditMsg,
16212
+ {
16213
+ extraInfo,
16214
+ customDiffViewer,
16215
+ handleSend
16216
+ }
16217
+ ),
16218
+ msg.messageType === msgType.TASK_TIP && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-2 flex items-center gap-1", children: [
16219
+ "学习计划已经定了,明天 ",
16220
+ extraInfo == null ? void 0 : extraInfo.reminderTimeDesc,
16221
+ " 我叫你接着学,好吗?",
16222
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
16223
+ "div",
16474
16224
  {
16225
+ className: "whitespace-nowrap text-green-500 cursor-pointer hover:text-green-400 hover:underline text-[11px] flex items-center gap-1 px-2.5 py-0.5 border border-green-500 rounded-full",
16475
16226
  onClick: () => {
16476
- handleSend({ input: wholeTip, scene: item.scene });
16227
+ const url = `${vgenBaseUrl}/todayTasks/taskManagement`;
16228
+ window.open(url, "_blank");
16477
16229
  },
16478
- className: "w-full group/recommend flex items-center justify-between p-4 bg-white/80 backdrop-blur-sm border border-slate-100 rounded-xl hover:border-primary-200 hover:bg-primary-50/30 transition-all duration-300 text-left shadow-sm hover:shadow-md",
16479
16230
  children: [
16480
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
16481
- Icon && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm px-2 py-1.5 flex items-center gap-1 transition-colors rounded-md bg-primary/10 text-primary border border-primary/20", children: [
16482
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { className: `${sceneIconColorMap[item.scene]} w-5 h-5` }),
16483
- sceneTitleMap[item.scene]
16484
- ] }),
16485
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { title: item.topic, className: "flex-1 text-[15px] text-slate-700 font-medium group-hover/recommend:text-primary-600 transition-colors line-clamp-1", children: wholeTip })
16486
- ] }),
16487
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRightOutlined, { className: "text-slate-300 group-hover/recommend:text-primary-400 opacity-100 group-hover/recommend:opacity-100 -translate-x-2 group-hover/recommend:translate-x-0 transition-all" })
16231
+ "已经在日程里了",
16232
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "w-3.5 h-3.5" })
16488
16233
  ]
16489
16234
  }
16490
16235
  )
16491
- },
16492
- item.topic + index22
16493
- );
16494
- }) }) }) : null,
16495
- msg.role === "ai" && msg.messageType === msgType.TASK_TIP ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 px-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
16236
+ ] }),
16237
+ msg.messageType === msgType.TASK_EDIT && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageEditTask$1, { extraInfo })
16238
+ ]
16239
+ }
16240
+ ),
16241
+ msg.role === "ai" && msg.messageType === msgType.TEXT && typeof msg.content === "string" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 px-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16242
+ "button",
16243
+ {
16244
+ onClick: () => copyText(msg.content),
16245
+ className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16246
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "w-3.5 h-3.5" })
16247
+ }
16248
+ ) }),
16249
+ msg.role === "user" && msg.messageType === msgType.TEXT && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full flex items-center justify-end gap-2 px-1", children: [
16250
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16496
16251
  "button",
16497
16252
  {
16498
- onClick: () => sendChangeTimeMsg(extraInfo),
16499
- className: "flex items-center p-1.5 gap-1 text-[12px] text-gray-500 italic hover:text-gray-600 transition-colors",
16500
- children: [
16501
- /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCcw, { className: "w-3 h-3" }),
16502
- "改个时间"
16503
- ]
16253
+ onClick: () => copyText(msg.content),
16254
+ className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16255
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "w-3.5 h-3.5" })
16504
16256
  }
16505
- ) }) : null
16506
- ]
16507
- }
16508
- )
16509
- ]
16257
+ ),
16258
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "重新发送", placement: "bottom", arrow: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16259
+ "button",
16260
+ {
16261
+ onClick: () => {
16262
+ handleSend({ input: msg.content });
16263
+ },
16264
+ className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16265
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCcw, { className: "w-3.5 h-3.5" })
16266
+ }
16267
+ ) })
16268
+ ] }),
16269
+ ((_b = extraInfo == null ? void 0 : extraInfo.buttonList) == null ? void 0 : _b.length) && isLast ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full max-w-2xl mb-2 flex gap-4", children: extraInfo == null ? void 0 : extraInfo.buttonList.map((item, index22) => {
16270
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
16271
+ motion.div,
16272
+ {
16273
+ initial: { opacity: 0, x: -20 },
16274
+ animate: { opacity: 1, x: 0 },
16275
+ transition: { delay: index22 * 0.1, duration: 0.4 },
16276
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16277
+ "button",
16278
+ {
16279
+ onClick: () => {
16280
+ if (item.action === "sendTopic") {
16281
+ handleSend({ input: item.topic });
16282
+ }
16283
+ },
16284
+ className: "w-full group/recommend flex items-center justify-between px-4 py-2 bg-white/80 backdrop-blur-sm border border-slate-100 rounded-xl hover:border-primary-200 hover:bg-primary-50/30 transition-all duration-300 text-left shadow-sm hover:shadow-md",
16285
+ children: item.topic
16286
+ }
16287
+ )
16288
+ },
16289
+ item.topic + index22
16290
+ );
16291
+ }) }) : null,
16292
+ ((_c = extraInfo == null ? void 0 : extraInfo.recommendList) == null ? void 0 : _c.length) && isLast ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full max-w-2xl mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3", children: extraInfo == null ? void 0 : extraInfo.recommendList.map((item, index22) => {
16293
+ var _a2, _b2;
16294
+ const Icon = sceneIconMap[item.scene];
16295
+ const wholeTip = ((_a2 = sceneTipFixMap == null ? void 0 : sceneTipFixMap[item.scene]) == null ? void 0 : _a2.pre) + "《" + item.topic + "》" + ((_b2 = sceneTipFixMap == null ? void 0 : sceneTipFixMap[item.scene]) == null ? void 0 : _b2.after);
16296
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
16297
+ motion.div,
16298
+ {
16299
+ initial: { opacity: 0, x: -20 },
16300
+ animate: { opacity: 1, x: 0 },
16301
+ transition: { delay: index22 * 0.1, duration: 0.4 },
16302
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
16303
+ "button",
16304
+ {
16305
+ onClick: () => {
16306
+ handleSend({ input: wholeTip, scene: item.scene });
16307
+ },
16308
+ className: "w-full group/recommend flex items-center justify-between p-4 bg-white/80 backdrop-blur-sm border border-slate-100 rounded-xl hover:border-primary-200 hover:bg-primary-50/30 transition-all duration-300 text-left shadow-sm hover:shadow-md",
16309
+ children: [
16310
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
16311
+ Icon && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm px-2 py-1.5 flex items-center gap-1 transition-colors rounded-md bg-primary/10 text-primary border border-primary/20", children: [
16312
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { className: `${sceneIconColorMap[item.scene]} w-5 h-5` }),
16313
+ sceneTitleMap[item.scene]
16314
+ ] }),
16315
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { title: item.topic, className: "flex-1 text-[15px] text-slate-700 font-medium group-hover/recommend:text-primary-600 transition-colors line-clamp-1", children: wholeTip })
16316
+ ] }),
16317
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRightOutlined, { className: "text-slate-300 group-hover/recommend:text-primary-400 opacity-100 group-hover/recommend:opacity-100 -translate-x-2 group-hover/recommend:translate-x-0 transition-all" })
16318
+ ]
16319
+ }
16320
+ )
16321
+ },
16322
+ item.topic + index22
16323
+ );
16324
+ }) }) }) : null,
16325
+ msg.role === "ai" && msg.messageType === msgType.TASK_TIP ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 px-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
16326
+ "button",
16327
+ {
16328
+ onClick: () => sendChangeTimeMsg(extraInfo),
16329
+ className: "flex items-center p-1.5 gap-1 text-[12px] text-gray-500 italic hover:text-gray-600 transition-colors",
16330
+ children: [
16331
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCcw, { className: "w-3 h-3" }),
16332
+ "改个时间"
16333
+ ]
16334
+ }
16335
+ ) }) : null
16336
+ ]
16337
+ }
16338
+ )
16510
16339
  },
16511
16340
  msg.id
16512
16341
  );
@@ -18495,7 +18324,8 @@ const BottomChatDock = (props) => {
18495
18324
  isDev,
18496
18325
  quote,
18497
18326
  onClearQuote,
18498
- customDiffViewer
18327
+ customDiffViewer,
18328
+ onSwitchLayout
18499
18329
  } = props;
18500
18330
  const [input, setInput] = useState("");
18501
18331
  const scrollRef = useRef(null);
@@ -18548,6 +18378,18 @@ const BottomChatDock = (props) => {
18548
18378
  children: [
18549
18379
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-9 w-9 shrink-0 overflow-hidden rounded-full ring-1 ring-primary/15", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: COOKIE_AVATAR, alt: "", className: "h-full w-full object-cover" }) }),
18550
18380
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "block text-[13px] font-black text-slate-800", children: open ? "饼干" : dockHint(state) }) }),
18381
+ onSwitchLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18382
+ Segmented,
18383
+ {
18384
+ size: "small",
18385
+ value: "float",
18386
+ onChange: (v) => onSwitchLayout(v),
18387
+ options: [
18388
+ { label: "悬浮窗", value: "float" },
18389
+ { label: "左侧固定", value: "inline" }
18390
+ ]
18391
+ }
18392
+ ) }),
18551
18393
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 transition-colors group-hover:bg-slate-200", children: open ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronUp, { className: "h-4 w-4" }) })
18552
18394
  ]
18553
18395
  }
@@ -18705,7 +18547,8 @@ const BottomChatPanel = (props) => {
18705
18547
  width = 320,
18706
18548
  collapsible = true,
18707
18549
  resizable = true,
18708
- onWidthChange
18550
+ onWidthChange,
18551
+ onSwitchLayout
18709
18552
  } = props;
18710
18553
  const expandedOpen = collapsible ? open : true;
18711
18554
  const [dragWidth, setDragWidth] = useState(null);
@@ -18797,7 +18640,20 @@ const BottomChatPanel = (props) => {
18797
18640
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: panelWidth }, className: "flex h-full flex-col", children: [
18798
18641
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex shrink-0 items-center gap-2.5 px-3.5 py-3", children: [
18799
18642
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-9 w-9 shrink-0 overflow-hidden rounded-full ring-1 ring-primary/15", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: COOKIE_AVATAR, alt: "", className: "h-full w-full object-cover" }) }),
18800
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1 truncate text-[13px] font-black text-slate-800", children: "饼干 · AI 学伴" }),
18643
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1 truncate text-[13px] font-black text-slate-800", children: "饼干" }),
18644
+ onSwitchLayout && /* @__PURE__ */ jsxRuntimeExports.jsx(
18645
+ Segmented,
18646
+ {
18647
+ size: "small",
18648
+ className: "shrink-0",
18649
+ value: "inline",
18650
+ onChange: (v) => onSwitchLayout(v),
18651
+ options: [
18652
+ { label: "悬浮窗", value: "float" },
18653
+ { label: "左侧固定", value: "inline" }
18654
+ ]
18655
+ }
18656
+ ),
18801
18657
  collapsible && /* @__PURE__ */ jsxRuntimeExports.jsx(
18802
18658
  "button",
18803
18659
  {
@@ -18997,6 +18853,8 @@ const VgenAgent = forwardRef((props, ref) => {
18997
18853
  dockInitOpen = false,
18998
18854
  /* 底部 dock 形态:float(缺省)= 悬浮浮窗原形态不变;inline = 左侧固定面板(追加形态) */
18999
18855
  dockLayout = "float",
18856
+ /* dock 形态切换回调(由 AI 学伴内右上角切换按钮触发) */
18857
+ onDockLayoutChange,
19000
18858
  /* inline 左侧固定面板展开态列宽(透传 BottomChatPanel width) */
19001
18859
  dockPanelWidth = 320,
19002
18860
  quoteTarget,
@@ -19739,7 +19597,8 @@ const VgenAgent = forwardRef((props, ref) => {
19739
19597
  ctaEnabled: !!onDockCta,
19740
19598
  onAccept: handleDockAccept,
19741
19599
  onReject: handleDockReject,
19742
- onResume: handleDockResume
19600
+ onResume: handleDockResume,
19601
+ onSwitchLayout: onDockLayoutChange
19743
19602
  }
19744
19603
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
19745
19604
  BottomChatDock,
@@ -19759,6 +19618,7 @@ const VgenAgent = forwardRef((props, ref) => {
19759
19618
  onAccept: handleDockAccept,
19760
19619
  onReject: handleDockReject,
19761
19620
  onResume: handleDockResume,
19621
+ onSwitchLayout: onDockLayoutChange,
19762
19622
  quote: controller.dockQuotedText,
19763
19623
  onClearQuote: () => controller.setDockQuotedText(null),
19764
19624
  customDiffViewer