@customize-agent/server 4.0.47 → 4.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +23 -23
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/chunks/6697.js +17 -17
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/api/assets/generated/preview.js +1 -1
- package/.next/server/pages/api/assets/generated.js +1 -1
- package/.next/server/pages/api/documents/export.js +2 -2
- package/.next/server/pages/api/documents/generate.js +1 -1
- package/.next/server/pages/api/documents/generated/[id].js +1 -1
- package/.next/server/pages/api/documents/generated.js +1 -1
- package/.next/server/pages/asset-library.html +1 -1
- package/.next/server/pages/context/long-term.html +1 -1
- package/.next/server/pages/context/short-term.html +1 -1
- package/.next/server/pages/document-roles.html +1 -1
- package/.next/server/pages/documents.html +1 -1
- package/.next/server/pages/guide.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/knowledge/file-detail.html +1 -1
- package/.next/server/pages/knowledge/files.html +1 -1
- package/.next/server/pages/knowledge/manage.html +1 -1
- package/.next/server/pages/knowledge/search.html +1 -1
- package/.next/server/pages/knowledge.html +1 -1
- package/.next/server/pages/models.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/prompt.html +1 -1
- package/.next/server/pages/settings.html +1 -1
- package/.next/server/pages/system/logs.html +1 -1
- package/.next/server/pages-manifest.json +24 -24
- package/.next/static/chunks/pages/{_app-823e0acf7facee2b.js → _app-fb7ca29c210d0293.js} +3 -3
- package/.next/static/chunks/pages/{documents-9d0fd64b774640f0.js → documents-9967f1fdf3fb6d03.js} +1 -1
- package/.next/static/chunks/webpack-77d10b4726f13aa5.js +1 -0
- package/.next/static/{LBrawJTNYfdD0XQzvZ6L5 → xvXnvFqmKq5NBy7PzXh6G}/_buildManifest.js +1 -1
- package/package.json +3 -3
- package/.next/static/chunks/webpack-fbb920bddf9bf0a6.js +0 -1
- /package/.next/static/{LBrawJTNYfdD0XQzvZ6L5 → xvXnvFqmKq5NBy7PzXh6G}/_ssgManifest.js +0 -0
package/.next/static/chunks/pages/{documents-9d0fd64b774640f0.js → documents-9967f1fdf3fb6d03.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[298],{16403:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return r(19562)}])},19562:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ei});var s=r(65321),l=r(97109),n=r(7576),i=r(35292),a=r(17807),o=r(63455),c=r(11702),d=r(88762),u=r(85114),m=r(68787),p=r(84253),x=r(38332),h=r(26171),g=r(33442),f=r(85493),j=r(34052),v=r(9730),y=r(42700),w=r(58569),A=r(76506),S=r(2256),k=r(38770),b=r(57271),I=r(23216),C=r(16285),z=r(26619),_=r(8263),T=r(8579),B=r(75548),D=r(7851),E=r(84742),M=r(29071),P=r(63552),R=r(26631),F=r(83914),G=r(58209),W=r(54746),L=r(71330),N=r(64068),O=r(93051),H=r(38762),q=r(64629),K=r(67547),U=r(76830),V=r(1310),X=r(6578),Q=r(79059);let{TextArea:J}=n.A,{Text:Y}=i.A,Z=null;function $(){null==Z||Z.listeners.forEach(e=>e())}let ee={role_binding:(0,s.jsx)(I.A,{}),context_recall:(0,s.jsx)(C.A,{}),knowledge_retrieval:(0,s.jsx)(z.A,{}),file_understanding:(0,s.jsx)(_.A,{}),fact_extraction:(0,s.jsx)(C.A,{}),chapter_generation:(0,s.jsx)(T.A,{}),asset_generation:(0,s.jsx)(B.A,{}),validation:(0,s.jsx)(D.A,{}),formatting:(0,s.jsx)(E.A,{}),llm_review:(0,s.jsx)(M.A,{}),export_ready:(0,s.jsx)(P.A,{}),reference:(0,s.jsx)(B.A,{})},et={施工组织设计:(0,s.jsx)(D.A,{}),投标文件:(0,s.jsx)(P.A,{}),技术方案:(0,s.jsx)(C.A,{}),报告:(0,s.jsx)(R.A,{}),自定义:(0,s.jsx)(T.A,{})};function er(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function es(e){return e?e.split(/[\\/]/u).pop()||e:""}let el={role_binding:"角色配置绑定",context_recall:"上下文召回",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},en={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function ei(){let e=(0,Q.Vr)(),{message:t}=a.A.useApp(),[r]=o.A.useForm(),i=(0,l.useRef)(null),[B,ei]=(0,l.useState)([]),[ea,eo]=(0,l.useState)("construction-organization-design"),[ec,ed]=(0,l.useState)([]),[eu,em]=(0,l.useState)([]),[ep,ex]=(0,l.useState)([]),[eh,eg]=(0,l.useState)([]),[ef,ej]=(0,l.useState)(!1),[ev,ey]=(0,l.useState)(!0),[ew,eA]=(0,l.useState)(!1),[eS,ek]=(0,l.useState)(null),[eb,eI]=(0,l.useState)(""),[eC,ez]=(0,l.useState)([]),[e_,eT]=(0,l.useState)(null),[eB,eD]=(0,l.useState)(null),[eE,eM]=(0,l.useState)(""),[eP,eR]=(0,l.useState)(!1),[eF,eG]=(0,l.useState)([]),[eW,eL]=(0,l.useState)(!1),[eN,eO]=(0,l.useState)(!1),[eH,eq]=(0,l.useState)({}),eK=ec.filter(e=>"file"===e.type).map(e=>({label:e.name,value:e.id})),eU=er(Object.values(r.getFieldValue("fileBindingGroups")||{}).flat()),eV=er([...eU,...eh.map(e=>e.relativePath)]).map(e=>{let t=eh.find(t=>t.relativePath===e);return{label:(0,s.jsxs)("div",{title:e,style:{display:"flex",justifyContent:"space-between",gap:8},children:[(0,s.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:es(e)}),t&&(0,s.jsx)(c.A,{style:{margin:0},children:t.status})]}),value:e}}),[eX,eQ]=(0,l.useState)([]),[eJ,eY]=(0,l.useState)(null),[eZ,e$]=(0,l.useState)("templates"),[e0,e1]=(0,l.useState)(!1),[e2,e6]=(0,l.useState)("workflow"),e8=(0,l.useRef)(null),e3=(0,l.useRef)(0),e5=async()=>{try{ez((await (0,X.cQ)()).documents)}catch(e){ez([])}};(0,l.useEffect)(()=>{let e=()=>{Z&&(eQ(Z.flowSteps),eY(Z.activeFlowKey),eA(Z.loading),Z.documentId&&eT(Z.documentId),Z.draft&&ek(Z.draft),void 0!==Z.content&&eI(Z.content))},t=Z;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,l.useEffect)(()=>{ey(!0),Promise.all([(0,X.Dl)().then(e=>{var t,r;ei(e.templates),eo(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,X.lv)().then(e=>{ed(e.roles),em(e.configs)}),(0,X.dx)().then(e=>ex(e)),e5()]).catch(()=>t.error(e("common.error"))).finally(()=>ey(!1))},[t,e]),(0,l.useEffect)(()=>{if(0===eC.length)return;let e=localStorage.getItem("activeGenDocId");if(!e)return;if(!eC.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem("activeGenDocId");let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,X.v7)(e);await e5(),"generating"!==r.status&&(localStorage.removeItem("activeGenDocId"),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eC]);let e7=(0,l.useMemo)(()=>B.find(e=>e.id===ea),[B,ea]),e4=eu.map(e=>({label:e.name,value:e.id})),e9=Math.max(0,eX.findIndex(e=>e.key===eJ)),te=e=>{var t;return e?(null==(t=ec.find(t=>t.id===e))?void 0:t.name)||en[e]||"未知角色":""},tt=e=>e.subtitle||e.roleName||te(e.roleId)||el[e.type]||e.type,tr=e=>{var t,r,s;return e.promptName||((t=e.promptId)?(null==(r=ep.find(e=>e.id===t))?void 0:r.projectName)||(null==(s=ec.find(e=>e.id===t))?void 0:s.name)||en[t]||"未知提示词":"")},ts=e=>(0,s.jsx)(c.A,{closable:e.closable,onClose:e.onClose,color:"blue",title:e.value,style:{margin:"1px 2px",fontSize:11,lineHeight:"18px",maxWidth:220,overflow:"hidden",textOverflow:"ellipsis"},children:es(e.value)}),tl=()=>{e3.current+=1,eM(""),eG([]),eL(!1),eR(!1)},tn=e=>{eo(e),eT(null),ek(null),eI(""),tl(),e6("workflow"),e1(!0),e$("drafts")},ti=async r=>{eT(r.id),eo(r.templateId);let s=ta(r.status);if(s||"failed"===r.status){tw.current=!0,tl(),ek(null),eI(""),eA(s),e6("workflow"),e1(!0);try{let{document:e}=await (0,X.v7)(r.id);td(e),ta(e.status)?tu(e.id):await e5()}catch(e){td(r)}return}e6("editor"),eQ([]),eY(null),tl();try{let{document:e}=await (0,X.v7)(r.id);ek(e.draft||null),eI(e.editedMarkdown||e.markdown)}catch(r){t.error(e("common.error"))}e1(!0)},ta=e=>"completed"!==e&&"warning"!==e&&"failed"!==e,to=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ew;(null==Z?void 0:Z.loading)&&(Z.flowSteps=e,Z.activeFlowKey=t,Z.loading=r,$())},tc=e=>{var t,r,l,n,i;let a=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(a.length>0){let t=a.map((e,t)=>{var r;let l,n="failed"===(l=e.status)?"error":"fallback"===l?"warning":"finish";return{key:"".concat(e.type,"-").concat(t),title:e.title||el[e.type]||e.type,subtitle:tt(e),description:e.message||"",status:n,icon:"role_binding"===(r=e.type)?(0,s.jsx)(I.A,{}):"knowledge_retrieval"===r?(0,s.jsx)(z.A,{}):"context_recall"===r?(0,s.jsx)(C.A,{}):"file_understanding"===r?(0,s.jsx)(_.A,{}):"fact_extraction"===r?(0,s.jsx)(C.A,{}):"chapter_generation"===r?(0,s.jsx)(T.A,{}):"llm_review"===r?(0,s.jsx)(M.A,{}):"validation"===r?(0,s.jsx)(D.A,{}):"formatting"===r?(0,s.jsx)(E.A,{}):"export_ready"===r?(0,s.jsx)(P.A,{}):(0,s.jsx)(R.A,{}),subSteps:[{key:"stage-".concat(t),title:tr(e)?"提示词:".concat(tr(e)):tt(e),status:n}]}});"generating"===e.status&&t.length>0&&(null==(r=t.at(-1))?void 0:r.status)==="finish"&&(t[t.length-1]={...t[t.length-1],status:"process"});let o="generating"===e.status?(null==(l=t.at(-1))?void 0:l.key)||"prepare":"failed"===e.status?(null==(n=t.find(e=>"error"===e.status))?void 0:n.key)||(null==(i=t.at(-1))?void 0:i.key)||"prepare":"done";return{steps:t,activeKey:o}}return{steps:[],activeKey:null}},td=e=>{let{steps:t,activeKey:r}=tc(e);eQ(t),eY(r),eA(ta(e.status)),to(t,r,ta(e.status)),"failed"===e.status&&e6("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(ek(e.draft),eI(e.editedMarkdown||e.markdown),e6("editor"),eQ([]),eY(null))},tu=e=>{e8.current&&clearInterval(e8.current),e8.current=setInterval(()=>{(async()=>{try{let{document:t}=await (0,X.v7)(e,!0);td(t),await e5(),ta(t.status)||(e8.current&&clearInterval(e8.current),e8.current=null,localStorage.removeItem("activeGenDocId"))}catch(e){}})()},2e3)};(0,l.useEffect)(()=>{if(!ew||!eJ)return;let e=window.setInterval(()=>eQ(e=>{let t=e.map(e=>{if(e.key!==eJ||"process"!==e.status)return e;let t=e.subSteps.findIndex(e=>"process"===e.status),r=t<0?0:Math.min(t+1,e.subSteps.length-1);return{...e,subSteps:e.subSteps.map((e,t)=>t<r?{...e,status:"finish"}:t===r?{...e,status:"process"}:{...e,status:"wait"})}});return to(t,eJ),t}),1400);return()=>window.clearInterval(e)},[eJ,ew]);let tm=async e=>{ej(!0);try{let t=await (0,X.nU)({query:e,limit:120,includeContent:!!e.trim()});eg(t.files)}catch(e){t.error("知识库文件检索失败")}finally{ej(!1)}},tp=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],fileBindings:[]};r.resetFields(),r.setFieldsValue({...t,fileBindingGroups:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,t)=>(t.roleId&&t.filePath&&(e[t.roleId]=er([...e[t.roleId]||[],t.filePath])),e),{})}(t.fileBindings)}),tm(""),eO(!0)},tx=async()=>{try{let s=await r.validateFields(),l=s.fileBindingGroups||{},n=Object.entries(l).flatMap(e=>{let[t,r]=e;return er(r||[]).map(e=>({roleId:t,filePath:e}))}),{fileBindingGroups:i,...a}=s,o={...a,chapters:[],fileBindings:n},c=await (0,X.l2)(o);ei(c.templates),eo(c.template.id),eO(!1),await e5(),t.success(e("common.success"))}catch(e){e instanceof Error&&t.error(e.message)}},th=async r=>{try{let s=await (0,X.bV)(r);ei(s.templates),eo(s.template.id),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tg=async r=>{try{var s,l;let n=await (0,X.h0)(r);ei(n.templates),eo(null!=(l=null==(s=n.templates[0])?void 0:s.id)?l:""),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tf=async e=>{try{let{validation:r}=await (0,X.SM)(e);eq(t=>({...t,[e]:r}));let s=r.issues.filter(e=>"error"===e.level);if(eo(e),s.length>0)return void t.warning("模板运行前检查未通过,请先处理阻断项");if(r.issues.length>0)return void t.warning("模板存在警告,可在检查面板确认后继续运行");tn(e)}catch(e){t.error(e instanceof Error?e.message:"模板运行前检查失败")}},tj=async r=>{try{await (0,X.QG)(r),e_===r&&(eT(null),ek(null),eI("")),await e5(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tv=async e=>{for(;;){let{document:t}=await (0,X.v7)(e,!0);if(td(t),("completed"===t.status||"warning"===t.status)&&t.draft)return t;if("failed"===t.status)throw Error(t.error||"生成失败");await new Promise(e=>window.setTimeout(e,1500))}},ty=async()=>{if(!ea)return;if(null==Z?void 0:Z.loading){eQ(Z.flowSteps),eY(Z.activeFlowKey),eA(!0);return}eA(!0);let r=(0,X.OX)({templateId:ea});Z={id:Date.now(),templateId:ea,loading:!0,flowSteps:[],activeFlowKey:null,promise:r,listeners:new Set},eQ([]),eY(null);let s=[];try{let l=await r;l.documentId&&(localStorage.setItem("activeGenDocId",l.documentId),eT(l.documentId),(null==Z?void 0:Z.promise)===r&&(Z.documentId=l.documentId)),await e5();let n=l.documentId?await tv(l.documentId):void 0,a=l.draft||(null==n?void 0:n.draft);if(!a)throw Error("生成结果为空");(l.documentId||(null==n?void 0:n.id))&&eT(l.documentId||n.id),s.forEach(e=>window.clearTimeout(e)),ek(a),eI((null==n?void 0:n.editedMarkdown)||(null==n?void 0:n.markdown)||a.markdown),(null==Z?void 0:Z.promise)===r&&(Z.draft=a,Z.content=(null==n?void 0:n.editedMarkdown)||(null==n?void 0:n.markdown)||a.markdown);let o=n||{id:l.documentId||"draft-".concat(Date.now()),templateId:ea,title:a.title,requirement:a.requirement,markdown:a.markdown,status:a.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!a.exportGate.passed?"warning":"completed",draft:a,executionStages:a.executionStages,assets:a.assets||[],createdAt:a.generatedAt,updatedAt:Date.now()},{steps:c}=tc(o);eQ(c),to(c,"done",!1),eY("done"),(null==Z?void 0:Z.promise)===r&&(Z.activeFlowKey="done",Z.loading=!1,$()),localStorage.removeItem("activeGenDocId"),await e5(),t.success(e("common.success")),window.setTimeout(()=>{var e;return null==(e=i.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(l){localStorage.removeItem("activeGenDocId");let s=l instanceof Error?l.message:e("common.error");eQ(e=>{let t=e.map(e=>"process"===e.status?{...e,status:"error",description:s,subSteps:((e,t)=>{if("wait"===t)return e.subSteps.map(e=>({...e,status:"wait"}));if("finish"===t)return e.subSteps.map(e=>({...e,status:"finish"}));if("error"===t)return e.subSteps.map((e,t)=>({...e,status:0===t?"error":e.status}));let r=e.subSteps.findIndex(e=>"wait"===e.status);return e.subSteps.map((e,t)=>t<r||-1===r?{...e,status:"finish"}:t===r?{...e,status:"process"}:e)})(e,"error")}:e);return to(t,eJ,!1),t}),(null==Z?void 0:Z.promise)===r&&(Z.loading=!1,Z.error=s,$()),t.error(s)}finally{s.forEach(e=>window.clearTimeout(e)),eA(!1),(null==Z?void 0:Z.promise)===r&&(Z.loading=!1,$())}},tw=(0,l.useRef)(!1),tA=async r=>{(null==Z?void 0:Z.loading)&&(Z.loading=!1,Z.error="用户中止",$(),Z=null,eA(!1)),localStorage.removeItem("activeGenDocId"),e8.current&&(clearInterval(e8.current),e8.current=null);try{await (0,X.r)(r.id),await e5(),e_===r.id&&(eT(null),ek(null),eI("")),t.success("已中止生成任务")}catch(r){t.error(e("common.error"))}};(0,l.useEffect)(()=>{e0&&"workflow"===e2&&!tw.current&&!(null==Z?void 0:Z.loading)&&(null==e7?void 0:e7.projectRoleConfigId)&&(tw.current=!0,window.setTimeout(()=>{ty()},300)),e0||(tw.current=!1)},[e0,e2]);let tS=async r=>{if(eS){eD(r);try{let e={documentId:e_||void 0,title:eS.title,markdown:eb,format:r,enforceGate:!1,exportGate:eS.exportGate,useClientMarkdown:!0},t=await (0,X.UE)(e);((e,t,r)=>{let s=new Blob([e],{type:r}),l=URL.createObjectURL(s),n=document.createElement("a");n.href=l,n.download=t,n.target="_self",n.rel="noopener",n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),n.remove(),window.setTimeout(()=>URL.revokeObjectURL(l),1e3)})(t,"".concat(eS.title,".").concat("markdown"===r?"md":r),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[r])}catch(r){t.error(r instanceof Error?r.message:e("common.error"))}finally{eD(null)}}},tk=async()=>{if(eS)try{if(e_)await (0,X.a6)(e_,{editedMarkdown:eb,markdown:eb});else{let e=await (0,X.Af)({...eS,markdown:eb});ek(e.draft)}await e5(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tb=(e,t)=>{eG(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},tI=async()=>{let r=eE.trim();if(!eS||!r||eP)return;let s=e3.current+1;e3.current=s,eR(!0);try{var l,n;let e=await (0,X.Gi)({title:eS.title,markdown:eb,instruction:r,facts:null==(l=eS.structuredFacts)?void 0:l.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==(n=eS.chapters)?void 0:n.map(e=>e.title)});if(e3.current!==s||e_!=e_)return;tb(eb,r),eI(e.markdown),eM(""),t.success("已按提示完成精准修改")}catch(r){e3.current===s&&t.error(r instanceof Error?r.message:e("common.error"))}finally{e3.current===s&&eR(!1)}};if(ev)return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)(d.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)(d.A,{active:!0,paragraph:{rows:2}}),(0,s.jsx)(d.A,{active:!0,paragraph:{rows:8}})]});let tC="workflow"===e2?"工作流:".concat((null==e7?void 0:e7.name)||"选择模板"):"编辑:".concat((null==eS?void 0:eS.title)||(null==e7?void 0:e7.outputTitle)||"文档");return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"pageTitle",children:e("documents.title")}),(0,s.jsx)("p",{className:"pageDesc",children:e("documents.description")})]}),(0,s.jsx)(u.Ay,{type:"primary",icon:(0,s.jsx)(W.A,{}),onClick:()=>tp(),children:e("documents.newTemplate")})]}),(0,s.jsx)(m.A,{size:"small",tabList:[{key:"templates",label:"模板库 (".concat(B.length,")")},{key:"drafts",label:"生成记录 (".concat(eC.length,")")}],activeTabKey:eZ,onTabChange:e$,children:"templates"===eZ?0===B.length?(0,s.jsx)(p.A,{description:e("common.noData")}):(0,s.jsx)(x.A,{dataSource:B,renderItem:t=>(0,s.jsx)(x.A.Item,{style:{cursor:"pointer",padding:"10px 0"},actions:[(0,s.jsx)(u.Ay,{size:"small",icon:(0,s.jsx)(L.A,{}),onClick:e=>{e.stopPropagation(),tp(t)},children:"配置"},"cfg"),(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:(0,s.jsx)(N.A,{}),onClick:e=>{e.stopPropagation(),tf(t.id)},children:"运行"},"run"),(0,s.jsx)(u.Ay,{size:"small",icon:(0,s.jsx)(O.A,{}),onClick:e=>{e.stopPropagation(),th(t.id)}},"copy"),(0,s.jsx)(h.A,{title:e("documents.deleteTemplateConfirm"),onConfirm:e=>{null==e||e.stopPropagation(),tg(t.id)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(G.A,{}),onClick:e=>e.stopPropagation()})},"del")],onClick:()=>eo(t.id),children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,minWidth:0,flex:1},children:[function(e,t){let r=et[e]||(0,s.jsx)(R.A,{});return(0,s.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(t.category,ea===t.id),(0,s.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,s.jsx)("span",{style:{fontWeight:ea===t.id?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name}),ea===t.id&&(0,s.jsx)(c.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"当前"}),(0,s.jsx)(c.A,{style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:t.category}),eH[t.id]&&(0,s.jsxs)(c.A,{color:eH[t.id].issues.some(e=>"error"===e.level)?"error":eH[t.id].issues.length?"warning":"success",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:["检查 ",eH[t.id].fileDiagnostics.length," 文件 / ",eH[t.id].promptDiagnostics.length," 提示词"]})]}),t.description&&(0,s.jsx)(Y,{type:"secondary",style:{fontSize:12,lineHeight:"18px"},children:t.description}),eH[t.id]&&(0,s.jsx)("div",{onClick:e=>e.stopPropagation(),style:{marginTop:8,padding:10,border:"1px solid ".concat(eH[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBorder)":eH[t.id].issues.length?"var(--colorWarningBorder)":"var(--colorSuccessBorder)"),borderRadius:10,background:eH[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBg)":eH[t.id].issues.length?"var(--colorWarningBg)":"var(--colorSuccessBg)"},children:(0,s.jsxs)(g.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,s.jsxs)(g.A,{wrap:!0,children:[(0,s.jsx)(Y,{strong:!0,children:eH[t.id].issues.some(e=>"error"===e.level)?"运行前检查未通过":eH[t.id].issues.length?"运行前检查存在警告":"运行前检查通过"}),(0,s.jsxs)(c.A,{color:"blue",children:["文件角色 ",eH[t.id].fileDiagnostics.length]}),(0,s.jsxs)(c.A,{color:"purple",children:["提示词角色 ",eH[t.id].promptDiagnostics.length]})]}),eH[t.id].issues.length>0?eH[t.id].issues.map(e=>(0,s.jsx)(f.A,{type:"error"===e.level?"error":"warning",message:e.message,showIcon:!0},e.message)):(0,s.jsx)(f.A,{type:"success",message:"文件角色、提示词角色和后台自动规范检查通过,可以运行。",showIcon:!0}),!eH[t.id].issues.some(e=>"error"===e.level)&&eH[t.id].issues.length>0&&(0,s.jsx)("div",{children:(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:(0,s.jsx)(N.A,{}),onClick:()=>tn(t.id),children:"忽略警告并继续运行"})})]})})]})]})})}):0===eC.length?(0,s.jsx)(p.A,{description:e("common.noData")}):(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:eC.slice(0,15).map((e,t)=>{var r,l,n;let i,a;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 12px",border:"1px solid var(--colorBorderSecondary)",borderRadius:10,cursor:"pointer",background:e_===e.id?"var(--colorFillAlter)":void 0,minWidth:0},onClick:()=>{ti(e)},children:["completed"===e.status?(0,s.jsx)(E.A,{style:{fontSize:18,color:"var(--colorOk)",flexShrink:0,marginTop:2}}):"failed"===e.status?(0,s.jsx)(H.A,{style:{fontSize:18,color:"var(--colorDanger)",flexShrink:0,marginTop:2}}):"warning"===e.status?(0,s.jsx)(D.A,{style:{fontSize:18,color:"var(--colorWarning)",flexShrink:0,marginTop:2}}):(0,s.jsx)(q.A,{spin:!0,style:{fontSize:18,color:"#1677ff",flexShrink:0,marginTop:2}}),(0,s.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,s.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:3},children:e.title}),(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px 10px",color:"var(--colorTextSecondary)",fontSize:11},children:[(0,s.jsx)("span",{children:new Date(e.updatedAt).toLocaleString()}),(0,s.jsxs)("span",{children:["耗时 ",(e=>{let t=Math.max(0,Math.round(((e.completedAt||e.updatedAt)-e.createdAt)/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60),s=t%60;if(r<60)return s?"".concat(r," 分 ").concat(s," 秒"):"".concat(r," 分");let l=Math.floor(r/60),n=r%60;return n?"".concat(l," 小时 ").concat(n," 分"):"".concat(l," 小时")})(e)]})]}),("warning"===e.status||"failed"===e.status)&&(0,s.jsx)("div",{style:{marginTop:3,color:"failed"===e.status?"var(--colorError)":"var(--colorWarning)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null==(r=e.warningIssues)?void 0:r[0])||(null==(n=e.draft)||null==(l=n.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:l.message)||"需复核"})]}),(0,s.jsxs)(g.A,{size:4,align:"center",children:[(0,s.jsx)(c.A,{color:"completed"===(i=e.status)?"success":"warning"===i?"warning":"failed"===i?"error":"processing",style:{margin:0,fontSize:10,lineHeight:"18px"},children:"completed"===(a=e.status)?"已完成":"warning"===a?"需复核":"failed"===a?"失败":"生成中"}),(0,s.jsxs)(c.A,{style:{margin:0,fontSize:10,lineHeight:"18px"},children:["#",t+1]}),(0,s.jsx)(h.A,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),tj(e.id)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(G.A,{}),onClick:e=>e.stopPropagation()})}),ta(e.status)&&(0,s.jsx)(h.A,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),tA(e)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),children:"中止"})}),(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:ta(e.status)?(0,s.jsx)(q.A,{spin:!0}):(0,s.jsx)(N.A,{}),onClick:t=>{t.stopPropagation(),ti(e)},children:"打开"})]})]},e.id)})})}),(0,s.jsx)(j.A,{title:tC,open:e0,onClose:()=>{e1(!1),e8.current&&(clearInterval(e8.current),e8.current=null)},width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:eS?(0,s.jsxs)(g.A,{wrap:!0,children:[(0,s.jsx)(u.Ay,{icon:(0,s.jsx)(K.A,{}),disabled:eP,onClick:()=>{tk()},children:e("documents.saveDraft")}),(0,s.jsx)(u.Ay,{icon:(0,s.jsx)(U.A,{}),disabled:eP,loading:"markdown"===eB,onClick:()=>{tS("markdown")},children:"MD"}),(0,s.jsx)(u.Ay,{disabled:eP,loading:"html"===eB,onClick:()=>{tS("html")},children:"HTML"}),(0,s.jsx)(u.Ay,{disabled:eP,loading:"docx"===eB,onClick:()=>{tS("docx")},children:"DOCX"}),(0,s.jsx)(u.Ay,{type:"primary",disabled:eP,loading:"pdf"===eB,onClick:()=>{tS("pdf")},children:"PDF"})]}):ew&&"workflow"===e2?(0,s.jsx)(u.Ay,{danger:!0,onClick:()=>{(async()=>{e_&&await (0,X.r)(e_).catch(()=>void 0),Z&&(Z.loading=!1,Z.error="用户中止",$(),Z=null),localStorage.removeItem("activeGenDocId"),e8.current&&(clearInterval(e8.current),e8.current=null),eA(!1),eQ([]),eY(null),e1(!1),await e5(),t.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,s.jsxs)(g.A,{direction:"vertical",style:{width:"100%"},size:"middle",children:["workflow"===e2&&eX.length>0&&(0,s.jsx)(v.A,{direction:"vertical",size:"small",current:e9,items:eX.map(e=>{let t;return{title:e.title,description:(0,s.jsxs)("div",{children:[e.subtitle&&(0,s.jsx)("div",{style:{marginBottom:4},children:(0,s.jsx)(c.A,{children:e.subtitle})}),(0,s.jsx)("div",{children:e.description}),(0,s.jsx)("div",{style:{marginTop:4},children:e.subSteps.map(e=>{var t;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,s.jsx)(F.A,{}):"finish"===t?(0,s.jsx)(E.A,{}):"warning"===t?(0,s.jsx)(D.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,s.jsx)(G.A,{}):(0,s.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,s.jsx)("span",{children:e.title})]},e.key)})})]}),status:"warning"===(t=e.status)?"finish":t,icon:"process"===e.status?(0,s.jsx)(F.A,{}):"warning"===e.status?(0,s.jsx)(D.A,{style:{color:"var(--colorWarning)"}}):e.icon}})}),"workflow"===e2&&ew&&0===eX.length&&(0,s.jsx)("div",{style:{textAlign:"center",padding:40},children:(0,s.jsx)(y.A,{tip:"正在准备生成…"})}),eS&&(0,s.jsx)("div",{ref:i,children:(0,s.jsx)(w.A,{items:[{key:"edit",label:e("documents.edit"),children:(0,s.jsxs)(g.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,s.jsx)(J,{rows:28,value:eb,disabled:eP,onChange:e=>eI(e.target.value)}),(0,s.jsx)(m.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,s.jsxs)(g.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,s.jsxs)(g.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(g.A,{size:6,children:[(0,s.jsx)(M.A,{style:{color:"var(--colorAccent)"}}),(0,s.jsx)(Y,{strong:!0,children:"精准修改"}),(0,s.jsx)(c.A,{color:"blue",children:"AI 辅助"})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,s.jsxs)(u.Ay,{size:"small",icon:(0,s.jsx)(V.A,{}),onClick:()=>eL(e=>!e),disabled:0===eF.length,children:["历史版本 ",eF.length>0?eF.length:""]})]}),(0,s.jsx)(J,{rows:4,value:eE,disabled:eP,onChange:e=>eM(e.target.value),placeholder:"例如:把第三章语气改得更专业,补充工期风险应对;或压缩全文到 3000 字以内,并保留关键事实。"}),(0,s.jsxs)(g.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsx)(g.A,{wrap:!0,children:["更专业","更简洁","强化细节","优化结构"].map(e=>(0,s.jsx)(u.Ay,{size:"small",disabled:eP,onClick:()=>eM(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,s.jsx)(u.Ay,{type:"primary",icon:(0,s.jsx)(M.A,{}),loading:eP,disabled:!eE.trim(),onClick:()=>{tI()},children:"应用修改"})]}),eW&&(0,s.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,s.jsx)(x.A,{size:"small",dataSource:eF,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,s.jsx)(x.A.Item,{actions:[(0,s.jsx)(u.Ay,{size:"small",disabled:eP,onClick:()=>{tb(eb,"恢复前版本"),eI(e.content),t.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,s.jsx)(x.A.Item.Meta,{title:(0,s.jsxs)(g.A,{children:[(0,s.jsx)(Y,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(c.A,{children:e.prompt})]}),description:(0,s.jsx)(Y,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eS.chapters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eS.chapters.length,")"]}),(0,s.jsx)(x.A,{size:"small",dataSource:eS.chapters,renderItem:e=>(0,s.jsx)(x.A.Item,{children:(0,s.jsx)(x.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eS.structuredFacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eS.structuredFacts.length,")"]}),(0,s.jsx)(A.A,{size:"small",column:1,bordered:!0,children:eS.structuredFacts.map((e,t)=>(0,s.jsxs)(A.A.Item,{label:e.key,children:[(0,s.jsx)("span",{children:e.value}),(0,s.jsx)(c.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,s.jsx)(Y,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eS.sources.length,")"]}),0===eS.sources.length?(0,s.jsx)(p.A,{description:"暂无"}):(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eS.sources.map(e=>(0,s.jsxs)(c.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eS.missingItems.length,")"]}),0===eS.missingItems.length?(0,s.jsx)(p.A,{description:"无缺失"}):(0,s.jsx)(x.A,{size:"small",dataSource:eS.missingItems,renderItem:e=>(0,s.jsx)(x.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eS.validationIssues.length,")"),children:0===eS.validationIssues.length?(0,s.jsx)(p.A,{description:"校验通过"}):(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eS.validationIssues.map(e=>(0,s.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,s.jsx)(c.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,s.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,s.jsx)("div",{style:{marginTop:6,color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all"},children:e.suggestion})]},"".concat(e.level,"-").concat(e.message))),eS.exportGate.checklist.length>0&&(0,s.jsxs)("div",{style:{marginTop:8},children:[(0,s.jsx)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,s.jsx)(x.A,{size:"small",dataSource:eS.exportGate.checklist,renderItem:e=>(0,s.jsxs)(x.A.Item,{children:[(0,s.jsx)(Y,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,s.jsx)(c.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eS.executionStages.length,")"),children:(0,s.jsx)(x.A,{size:"small",dataSource:eS.executionStages,renderItem:e=>(0,s.jsxs)(x.A.Item,{children:[(0,s.jsx)(x.A.Item.Meta,{avatar:ee[e.type]||(0,s.jsx)(R.A,{}),title:(0,s.jsx)(Y,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(el[e.type]||e.type," \xb7 ").concat(e.roleName||te(e.roleId))}),description:(0,s.jsx)(Y,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,s.jsx)(c.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,s.jsx)(j.A,{title:e("documents.templateEditor"),open:eN,onClose:()=>eO(!1),width:860,maskClosable:!1,styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsxs)(g.A,{children:[(0,s.jsx)(u.Ay,{onClick:()=>eO(!1),children:e("common.cancel")}),(0,s.jsx)(u.Ay,{type:"primary",onClick:()=>{tx()},children:e("common.save")})]}),children:(0,s.jsxs)(o.A,{form:r,layout:"vertical",requiredMark:"optional",children:[(0,s.jsxs)(S.A,{gutter:12,children:[(0,s.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(n.A,{})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"name",label:e("documents.templateName"),rules:[{required:!0}],children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"category",label:e("documents.templateCategory"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"outputTitle",label:e("documents.outputTitle"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:12,children:(0,s.jsx)(o.A.Item,{name:"description",label:e("documents.templateDescription"),children:(0,s.jsx)(n.A,{})})})]}),(0,s.jsx)(o.A.Item,{name:"projectRoleConfigId",label:e("documents.projectRoleConfig"),rules:[{required:!0,message:e("documents.projectRoleConfigRequired")}],children:(0,s.jsx)(b.A,{showSearch:!0,placeholder:e("documents.projectRoleConfigRequired"),options:e4})}),(0,s.jsxs)("div",{style:{marginBottom:16},children:[(0,s.jsxs)(g.A,{style:{width:"100%",justifyContent:"space-between",marginBottom:8},children:[(0,s.jsx)(Y,{strong:!0,children:"项目文件绑定"}),(0,s.jsx)(c.A,{color:"blue",children:"按文件角色多选"})]}),(0,s.jsx)(f.A,{type:"info",showIcon:!0,style:{marginBottom:12},message:"每个文件角色下多选对应的知识库文件。用户换项目时,只需要在这里重新选择对应项目资料。"}),0===eK.length?(0,s.jsx)(p.A,{image:p.A.PRESENTED_IMAGE_SIMPLE,description:"暂无可用文件角色"}):eK.map(e=>(0,s.jsx)(m.A,{size:"small",style:{marginBottom:12},title:(0,s.jsx)(g.A,{children:(0,s.jsx)(Y,{children:e.label})}),children:(0,s.jsx)(o.A.Item,{name:["fileBindingGroups",e.value],children:(0,s.jsx)(b.A,{mode:"multiple",showSearch:!0,filterOption:!1,loading:ef,onSearch:e=>{tm(e)},onFocus:()=>{tm("")},tagRender:ts,placeholder:"输入关键词搜索知识库文件",options:eV})})},e.value))]}),(0,s.jsx)(f.A,{type:"info",showIcon:!0,message:"文档规范由后台根据模板、提示词和角色绑定自动生成,无需手动维护规范包。"})]})})]})}}},e=>{e.O(0,[433,787,576,195,455,506,412,304,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[298],{16403:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return r(19562)}])},19562:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ei});var s=r(65321),l=r(97109),n=r(7576),i=r(35292),a=r(17807),o=r(63455),c=r(11702),d=r(88762),u=r(85114),m=r(68787),p=r(84253),x=r(38332),h=r(26171),g=r(33442),f=r(85493),j=r(34052),v=r(9730),y=r(42700),w=r(58569),A=r(76506),S=r(2256),k=r(38770),b=r(57271),I=r(23216),C=r(16285),z=r(26619),_=r(8263),T=r(8579),B=r(75548),D=r(7851),E=r(84742),M=r(29071),P=r(63552),R=r(26631),F=r(83914),G=r(58209),W=r(54746),L=r(71330),N=r(64068),O=r(93051),H=r(38762),q=r(64629),K=r(67547),U=r(76830),V=r(1310),X=r(6578),Q=r(79059);let{TextArea:J}=n.A,{Text:Y}=i.A,Z=null;function $(){null==Z||Z.listeners.forEach(e=>e())}let ee={role_binding:(0,s.jsx)(I.A,{}),context_recall:(0,s.jsx)(C.A,{}),knowledge_retrieval:(0,s.jsx)(z.A,{}),file_understanding:(0,s.jsx)(_.A,{}),fact_extraction:(0,s.jsx)(C.A,{}),chapter_generation:(0,s.jsx)(T.A,{}),asset_generation:(0,s.jsx)(B.A,{}),validation:(0,s.jsx)(D.A,{}),formatting:(0,s.jsx)(E.A,{}),llm_review:(0,s.jsx)(M.A,{}),export_ready:(0,s.jsx)(P.A,{}),reference:(0,s.jsx)(B.A,{})},et={施工组织设计:(0,s.jsx)(D.A,{}),投标文件:(0,s.jsx)(P.A,{}),技术方案:(0,s.jsx)(C.A,{}),报告:(0,s.jsx)(R.A,{}),自定义:(0,s.jsx)(T.A,{})};function er(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function es(e){return e?e.split(/[\\/]/u).pop()||e:""}let el={role_binding:"角色配置绑定",context_recall:"上下文召回",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},en={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function ei(){let e=(0,Q.Vr)(),{message:t}=a.A.useApp(),[r]=o.A.useForm(),i=(0,l.useRef)(null),[B,ei]=(0,l.useState)([]),[ea,eo]=(0,l.useState)("construction-organization-design"),[ec,ed]=(0,l.useState)([]),[eu,em]=(0,l.useState)([]),[ep,ex]=(0,l.useState)([]),[eh,eg]=(0,l.useState)([]),[ef,ej]=(0,l.useState)(!1),[ev,ey]=(0,l.useState)(!0),[ew,eA]=(0,l.useState)(!1),[eS,ek]=(0,l.useState)(null),[eb,eI]=(0,l.useState)(""),[eC,ez]=(0,l.useState)([]),[e_,eT]=(0,l.useState)(null),[eB,eD]=(0,l.useState)(null),[eE,eM]=(0,l.useState)(""),[eP,eR]=(0,l.useState)(!1),[eF,eG]=(0,l.useState)([]),[eW,eL]=(0,l.useState)(!1),[eN,eO]=(0,l.useState)(!1),[eH,eq]=(0,l.useState)({}),eK=ec.filter(e=>"file"===e.type).map(e=>({label:e.name,value:e.id})),eU=er(Object.values(r.getFieldValue("fileBindingGroups")||{}).flat()),eV=er([...eU,...eh.map(e=>e.relativePath)]).map(e=>{let t=eh.find(t=>t.relativePath===e);return{label:(0,s.jsxs)("div",{title:e,style:{display:"flex",justifyContent:"space-between",gap:8},children:[(0,s.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:es(e)}),t&&(0,s.jsx)(c.A,{style:{margin:0},children:t.status})]}),value:e}}),[eX,eQ]=(0,l.useState)([]),[eJ,eY]=(0,l.useState)(null),[eZ,e$]=(0,l.useState)("templates"),[e0,e1]=(0,l.useState)(!1),[e2,e6]=(0,l.useState)("workflow"),e8=(0,l.useRef)(null),e3=(0,l.useRef)(0),e5=async()=>{try{ez((await (0,X.cQ)()).documents)}catch(e){ez([])}};(0,l.useEffect)(()=>{let e=()=>{Z&&(eQ(Z.flowSteps),eY(Z.activeFlowKey),eA(Z.loading),Z.documentId&&eT(Z.documentId),Z.draft&&ek(Z.draft),void 0!==Z.content&&eI(Z.content))},t=Z;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,l.useEffect)(()=>{ey(!0),Promise.all([(0,X.Dl)().then(e=>{var t,r;ei(e.templates),eo(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,X.lv)().then(e=>{ed(e.roles),em(e.configs)}),(0,X.dx)().then(e=>ex(e)),e5()]).catch(()=>t.error(e("common.error"))).finally(()=>ey(!1))},[t,e]),(0,l.useEffect)(()=>{if(0===eC.length)return;let e=localStorage.getItem("activeGenDocId");if(!e)return;if(!eC.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem("activeGenDocId");let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,X.v7)(e);await e5(),"generating"!==r.status&&(localStorage.removeItem("activeGenDocId"),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eC]);let e7=(0,l.useMemo)(()=>B.find(e=>e.id===ea),[B,ea]),e4=eu.map(e=>({label:e.name,value:e.id})),e9=Math.max(0,eX.findIndex(e=>e.key===eJ)),te=e=>{var t;return e?(null==(t=ec.find(t=>t.id===e))?void 0:t.name)||en[e]||"未知角色":""},tt=e=>e.subtitle||e.roleName||te(e.roleId)||el[e.type]||e.type,tr=e=>{var t,r,s;return e.promptName||((t=e.promptId)?(null==(r=ep.find(e=>e.id===t))?void 0:r.projectName)||(null==(s=ec.find(e=>e.id===t))?void 0:s.name)||en[t]||"未知提示词":"")},ts=e=>(0,s.jsx)(c.A,{closable:e.closable,onClose:e.onClose,color:"blue",title:e.value,style:{margin:"1px 2px",fontSize:11,lineHeight:"18px",maxWidth:220,overflow:"hidden",textOverflow:"ellipsis"},children:es(e.value)}),tl=()=>{e3.current+=1,eM(""),eG([]),eL(!1),eR(!1)},tn=e=>{eo(e),eT(null),ek(null),eI(""),tl(),e6("workflow"),e1(!0),e$("drafts")},ti=async r=>{eT(r.id),eo(r.templateId);let s=ta(r.status);if(s||"failed"===r.status){tw.current=!0,tl(),ek(null),eI(""),eA(s),e6("workflow"),e1(!0);try{let{document:e}=await (0,X.v7)(r.id);td(e),ta(e.status)?tu(e.id):await e5()}catch(e){td(r)}return}e6("editor"),eQ([]),eY(null),tl();try{let{document:e}=await (0,X.v7)(r.id);ek(e.draft||null),eI(e.editedMarkdown||e.markdown)}catch(r){t.error(e("common.error"))}e1(!0)},ta=e=>"completed"!==e&&"warning"!==e&&"failed"!==e,to=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ew;(null==Z?void 0:Z.loading)&&(Z.flowSteps=e,Z.activeFlowKey=t,Z.loading=r,$())},tc=e=>{var t,r,l,n,i;let a=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(a.length>0){let t=a.map((e,t)=>{var r;let l,n="failed"===(l=e.status)?"error":"fallback"===l?"warning":"finish";return{key:"".concat(e.type,"-").concat(t),title:e.title||el[e.type]||e.type,subtitle:tt(e),description:e.message||"",status:n,icon:"role_binding"===(r=e.type)?(0,s.jsx)(I.A,{}):"knowledge_retrieval"===r?(0,s.jsx)(z.A,{}):"context_recall"===r?(0,s.jsx)(C.A,{}):"file_understanding"===r?(0,s.jsx)(_.A,{}):"fact_extraction"===r?(0,s.jsx)(C.A,{}):"chapter_generation"===r?(0,s.jsx)(T.A,{}):"llm_review"===r?(0,s.jsx)(M.A,{}):"validation"===r?(0,s.jsx)(D.A,{}):"formatting"===r?(0,s.jsx)(E.A,{}):"export_ready"===r?(0,s.jsx)(P.A,{}):(0,s.jsx)(R.A,{}),subSteps:[{key:"stage-".concat(t),title:tr(e)?"提示词:".concat(tr(e)):tt(e),status:n}]}});"generating"===e.status&&t.length>0&&(null==(r=t.at(-1))?void 0:r.status)==="finish"&&(t[t.length-1]={...t[t.length-1],status:"process"});let o="generating"===e.status?(null==(l=t.at(-1))?void 0:l.key)||"prepare":"failed"===e.status?(null==(n=t.find(e=>"error"===e.status))?void 0:n.key)||(null==(i=t.at(-1))?void 0:i.key)||"prepare":"done";return{steps:t,activeKey:o}}return{steps:[],activeKey:null}},td=e=>{let{steps:t,activeKey:r}=tc(e);eQ(t),eY(r),eA(ta(e.status)),to(t,r,ta(e.status)),"failed"===e.status&&e6("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(ek(e.draft),eI(e.editedMarkdown||e.markdown),e6("editor"),eQ([]),eY(null))},tu=e=>{e8.current&&clearInterval(e8.current),e8.current=setInterval(()=>{(async()=>{try{let{document:t}=await (0,X.v7)(e,!0);td(t),await e5(),ta(t.status)||(e8.current&&clearInterval(e8.current),e8.current=null,localStorage.removeItem("activeGenDocId"))}catch(e){}})()},2e3)};(0,l.useEffect)(()=>{if(!ew||!eJ)return;let e=window.setInterval(()=>eQ(e=>{let t=e.map(e=>{if(e.key!==eJ||"process"!==e.status)return e;let t=e.subSteps.findIndex(e=>"process"===e.status),r=t<0?0:Math.min(t+1,e.subSteps.length-1);return{...e,subSteps:e.subSteps.map((e,t)=>t<r?{...e,status:"finish"}:t===r?{...e,status:"process"}:{...e,status:"wait"})}});return to(t,eJ),t}),1400);return()=>window.clearInterval(e)},[eJ,ew]);let tm=async e=>{ej(!0);try{let t=await (0,X.nU)({query:e,limit:120,includeContent:!!e.trim()});eg(t.files)}catch(e){t.error("知识库文件检索失败")}finally{ej(!1)}},tp=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],fileBindings:[]};r.resetFields(),r.setFieldsValue({...t,fileBindingGroups:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,t)=>(t.roleId&&t.filePath&&(e[t.roleId]=er([...e[t.roleId]||[],t.filePath])),e),{})}(t.fileBindings)}),tm(""),eO(!0)},tx=async()=>{try{let s=await r.validateFields(),l=s.fileBindingGroups||{},n=Object.entries(l).flatMap(e=>{let[t,r]=e;return er(r||[]).map(e=>({roleId:t,filePath:e}))}),{fileBindingGroups:i,...a}=s,o={...a,chapters:[],fileBindings:n},c=await (0,X.l2)(o);ei(c.templates),eo(c.template.id),eO(!1),await e5(),t.success(e("common.success"))}catch(e){e instanceof Error&&t.error(e.message)}},th=async r=>{try{let s=await (0,X.bV)(r);ei(s.templates),eo(s.template.id),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tg=async r=>{try{var s,l;let n=await (0,X.h0)(r);ei(n.templates),eo(null!=(l=null==(s=n.templates[0])?void 0:s.id)?l:""),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tf=async e=>{try{let{validation:r}=await (0,X.SM)(e);eq(t=>({...t,[e]:r}));let s=r.issues.filter(e=>"error"===e.level);if(eo(e),s.length>0)return void t.warning("模板运行前检查未通过,请先处理阻断项");if(r.issues.length>0)return void t.warning("模板存在警告,可在检查面板确认后继续运行");tn(e)}catch(e){t.error(e instanceof Error?e.message:"模板运行前检查失败")}},tj=async r=>{try{await (0,X.QG)(r),e_===r&&(eT(null),ek(null),eI("")),await e5(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tv=async e=>{for(;;){let{document:t}=await (0,X.v7)(e,!0);if(td(t),("completed"===t.status||"warning"===t.status)&&t.draft)return t;if("failed"===t.status)throw Error(t.error||"生成失败");await new Promise(e=>window.setTimeout(e,1500))}},ty=async()=>{if(!ea)return;if(null==Z?void 0:Z.loading){eQ(Z.flowSteps),eY(Z.activeFlowKey),eA(!0);return}eA(!0);let r=(0,X.OX)({templateId:ea});Z={id:Date.now(),templateId:ea,loading:!0,flowSteps:[],activeFlowKey:null,promise:r,listeners:new Set},eQ([]),eY(null);let s=[];try{let l=await r;l.documentId&&(localStorage.setItem("activeGenDocId",l.documentId),eT(l.documentId),(null==Z?void 0:Z.promise)===r&&(Z.documentId=l.documentId)),await e5();let n=l.documentId?await tv(l.documentId):void 0,a=l.draft||(null==n?void 0:n.draft);if(!a)throw Error("生成结果为空");(l.documentId||(null==n?void 0:n.id))&&eT(l.documentId||n.id),s.forEach(e=>window.clearTimeout(e)),ek(a),eI((null==n?void 0:n.editedMarkdown)||(null==n?void 0:n.markdown)||a.markdown),(null==Z?void 0:Z.promise)===r&&(Z.draft=a,Z.content=(null==n?void 0:n.editedMarkdown)||(null==n?void 0:n.markdown)||a.markdown);let o=n||{id:l.documentId||"draft-".concat(Date.now()),templateId:ea,title:a.title,requirement:a.requirement,markdown:a.markdown,status:a.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!a.exportGate.passed?"warning":"completed",draft:a,executionStages:a.executionStages,assets:a.assets||[],createdAt:a.generatedAt,updatedAt:Date.now()},{steps:c}=tc(o);eQ(c),to(c,"done",!1),eY("done"),(null==Z?void 0:Z.promise)===r&&(Z.activeFlowKey="done",Z.loading=!1,$()),localStorage.removeItem("activeGenDocId"),await e5(),t.success(e("common.success")),window.setTimeout(()=>{var e;return null==(e=i.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(l){localStorage.removeItem("activeGenDocId");let s=l instanceof Error?l.message:e("common.error");eQ(e=>{let t=e.map(e=>"process"===e.status?{...e,status:"error",description:s,subSteps:((e,t)=>{if("wait"===t)return e.subSteps.map(e=>({...e,status:"wait"}));if("finish"===t)return e.subSteps.map(e=>({...e,status:"finish"}));if("error"===t)return e.subSteps.map((e,t)=>({...e,status:0===t?"error":e.status}));let r=e.subSteps.findIndex(e=>"wait"===e.status);return e.subSteps.map((e,t)=>t<r||-1===r?{...e,status:"finish"}:t===r?{...e,status:"process"}:e)})(e,"error")}:e);return to(t,eJ,!1),t}),(null==Z?void 0:Z.promise)===r&&(Z.loading=!1,Z.error=s,$()),t.error(s)}finally{s.forEach(e=>window.clearTimeout(e)),eA(!1),(null==Z?void 0:Z.promise)===r&&(Z.loading=!1,$())}},tw=(0,l.useRef)(!1),tA=async r=>{(null==Z?void 0:Z.loading)&&(Z.loading=!1,Z.error="用户中止",$(),Z=null,eA(!1)),localStorage.removeItem("activeGenDocId"),e8.current&&(clearInterval(e8.current),e8.current=null);try{await (0,X.r)(r.id),await e5(),e_===r.id&&(eT(null),ek(null),eI("")),t.success("已中止生成任务")}catch(r){t.error(e("common.error"))}};(0,l.useEffect)(()=>{e0&&"workflow"===e2&&!tw.current&&!(null==Z?void 0:Z.loading)&&(null==e7?void 0:e7.projectRoleConfigId)&&(tw.current=!0,window.setTimeout(()=>{ty()},300)),e0||(tw.current=!1)},[e0,e2]);let tS=async r=>{if(eS){eD(r);try{let e={documentId:e_||void 0,title:eS.title,markdown:eb,format:r,enforceGate:!0,exportGate:eS.exportGate,useClientMarkdown:!0},t=await (0,X.UE)(e);((e,t,r)=>{let s=new Blob([e],{type:r}),l=URL.createObjectURL(s),n=document.createElement("a");n.href=l,n.download=t,n.target="_self",n.rel="noopener",n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),n.remove(),window.setTimeout(()=>URL.revokeObjectURL(l),1e3)})(t,"".concat(eS.title,".").concat("markdown"===r?"md":r),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[r])}catch(r){t.error(r instanceof Error?r.message:e("common.error"))}finally{eD(null)}}},tk=async()=>{if(eS)try{if(e_)await (0,X.a6)(e_,{editedMarkdown:eb,markdown:eb});else{let e=await (0,X.Af)({...eS,markdown:eb});ek(e.draft)}await e5(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tb=(e,t)=>{eG(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},tI=async()=>{let r=eE.trim();if(!eS||!r||eP)return;let s=e3.current+1;e3.current=s,eR(!0);try{var l,n;let e=await (0,X.Gi)({title:eS.title,markdown:eb,instruction:r,facts:null==(l=eS.structuredFacts)?void 0:l.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==(n=eS.chapters)?void 0:n.map(e=>e.title)});if(e3.current!==s||e_!=e_)return;tb(eb,r),eI(e.markdown),eM(""),t.success("已按提示完成精准修改")}catch(r){e3.current===s&&t.error(r instanceof Error?r.message:e("common.error"))}finally{e3.current===s&&eR(!1)}};if(ev)return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)(d.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)(d.A,{active:!0,paragraph:{rows:2}}),(0,s.jsx)(d.A,{active:!0,paragraph:{rows:8}})]});let tC="workflow"===e2?"工作流:".concat((null==e7?void 0:e7.name)||"选择模板"):"编辑:".concat((null==eS?void 0:eS.title)||(null==e7?void 0:e7.outputTitle)||"文档");return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"pageTitle",children:e("documents.title")}),(0,s.jsx)("p",{className:"pageDesc",children:e("documents.description")})]}),(0,s.jsx)(u.Ay,{type:"primary",icon:(0,s.jsx)(W.A,{}),onClick:()=>tp(),children:e("documents.newTemplate")})]}),(0,s.jsx)(m.A,{size:"small",tabList:[{key:"templates",label:"模板库 (".concat(B.length,")")},{key:"drafts",label:"生成记录 (".concat(eC.length,")")}],activeTabKey:eZ,onTabChange:e$,children:"templates"===eZ?0===B.length?(0,s.jsx)(p.A,{description:e("common.noData")}):(0,s.jsx)(x.A,{dataSource:B,renderItem:t=>(0,s.jsx)(x.A.Item,{style:{cursor:"pointer",padding:"10px 0"},actions:[(0,s.jsx)(u.Ay,{size:"small",icon:(0,s.jsx)(L.A,{}),onClick:e=>{e.stopPropagation(),tp(t)},children:"配置"},"cfg"),(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:(0,s.jsx)(N.A,{}),onClick:e=>{e.stopPropagation(),tf(t.id)},children:"运行"},"run"),(0,s.jsx)(u.Ay,{size:"small",icon:(0,s.jsx)(O.A,{}),onClick:e=>{e.stopPropagation(),th(t.id)}},"copy"),(0,s.jsx)(h.A,{title:e("documents.deleteTemplateConfirm"),onConfirm:e=>{null==e||e.stopPropagation(),tg(t.id)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(G.A,{}),onClick:e=>e.stopPropagation()})},"del")],onClick:()=>eo(t.id),children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,minWidth:0,flex:1},children:[function(e,t){let r=et[e]||(0,s.jsx)(R.A,{});return(0,s.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(t.category,ea===t.id),(0,s.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,s.jsx)("span",{style:{fontWeight:ea===t.id?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name}),ea===t.id&&(0,s.jsx)(c.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"当前"}),(0,s.jsx)(c.A,{style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:t.category}),eH[t.id]&&(0,s.jsxs)(c.A,{color:eH[t.id].issues.some(e=>"error"===e.level)?"error":eH[t.id].issues.length?"warning":"success",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:["检查 ",eH[t.id].fileDiagnostics.length," 文件 / ",eH[t.id].promptDiagnostics.length," 提示词"]})]}),t.description&&(0,s.jsx)(Y,{type:"secondary",style:{fontSize:12,lineHeight:"18px"},children:t.description}),eH[t.id]&&(0,s.jsx)("div",{onClick:e=>e.stopPropagation(),style:{marginTop:8,padding:10,border:"1px solid ".concat(eH[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBorder)":eH[t.id].issues.length?"var(--colorWarningBorder)":"var(--colorSuccessBorder)"),borderRadius:10,background:eH[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBg)":eH[t.id].issues.length?"var(--colorWarningBg)":"var(--colorSuccessBg)"},children:(0,s.jsxs)(g.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,s.jsxs)(g.A,{wrap:!0,children:[(0,s.jsx)(Y,{strong:!0,children:eH[t.id].issues.some(e=>"error"===e.level)?"运行前检查未通过":eH[t.id].issues.length?"运行前检查存在警告":"运行前检查通过"}),(0,s.jsxs)(c.A,{color:"blue",children:["文件角色 ",eH[t.id].fileDiagnostics.length]}),(0,s.jsxs)(c.A,{color:"purple",children:["提示词角色 ",eH[t.id].promptDiagnostics.length]})]}),eH[t.id].issues.length>0?eH[t.id].issues.map(e=>(0,s.jsx)(f.A,{type:"error"===e.level?"error":"warning",message:e.message,showIcon:!0},e.message)):(0,s.jsx)(f.A,{type:"success",message:"文件角色、提示词角色和后台自动规范检查通过,可以运行。",showIcon:!0}),!eH[t.id].issues.some(e=>"error"===e.level)&&eH[t.id].issues.length>0&&(0,s.jsx)("div",{children:(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:(0,s.jsx)(N.A,{}),onClick:()=>tn(t.id),children:"忽略警告并继续运行"})})]})})]})]})})}):0===eC.length?(0,s.jsx)(p.A,{description:e("common.noData")}):(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:eC.slice(0,15).map((e,t)=>{var r,l,n;let i,a;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 12px",border:"1px solid var(--colorBorderSecondary)",borderRadius:10,cursor:"pointer",background:e_===e.id?"var(--colorFillAlter)":void 0,minWidth:0},onClick:()=>{ti(e)},children:["completed"===e.status?(0,s.jsx)(E.A,{style:{fontSize:18,color:"var(--colorOk)",flexShrink:0,marginTop:2}}):"failed"===e.status?(0,s.jsx)(H.A,{style:{fontSize:18,color:"var(--colorDanger)",flexShrink:0,marginTop:2}}):"warning"===e.status?(0,s.jsx)(D.A,{style:{fontSize:18,color:"var(--colorWarning)",flexShrink:0,marginTop:2}}):(0,s.jsx)(q.A,{spin:!0,style:{fontSize:18,color:"#1677ff",flexShrink:0,marginTop:2}}),(0,s.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,s.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:3},children:e.title}),(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px 10px",color:"var(--colorTextSecondary)",fontSize:11},children:[(0,s.jsx)("span",{children:new Date(e.updatedAt).toLocaleString()}),(0,s.jsxs)("span",{children:["耗时 ",(e=>{let t=Math.max(0,Math.round(((e.completedAt||e.updatedAt)-e.createdAt)/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60),s=t%60;if(r<60)return s?"".concat(r," 分 ").concat(s," 秒"):"".concat(r," 分");let l=Math.floor(r/60),n=r%60;return n?"".concat(l," 小时 ").concat(n," 分"):"".concat(l," 小时")})(e)]})]}),("warning"===e.status||"failed"===e.status)&&(0,s.jsx)("div",{style:{marginTop:3,color:"failed"===e.status?"var(--colorError)":"var(--colorWarning)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null==(r=e.warningIssues)?void 0:r[0])||(null==(n=e.draft)||null==(l=n.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:l.message)||"需复核"})]}),(0,s.jsxs)(g.A,{size:4,align:"center",children:[(0,s.jsx)(c.A,{color:"completed"===(i=e.status)?"success":"warning"===i?"warning":"failed"===i?"error":"processing",style:{margin:0,fontSize:10,lineHeight:"18px"},children:"completed"===(a=e.status)?"已完成":"warning"===a?"需复核":"failed"===a?"失败":"生成中"}),(0,s.jsxs)(c.A,{style:{margin:0,fontSize:10,lineHeight:"18px"},children:["#",t+1]}),(0,s.jsx)(h.A,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),tj(e.id)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(G.A,{}),onClick:e=>e.stopPropagation()})}),ta(e.status)&&(0,s.jsx)(h.A,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),tA(e)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),children:"中止"})}),(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:ta(e.status)?(0,s.jsx)(q.A,{spin:!0}):(0,s.jsx)(N.A,{}),onClick:t=>{t.stopPropagation(),ti(e)},children:"打开"})]})]},e.id)})})}),(0,s.jsx)(j.A,{title:tC,open:e0,onClose:()=>{e1(!1),e8.current&&(clearInterval(e8.current),e8.current=null)},width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:eS?(0,s.jsxs)(g.A,{wrap:!0,children:[(0,s.jsx)(u.Ay,{icon:(0,s.jsx)(K.A,{}),disabled:eP,onClick:()=>{tk()},children:e("documents.saveDraft")}),(0,s.jsx)(u.Ay,{icon:(0,s.jsx)(U.A,{}),disabled:eP,loading:"markdown"===eB,onClick:()=>{tS("markdown")},children:"MD"}),(0,s.jsx)(u.Ay,{disabled:eP,loading:"html"===eB,onClick:()=>{tS("html")},children:"HTML"}),(0,s.jsx)(u.Ay,{disabled:eP,loading:"docx"===eB,onClick:()=>{tS("docx")},children:"DOCX"}),(0,s.jsx)(u.Ay,{type:"primary",disabled:eP,loading:"pdf"===eB,onClick:()=>{tS("pdf")},children:"PDF"})]}):ew&&"workflow"===e2?(0,s.jsx)(u.Ay,{danger:!0,onClick:()=>{(async()=>{e_&&await (0,X.r)(e_).catch(()=>void 0),Z&&(Z.loading=!1,Z.error="用户中止",$(),Z=null),localStorage.removeItem("activeGenDocId"),e8.current&&(clearInterval(e8.current),e8.current=null),eA(!1),eQ([]),eY(null),e1(!1),await e5(),t.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,s.jsxs)(g.A,{direction:"vertical",style:{width:"100%"},size:"middle",children:["workflow"===e2&&eX.length>0&&(0,s.jsx)(v.A,{direction:"vertical",size:"small",current:e9,items:eX.map(e=>{let t;return{title:e.title,description:(0,s.jsxs)("div",{children:[e.subtitle&&(0,s.jsx)("div",{style:{marginBottom:4},children:(0,s.jsx)(c.A,{children:e.subtitle})}),(0,s.jsx)("div",{children:e.description}),(0,s.jsx)("div",{style:{marginTop:4},children:e.subSteps.map(e=>{var t;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,s.jsx)(F.A,{}):"finish"===t?(0,s.jsx)(E.A,{}):"warning"===t?(0,s.jsx)(D.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,s.jsx)(G.A,{}):(0,s.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,s.jsx)("span",{children:e.title})]},e.key)})})]}),status:"warning"===(t=e.status)?"finish":t,icon:"process"===e.status?(0,s.jsx)(F.A,{}):"warning"===e.status?(0,s.jsx)(D.A,{style:{color:"var(--colorWarning)"}}):e.icon}})}),"workflow"===e2&&ew&&0===eX.length&&(0,s.jsx)("div",{style:{textAlign:"center",padding:40},children:(0,s.jsx)(y.A,{tip:"正在准备生成…"})}),eS&&(0,s.jsx)("div",{ref:i,children:(0,s.jsx)(w.A,{items:[{key:"edit",label:e("documents.edit"),children:(0,s.jsxs)(g.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,s.jsx)(J,{rows:28,value:eb,disabled:eP,onChange:e=>eI(e.target.value)}),(0,s.jsx)(m.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,s.jsxs)(g.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,s.jsxs)(g.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(g.A,{size:6,children:[(0,s.jsx)(M.A,{style:{color:"var(--colorAccent)"}}),(0,s.jsx)(Y,{strong:!0,children:"精准修改"}),(0,s.jsx)(c.A,{color:"blue",children:"AI 辅助"})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,s.jsxs)(u.Ay,{size:"small",icon:(0,s.jsx)(V.A,{}),onClick:()=>eL(e=>!e),disabled:0===eF.length,children:["历史版本 ",eF.length>0?eF.length:""]})]}),(0,s.jsx)(J,{rows:4,value:eE,disabled:eP,onChange:e=>eM(e.target.value),placeholder:"例如:把第三章语气改得更专业,补充工期风险应对;或压缩全文到 3000 字以内,并保留关键事实。"}),(0,s.jsxs)(g.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsx)(g.A,{wrap:!0,children:["更专业","更简洁","强化细节","优化结构"].map(e=>(0,s.jsx)(u.Ay,{size:"small",disabled:eP,onClick:()=>eM(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,s.jsx)(u.Ay,{type:"primary",icon:(0,s.jsx)(M.A,{}),loading:eP,disabled:!eE.trim(),onClick:()=>{tI()},children:"应用修改"})]}),eW&&(0,s.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,s.jsx)(x.A,{size:"small",dataSource:eF,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,s.jsx)(x.A.Item,{actions:[(0,s.jsx)(u.Ay,{size:"small",disabled:eP,onClick:()=>{tb(eb,"恢复前版本"),eI(e.content),t.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,s.jsx)(x.A.Item.Meta,{title:(0,s.jsxs)(g.A,{children:[(0,s.jsx)(Y,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(c.A,{children:e.prompt})]}),description:(0,s.jsx)(Y,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eS.chapters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eS.chapters.length,")"]}),(0,s.jsx)(x.A,{size:"small",dataSource:eS.chapters,renderItem:e=>(0,s.jsx)(x.A.Item,{children:(0,s.jsx)(x.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eS.structuredFacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eS.structuredFacts.length,")"]}),(0,s.jsx)(A.A,{size:"small",column:1,bordered:!0,children:eS.structuredFacts.map((e,t)=>(0,s.jsxs)(A.A.Item,{label:e.key,children:[(0,s.jsx)("span",{children:e.value}),(0,s.jsx)(c.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,s.jsx)(Y,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eS.sources.length,")"]}),0===eS.sources.length?(0,s.jsx)(p.A,{description:"暂无"}):(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eS.sources.map(e=>(0,s.jsxs)(c.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eS.missingItems.length,")"]}),0===eS.missingItems.length?(0,s.jsx)(p.A,{description:"无缺失"}):(0,s.jsx)(x.A,{size:"small",dataSource:eS.missingItems,renderItem:e=>(0,s.jsx)(x.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eS.validationIssues.length,")"),children:0===eS.validationIssues.length?(0,s.jsx)(p.A,{description:"校验通过"}):(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eS.validationIssues.map(e=>(0,s.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,s.jsx)(c.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,s.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,s.jsx)("div",{style:{marginTop:6,color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all"},children:e.suggestion})]},"".concat(e.level,"-").concat(e.message))),eS.exportGate.checklist.length>0&&(0,s.jsxs)("div",{style:{marginTop:8},children:[(0,s.jsx)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,s.jsx)(x.A,{size:"small",dataSource:eS.exportGate.checklist,renderItem:e=>(0,s.jsxs)(x.A.Item,{children:[(0,s.jsx)(Y,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,s.jsx)(c.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eS.executionStages.length,")"),children:(0,s.jsx)(x.A,{size:"small",dataSource:eS.executionStages,renderItem:e=>(0,s.jsxs)(x.A.Item,{children:[(0,s.jsx)(x.A.Item.Meta,{avatar:ee[e.type]||(0,s.jsx)(R.A,{}),title:(0,s.jsx)(Y,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(el[e.type]||e.type," \xb7 ").concat(e.roleName||te(e.roleId))}),description:(0,s.jsx)(Y,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,s.jsx)(c.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,s.jsx)(j.A,{title:e("documents.templateEditor"),open:eN,onClose:()=>eO(!1),width:860,maskClosable:!1,styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsxs)(g.A,{children:[(0,s.jsx)(u.Ay,{onClick:()=>eO(!1),children:e("common.cancel")}),(0,s.jsx)(u.Ay,{type:"primary",onClick:()=>{tx()},children:e("common.save")})]}),children:(0,s.jsxs)(o.A,{form:r,layout:"vertical",requiredMark:"optional",children:[(0,s.jsxs)(S.A,{gutter:12,children:[(0,s.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(n.A,{})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"name",label:e("documents.templateName"),rules:[{required:!0}],children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"category",label:e("documents.templateCategory"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"outputTitle",label:e("documents.outputTitle"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:12,children:(0,s.jsx)(o.A.Item,{name:"description",label:e("documents.templateDescription"),children:(0,s.jsx)(n.A,{})})})]}),(0,s.jsx)(o.A.Item,{name:"projectRoleConfigId",label:e("documents.projectRoleConfig"),rules:[{required:!0,message:e("documents.projectRoleConfigRequired")}],children:(0,s.jsx)(b.A,{showSearch:!0,placeholder:e("documents.projectRoleConfigRequired"),options:e4})}),(0,s.jsxs)("div",{style:{marginBottom:16},children:[(0,s.jsxs)(g.A,{style:{width:"100%",justifyContent:"space-between",marginBottom:8},children:[(0,s.jsx)(Y,{strong:!0,children:"项目文件绑定"}),(0,s.jsx)(c.A,{color:"blue",children:"按文件角色多选"})]}),(0,s.jsx)(f.A,{type:"info",showIcon:!0,style:{marginBottom:12},message:"每个文件角色下多选对应的知识库文件。用户换项目时,只需要在这里重新选择对应项目资料。"}),0===eK.length?(0,s.jsx)(p.A,{image:p.A.PRESENTED_IMAGE_SIMPLE,description:"暂无可用文件角色"}):eK.map(e=>(0,s.jsx)(m.A,{size:"small",style:{marginBottom:12},title:(0,s.jsx)(g.A,{children:(0,s.jsx)(Y,{children:e.label})}),children:(0,s.jsx)(o.A.Item,{name:["fileBindingGroups",e.value],children:(0,s.jsx)(b.A,{mode:"multiple",showSearch:!0,filterOption:!1,loading:ef,onSearch:e=>{tm(e)},onFocus:()=>{tm("")},tagRender:ts,placeholder:"输入关键词搜索知识库文件",options:eV})})},e.value))]}),(0,s.jsx)(f.A,{type:"info",showIcon:!0,message:"文档规范由后台根据模板、提示词和角色绑定自动生成,无需手动维护规范包。"})]})})]})}}},e=>{e.O(0,[433,787,576,195,455,506,412,304,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e={},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}},f=!0;try{e[o](a,a.exports,t),f=!1}finally{f&&delete r[o]}return a.exports}t.m=e,(()=>{var e=[];t.O=(r,o,n,a)=>{if(o){a=a||0;for(var f=e.length;f>0&&e[f-1][2]>a;f--)e[f]=e[f-1];e[f]=[o,n,a];return}for(var l=1/0,f=0;f<e.length;f++){for(var[o,n,a]=e[f],u=!0,i=0;i<o.length;i++)(!1&a||l>=a)&&Object.keys(t.O).every(e=>t.O[e](o[i]))?o.splice(i--,1):(u=!1,a<l&&(l=a));if(u){e.splice(f--,1);var p=n();void 0!==p&&(r=p)}}return r}})(),t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},(()=>{var e,r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;t.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);t.r(a);var f={};e=e||[null,r({}),r([]),r(r)];for(var l=2&n&&o;"object"==typeof l&&!~e.indexOf(l);l=r(l))Object.getOwnPropertyNames(l).forEach(e=>f[e]=()=>o[e]);return f.default=()=>o,t.d(a,f),a}})(),t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/_next/",(()=>{var e={68:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,a,[f,l,u]=o,i=0;if(f.some(r=>0!==e[r])){for(n in l)t.o(l,n)&&(t.m[n]=l[n]);if(u)var p=u(t)}for(r&&r(o);i<f.length;i++)a=f[i],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(p)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,e,t,c,a,n,d,i,r,u,o,b,f,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,e,t,c,a,n,d,i,r,u,o,k,b,f,g,h,l,j,m){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:b,bitArray:[]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:b,bitArray:[]},"/":[s,e,f,g,"static/chunks/pages/index-a2a24e9602e7ea52.js"],"/_error":["static/chunks/pages/_error-282257fbdcc167b4.js"],"/asset-library":[s,e,n,"static/chunks/749-83476f9bcd014a5a.js","static/chunks/pages/asset-library-e9ddfe1cbaac42d9.js"],"/context/long-term":[s,e,t,c,a,n,d,i,h,"static/chunks/pages/context/long-term-6b9a9683a4d6ea86.js"],"/context/short-term":[s,e,t,c,a,n,d,i,h,"static/chunks/pages/context/short-term-6078efae6e3a905c.js"],"/document-roles":[s,e,t,c,i,"static/chunks/496-4fb9a063790e65ff.js","static/chunks/pages/document-roles-fd02980db151650c.js"],"/documents":[s,e,t,c,i,u,l,"static/chunks/304-7bc5b1cd0b9315a1.js","static/chunks/pages/documents-9967f1fdf3fb6d03.js"],"/guide":[s,e,l,"static/chunks/20-00147a779147a5a4.js","static/chunks/pages/guide-cba4ca0b28bb9b64.js"],"/knowledge":["static/chunks/pages/knowledge-905248d8dcb15453.js"],"/knowledge/file-detail":[s,e,t,a,n,d,u,j,o,"static/chunks/pages/knowledge/file-detail-2e874c92d01b1c14.js"],"/knowledge/files":[s,e,t,a,n,d,o,"static/chunks/pages/knowledge/files-75a33100a1b3b5b5.js"],"/knowledge/manage":[s,e,u,"static/chunks/788-7f7359a830e3f4fd.js","static/chunks/pages/knowledge/manage-ed99a6cb254ddbb7.js"],"/knowledge/search":[s,e,t,u,m,o,"static/chunks/pages/knowledge/search-afb423fc22eb623b.js"],"/models":[s,e,t,c,a,i,m,"static/chunks/647-d5e08fda405f7059.js","static/chunks/pages/models-d5e80645dc4a61b1.js"],"/overview":[s,e,f,g,"static/chunks/pages/overview-1260176045ed5f7a.js"],"/prompt":[s,e,t,c,a,"static/chunks/525-5d947137d894f5fe.js","static/chunks/pages/prompt-9b869fbe3463020d.js"],"/settings":[s,e,"static/chunks/pages/settings-fa9d6a56898ba678.js"],"/system/logs":[s,t,c,a,n,d,j,"static/chunks/pages/system/logs-3826fa44a76b12fc.js"],sortedPages:["/","/_app","/_error","/asset-library","/context/long-term","/context/short-term","/document-roles","/documents","/guide","/knowledge","/knowledge/file-detail","/knowledge/files","/knowledge/manage","/knowledge/search","/models","/overview","/prompt","/settings","/system/logs"]}}("static/chunks/433-233659be69169c19.js","static/chunks/787-c18af810af3433f6.js","static/chunks/576-6699fed6c88502fe.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/985-4b4a3ed36ada16eb.js","static/chunks/150-134099bf526e9292.js","static/chunks/289-30e7c55f49a896b7.js","static/chunks/455-97ad88d6604f54b7.js",0,"static/chunks/506-93f730bc149d0dce.js","static/css/09be1fdeab8595ab.css",1e-4,NaN,"static/chunks/694-2d545cfbb9779f2c.js","static/chunks/795-d8fb7a0420512701.js","static/chunks/932-2f195f4200ce9378.js","static/chunks/412-b9c854c6a76db67d.js","static/chunks/861-91cbdd34b8e23151.js","static/chunks/938-45efd516bb130bd5.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@customize-agent/server",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.49",
|
|
4
4
|
"description": "Customize Agent Web 管理控制台",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json"
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"typescript": "^6.0.3",
|
|
51
51
|
"xlsx": "^0.18.5",
|
|
52
52
|
"@customize-agent/knowledge": "^4.0.17",
|
|
53
|
-
"@customize-agent/
|
|
54
|
-
"@customize-agent/
|
|
53
|
+
"@customize-agent/runtime": "^3.0.9",
|
|
54
|
+
"@customize-agent/llm": "^3.0.7"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@tailwindcss/postcss": "^4.3.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var e={},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var f=r[o]={exports:{}},a=!0;try{e[o](f,f.exports,t),a=!1}finally{a&&delete r[o]}return f.exports}t.m=e,(()=>{var e=[];t.O=(r,o,n,f)=>{if(o){f=f||0;for(var a=e.length;a>0&&e[a-1][2]>f;a--)e[a]=e[a-1];e[a]=[o,n,f];return}for(var i=1/0,a=0;a<e.length;a++){for(var[o,n,f]=e[a],l=!0,u=0;u<o.length;u++)(!1&f||i>=f)&&Object.keys(t.O).every(e=>t.O[e](o[u]))?o.splice(u--,1):(l=!1,f<i&&(i=f));if(l){e.splice(a--,1);var c=n();void 0!==c&&(r=c)}}return r}})(),t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},(()=>{var e,r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;t.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var f=Object.create(null);t.r(f);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&o;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(e=>a[e]=()=>o[e]);return a.default=()=>o,t.d(f,a),f}})(),t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/_next/",(()=>{var e={68:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,f,[a,i,l]=o,u=0;if(a.some(r=>0!==e[r])){for(n in i)t.o(i,n)&&(t.m[n]=i[n]);if(l)var c=l(t)}for(r&&r(o);u<a.length;u++)f=a[u],t.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return t.O(c)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})()})();
|
|
File without changes
|