@oscloudlab/vgen-agent-assistant 0.0.20 → 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
  };
@@ -15793,25 +15731,13 @@ const MessageContent = (props) => {
15793
15731
  const [sessionToKnowledgeModalVisible, setSessionToKnowledgeModalVisible] = useState(false);
15794
15732
  const [sessionToKnowledgeLoading, setSessionToKnowledgeLoading] = useState(false);
15795
15733
  const [sessionToKnowledgeLoadingText, setSessionToKnowledgeLoadingText] = useState("");
15796
- const transfromTextRef = useRef("");
15734
+ useRef("");
15797
15735
  const transfromTextController = useRef("");
15798
15736
  const transformFinishKnowledgeId = useRef("");
15799
15737
  const [messagesHere, setMessagesHere] = useState([]);
15800
15738
  useEffect(() => {
15801
15739
  setMessagesHere(messages);
15802
15740
  }, [messages]);
15803
- const toGetTraceId = async () => {
15804
- const extraObj = {
15805
- sessionId: "-1",
15806
- enableSearch: false
15807
- };
15808
- const traceRes = await getTraceId({
15809
- app: "vgen-web",
15810
- btype: "button-event",
15811
- extra: JSON.stringify(extraObj)
15812
- });
15813
- return (traceRes == null ? void 0 : traceRes.data) || "";
15814
- };
15815
15741
  const sendChangeTimeMsg = (extraInfo) => {
15816
15742
  saveMsg == null ? void 0 : saveMsg({
15817
15743
  content: "",
@@ -15823,76 +15749,6 @@ const MessageContent = (props) => {
15823
15749
  })
15824
15750
  });
15825
15751
  };
15826
- const sesseionTransformKnowledge = async (content2) => {
15827
- var _a, _b;
15828
- setSessionToKnowledgeModalVisible(true);
15829
- setSessionToKnowledgeLoading(true);
15830
- transfromTextController.current && ((_a = transfromTextController.current) == null ? void 0 : _a.close());
15831
- transformFinishKnowledgeId.current = "";
15832
- transfromTextRef.current = content2;
15833
- try {
15834
- const systemText = "<session>" + textToBase64(content2) + "</session>";
15835
- const params = {
15836
- system: systemText,
15837
- // 上下文
15838
- message: `将该会话转化成知识点`
15839
- };
15840
- message.warning("开始生成知识点,请稍后...");
15841
- const traceId = await toGetTraceId();
15842
- const controller = chatSseSaas(
15843
- {
15844
- sessionId: "-1"
15845
- },
15846
- {
15847
- ...params
15848
- },
15849
- {
15850
- onProgress: (message2) => {
15851
- setSessionToKnowledgeLoadingText(message2);
15852
- },
15853
- onError: (error) => {
15854
- console.error("ai回答发生错误:", error);
15855
- setSessionToKnowledgeLoading(false);
15856
- setSessionToKnowledgeLoadingText("");
15857
- },
15858
- onComplete: ({ sessionKnowledgeData }) => {
15859
- var _a2;
15860
- setSessionToKnowledgeLoading(false);
15861
- try {
15862
- const data = tryParseJSON(sessionKnowledgeData || "");
15863
- if (data == null ? void 0 : data.content) {
15864
- const params2 = {
15865
- btype: 1,
15866
- // knowledgeList: [data],
15867
- data: encryptData([data])
15868
- };
15869
- saveKnowledges(params2).then((res) => {
15870
- var _a3, _b2;
15871
- const list2 = (res == null ? void 0 : res.knowledgeList) || [];
15872
- if ((_a3 = list2[0]) == null ? void 0 : _a3.knowledgeId) {
15873
- transformFinishKnowledgeId.current = (_b2 = list2[0]) == null ? void 0 : _b2.knowledgeId;
15874
- }
15875
- });
15876
- }
15877
- } catch (error) {
15878
- console.error("解析知识点代码发生错误:", error);
15879
- setSessionToKnowledgeModalVisible(false);
15880
- setSessionToKnowledgeLoading(false);
15881
- transfromTextController.current && ((_a2 = transfromTextController.current) == null ? void 0 : _a2.close());
15882
- }
15883
- }
15884
- },
15885
- traceId
15886
- );
15887
- transfromTextController.current = controller;
15888
- } catch (error) {
15889
- console.error("知识点转化失败:", error);
15890
- message.error(error.message || "知识点转化失败");
15891
- setSessionToKnowledgeModalVisible(false);
15892
- setSessionToKnowledgeLoading(false);
15893
- transfromTextController.current && ((_b = transfromTextController.current) == null ? void 0 : _b.close());
15894
- }
15895
- };
15896
15752
  useEffect(() => {
15897
15753
  var _a;
15898
15754
  if (!sessionToKnowledgeModalVisible) {
@@ -15978,7 +15834,7 @@ const MessageContent = (props) => {
15978
15834
  return null;
15979
15835
  }
15980
15836
  const isLast = index2 === messagesHere.length - 1;
15981
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
15837
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
15982
15838
  motion.div,
15983
15839
  {
15984
15840
  initial: { opacity: 0, y: 10 },
@@ -15987,540 +15843,499 @@ const MessageContent = (props) => {
15987
15843
  "flex gap-2",
15988
15844
  msg.role === "user" ? "flex-row-reverse" : "flex-row"
15989
15845
  ),
15990
- children: [
15991
- /* @__PURE__ */ jsxRuntimeExports.jsx(
15992
- "div",
15993
- {
15994
- className: cn(
15995
- "w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 shadow-sm",
15996
- msg.role === "user" ? "text-white" : "bg-primary-200 border border-gray-100"
15997
- ),
15998
- 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" })
15999
- }
16000
- ),
16001
- thinkContent && !answerIsDone && isLast ? /* @__PURE__ */ jsxRuntimeExports.jsx(
16002
- ThinkingContent,
16003
- {
16004
- thinkContent,
16005
- answerIsDone,
16006
- isLast,
16007
- recommendScene,
16008
- cookieConsume,
16009
- progress
16010
- }
16011
- ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
16012
- "div",
16013
- {
16014
- className: cn(
16015
- "flex flex-col gap-2 max-w-[85%] group mt-1",
16016
- msg.role === "user" ? "items-end" : "items-start",
16017
- msg.role === "ai" && msg.messageType !== msgType.TEXT ? "mb-4" : ""
16018
- ),
16019
- children: [
16020
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16021
- "div",
16022
- {
16023
- className: cn(
16024
- "w-full px-4 rounded-[24px] text-[13px] leading-relaxed shadow-sm",
16025
- msg.role === "user" ? "bg-primary-600 text-white rounded-tr-none" : "bg-white text-gray-800 border border-gray-100 rounded-tl-none"
16026
- ),
16027
- children: [
16028
- msg.messageType === msgType.NODE && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-1 py-2 whitespace-pre-wrap break-words", children: msg.content }),
16029
- (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,
16030
- 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 ? "视频解析请求" : "视频推荐" }),
16031
- 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(
16032
- BiliRecommend$1,
16033
- {
16034
- searchKey: extraInfo.form.searchKey,
16035
- selectCallback: handleSelectSearchResult
16036
- }
16037
- ) }),
16038
- msg.messageType === msgType.FROM_LEARN_TASK && (extraInfo == null ? void 0 : extraInfo.form) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "my-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16039
- Collapse,
16040
- {
16041
- defaultActiveKey: extraInfo.needClarify === true ? [msg.id] : [],
16042
- items: [
16043
- {
16044
- key: msg.id,
16045
- label: "创建任务信息确认",
16046
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white", children: [
16047
- /* @__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: [
16048
- /* @__PURE__ */ jsxRuntimeExports.jsx(User, { className: "h-4 w-4 mr-2 text-primary" }),
16049
- "定制你的专属任务"
16050
- ] }) }),
16051
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16052
- Form,
16053
- {
16054
- layout: "inline",
16055
- className: "space-y-4",
16056
- labelCol: { span: 8 },
16057
- wrapperCol: { span: 16 },
16058
- onFinish: taskFormSubmit,
16059
- autoComplete: "off",
16060
- children: [
16061
- TaskFormFields == null ? void 0 : TaskFormFields.map((item) => {
16062
- var _a2, _b2, _c2;
16063
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
16064
- Form.Item,
16065
- {
16066
- initialValue: ((_a2 = extraInfo == null ? void 0 : extraInfo.form) == null ? void 0 : _a2[item.name]) || void 0,
16067
- label: item.display,
16068
- name: item.name,
16069
- rules: item.required ? [
16070
- {
16071
- required: true,
16072
- message: `${item.type === "str" ? "请输入" : "请选择"}${item.display}`
16073
- }
16074
- ] : [],
16075
- style: {
16076
- marginTop: item.type === "str" ? "16px" : "12px",
16077
- width: "320px"
16078
- },
16079
- children: item.type === "str" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
16080
- Input,
16081
- {
16082
- placeholder: item.desc || item.display,
16083
- style: { width: "140px" }
16084
- }
16085
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
16086
- Checkbox.Group,
16087
- {
16088
- 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 || [],
16089
- style: { width: "140px" }
16090
- }
16091
- )
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"
16092
15923
  },
16093
- item.name
16094
- );
16095
- }),
16096
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full flex align-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
16097
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", htmlType: "submit", children: formSubmitTextMap[msg.messageType] }),
16098
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { htmlType: "reset", children: "清空" })
16099
- ] }) })
16100
- ]
16101
- }
16102
- )
16103
- ] })
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
16104
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
+ "保存路径"
16105
15982
  ]
16106
15983
  }
16107
- ) }),
16108
- msg.messageType === msgType.LEARN_PATH_TREE && getObjType(extraInfo) === "[object Array]" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4", children: [
16109
- extraInfo.map((item, index22) => {
16110
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-4", children: [
16111
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-bold mb-2", children: `${index22 + 1}. ${item.name}` }),
16112
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500 mb-2", children: item.desc }),
16113
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16114
- Tree,
16115
- {
16116
- treeData: item.data,
16117
- fieldNames: {
16118
- title: "name",
16119
- key: "name"
16120
- },
16121
- showLine: true
16122
- }
16123
- )
16124
- ] }, item.name);
16125
- }),
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" }),
16126
16019
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
16127
- Button,
16020
+ "button",
16128
16021
  {
16129
- onClick: () => saveStudyPath == null ? void 0 : saveStudyPath(extraInfo),
16130
- type: "primary",
16131
- disabled: studyPathSaving,
16132
- loading: studyPathSaving,
16133
- 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",
16134
16027
  children: [
16135
- /* @__PURE__ */ jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4 mr-2" }),
16136
- "保存路径"
16028
+ "查看计划",
16029
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16137
16030
  ]
16138
16031
  }
16139
16032
  )
16140
- ] }),
16141
- msg.messageType === msgType.REL_LEARN_PATH && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
16142
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
16143
- /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.name }),
16144
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16145
- "button",
16146
- {
16147
- onClick: () => toCheckStudyPath(extraInfo),
16148
- className: "p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 transition-all opacity-0 group-hover:opacity-100",
16149
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "w-3.5 h-3.5" })
16150
- }
16151
- )
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 })
16152
16082
  ] }),
16153
- /* @__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: "点击查看视频分析结果,获取详细的视频内容解析和学习建议。" }),
16154
16084
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16155
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16156
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16157
- "button",
16158
- {
16159
- onClick: () => {
16160
- const url = `${vgenBaseUrl}/studyMap/${extraInfo.id}`;
16161
- window.open(url, "_blank");
16162
- },
16163
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16164
- children: "进入学习"
16165
- }
16166
- )
16167
- ] })
16168
- ] }),
16169
- msg.messageType === msgType.REL_PLAN_TASK && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group max-w-[300px]", children: [
16170
- /* @__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 }) }),
16171
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.desc }),
16172
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16173
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16174
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16175
- "button",
16176
- {
16177
- onClick: () => {
16178
- const url = `${vgenBaseUrl}/myStudyPath?planId=${extraInfo.id}`;
16179
- window.open(url, "_blank");
16180
- },
16181
- 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",
16182
- children: [
16183
- "查看计划",
16184
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16185
- ]
16186
- }
16187
- )
16188
- ] })
16189
- ] }),
16190
- msg.messageType === msgType.REL_KNOWLEDGE_CARD && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 max-w-[300px]", children: [
16191
- /* @__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 }) }),
16192
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { title: extraInfo.content, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: extraInfo.content }),
16193
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16194
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16195
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16196
- "button",
16197
- {
16198
- onClick: () => {
16199
- const url = `${vgenBaseUrl}/knowledgeDetailPage/${extraInfo.knowledgeId}`;
16200
- window.open(url, "_blank");
16201
- },
16202
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16203
- children: "立即查看"
16204
- }
16205
- )
16206
- ] })
16207
- ] }),
16208
- msg.messageType === msgType.REL_QUESTION && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 max-w-[300px]", children: [
16209
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { className: "text-[16px] font-bold text-gray-900", children: [
16210
- "题目批次ID:",
16211
- extraInfo == null ? void 0 : extraInfo.batchId
16212
- ] }) }),
16213
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16214
- /* @__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" }),
16215
16086
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
16216
16087
  "button",
16217
16088
  {
16218
16089
  onClick: (e) => {
16219
16090
  e.stopPropagation();
16220
- toCheckQuestions == null ? void 0 : toCheckQuestions(extraInfo);
16091
+ toCheckVideo == null ? void 0 : toCheckVideo(extraInfo.recordId || extraInfo.id);
16221
16092
  },
16222
- 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",
16223
16094
  children: [
16224
- "去答题 (共",
16225
- extraInfo.questionCenterIds.length,
16226
- "题)"
16095
+ "查看视频",
16096
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16227
16097
  ]
16228
16098
  }
16229
16099
  )
16230
16100
  ] })
16231
16101
  ] }),
16232
- msg.messageType === msgType.REL_RECORD && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4", children: [
16233
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pt-4 max-w-[300px]", children: [
16234
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 items-start mb-2", children: [
16235
- /* @__PURE__ */ jsxRuntimeExports.jsx(Video, { className: "w-[44px] h-[26px] text-primary-400" }),
16236
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { title: extraInfo.title, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: extraInfo.title })
16237
- ] }),
16238
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: "点击查看视频分析结果,获取详细的视频内容解析和学习建议。" }),
16239
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16240
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[12px] font-bold text-primary-400 uppercase tracking-wider" }),
16241
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16242
- "button",
16243
- {
16244
- onClick: (e) => {
16245
- e.stopPropagation();
16246
- toCheckVideo == null ? void 0 : toCheckVideo(extraInfo.recordId || extraInfo.id);
16247
- },
16248
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16249
- children: [
16250
- "查看视频",
16251
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16252
- ]
16253
- }
16254
- )
16255
- ] })
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: "视频拼命解析中,先来看看这些吧~" })
16256
16106
  ] }),
16257
- (recommendVideos == null ? void 0 : recommendVideos.length) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 max-w-[300px] pt-4 border-t border-gray-100", children: [
16258
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
16259
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-1 h-4 bg-gradient-to-b from-primary-400 to-primary-600 rounded-full" }),
16260
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-bold text-gray-800", children: "视频拼命解析中,先来看看这些吧~" })
16261
- ] }),
16262
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: recommendVideos.map((video) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
16263
- "div",
16264
- {
16265
- 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",
16266
- onClick: (e) => {
16267
- e.stopPropagation();
16268
- recommendVideoSelect(video);
16269
- },
16270
- children: [
16271
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16272
- "img",
16273
- {
16274
- referrerPolicy: "no-referrer",
16275
- className: "w-24 h-16 rounded-lg group-hover/item:scale-105 transition-transform",
16276
- src: video.pic
16277
- }
16278
- ),
16279
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
16280
- /* @__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 }),
16281
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
16282
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-500 whitespace-nowrap", children: video.createTime.split(" ")[0] }),
16283
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-300", children: "•" }),
16284
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-gray-500 whitespace-nowrap", children: [
16285
- formatViewCount(video.views),
16286
- "次观看"
16287
- ] })
16288
- ] })
16289
- ] }),
16290
- /* @__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" }) })
16291
- ]
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);
16292
16114
  },
16293
- video.recordId
16294
- )) })
16295
- ] })
16296
- ] }),
16297
- msg.messageType === msgType.REL_LEARN_TASK && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-4 group min-w-[300px] max-w-[400px]", children: [
16298
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
16299
- /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { title: extraInfo.name, className: "text-[16px] font-bold text-gray-900 line-clamp-1", children: [
16300
- "任务名称:",
16301
- extraInfo.taskName
16302
- ] }),
16303
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16304
- "button",
16305
- {
16306
- onClick: () => toEditTask(extraInfo),
16307
- className: "p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 transition-all opacity-0 group-hover:opacity-100",
16308
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "w-3.5 h-3.5" })
16309
- }
16310
- )
16311
- ] }),
16312
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: [
16313
- "推送周期:",
16314
- cycleDayFormat(extraInfo.cycleDays || [])
16315
- ] }),
16316
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-2 leading-relaxed line-clamp-3", children: [
16317
- "提醒时间:",
16318
- 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
16319
16147
  ] }),
16320
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16321
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider", children: [
16322
- "生效时间:",
16323
- extraInfo.effectiveDate
16324
- ] }),
16325
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16326
- "button",
16327
- {
16328
- onClick: () => {
16329
- const url = `${vgenBaseUrl}/taskManagement`;
16330
- window.open(url, "_blank");
16331
- },
16332
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16333
- children: [
16334
- "查看任务",
16335
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16336
- ]
16337
- }
16338
- )
16339
- ] })
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
+ )
16340
16156
  ] }),
16341
- 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: [
16342
- /* @__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: [
16343
- "测评方向:",
16344
- extraInfo.title
16345
- ] }) }),
16346
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { title: extraInfo.desc, className: "text-sm text-gray-500 mb-6 leading-relaxed line-clamp-3", children: [
16347
- "测评等级:",
16348
- 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
16349
16169
  ] }),
16350
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-50", children: [
16351
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-bold text-gray-400 uppercase tracking-wider" }),
16352
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
16353
- "button",
16354
- {
16355
- onClick: () => toCheckEvaluation(extraInfo),
16356
- className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16357
- children: [
16358
- "进入测评",
16359
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16360
- ]
16361
- }
16362
- )
16363
- ] })
16364
- ] }) }),
16365
- msg.messageType === msgType.REL_RESOURCE_EDIT && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(
16366
- ResourceEditMsg,
16367
- {
16368
- extraInfo,
16369
- customDiffViewer,
16370
- handleSend
16371
- }
16372
- ),
16373
- msg.messageType === msgType.TASK_TIP && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-2 flex items-center gap-1", children: [
16374
- "学习计划已经定了,明天 ",
16375
- extraInfo == null ? void 0 : extraInfo.reminderTimeDesc,
16376
- " 我叫你接着学,好吗?",
16377
16170
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
16378
- "div",
16171
+ "button",
16379
16172
  {
16380
- 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",
16381
16173
  onClick: () => {
16382
- const url = `${vgenBaseUrl}/todayTasks/taskManagement`;
16174
+ const url = `${vgenBaseUrl}/taskManagement`;
16383
16175
  window.open(url, "_blank");
16384
16176
  },
16177
+ className: "bg-primary-600 hover:bg-primary-700 text-white rounded-xl h-9 px-4 font-bold text-xs gap-2",
16385
16178
  children: [
16386
- "已经在日程里了",
16387
- /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "w-3.5 h-3.5" })
16179
+ "查看任务",
16180
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "w-3.5 h-3.5" })
16388
16181
  ]
16389
16182
  }
16390
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
16391
16194
  ] }),
16392
- msg.messageType === msgType.TASK_EDIT && extraInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageEditTask$1, { extraInfo })
16393
- ]
16394
- }
16395
- ),
16396
- msg.role === "ai" && msg.messageType === msgType.TEXT && typeof msg.content === "string" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 px-1", children: [
16397
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16398
- "button",
16399
- {
16400
- onClick: () => copyText(msg.content),
16401
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16402
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "w-3.5 h-3.5" })
16403
- }
16404
- ),
16405
- !isTaskPage && /* @__PURE__ */ jsxRuntimeExports.jsx(
16406
- Dropdown,
16407
- {
16408
- menu: {
16409
- 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",
16410
16199
  {
16411
- key: "convert-to-knowledge",
16412
- label: "转化为知识点",
16413
- onClick: () => {
16414
- sesseionTransformKnowledge(msg.content);
16415
- }
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
+ ]
16416
16206
  }
16417
- ]
16418
- },
16419
- trigger: ["hover"],
16420
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16421
- "button",
16422
- {
16423
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16424
- onClick: (e) => {
16425
- e.stopPropagation();
16426
- },
16427
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Wand2, { className: "w-3.5 h-3.5" })
16428
- }
16429
- )
16430
- }
16431
- )
16432
- ] }),
16433
- msg.role === "user" && msg.messageType === msgType.TEXT && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full flex items-center justify-end gap-2 px-1", children: [
16434
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16435
- "button",
16436
- {
16437
- onClick: () => copyText(msg.content),
16438
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16439
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "w-3.5 h-3.5" })
16440
- }
16441
- ),
16442
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "重新发送", placement: "bottom", arrow: false, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16443
- "button",
16444
- {
16445
- onClick: () => {
16446
- handleSend({ input: msg.content });
16447
- },
16448
- className: "p-1.5 text-gray-500 hover:text-gray-600 transition-colors",
16449
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCcw, { className: "w-3.5 h-3.5" })
16450
- }
16451
- ) })
16452
- ] }),
16453
- ((_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) => {
16454
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
16455
- motion.div,
16456
- {
16457
- initial: { opacity: 0, x: -20 },
16458
- animate: { opacity: 1, x: 0 },
16459
- transition: { delay: index22 * 0.1, duration: 0.4 },
16460
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16461
- "button",
16462
- {
16463
- onClick: () => {
16464
- if (item.action === "sendTopic") {
16465
- handleSend({ input: item.topic });
16466
- }
16467
- },
16468
- 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",
16469
- children: item.topic
16470
- }
16471
- )
16472
- },
16473
- item.topic + index22
16474
- );
16475
- }) }) : null,
16476
- ((_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) => {
16477
- var _a2, _b2;
16478
- const Icon = sceneIconMap[item.scene];
16479
- 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);
16480
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
16481
- motion.div,
16482
- {
16483
- initial: { opacity: 0, x: -20 },
16484
- animate: { opacity: 1, x: 0 },
16485
- transition: { delay: index22 * 0.1, duration: 0.4 },
16486
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
16487
- "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",
16488
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",
16489
16226
  onClick: () => {
16490
- handleSend({ input: wholeTip, scene: item.scene });
16227
+ const url = `${vgenBaseUrl}/todayTasks/taskManagement`;
16228
+ window.open(url, "_blank");
16491
16229
  },
16492
- 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",
16493
16230
  children: [
16494
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
16495
- 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: [
16496
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { className: `${sceneIconColorMap[item.scene]} w-5 h-5` }),
16497
- sceneTitleMap[item.scene]
16498
- ] }),
16499
- /* @__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 })
16500
- ] }),
16501
- /* @__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" })
16502
16233
  ]
16503
16234
  }
16504
16235
  )
16505
- },
16506
- item.topic + index22
16507
- );
16508
- }) }) }) : null,
16509
- 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(
16510
16251
  "button",
16511
16252
  {
16512
- onClick: () => sendChangeTimeMsg(extraInfo),
16513
- className: "flex items-center p-1.5 gap-1 text-[12px] text-gray-500 italic hover:text-gray-600 transition-colors",
16514
- children: [
16515
- /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCcw, { className: "w-3 h-3" }),
16516
- "改个时间"
16517
- ]
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" })
16518
16256
  }
16519
- ) }) : null
16520
- ]
16521
- }
16522
- )
16523
- ]
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
+ )
16524
16339
  },
16525
16340
  msg.id
16526
16341
  );
@@ -18509,7 +18324,8 @@ const BottomChatDock = (props) => {
18509
18324
  isDev,
18510
18325
  quote,
18511
18326
  onClearQuote,
18512
- customDiffViewer
18327
+ customDiffViewer,
18328
+ onSwitchLayout
18513
18329
  } = props;
18514
18330
  const [input, setInput] = useState("");
18515
18331
  const scrollRef = useRef(null);
@@ -18562,6 +18378,18 @@ const BottomChatDock = (props) => {
18562
18378
  children: [
18563
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" }) }),
18564
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
+ ) }),
18565
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" }) })
18566
18394
  ]
18567
18395
  }
@@ -18719,7 +18547,8 @@ const BottomChatPanel = (props) => {
18719
18547
  width = 320,
18720
18548
  collapsible = true,
18721
18549
  resizable = true,
18722
- onWidthChange
18550
+ onWidthChange,
18551
+ onSwitchLayout
18723
18552
  } = props;
18724
18553
  const expandedOpen = collapsible ? open : true;
18725
18554
  const [dragWidth, setDragWidth] = useState(null);
@@ -18811,7 +18640,20 @@ const BottomChatPanel = (props) => {
18811
18640
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: panelWidth }, className: "flex h-full flex-col", children: [
18812
18641
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex shrink-0 items-center gap-2.5 px-3.5 py-3", children: [
18813
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" }) }),
18814
- /* @__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
+ ),
18815
18657
  collapsible && /* @__PURE__ */ jsxRuntimeExports.jsx(
18816
18658
  "button",
18817
18659
  {
@@ -19011,6 +18853,8 @@ const VgenAgent = forwardRef((props, ref) => {
19011
18853
  dockInitOpen = false,
19012
18854
  /* 底部 dock 形态:float(缺省)= 悬浮浮窗原形态不变;inline = 左侧固定面板(追加形态) */
19013
18855
  dockLayout = "float",
18856
+ /* dock 形态切换回调(由 AI 学伴内右上角切换按钮触发) */
18857
+ onDockLayoutChange,
19014
18858
  /* inline 左侧固定面板展开态列宽(透传 BottomChatPanel width) */
19015
18859
  dockPanelWidth = 320,
19016
18860
  quoteTarget,
@@ -19753,7 +19597,8 @@ const VgenAgent = forwardRef((props, ref) => {
19753
19597
  ctaEnabled: !!onDockCta,
19754
19598
  onAccept: handleDockAccept,
19755
19599
  onReject: handleDockReject,
19756
- onResume: handleDockResume
19600
+ onResume: handleDockResume,
19601
+ onSwitchLayout: onDockLayoutChange
19757
19602
  }
19758
19603
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
19759
19604
  BottomChatDock,
@@ -19773,6 +19618,7 @@ const VgenAgent = forwardRef((props, ref) => {
19773
19618
  onAccept: handleDockAccept,
19774
19619
  onReject: handleDockReject,
19775
19620
  onResume: handleDockResume,
19621
+ onSwitchLayout: onDockLayoutChange,
19776
19622
  quote: controller.dockQuotedText,
19777
19623
  onClearQuote: () => controller.setDockQuotedText(null),
19778
19624
  customDiffViewer