@customize-agent/server 4.0.2 → 4.0.3
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 +20 -20
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/chunks/3445.js +40 -14
- package/.next/server/chunks/8204.js +1 -1
- package/.next/server/chunks/9270.js +1 -1
- package/.next/server/chunks/9301.js +2 -2
- 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/context.js +25 -1
- package/.next/server/pages/api/documents/export.js +1 -1
- 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/document-specs.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/search.js.nft.json +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/{JSSClm7Ao89P7zD8JkYIG → Hr2tsu12MBY5TxEsnEZnS}/_buildManifest.js +1 -1
- package/.next/static/chunks/261-38aa5b7186d6c652.js +1 -0
- package/.next/static/chunks/4427-3157df6662359f8b.js +1 -0
- package/.next/static/chunks/{7150-123ff059dd0e2eb9.js → 7150-337333a0e39eac73.js} +2 -2
- package/.next/static/chunks/7223-97205011db4aa4ae.js +1 -0
- package/.next/static/chunks/8676-ae7c8476d85cc5eb.js +1 -0
- package/.next/static/chunks/pages/{_app-38ff7f551a80399f.js → _app-efe7c86ef4792ef9.js} +14 -14
- package/.next/static/chunks/pages/document-roles-612878579899e768.js +1 -0
- package/.next/static/chunks/pages/documents-ebcb8c79491fe28a.js +1 -0
- package/.next/static/chunks/pages/guide-4aa2f239f4d37599.js +1 -0
- package/.next/static/chunks/pages/knowledge/search-5d949867a3849147.js +1 -0
- package/.next/static/chunks/pages/{models-a37db9926d9a0a52.js → models-1788b9741155e3ce.js} +1 -1
- package/.next/static/chunks/pages/overview-7390048298712904.js +1 -0
- package/next.config.ts +3 -0
- package/package.json +2 -2
- package/.next/static/chunks/261-8a5ce39d74fc746e.js +0 -1
- package/.next/static/chunks/4427-302c5267a1f8493e.js +0 -1
- package/.next/static/chunks/7223-58376fd8a1d62df4.js +0 -1
- package/.next/static/chunks/8676-5982391f15ea1190.js +0 -1
- package/.next/static/chunks/pages/document-roles-ab6dfead3fd99a2c.js +0 -1
- package/.next/static/chunks/pages/documents-c04e4ed600384e6a.js +0 -1
- package/.next/static/chunks/pages/guide-c5ef2e13eab4c312.js +0 -1
- package/.next/static/chunks/pages/knowledge/search-72a46d6d1200ef93.js +0 -1
- package/.next/static/chunks/pages/overview-3dd4c539302d7349.js +0 -1
- /package/.next/static/{JSSClm7Ao89P7zD8JkYIG → Hr2tsu12MBY5TxEsnEZnS}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7223],{1611:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"}},2256:(e,t,r)=>{r.d(t,{A:()=>a});let a=r(25341).A},4034:(e,t,r)=>{r.d(t,{L:()=>n,v:()=>c});var a=r(3638);let n=(e,t,r)=>(0,a.$)({[`${e}-status-success`]:"success"===t,[`${e}-status-warning`]:"warning"===t,[`${e}-status-error`]:"error"===t,[`${e}-status-validating`]:"validating"===t,[`${e}-has-feedback`]:r}),c=(e,t)=>t||e},11100:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]},name:"scissor",theme:"outlined"}},14995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},15033:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(97109).createContext)({})},19013:(e,t,r)=>{r.d(t,{C:()=>n});var a=r(97109);let n=()=>a.useReducer(e=>e+1,0)},19135:(e,t,r)=>{r.d(t,{Ay:()=>o,Gl:()=>s,ko:()=>i,ye:()=>l});var a=r(97109),n=r(7709),c=r(26047);let l=["xxxl","xxl","xl","lg","md","sm","xs"],s=[].concat(l).reverse(),i=(e,t)=>{if(t){for(let r of l)if(e[r]&&t?.[r]!==void 0)return t[r]}},o=()=>{let[,e]=(0,n.Ay)(),t=(e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}))((e=>{let t=[].concat(l).reverse();return t.forEach((r,a)=>{let n=r.toUpperCase(),c=`screen${n}Min`,l=`screen${n}`;if(!(e[c]<=e[l]))throw Error(`${c}<=${l} fails : !(${e[c]}<=${e[l]})`);if(a<t.length-1){let r=`screen${n}Max`;if(!(e[l]<=e[r]))throw Error(`${l}<=${r} fails : !(${e[l]}<=${e[r]})`);let c=t[a+1].toUpperCase(),s=`screen${c}Min`;if(!(e[r]<=e[s]))throw Error(`${r}<=${s} fails : !(${e[r]}<=${e[s]})`)}}),e})(e));return a.useMemo(()=>{let e=new Map,r=-1,a={};return{responsiveMap:t,matchHandlers:{},dispatch:t=>(a=t,e.forEach(e=>{e(a)}),e.size>=1),subscribe(t){return e.size||this.register(),r+=1,e.set(r,t),t(a),r},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let r=({matches:t})=>{this.dispatch({...a,[e]:t})},n=window.matchMedia(t);(0,c.Tn)(n.addEventListener)&&n.addEventListener("change",r),this.matchHandlers[t]={mql:n,listener:r},r(n)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];(0,c.Tn)(t?.mql.removeEventListener)&&t.mql.removeEventListener("change",t?.listener)}),e.clear()}}},[t])}},21247:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"}}]},name:"merge-cells",theme:"outlined"}},23216:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(29664),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},23830:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"}},25341:(e,t,r)=>{r.d(t,{A:()=>u});var a=r(97109),n=r(3638),c=r(26047),l=r(19135),s=r(74567),i=r(59609),o=r(15033),f=r(84060);let d=(e,t)=>{let[r,n]=a.useState(()=>(0,c.Kg)(e)?e:"");return a.useEffect(()=>{(()=>{if((0,c.Kg)(e)&&n(e),(0,c.Qd)(e))for(let r=0;r<l.ye.length;r++){let a=l.ye[r];if(!t||!t[a])continue;let c=e[a];if(void 0!==c)return void n(c)}})()},[JSON.stringify(e),t]),r},u=a.forwardRef((e,t)=>{let{prefixCls:r,justify:u,align:h,className:v,style:p,children:m,gutter:g=0,wrap:$,...b}=e,{getPrefixCls:x,direction:w}=a.useContext(s.QO),A=(0,i.A)(!0,null),y=d(h,A),E=d(u,A),O=x("row",r),[H,z]=(0,f.L3)(O),V=function(e,t){let r=[void 0,void 0],a=Array.isArray(e)?e:[e,void 0],n=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return a.forEach((e,t)=>{if((0,c.Qd)(e))for(let a=0;a<l.ye.length;a++){let c=l.ye[a];if(n[c]&&void 0!==e[c]){r[t]=e[c];break}}else r[t]=e}),r}(g,A),j=(0,n.$)(O,{[`${O}-no-wrap`]:!1===$,[`${O}-${E}`]:E,[`${O}-${y}`]:y,[`${O}-rtl`]:"rtl"===w},v,H,z),M={};V?.[0]&&(M.marginInline=(0,c.Et)(V[0])?`${-(V[0]/2)}px`:`calc(${V[0]} / -2)`);let[N,R]=V;M.rowGap=R;let L=a.useMemo(()=>({gutter:[N,R],wrap:$}),[N,R,$]);return a.createElement(o.A.Provider,{value:L},a.createElement("div",{...b,className:j,style:{...M,...p},ref:t},m))})},26619:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(1611),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},29606:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(23830),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},29664:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"}},30960:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"}},34084:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"}},35459:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(98995),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},38770:(e,t,r)=>{r.d(t,{A:()=>a});let a=r(51916).A},49484:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(11100),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},51916:(e,t,r)=>{r.d(t,{A:()=>u});var a=r(97109),n=r(3638),c=r(26047),l=r(19135),s=r(74567),i=r(10540),o=r(15033),f=r(84060);function d(e){return"auto"===e?"1 1 auto":(0,c.Et)(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}let u=a.forwardRef((e,t)=>{let{getPrefixCls:r,direction:u}=a.useContext(s.QO),{gutter:h,wrap:v}=a.useContext(o.A),{prefixCls:p,span:m,order:g,offset:$,push:b,pull:x,className:w,children:A,flex:y,style:E,...O}=e,H=r("col",p),z=r(),[V,j]=(0,f.xV)(H),[M]=(0,i.PN)(z,"col"),N={},R={};l.Gl.forEach(t=>{let r={},a=e[t];(0,c.Et)(a)?r.span=a:(0,c.Qd)(a)&&(r=a||{}),delete O[t],R={...R,[`${H}-${t}-${r.span}`]:(0,c.R)(r.span),[`${H}-${t}-order-${r.order}`]:r.order||0===r.order,[`${H}-${t}-offset-${r.offset}`]:r.offset||0===r.offset,[`${H}-${t}-push-${r.push}`]:r.push||0===r.push,[`${H}-${t}-pull-${r.pull}`]:r.pull||0===r.pull,[`${H}-rtl`]:"rtl"===u},r.flex&&(R[`${H}-${t}-flex`]=!0,N[M(`${t}-flex`)]=d(r.flex))});let L=(0,n.$)(H,{[`${H}-${m}`]:void 0!==m,[`${H}-order-${g}`]:g,[`${H}-offset-${$}`]:$,[`${H}-push-${b}`]:b,[`${H}-pull-${x}`]:x},w,R,V,j),S={};return h?.[0]&&(S.paddingInline=(0,c.Et)(h[0])?`${h[0]/2}px`:`calc(${h[0]} / 2)`),y&&(S.flex=d(y),!1!==v||S.minWidth||(S.minWidth=0)),a.createElement("div",{...O,style:{...S,...E,...N},className:L,ref:t},A)})},53234:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54849:(e,t,r)=>{r.d(t,{A:()=>w});var a=r(97109),n=r(82813),c=r(52690),l=r(3638),s=r(92162),i=r(26047),o=r(74567),f=r(88762);let d=e=>{let t,{value:r,formatter:n,precision:c,decimalSeparator:l,groupSeparator:s="",prefixCls:o,className:f,style:d}=e;if((0,i.Tn)(n))t=n(r);else{let e=String(r),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){let e=n[1],r=n[2]||"0",f=n[4]||"";r=r.replace(/\B(?=(\d{3})+(?!\d))/g,s),(0,i.Et)(c)&&(f=f.padEnd(c,"0").slice(0,c>0?c:0)),f&&(f=`${l}${f}`),t=[a.createElement("span",{key:"int",className:`${o}-content-value-int`},e,r),f&&a.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},f)]}else t=e}return a.createElement("span",{className:f,style:d},t)};var u=r(7961),h=r(10540),v=r(28403);let p=(0,h.OF)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:r,padding:a,colorTextDescription:n,titleFontSize:c,colorTextHeading:l,contentFontSize:s,fontFamily:i}=e;return{[t]:{...(0,u.dF)(e),[`${t}-header`]:{paddingBottom:r,[`${t}-title`]:{color:n,fontSize:c}},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:l,fontSize:s,fontFamily:i,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:r},[`${t}-content-suffix`]:{marginInlineStart:r}}}}})((0,v.oX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:r}=e;return{titleFontSize:r,contentFontSize:t}}),m=a.forwardRef((e,t)=>{let{prefixCls:r,className:c,rootClassName:u,style:h,valueStyle:v,value:m=0,title:g,valueRender:$,prefix:b,suffix:x,loading:w=!1,formatter:A,precision:y,decimalSeparator:E=".",groupSeparator:O=",",onMouseEnter:H,onMouseLeave:z,styles:V,classNames:j,...M}=e,{getPrefixCls:N,direction:R,className:L,style:S,classNames:C,styles:k}=(0,o.TP)("statistic"),P=N("statistic",r),[B,T]=p(P),X={...e,decimalSeparator:E,groupSeparator:O,loading:w,value:m},I=(0,s.XT)(S),D=(0,s.XT)(h),[Q,_]=(0,s.AV)([C,j],[k,I,V,D],{props:X}),F=(0,l.$)(P,{[`${P}-rtl`]:"rtl"===R},L,c,u,Q.root,B,T),G=(0,l.$)(`${P}-header`,Q.header),q=(0,l.$)(`${P}-title`,Q.title),K=(0,l.$)(`${P}-content`,Q.content),U=(0,l.$)(`${P}-content-value`,Q.value),W=(0,l.$)(`${P}-content-prefix`,Q.prefix),J=(0,l.$)(`${P}-content-suffix`,Q.suffix),Y=a.createElement(d,{decimalSeparator:E,groupSeparator:O,prefixCls:P,formatter:A,precision:y,value:m,className:U,style:_.value}),Z=a.useRef(null);a.useImperativeHandle(t,()=>({nativeElement:Z.current}));let ee=(0,n.KE)(M,{aria:!0,data:!0});return a.createElement("div",{...ee,className:F,style:_.root,ref:Z,onMouseEnter:H,onMouseLeave:z},g&&a.createElement("div",{className:G,style:_.header},a.createElement("div",{className:q,style:_.title},g)),a.createElement(f.A,{paragraph:!1,loading:w,className:`${P}-skeleton`,active:!0},a.createElement("div",{className:K,style:{...v,..._.content}},b&&a.createElement("span",{className:W,style:_.prefix},b),(0,i.Tn)($)?$(Y):Y,x&&a.createElement("span",{className:J,style:_.suffix},x))))}),g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],$=1e3/60,b=e=>{let{value:t,format:r="HH:mm:ss",onChange:l,onFinish:s,type:i,...o}=e,f="countdown"===i,[d,u]=a.useState(null),h=(0,n._q)(()=>{let e=Date.now(),r=new Date(t).getTime();u({});let a=f?r-e:e-r;return l?.(a),!f||!(r<e)||(s?.(),!1)});return a.useEffect(()=>{let e;return e=window.setInterval(()=>{h()||window.clearInterval(e)},$),()=>{window.clearInterval(e)}},[t,f]),a.useEffect(()=>{u({})},[]),a.createElement(m,{...o,value:t,valueRender:e=>(0,c.Ob)(e,{title:void 0}),formatter:(e,t)=>d?function(e,t,r){let{format:a=""}=t,n=new Date(e).getTime(),c=Date.now();return function(e,t){let r=e,a=/\[[^\]]*]/g,n=(t.match(a)||[]).map(e=>e.slice(1,-1)),c=t.replace(a,"[]"),l=g.reduce((e,[t,a])=>{if(e.includes(t)){let n=Math.floor(r/a);return r-=n*a,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return n.toString().padStart(t,"0")})}return e},c),s=0;return l.replace(a,()=>{let e=n[s];return s+=1,e})}(r?Math.max(n-c,0):Math.max(c-n,0),a)}(e,{...t,format:r},f):"-"})},x=a.memo(e=>a.createElement(b,{...e,type:"countdown"}));m.Timer=b,m.Countdown=x;let w=m},56768:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(30960),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},58740:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(34084),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},59609:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(82813),c=r(19013),l=r(19135);let s=function(e=!0,t={}){let r=(0,a.useRef)(t),[,s]=(0,c.C)(),i=(0,l.Ay)();return(0,n.Nf)(()=>{let t=i.subscribe(t=>{r.current=t,e&&s()});return()=>i.unsubscribe(t)},[]),r.current}},63214:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},63663:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(21247),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},84190:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(63214),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},93314:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(53234),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))},98995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"}},99811:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(97109),n=r(14995),c=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let s=a.forwardRef((e,t)=>a.createElement(c.A,l({},e,{ref:t,icon:n.A})))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8676],{2256:(e,t,r)=>{r.d(t,{A:()=>n});let n=r(25341).A},8579:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(95008),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},10218:(e,t,r)=>{r.d(t,{A:()=>v,H:()=>p});var n=r(97109),o=r(4932),i=r(82813);let l=e=>"object"==typeof e&&null!=e&&1===e.nodeType,a=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,c=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let r=getComputedStyle(e,null);return a(r.overflowY,t)||a(r.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},s=(e,t,r,n,o,i,l,a)=>i<e&&l>t||i>e&&l<t?0:i<=e&&a<=r||l>=t&&a>=r?i-e-n:l>t&&a<r||i<e&&a>r?l-t+o:0,d=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},h=(e,t)=>{var r,n,o,i;if("undefined"==typeof document)return[];let{scrollMode:a,block:h,inline:f,boundary:u,skipOverflowHiddenElements:p}=t,m="function"==typeof u?u:e=>e!==u;if(!l(e))throw TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,g=[],b=e;for(;l(b)&&m(b);){if((b=d(b))===v){g.push(b);break}null!=b&&b===document.body&&c(b)&&!c(document.documentElement)||null!=b&&c(b,p)&&g.push(b)}let w=null!=(n=null==(r=window.visualViewport)?void 0:r.width)?n:innerWidth,$=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:y,scrollY:A}=window,{height:H,width:z,top:E,right:M,bottom:x,left:O}=e.getBoundingClientRect(),{top:j,right:L,bottom:C,left:I}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),V="start"===h||"nearest"===h?E-j:"end"===h?x+C:E+H/2-j+C,R="center"===f?O+z/2-I+L:"end"===f?M+L:O-I,N=[];for(let e=0;e<g.length;e++){let t=g[e],{height:r,width:n,top:o,right:i,bottom:l,left:d}=t.getBoundingClientRect();if("if-needed"===a&&E>=0&&O>=0&&x<=$&&M<=w&&(t===v&&!c(t)||E>=o&&x<=l&&O>=d&&M<=i))break;let u=getComputedStyle(t),p=parseInt(u.borderLeftWidth,10),m=parseInt(u.borderTopWidth,10),b=parseInt(u.borderRightWidth,10),j=parseInt(u.borderBottomWidth,10),L=0,C=0,I="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-b:0,k="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-j:0,S="offsetWidth"in t?0===t.offsetWidth?0:n/t.offsetWidth:0,B="offsetHeight"in t?0===t.offsetHeight?0:r/t.offsetHeight:0;if(v===t)L="start"===h?V:"end"===h?V-$:"nearest"===h?s(A,A+$,$,m,j,A+V,A+V+H,H):V-$/2,C="start"===f?R:"center"===f?R-w/2:"end"===f?R-w:s(y,y+w,w,p,b,y+R,y+R+z,z),L=Math.max(0,L+A),C=Math.max(0,C+y);else{L="start"===h?V-o-m:"end"===h?V-l+j+k:"nearest"===h?s(o,l,r,m,j+k,V,V+H,H):V-(o+r/2)+k/2,C="start"===f?R-d-p:"center"===f?R-(d+n/2)+I/2:"end"===f?R-i+b+I:s(d,i,n,p,b+I,R,R+z,z);let{scrollLeft:e,scrollTop:a}=t;L=0===B?0:Math.max(0,Math.min(a+L/B,t.scrollHeight-r/B+k)),C=0===S?0:Math.max(0,Math.min(e+C/S,t.scrollWidth-n/S+I)),V+=a-L,R+=e-C}N.push({el:t,top:L,left:C})}return N};var f=r(26047),u=r(44624);function p(e){return(0,u.$r)(e).join("_")}function m(e,t){let r=t.getFieldInstance(e),n=(0,i.rb)(r);if(n)return n;let o=(0,u.kV)((0,u.$r)(e),t.__INTERNAL__.name);if(o)return document.getElementById(o)}function v(e){let[t]=(0,o.mN)(),r=n.useRef({}),i=n.useMemo(()=>e??{...t,__INTERNAL__:{itemRef:e=>t=>{let n=p(e);t?r.current[n]=t:delete r.current[n]}},scrollToField:(e,t={})=>{let{focus:r,...n}=t,o=m(e,i);o&&(!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let r=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(h(e,t));let n="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:o,top:i,left:l}of h(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=i-r.top+r.bottom,t=l-r.left+r.right;o.scroll({top:e,left:t,behavior:n})}}(o,{scrollMode:"if-needed",block:"nearest",...n}),r&&i.focusField(e))},focusField:e=>{let t=i.getFieldInstance(e);(0,f.Tn)(t?.focus)?t.focus():m(e,i)?.focus?.()},getFieldInstance:e=>{let t=p(e);return r.current[t]}},[e,t]);return[i]}},12887:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},15437:(e,t,r)=>{r.d(t,{A:()=>n});let n=e=>{let{componentCls:t,antCls:r,motionDurationMid:n,motionEaseInOut:o}=e;return{[t]:{[`${r}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(e=>`${e} ${n} ${o}`).join(", ")} !important`}},[`${r}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(e=>`${e} ${n} ${o}`).join(", ")} !important`}}}}},19013:(e,t,r)=>{r.d(t,{C:()=>o});var n=r(97109);let o=()=>n.useReducer(e=>e+1,0)},19135:(e,t,r)=>{r.d(t,{Ay:()=>s,Gl:()=>a,ko:()=>c,ye:()=>l});var n=r(97109),o=r(7709),i=r(26047);let l=["xxxl","xxl","xl","lg","md","sm","xs"],a=[].concat(l).reverse(),c=(e,t)=>{if(t){for(let r of l)if(e[r]&&t?.[r]!==void 0)return t[r]}},s=()=>{let[,e]=(0,o.Ay)(),t=(e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}))((e=>{let t=[].concat(l).reverse();return t.forEach((r,n)=>{let o=r.toUpperCase(),i=`screen${o}Min`,l=`screen${o}`;if(!(e[i]<=e[l]))throw Error(`${i}<=${l} fails : !(${e[i]}<=${e[l]})`);if(n<t.length-1){let r=`screen${o}Max`;if(!(e[l]<=e[r]))throw Error(`${l}<=${r} fails : !(${e[l]}<=${e[r]})`);let i=t[n+1].toUpperCase(),a=`screen${i}Min`;if(!(e[r]<=e[a]))throw Error(`${r}<=${a} fails : !(${e[r]}<=${e[a]})`)}}),e})(e));return n.useMemo(()=>{let e=new Map,r=-1,n={};return{responsiveMap:t,matchHandlers:{},dispatch:t=>(n=t,e.forEach(e=>{e(n)}),e.size>=1),subscribe(t){return e.size||this.register(),r+=1,e.set(r,t),t(n),r},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let r=({matches:t})=>{this.dispatch({...n,[e]:t})},o=window.matchMedia(t);(0,i.Tn)(o.addEventListener)&&o.addEventListener("change",r),this.matchHandlers[t]={mql:o,listener:r},r(o)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];(0,i.Tn)(t?.mql.removeEventListener)&&t.mql.removeEventListener("change",t?.listener)}),e.clear()}}},[t])}},20966:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"}},25345:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(99729),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},26631:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(12887),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},38770:(e,t,r)=>{r.d(t,{A:()=>n});let n=r(51916).A},43094:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(72870),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},43979:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(59291),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},44624:(e,t,r)=>{r.d(t,{$r:()=>o,BS:()=>l,kV:()=>i});let n=["parentNode"];function o(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function i(e,t){if(!e.length)return;let r=e.join("_");return t?`${t}_${r}`:n.includes(r)?`form_item_${r}`:r}function l(e,t,r,n,o,i){let l=n;return void 0!==i?l=i:r.validating?l="validating":e.length?l="error":t.length?l="warning":(r.touched||o&&r.validated)&&(l="success"),l}},44858:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"}}]},name:"table",theme:"outlined"}},56374:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"}},59291:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"profile",theme:"outlined"}},59609:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(82813),i=r(19013),l=r(19135);let a=function(e=!0,t={}){let r=(0,n.useRef)(t),[,a]=(0,i.C)(),c=(0,l.Ay)();return(0,o.Nf)(()=>{let t=c.subscribe(t=>{r.current=t,e&&a()});return()=>c.unsubscribe(t)},[]),r.current}},66284:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"}},72870:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"}},75548:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(66284),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},80042:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(44858),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},84662:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(20966),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},84742:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(56374),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},85493:(e,t,r)=>{r.d(t,{A:()=>L});var n=r(97109),o=r(59188),i=r(4216),l=r(45042),a=r(97137),c=r(62188),s=r(67189),d=r(82813),h=r(3638),f=r(92162),u=r(26047),p=r(74567),m=r(15561),v=r(7961),g=r(10540);let b=(e,t,r)=>({background:e,[`${r}-icon`]:{color:t}}),w=(0,g.OF)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:r,marginXS:n,marginSM:o,fontSize:i,fontSizeLG:l,lineHeight:a,borderRadiusLG:c,motionEaseInOutCirc:s,withDescriptionIconSize:d,colorText:h,colorTextHeading:f,withDescriptionPadding:u,defaultPadding:p,lineWidth:g,lineType:b,colorSuccessBorder:w,colorWarningBorder:$,colorErrorBorder:y,colorInfoBorder:A}=e;return{[t]:{...(0,v.dF)(e),position:"relative",display:"flex",alignItems:"center",padding:p,wordWrap:"break-word",borderRadius:c,borderWidth:(0,m.zA)(g),borderStyle:b,[`&${t}-success`]:{borderColor:w},[`&${t}-info`]:{borderColor:A},[`&${t}-warning`]:{borderColor:$},[`&${t}-error`]:{borderColor:y},[`&${t}-filled`]:{borderColor:"transparent"},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:n,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:a},"&-title":{color:f},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(e=>`${e} ${r} ${s}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},[`&${t}-with-description`]:{alignItems:"flex-start",padding:u,[`${t}-icon`]:{marginInlineEnd:o,fontSize:d,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:n,color:f,fontSize:l},[`${t}-description`]:{display:"block",color:h}},[`&${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}}})(e),(e=>{let{componentCls:t,colorSuccess:r,colorSuccessBg:n,colorWarning:o,colorWarningBg:i,colorError:l,colorErrorBg:a,colorInfo:c,colorInfoBg:s}=e;return{[t]:{"&-success":b(n,r,t),"&-info":b(s,c,t),"&-warning":b(i,o,t),"&-error":{...b(a,l,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}})(e),(e=>{let{componentCls:t,iconCls:r,motionDurationMid:n,marginXS:o,fontSizeIcon:i,colorIcon:l,colorIconHover:a}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:o},[`${t}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:i,lineHeight:(0,m.zA)(i),backgroundColor:"transparent",border:"none",cursor:"pointer",...(0,v.K8)(e),[`${r}-close`]:{color:l,transition:`color ${n}`,"&:hover":{color:a}}},"&-close-text":{color:l,transition:`color ${n}`,"&:hover":{color:a}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),$=e=>{let{icon:t,type:r,className:l,style:s,successIcon:d,infoIcon:h,warningIcon:f,errorIcon:u}=e,p={success:d??n.createElement(o.A,null),info:h??n.createElement(c.A,null),error:u??n.createElement(i.A,null),warning:f??n.createElement(a.A,null)};return n.createElement("span",{className:l,style:s},t??p[r])},y=e=>{let{isClosable:t,prefixCls:r,closeIcon:o,handleClose:i,ariaProps:a,className:c,style:s}=e,d=!0===o||void 0===o?n.createElement(l.A,null):o;return t?n.createElement("button",{type:"button",onClick:i,className:(0,h.$)(`${r}-close-icon`,c),tabIndex:0,style:s,...a},d):null},A=n.forwardRef((e,t)=>{let{description:r,prefixCls:o,message:i,title:l,banner:a,className:c,rootClassName:m,style:v,onMouseEnter:g,onMouseLeave:b,onClick:A,afterClose:H,showIcon:z,closable:E,closeText:M,closeIcon:x,action:O,id:j,styles:L,classNames:C,...I}=e,V=l??i,[R,N]=n.useState(!1),k=n.useRef(null);n.useImperativeHandle(t,()=>({nativeElement:k.current}));let{getPrefixCls:S,direction:B,variant:W,closable:_,closeIcon:F,className:T,style:P,classNames:X,styles:D,successIcon:Q,infoIcon:G,warningIcon:K,errorIcon:q}=(0,p.TP)("alert"),U=S("alert",o),[Y,J]=w(U),{onClose:Z,afterClose:ee}=(0,u.Qd)(E)?E:{},et=t=>{N(!0),(Z??e.onClose)?.(t)},er=n.useMemo(()=>void 0!==e.type?e.type:a?"warning":"info",[e.type,a]),en=e.variant??W??"outlined",eo=n.useMemo(()=>!!(0,u.Qd)(E)&&!!E.closeIcon||!!M||("boolean"==typeof E?E:!!(!1!==x&&(0,u.R)(x))||!!_),[M,x,E,_]),ei=!!a&&void 0===z||z,el={...e,prefixCls:U,variant:en,type:er,showIcon:ei,closable:eo},ea=(0,f.XT)(P),ec=(0,f.XT)(v),[es,ed]=(0,f.AV)([X,C],[D,ea,L,ec],{props:el}),eh=(0,h.$)(U,`${U}-${er}`,`${U}-${en}`,{[`${U}-with-description`]:!!r,[`${U}-no-icon`]:!ei,[`${U}-banner`]:!!a,[`${U}-rtl`]:"rtl"===B},T,c,m,es.root,J,Y),ef=(0,d.KE)(I,{aria:!0,data:!0}),eu=n.useMemo(()=>(0,u.Qd)(E)&&E.closeIcon?E.closeIcon:M||(void 0!==x?x:(0,u.Qd)(_)&&_.closeIcon?_.closeIcon:F),[x,E,_,M,F]),ep=n.useMemo(()=>{let e=E??_;return(0,u.Qd)(e)?(0,d.KE)(e,{data:!0,aria:!0}):{}},[E,_]);return n.createElement(s.Ay,{visible:!R,motionName:`${U}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:ee??H},({className:t,style:o},i)=>n.createElement("div",{id:j,ref:(0,d.K4)(k,i),"data-show":!R,className:(0,h.$)(eh,t),style:{...ed.root,...o},onMouseEnter:g,onMouseLeave:b,onClick:A,role:"alert",...ef},ei?n.createElement($,{className:(0,h.$)(`${U}-icon`,es.icon),style:ed.icon,description:r,icon:e.icon,prefixCls:U,type:er,successIcon:Q,infoIcon:G,warningIcon:K,errorIcon:q}):null,n.createElement("div",{className:(0,h.$)(`${U}-section`,es.section),style:ed.section},V?n.createElement("div",{className:(0,h.$)(`${U}-title`,es.title),style:ed.title},V):null,r?n.createElement("div",{className:(0,h.$)(`${U}-description`,es.description),style:ed.description},r):null),O?n.createElement("div",{className:(0,h.$)(`${U}-actions`,es.actions),style:ed.actions},O):null,n.createElement(y,{className:es.close,style:ed.close,isClosable:eo,prefixCls:U,closeIcon:eu,handleClose:et,ariaProps:ep})))});var H=r(41113),z=r(49939),E=r(90218),M=r(13076),x=r(83784),O=r(15472);let j=function(e){function t(){var e,r,n;return(0,H.A)(this,t),r=t,n=arguments,r=(0,E.A)(r),(e=(0,x.A)(this,(0,M.A)()?Reflect.construct(r,n||[],(0,E.A)(this).constructor):r.apply(this,n))).state={error:void 0,info:{}},e}return(0,O.A)(t,e),(0,z.A)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,title:t,description:r,id:o,children:i}=this.props,{error:l,info:a}=this.state,c=t??e,s=a?.componentStack||null,d=(0,u.R)(c)?c:l?.toString(),h=(0,u.R)(r)?r:s;return l?n.createElement(A,{id:o,type:"error",title:d,description:n.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},h)}):i}}])}(n.PureComponent);A.ErrorBoundary=j;let L=A},92123:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"}},95008:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"}},96651:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(92123),i=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(i.A,l({},e,{ref:t,icon:o.A})))},99729:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8623],{23507:(e,l,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/document-roles",function(){return i(59889)}])},59889:(e,l,i)=>{"use strict";i.r(l),i.d(l,{default:()=>K});var r=i(65321),n=i(97109),s=i(35292),t=i(11702),o=i(17807),a=i(63455),c=i(84253),d=i(68787),p=i(85114),x=i(26171),m=i(33442),h=i(57271),u=i(85493),f=i(34052),y=i(7576),g=i(2256),j=i(38770),A=i(58569),b=i(25345),v=i(43979),I=i(80042),w=i(75548),S=i(26631),T=i(84662),z=i(30486),C=i(99650),k=i(8263),R=i(84742),_=i(43094),F=i(8579),B=i(58209),H=i(54746),W=i(96651),N=i(60470),D=i(6578),E=i(32620);let{Paragraph:P}=s.A,q={rule:(0,r.jsx)(b.A,{}),project_fact:(0,r.jsx)(v.A,{}),table:(0,r.jsx)(I.A,{}),drawing:(0,r.jsx)(w.A,{}),specification:(0,r.jsx)(S.A,{}),reference:(0,r.jsx)(T.A,{})},V={fact_extraction:(0,r.jsx)(z.A,{}),chapter_generation:(0,r.jsx)(C.A,{}),llm_review:(0,r.jsx)(k.A,{}),validation:(0,r.jsx)(R.A,{}),formatting:(0,r.jsx)(_.A,{}),reference:(0,r.jsx)(T.A,{})},O={rule:"#fa8c16",project_fact:"#1677ff",table:"#52c41a",drawing:"#722ed1",specification:"#eb2f96",reference:"#13c2c2"},G={fact_extraction:"#fa8c16",chapter_generation:"#1677ff",llm_review:"#722ed1",validation:"#52c41a",formatting:"#eb2f96",reference:"#13c2c2"},L={rule:"roles.ruleFile",project_fact:"roles.projectFactFile",table:"roles.tableFile",drawing:"roles.drawingFile",specification:"roles.specificationFile",reference:"roles.reference"},Q={fact_extraction:"roles.factExtraction",chapter_generation:"roles.chapterGeneration",llm_review:"roles.llmReview",validation:"roles.validation",formatting:"roles.formatting",reference:"roles.reference"},X=e=>(0,r.jsx)(t.A,{closable:e.closable,onClose:e.onClose,color:"blue",style:{margin:"1px 2px",fontSize:11,lineHeight:"18px"},children:e.label});function K(){let e,l,i=(0,E.Vr)(),{message:s}=o.A.useApp(),[b]=a.A.useForm(),[v]=a.A.useForm(),[I,w]=(0,n.useState)([]),[T,z]=(0,n.useState)([]),[k,R]=(0,n.useState)([]),[_,K]=(0,n.useState)([]),[U,J]=(0,n.useState)(!1),[M,Y]=(0,n.useState)(!1),[Z,$]=(0,n.useState)(!1),[ee,el]=(0,n.useState)("file"),[ei,er]=(0,n.useState)("custom"),en=async()=>{let[e,l,i]=await Promise.all([(0,D.lv)(),(0,D.HT)(),(0,D.dx)()]);w(e.roles),z(e.configs),R(l.files),K(i)};(0,n.useEffect)(()=>{en().catch(()=>s.error(i("common.error")))},[s,i]);let es=I.filter(e=>!e.builtIn),et=I.filter(e=>e.builtIn),eo=T.filter(e=>!e.builtIn),ea=T.filter(e=>e.builtIn),ec=e=>"all"===ei||("builtin"===ei?e.builtIn:!e.builtIn),ed=I.filter(ec),ep=T.filter(ec),ex=ed.filter(e=>"file"===e.type),em=ed.filter(e=>"prompt"===e.type),eh=I.filter(e=>"file"===e.type),eu=I.filter(e=>"prompt"===e.type),ef=async()=>{try{let e=await b.validateFields(),l=await (0,D.dg)(e);w(l.roles),z(l.configs),J(!1),s.success(i("common.success"))}catch(e){s.error(i("common.error"))}},ey=async()=>{try{let e=await v.validateFields(),l=e=>(null!=e?e:[]).map((e,l)=>{var i;return{roleId:e.roleId,order:Number(null!=(i=e.order)?i:l)}}),r=await (0,D.NR)({...e,fileRoles:l(e.fileRoles),promptRoles:l(e.promptRoles)});w(r.roles),z(r.configs),Y(!1),s.success(i("common.success"))}catch(e){s.error(i("common.error"))}},eg=async e=>{let l=await (0,D.FV)(e.type,e.id);w(l.roles),z(l.configs)},ej=async e=>{let l=await (0,D.dw)(e);w(l.roles),z(l.configs)},eA=function(e){var l;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file",r=(null==e?void 0:e.builtIn)?{...e,id:"".concat(e.id,"-copy-").concat(Date.now()),name:"".concat(e.name," Copy"),builtIn:!1}:e;(null==e?void 0:e.builtIn)&&s.info("内置角色不可直接编辑,已为你创建副本"),b.setFieldsValue(r?{...r,resourceIds:(null==(l=r.resourceIds)?void 0:l.length)?r.resourceIds:r.resourceId?[r.resourceId]:[]}:{id:"role-".concat(Date.now()),name:"",description:"",type:i,resourceIds:[],executionType:"prompt"===i?"reference":void 0,processingType:"file"===i?"reference":void 0}),J(!0)},eb=e=>{let l=(null==e?void 0:e.builtIn)?{...e,id:"".concat(e.id,"-copy-").concat(Date.now()),name:"".concat(e.name," Copy"),builtIn:!1}:e;(null==e?void 0:e.builtIn)&&s.info("内置项目配置不可直接编辑,已为你创建副本"),v.setFieldsValue(null!=l?l:{id:"config-".concat(Date.now()),name:"",description:"",fileRoles:[],promptRoles:[],builtIn:!1}),Y(!0)},ev=e=>I.find(l=>l.id===e);return(0,r.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"pageTitle",children:i("roles.title")}),(0,r.jsx)("p",{className:"pageDesc",children:i("roles.description")})]}),(0,r.jsxs)(m.A,{children:[(0,r.jsx)(h.A,{value:ei,onChange:er,style:{width:170},options:[{label:"我的配置 (".concat(es.length+eo.length,")"),value:"custom"},{label:"内置示例 (".concat(et.length+ea.length,")"),value:"builtin"},{label:"全部来源 (".concat(I.length+T.length,")"),value:"all"}]}),(0,r.jsx)(p.Ay,{icon:(0,r.jsx)(H.A,{}),onClick:()=>eA(void 0,"file"),children:i("roles.newFileRole")}),(0,r.jsx)(p.Ay,{icon:(0,r.jsx)(H.A,{}),onClick:()=>eA(void 0,"prompt"),children:i("roles.newPromptRole")}),(0,r.jsx)(p.Ay,{type:"primary",icon:(0,r.jsx)(H.A,{}),onClick:()=>eb(),children:i("roles.newConfig")})]})]}),(0,r.jsx)(u.A,{type:"info",showIcon:!0,message:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,r.jsx)("span",{children:i("roles.plainGuideTitle")}),(0,r.jsx)(p.Ay,{type:"link",size:"small",icon:Z?(0,r.jsx)(W.A,{}):(0,r.jsx)(N.A,{}),onClick:()=>$(!Z),style:{padding:"0 4px"},children:Z?"收起说明":"展开说明"})]}),description:Z?i("roles.plainGuideDesc"):void 0}),(0,r.jsx)(d.A,{size:"small",tabList:[{key:"file",label:"文件角色 (".concat(ex.length,")")},{key:"prompt",label:"提示词角色 (".concat(em.length,")")},{key:"configs",label:"项目角色配置 (".concat(ep.length,")")}],activeTabKey:ee,onTabChange:el,children:"configs"===ee?0===ep.length?(0,r.jsx)(c.A,{description:i("common.noData")}):(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:ep.map(e=>{let l=e.fileRoles.map(e=>({...e,role:ev(e.roleId)})).filter(e=>e.role),n=e.promptRoles.map(e=>({...e,role:ev(e.roleId)})).filter(e=>e.role);return(0,r.jsxs)(d.A,{size:"small",hoverable:!0,style:{minWidth:0},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8,marginBottom:6},children:[(0,r.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:e.name}),e.builtIn?(0,r.jsx)(t.A,{color:"gold",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"内置示例"}):(0,r.jsx)(t.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的配置"}),(0,r.jsxs)("div",{style:{display:"flex",gap:4,flexShrink:0},children:[(0,r.jsx)(p.Ay,{size:"small",icon:(0,r.jsx)(C.A,{}),onClick:()=>eb(e),children:e.builtIn?"复制":"编辑"}),(0,r.jsx)(x.A,{title:i("common.confirm"),disabled:e.builtIn,onConfirm:()=>{ej(e.id)},children:(0,r.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,r.jsx)(B.A,{}),disabled:e.builtIn})})]})]}),e.description&&(0,r.jsx)(P,{ellipsis:{rows:2},style:{fontSize:12,color:"var(--colorTextSecondary)",marginBottom:8},children:e.description}),(0,r.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:[(0,r.jsxs)("div",{style:{marginBottom:4},children:[(0,r.jsxs)("span",{children:["文件角色 (",e.fileRoles.length,"): "]}),l.length>0?(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:2},children:[l.slice(0,4).map(e=>(0,r.jsx)(t.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:e.role.name},e.roleId)),l.length>4&&(0,r.jsxs)(t.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",l.length-4]})]}):(0,r.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"无"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("span",{children:["提示词角色 (",e.promptRoles.length,"): "]}),n.length>0?(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:2},children:[n.slice(0,4).map(e=>(0,r.jsx)(t.A,{color:"purple",style:{margin:0,fontSize:10,lineHeight:"16px"},children:e.role.name},e.roleId)),n.length>4&&(0,r.jsxs)(t.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",n.length-4]})]}):(0,r.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"无"})]})]})]},e.id)})}):(e="file"===ee?ex:em,l=i,0===e.length?(0,r.jsx)(c.A,{description:i("common.noData")}):(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(270px, 1fr))",gap:12},children:e.map((e,n)=>{var s,o,a,c,m,h,u,f,y;let g=(null==(s=e.resourceIds)?void 0:s.length)?e.resourceIds:e.resourceId?[e.resourceId]:[],j=g.slice(0,3),A=g.length-j.length,b="file"===e.type?null!=(a=q[null!=(o=e.processingType)?o:""])?a:(0,r.jsx)(S.A,{}):null!=(m=V[null!=(c=e.executionType)?c:""])?m:(0,r.jsx)(F.A,{}),v="file"===e.type?null!=(u=O[null!=(h=e.processingType)?h:""])?u:"var(--colorAccent)":null!=(y=G[null!=(f=e.executionType)?f:""])?y:"var(--colorWarning)";return(0,r.jsxs)(d.A,{size:"small",hoverable:!0,style:{minWidth:0},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8,marginBottom:8},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0,flex:1},children:[(0,r.jsx)("span",{style:{color:v,fontSize:16,flexShrink:0,lineHeight:1},children:b}),(0,r.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:"20px"},children:e.name})]}),(0,r.jsx)("div",{style:{display:"flex",gap:4,flexShrink:0},children:e.builtIn?(0,r.jsx)(t.A,{color:"gold",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"内置示例"}):(0,r.jsx)(t.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的角色"})})]}),e.description&&(0,r.jsx)(P,{ellipsis:{rows:2},style:{fontSize:12,color:"var(--colorTextSecondary)",marginBottom:8},children:e.description}),(0,r.jsxs)("div",{style:{marginBottom:8,display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,r.jsx)(t.A,{color:"file"===e.type?"blue":"purple",style:{margin:0},children:function(e,l){var i,r,n;let s="file"===e.type?L[null!=(i=e.processingType)?i:""]:Q[null!=(r=e.executionType)?r:""];return s?l(s):null!=(n="file"===e.type?e.processingType:e.executionType)?n:""}(e,l)}),g.length>0&&(0,r.jsxs)("span",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:["绑定 ",g.length," 个资源"]})]}),j.length>0&&(0,r.jsx)("div",{style:{marginBottom:10},children:(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[j.map(e=>(0,r.jsx)(t.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e},e)),A>0&&(0,r.jsxs)(t.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",A]})]})}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:6,paddingTop:4,borderTop:"1px solid var(--colorBorderSecondary)"},children:[(0,r.jsx)(p.Ay,{size:"small",icon:(0,r.jsx)(C.A,{}),onClick:()=>eA(e),children:e.builtIn?"复制":"编辑"}),(0,r.jsx)(x.A,{title:i("common.confirm"),disabled:e.builtIn,onConfirm:()=>{eg(e)},children:(0,r.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,r.jsx)(B.A,{}),disabled:e.builtIn})})]})]},e.id)})}))}),(0,r.jsx)(f.A,{title:i("roles.roleEditor"),open:U,onClose:()=>J(!1),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:(0,r.jsx)(p.Ay,{type:"primary",onClick:()=>{ef()},children:i("common.save")}),children:(0,r.jsxs)(a.A,{form:b,layout:"vertical",children:[(0,r.jsx)(a.A.Item,{name:"id",hidden:!0,children:(0,r.jsx)(y.A,{})}),(0,r.jsxs)(g.A,{gutter:16,children:[(0,r.jsx)(j.A,{span:12,children:(0,r.jsx)(a.A.Item,{name:"type",label:i("roles.roleType"),rules:[{required:!0}],children:(0,r.jsx)(h.A,{options:[{label:i("roles.fileRole"),value:"file"},{label:i("roles.promptRole"),value:"prompt"}]})})}),(0,r.jsx)(j.A,{span:12,children:(0,r.jsx)(a.A.Item,{name:"name",label:i("roles.roleName"),rules:[{required:!0}],children:(0,r.jsx)(y.A,{})})})]}),(0,r.jsx)(a.A.Item,{name:"description",label:i("roles.roleDescription"),children:(0,r.jsx)(y.A.TextArea,{rows:2})}),(0,r.jsx)(a.A.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.type!==l.type,children:e=>{let{getFieldValue:l}=e,n="prompt"===l("type");return(0,r.jsx)(d.A,{size:"small",title:n?"提示词角色配置":"文件角色配置",style:{border:"1px solid var(--colorBorderSecondary)"},children:n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A.Item,{name:"executionType",label:i("roles.executionType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,r.jsx)(h.A,{options:[{label:i("roles.factExtraction"),value:"fact_extraction"},{label:i("roles.chapterGeneration"),value:"chapter_generation"},{label:i("roles.validation"),value:"validation"},{label:i("roles.formatting"),value:"formatting"},{label:i("roles.reference"),value:"reference"}]})}),(0,r.jsx)(a.A.Item,{name:"resourceIds",label:i("roles.bindPrompt"),style:{marginBottom:0},help:(0,r.jsx)("span",{style:{fontSize:11,color:"var(--colorTextSecondary)"},children:i("roles.multiBindPromptHelp")}),children:(0,r.jsx)(h.A,{mode:"multiple",showSearch:!0,tagRender:X,placeholder:"选择提示词",options:_.filter(e=>e.hasFile).map(e=>({label:e.projectName,value:e.id}))})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A.Item,{name:"processingType",label:i("roles.processingType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,r.jsx)(h.A,{options:[{label:i("roles.ruleFile"),value:"rule"},{label:i("roles.projectFactFile"),value:"project_fact"},{label:i("roles.tableFile"),value:"table"},{label:i("roles.drawingFile"),value:"drawing"},{label:i("roles.specificationFile"),value:"specification"},{label:i("roles.reference"),value:"reference"}]})}),(0,r.jsx)(a.A.Item,{name:"resourceIds",label:i("roles.bindFile"),style:{marginBottom:0},help:(0,r.jsx)("span",{style:{fontSize:11,color:"var(--colorTextSecondary)"},children:i("roles.multiBindFileHelp")}),children:(0,r.jsx)(h.A,{mode:"multiple",showSearch:!0,tagRender:X,placeholder:"选择知识库文件",options:k.map(e=>({label:e.relativePath,value:e.relativePath}))})})]})})}})]})}),(0,r.jsx)(f.A,{title:i("roles.configEditor"),open:M,onClose:()=>Y(!1),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:(0,r.jsx)(p.Ay,{type:"primary",onClick:()=>{ey()},children:i("common.save")}),children:(0,r.jsxs)(a.A,{form:v,layout:"vertical",children:[(0,r.jsx)(a.A.Item,{name:"id",hidden:!0,children:(0,r.jsx)(y.A,{})}),(0,r.jsxs)(g.A,{gutter:16,children:[(0,r.jsx)(j.A,{span:12,children:(0,r.jsx)(a.A.Item,{name:"name",label:i("roles.configName"),rules:[{required:!0}],children:(0,r.jsx)(y.A,{})})}),(0,r.jsx)(j.A,{span:12,children:(0,r.jsx)(a.A.Item,{name:"description",label:i("roles.configDescription"),children:(0,r.jsx)(y.A,{})})})]}),(0,r.jsx)(A.A,{destroyInactiveTabPane:!1,items:[{key:"file",label:"文件角色 (".concat(ex.length,")"),children:(0,r.jsx)(a.A.List,{name:"fileRoles",children:(e,l)=>{let{add:n,remove:s}=l;return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[0===e.length&&(0,r.jsx)(c.A,{description:"暂未添加文件角色"}),e.map((e,l)=>(0,r.jsxs)(d.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,r.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#1677ff",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,r.jsx)(p.Ay,{danger:!0,size:"small",icon:(0,r.jsx)(B.A,{}),onClick:()=>s(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,r.jsxs)(g.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,r.jsx)(j.A,{flex:"auto",children:(0,r.jsx)(a.A.Item,{name:[e.name,"roleId"],label:"文件角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,r.jsx)(h.A,{placeholder:"选择文件角色",size:"small",options:eh.map(e=>{var l;return{label:"".concat(e.name," (").concat(i(L[null!=(l=e.processingType)?l:""]||"roles.reference"),")"),value:e.id}})})})}),(0,r.jsx)(j.A,{style:{width:90},children:(0,r.jsx)(a.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,r.jsx)(y.A,{type:"number",size:"small"})})})]})]},e.key)),(0,r.jsx)(p.Ay,{icon:(0,r.jsx)(H.A,{}),onClick:()=>n({order:e.length}),children:i("roles.addRole")})]})}})},{key:"prompt",label:"提示词角色 (".concat(eu.length,")"),children:(0,r.jsx)(a.A.List,{name:"promptRoles",children:(e,l)=>{let{add:n,remove:s}=l;return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[0===e.length&&(0,r.jsx)(c.A,{description:"暂未添加提示词角色"}),e.map((e,l)=>(0,r.jsxs)(d.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,r.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#722ed1",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,r.jsx)(p.Ay,{danger:!0,size:"small",icon:(0,r.jsx)(B.A,{}),onClick:()=>s(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,r.jsxs)(g.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,r.jsx)(j.A,{flex:"auto",children:(0,r.jsx)(a.A.Item,{name:[e.name,"roleId"],label:"提示词角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,r.jsx)(h.A,{placeholder:"选择提示词角色",size:"small",options:eu.map(e=>{var l;return{label:"".concat(e.name," (").concat(i(Q[null!=(l=e.executionType)?l:""]||"roles.reference"),")"),value:e.id}})})})}),(0,r.jsx)(j.A,{style:{width:90},children:(0,r.jsx)(a.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,r.jsx)(y.A,{type:"number",size:"small"})})})]})]},e.key)),(0,r.jsx)(p.Ay,{icon:(0,r.jsx)(H.A,{}),onClick:()=>n({order:e.length}),children:i("roles.addRole")})]})}})}]})]})})]})}}},e=>{e.O(0,[347,8787,4277,7889,4833,7271,7576,9144,3455,5292,4052,8676,6578,636,6593,8792],()=>e(e.s=23507)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4298],{16403:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return s(19562)}])},19562:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>ei});var r=s(65321),n=s(97109),i=s(7576),l=s(35292),a=s(17807),o=s(63455),c=s(88762),d=s(85114),u=s(68787),p=s(84253),m=s(38332),h=s(26171),x=s(11702),g=s(33442),f=s(85493),v=s(34052),w=s(9730),j=s(42700),y=s(58569),A=s(76506),k=s(25258),S=s(2256),I=s(38770),b=s(57271),T=s(23216),z=s(26619),C=s(8263),_=s(16285),D=s(8579),M=s(75548),F=s(7851),L=s(84742),B=s(29071),E=s(63552),R=s(26631),P=s(76830),q=s(83914),W=s(58209),G=s(54746),H=s(71330),O=s(64068),N=s(93051),K=s(38762),U=s(64629),X=s(67547),V=s(99811),Q=s(6578),J=s(32620);let{TextArea:Y}=i.A,{Paragraph:Z,Text:$}=l.A,ee=null;function et(){null==ee||ee.listeners.forEach(e=>e())}let es={role_binding:(0,r.jsx)(T.A,{}),knowledge_retrieval:(0,r.jsx)(z.A,{}),file_understanding:(0,r.jsx)(C.A,{}),fact_extraction:(0,r.jsx)(_.A,{}),chapter_generation:(0,r.jsx)(D.A,{}),asset_generation:(0,r.jsx)(M.A,{}),validation:(0,r.jsx)(F.A,{}),formatting:(0,r.jsx)(L.A,{}),llm_review:(0,r.jsx)(B.A,{}),export_ready:(0,r.jsx)(E.A,{}),reference:(0,r.jsx)(M.A,{})},er={施工组织设计:(0,r.jsx)(F.A,{}),投标文件:(0,r.jsx)(E.A,{}),技术方案:(0,r.jsx)(_.A,{}),报告:(0,r.jsx)(R.A,{}),自定义:(0,r.jsx)(D.A,{})},en={role_binding:"角色配置绑定",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"};function ei(){let e=(0,J.Vr)(),{message:t}=a.A.useApp(),[s]=o.A.useForm(),l=(0,n.useRef)(null),[Z,ei]=(0,n.useState)([]),[el,ea]=(0,n.useState)("construction-organization-design"),[eo,ec]=(0,n.useState)([]),[ed,eu]=(0,n.useState)([]),[ep,em]=(0,n.useState)([]),[eh,ex]=(0,n.useState)(!0),[eg,ef]=(0,n.useState)(!1),[ev,ew]=(0,n.useState)(null),[ej,ey]=(0,n.useState)(""),[eA,ek]=(0,n.useState)([]),[eS,eI]=(0,n.useState)(null),[eb,eT]=(0,n.useState)(!1),[ez,eC]=(0,n.useState)(null),[e_,eD]=(0,n.useState)(!1),[eM,eF]=(0,n.useState)({}),[eL,eB]=(0,n.useState)([]),[eE,eR]=(0,n.useState)(null),[eP,eq]=(0,n.useState)("templates"),[eW,eG]=(0,n.useState)(!1),[eH,eO]=(0,n.useState)("workflow"),eN=(0,n.useRef)(null),eK=async()=>{try{ek((await (0,Q.cQ)()).documents)}catch(e){ek([])}};(0,n.useEffect)(()=>{let e=()=>{ee&&(eB(ee.flowSteps),eR(ee.activeFlowKey),ef(ee.loading),ee.documentId&&eI(ee.documentId),ee.draft&&ew(ee.draft),void 0!==ee.content&&ey(ee.content))},t=ee;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,n.useEffect)(()=>{ex(!0),Promise.all([(0,Q.Dl)().then(e=>{var t,s;ei(e.templates),ea(null!=(s=null==(t=e.templates[0])?void 0:t.id)?s:"construction-organization-design")}),(0,Q.lv)().then(e=>{ec(e.roles),eu(e.configs)}),(0,Q.mx)().then(e=>em(e.specs)),eK()]).catch(()=>t.error(e("common.error"))).finally(()=>ex(!1))},[t,e]),(0,n.useEffect)(()=>{if(0===eA.length)return;let e=localStorage.getItem("activeGenDocId");if(!e)return;if(!eA.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem("activeGenDocId");let t=setInterval(()=>{(async()=>{try{let{document:s}=await (0,Q.v7)(e);await eK(),"generating"!==s.status&&(localStorage.removeItem("activeGenDocId"),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eA]);let eU=(0,n.useMemo)(()=>Z.find(e=>e.id===el),[Z,el]),eX=ed.map(e=>({label:e.name,value:e.id})),eV=ep.map(e=>({label:e.name,value:e.id})),eQ=Math.max(0,eL.findIndex(e=>e.key===eE)),eJ=e=>{ea(e),eI(null),ew(null),ey(""),eO("workflow"),eG(!0),eq("drafts")},eY=async s=>{eI(s.id),ea(s.templateId);let r=e0(s.status);if(r||"failed"===s.status){ti.current=!0,ew(null),ey(""),ef(r),eO("workflow"),eG(!0);try{let{document:e}=await (0,Q.v7)(s.id);e6(e),e0(e.status)?e8(e.id):await eK()}catch(e){e6(s)}return}eO("editor"),eB([]),eR(null);try{let{document:e}=await (0,Q.v7)(s.id);ew(e.draft||null),ey(e.editedMarkdown||e.markdown)}catch(s){t.error(e("common.error"))}eG(!0)},eZ=e=>e.map((e,t)=>({key:"sub-".concat(t),title:e,status:"wait"})),e$=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eU,s=ep.find(e=>e.id===(null==t?void 0:t.documentSpecId)),n=ed.find(e=>e.id===(null==t?void 0:t.projectRoleConfigId)),i=((null==n?void 0:n.fileRoles)||[]).map(e=>{var t;return(null==(t=eo.find(t=>t.id===e.roleId))?void 0:t.name)||e.roleId}),l=((null==n?void 0:n.promptRoles)||[]).map(e=>{var t;return(null==(t=eo.find(t=>t.id===e.roleId))?void 0:t.name)||e.roleId}),a=(null==s?void 0:s.factFields.map(e=>e.name))||(null==t?void 0:t.chapters.flatMap(e=>e.requiredFacts))||[],o=(null==t?void 0:t.chapters.map(e=>e.title))||[],c=l.some(e=>/封面|图片|资源|cover|image/iu.test(e));return[{key:"prepare",title:e("documents.flowPrepare"),description:'读取"'.concat((null==t?void 0:t.name)||"当前模板",'"并创建后台生成任务'),status:"process",icon:(0,r.jsx)(R.A,{}),subSteps:eZ(["读取模板参数",(null==t?void 0:t.documentSpecId)?"加载规范包:".concat((null==s?void 0:s.name)||t.documentSpecId):"未绑定规范包,使用模板章节要求","创建后台生成任务"])},{key:"role_binding",title:"动态角色配置绑定",description:"绑定 ".concat(i.length," 个文件角色、").concat(l.length," 个提示词角色"),status:"wait",icon:(0,r.jsx)(T.A,{}),subSteps:eZ([...i.length?i.map(e=>"文件角色:".concat(e)):["没有文件角色,使用模板绑定文件"],...l.length?l.map(e=>"提示词角色:".concat(e)):["没有提示词角色,使用默认生成策略"]].slice(0,10))},{key:"knowledge_retrieval",title:"知识库证据检索",description:"按 ".concat(o.length," 个章节检索文本、文档、表格、图片、图纸和附件"),status:"wait",icon:(0,r.jsx)(z.A,{}),subSteps:eZ(o.length?o.slice(0,10).map(e=>"检索章节:".concat(e)):["按模板标题检索证据"])},{key:"file_understanding",title:"多类型文件理解",description:"按文件角色处理文本、PDF/Word、表格、图片、图纸和附件",status:"wait",icon:(0,r.jsx)(C.A,{}),subSteps:eZ(["识别文件类型和角色","构建结构化资源证据包","必要时调用多模态文件理解"])},{key:"fact_extraction",title:"动态 schema 事实抽取",description:"按 ".concat(a.length," 个规范/章节事实字段抽取并检测冲突"),status:"wait",icon:(0,r.jsx)(_.A,{}),subSteps:eZ(a.length?a.slice(0,10).map(e=>"抽取事实:".concat(e)):["抽取模板要求的事实","合并来源和角色","检测事实冲突"])},{key:"chapter_generation",title:"章节生成",description:"按 ".concat(o.length," 个模板章节逐章生成"),status:"wait",icon:(0,r.jsx)(D.A,{}),subSteps:eZ(o.length?o.slice(0,10).map(e=>"生成:".concat(e)):["构造章节提示词","等待 LLM 生成","整理章节证据"])},...c?[{key:"asset_generation",title:"生成资源处理",description:"根据资源/图片提示词生成或登记本地资源",status:"wait",icon:(0,r.jsx)(M.A,{}),subSteps:eZ(["生成资源提示词","保存到 generatedDocuments/assets","登记资源元数据"])}]:[],{key:"validation",title:"规范包与门禁校验",description:s?"执行 ".concat(s.gateRules.length," 条门禁规则"):"执行模板基础校验",status:"wait",icon:(0,r.jsx)(F.A,{}),subSteps:eZ([...(null==s?void 0:s.factFields.filter(e=>e.required).map(e=>"必填事实:".concat(e.name)))||[],...(null==s?void 0:s.gateRules.map(e=>"门禁:".concat(e.name)))||["检查章节证据","检查缺失项","检查导出门禁"]].slice(0,10))},{key:"formatting",title:e("documents.flowFormatting"),description:"整理标题、表格、图片、附件引用和正式 Markdown",status:"wait",icon:(0,r.jsx)(L.A,{}),subSteps:eZ(["整理标题层级","整理多类型资源引用","生成正式 Markdown"])},{key:"llm_review",title:"LLM 审查优化",description:"再次使用动态 schema、角色和结构化证据审查优化初稿",status:"wait",icon:(0,r.jsx)(B.A,{}),subSteps:eZ(["构造审查提示词","检查事实来源和冲突","回填优化后的 Markdown"])},{key:"export_ready",title:"导出就绪",description:"确认 Markdown/HTML/DOCX/PDF 可导出",status:"wait",icon:(0,r.jsx)(E.A,{}),subSteps:eZ(["生成导出检查清单","确认阻断项","准备导出格式"])},{key:"done",title:e("documents.flowDone"),description:e("documents.flowDoneDesc"),status:"wait",icon:(0,r.jsx)(P.A,{}),subSteps:eZ(["展示生成结果","允许编辑正文","允许导出文件"])}]},e0=e=>"completed"!==e&&"warning"!==e&&"failed"!==e,e1=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eg;(null==ee?void 0:ee.loading)&&(ee.flowSteps=e,ee.activeFlowKey=t,ee.loading=s,et())},e2=(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 s=e.subSteps.findIndex(e=>"wait"===e.status);return e.subSteps.map((e,t)=>t<s||-1===s?{...e,status:"finish"}:t===s?{...e,status:"process"}:e)},e6=e=>{let{steps:t,activeKey:s}=(e=>{var t,s,r;let n,i=Z.find(t=>t.id===e.templateId)||eU,l=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[],a=new Map(l.map(e=>[e.type,e])),o=e$(i).map(t=>{let s;if("prepare"===t.key){let s=l.length>0?"finish":"generating"===e.status?"process":"finish";return{...t,status:s,subSteps:e2(t,s)}}if("done"===t.key){let s="completed"===e.status?"finish":"warning"===e.status?"warning":"wait";return{...t,status:s,subSteps:e2(t,s)}}let r=a.get(t.key);if(!r)return t;let n="failed"===(s=r.status)?"error":"fallback"===s?"warning":"finish";return{...t,status:n,description:r.message||t.description,subSteps:e2(t,n)}});if("generating"===e.status){let e=Math.max(-1,...l.map(e=>o.findIndex(t=>t.key===e.type)).filter(e=>e>=0)),t=o.slice(e+1).find(e=>"done"!==e.key&&"wait"===e.status)||o.find(e=>"process"===e.status)||o.find(e=>"done"===e.key);for(let e of(n=(null==t?void 0:t.key)||"prepare",o))e.key===n&&"wait"===e.status&&(e.status="process",e.subSteps=e2(e,"process"))}else n="failed"===e.status?(null==(s=o.find(e=>"error"===e.status))?void 0:s.key)||(null==(r=l.at(-1))?void 0:r.type)||"prepare":"done";return{steps:o,activeKey:n}})(e);eB(t),eR(s),ef(e0(e.status)),"failed"===e.status&&eO("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(ew(e.draft),ey(e.editedMarkdown||e.markdown),eO("editor"),eB([]),eR(null))},e8=e=>{eN.current&&clearInterval(eN.current),eN.current=setInterval(()=>{(async()=>{try{let{document:t}=await (0,Q.v7)(e);e6(t),await eK(),e0(t.status)||(eN.current&&clearInterval(eN.current),eN.current=null,localStorage.removeItem("activeGenDocId"))}catch(e){}})()},2e3)},e7=(e,t,s)=>{eR(e),eB(r=>{let n=r.map(r=>r.key===e?{...r,status:t,description:s||r.description,subSteps:e2(r,t)}:r);return e1(n,e),n})};(0,n.useEffect)(()=>{if(!eg||!eE)return;let e=window.setInterval(()=>eB(e=>{let t=e.map(e=>{if(e.key!==eE||"process"!==e.status)return e;let t=e.subSteps.findIndex(e=>"process"===e.status),s=t<0?0:Math.min(t+1,e.subSteps.length-1);return{...e,subSteps:e.subSteps.map((e,t)=>t<s?{...e,status:"finish"}:t===s?{...e,status:"process"}:{...e,status:"wait"})}});return e1(t,eE),t}),1400);return()=>window.clearInterval(e)},[eE,eg]);let e3=e=>{eB(t=>{let s=t.findIndex(t=>t.key===e),r=t.map((e,t)=>t<s&&"error"!==e.status?{...e,status:"finish",subSteps:e2(e,"finish")}:e);return e1(r,e),r})},e5=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,documentSpecId:void 0,chapters:[]};s.setFieldsValue({...t,chapters:t.chapters.map(e=>({...e,queriesText:e.queries.join("\n"),requiredFactsText:e.requiredFacts.join("\n")}))}),eD(!0)},e4=async()=>{try{let r=await s.validateFields(),n={...r,chapters:(r.chapters||[]).map(e=>({...e,queries:String(e.queriesText||"").split(/\r?\n/u).map(e=>e.trim()).filter(Boolean),requiredFacts:String(e.requiredFactsText||"").split(/\r?\n/u).map(e=>e.trim()).filter(Boolean),queriesText:void 0,requiredFactsText:void 0}))},i=await (0,Q.l2)(n);ei(i.templates),ea(i.template.id),eD(!1),await eK(),t.success(e("common.success"))}catch(e){e instanceof Error&&t.error(e.message)}},e9=async s=>{try{let r=await (0,Q.bV)(s);ei(r.templates),ea(r.template.id),t.success(e("common.success"))}catch(s){t.error(e("common.error"))}},te=async s=>{try{var r,n;let i=await (0,Q.h0)(s);ei(i.templates),ea(null!=(n=null==(r=i.templates[0])?void 0:r.id)?n:""),t.success(e("common.success"))}catch(s){t.error(e("common.error"))}},tt=async e=>{try{let{validation:s}=await (0,Q.SM)(e);eF(t=>({...t,[e]:s}));let r=s.issues.filter(e=>"error"===e.level);if(ea(e),r.length>0)return void t.warning("模板运行前检查未通过,请先处理阻断项");if(s.issues.length>0)return void t.warning("模板存在警告,可在检查面板确认后继续运行");eJ(e)}catch(e){t.error(e instanceof Error?e.message:"模板运行前检查失败")}},ts=async s=>{try{await (0,Q.QG)(s),eS===s&&(eI(null),ew(null),ey("")),await eK(),t.success(e("common.success"))}catch(s){t.error(e("common.error"))}},tr=async e=>{let t=[{k:"chapter_generation",m:"后台任务已创建,正在轮询等待 LLM 章节生成完成…"},{k:"asset_generation",m:"正在轮询等待封面和生成资源写入本地记录…"},{k:"validation",m:"正在轮询等待校验、导出门禁和格式化完成…"},{k:"llm_review",m:"正在轮询等待 LLM 审查优化完成…"}],s=0;for(;;){var r;let{document:n}=await (0,Q.v7)(e);if(e6(n),("completed"===n.status||"warning"===n.status)&&n.draft)return n;if("failed"===n.status)throw Error(n.error||"生成失败");if(0===(n.executionStages||(null==(r=n.draft)?void 0:r.executionStages)||[]).length){let e=t[Math.min(s,t.length-1)];e3(e.k),e7(e.k,"process",e.m)}s++,await new Promise(e=>window.setTimeout(e,1500))}},tn=async()=>{if(!el)return;if(null==ee?void 0:ee.loading){eB(ee.flowSteps),eR(ee.activeFlowKey),ef(!0);return}ef(!0);let s=e$(Z.find(e=>e.id===el)||eU),r=(0,Q.OX)({templateId:el});ee={id:Date.now(),templateId:el,loading:!0,flowSteps:s,activeFlowKey:"prepare",promise:r,listeners:new Set},eB(s),eR("prepare");let n=[{k:"role_binding",m:"正在读取模板、文件角色、提示词角色和文档规范包…"},{k:"knowledge_retrieval",m:"正在从知识库检索章节证据、表格、图片和附件…"},{k:"file_understanding",m:"正在准备多模态文件理解…"},{k:"fact_extraction",m:"正在等待 LLM 事实抽取和后续章节生成结果…"}].map((e,t)=>window.setTimeout(()=>{e3(e.k),e7(e.k,"process",e.m)},600+900*t));try{let s=await r;s.documentId&&(localStorage.setItem("activeGenDocId",s.documentId),eI(s.documentId),(null==ee?void 0:ee.promise)===r&&(ee.documentId=s.documentId)),await eK();let i=s.documentId?await tr(s.documentId):void 0,a=s.draft||(null==i?void 0:i.draft);if(!a)throw Error("生成结果为空");(s.documentId||(null==i?void 0:i.id))&&eI(s.documentId||i.id),n.forEach(e=>window.clearTimeout(e)),e3("done"),ew(a),ey((null==i?void 0:i.editedMarkdown)||(null==i?void 0:i.markdown)||a.markdown),(null==ee?void 0:ee.promise)===r&&(ee.draft=a,ee.content=(null==i?void 0:i.editedMarkdown)||(null==i?void 0:i.markdown)||a.markdown),eB(t=>{let s=t.map(t=>{let s=a.executionStages.find(e=>e.type===t.key);if("prepare"===t.key)return{...t,status:"finish",description:e("documents.flowPrepareDone"),subSteps:e2(t,"finish")};if("done"===t.key){var r;let s=a.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!a.exportGate.passed,n=s?"warning":"finish",i=null==(r=a.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:r.message;return{...t,status:n,description:s?"生成完成,但需复核:".concat(i||e("documents.flowGateFailed")):e("documents.flowDoneDesc"),subSteps:e2(t,n)}}if(!s)return"process"===t.status?{...t,status:"finish",subSteps:e2(t,"finish")}:t;let n="failed"===s.status?"error":"finish";return{...t,status:n,description:"".concat(s.status.toUpperCase(),":").concat(s.message||t.description),subSteps:e2(t,n)}});return e1(s,"done",!1),s}),eR("done"),(null==ee?void 0:ee.promise)===r&&(ee.activeFlowKey="done",ee.loading=!1,et()),localStorage.removeItem("activeGenDocId"),await eK(),t.success(e("common.success")),window.setTimeout(()=>{var e;return null==(e=l.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(n){localStorage.removeItem("activeGenDocId");let s=n instanceof Error?n.message:e("common.error");eB(e=>{let t=e.map(e=>"process"===e.status?{...e,status:"error",description:s,subSteps:e2(e,"error")}:e);return e1(t,eE,!1),t}),(null==ee?void 0:ee.promise)===r&&(ee.loading=!1,ee.error=s,et()),t.error(s)}finally{n.forEach(e=>window.clearTimeout(e)),ef(!1),(null==ee?void 0:ee.promise)===r&&(ee.loading=!1,et())}},ti=(0,n.useRef)(!1),tl=async s=>{(null==ee?void 0:ee.loading)&&(ee.loading=!1,ee.error="用户中止",et(),ee=null,ef(!1)),localStorage.removeItem("activeGenDocId"),eN.current&&(clearInterval(eN.current),eN.current=null);try{await (0,Q.r)(s.id),await eK(),eS===s.id&&(eI(null),ew(null),ey("")),t.success("已中止生成任务")}catch(s){t.error(e("common.error"))}};(0,n.useEffect)(()=>{eW&&"workflow"===eH&&!ti.current&&!(null==ee?void 0:ee.loading)&&(null==eU?void 0:eU.projectRoleConfigId)&&(ti.current=!0,window.setTimeout(()=>{tn()},300)),eW||(ti.current=!1)},[eW,eH]);let ta=async s=>{if(ev){eT(!0);try{var r;let e="markdown"===s?"md":s,t=null==(r=ep.find(e=>e.id===(null==eU?void 0:eU.documentSpecId)))?void 0:r.wordTemplatePath,n=await (0,Q.UE)({documentId:eS||void 0,title:ev.title,markdown:ej,format:s,enforceGate:!1,exportGate:ev.exportGate,wordTemplatePath:t});((e,t,s)=>{let r=new Blob([e],{type:s}),n=URL.createObjectURL(r),i=document.createElement("a");i.href=n,i.download=t,i.target="_self",i.rel="noopener",i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),i.remove(),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)})(n,"".concat(ev.title,".").concat(e),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[s])}catch(s){t.error(s instanceof Error?s.message:e("common.error"))}finally{eT(!1)}}},to=async()=>{if(ev)try{if(eS)await (0,Q.a6)(eS,{editedMarkdown:ej,markdown:ej});else{let e=await (0,Q.Af)({...ev,markdown:ej});ew(e.draft)}await eK(),t.success(e("common.success"))}catch(s){t.error(e("common.error"))}},tc=async s=>{if(ev){eC(s.id);try{var r,n;let i=await (0,Q.R1)({templateId:ev.templateId,chapterId:s.id,documentId:eS||void 0,currentMarkdown:ej,existingFacts:null==(r=ev.structuredFacts)?void 0:r.map(e=>e.value)});ew({...ev,chapters:ev.chapters.map(e=>e.id===s.id?i.chapter:e)}),n=i.chapter,ey(e=>e.includes(s.content)?e.replace(s.content,n.content):"".concat(e,"\n\n").concat(n.content)),t.success(e("common.success"))}catch(s){t.error(e("common.error"))}finally{eC(null)}}};if(eh)return(0,r.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,r.jsx)(c.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,r.jsx)(c.A,{active:!0,paragraph:{rows:2}}),(0,r.jsx)(c.A,{active:!0,paragraph:{rows:8}})]});let td="workflow"===eH?"工作流:".concat((null==eU?void 0:eU.name)||"选择模板"):"编辑:".concat((null==ev?void 0:ev.title)||(null==eU?void 0:eU.outputTitle)||"文档");return(0,r.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"pageTitle",children:e("documents.title")}),(0,r.jsx)("p",{className:"pageDesc",children:e("documents.description")})]}),(0,r.jsx)(d.Ay,{type:"primary",icon:(0,r.jsx)(G.A,{}),onClick:()=>e5(),children:e("documents.newTemplate")})]}),(0,r.jsx)(u.A,{size:"small",tabList:[{key:"templates",label:"模板库 (".concat(Z.length,")")},{key:"drafts",label:"生成记录 (".concat(eA.length,")")}],activeTabKey:eP,onTabChange:eq,children:"templates"===eP?0===Z.length?(0,r.jsx)(p.A,{description:e("common.noData")}):(0,r.jsx)(m.A,{dataSource:Z,renderItem:(t,s)=>(0,r.jsx)(m.A.Item,{style:{cursor:"pointer",padding:"10px 0"},actions:[(0,r.jsx)(d.Ay,{size:"small",icon:(0,r.jsx)(H.A,{}),onClick:e=>{e.stopPropagation(),e5(t)},children:"配置"},"cfg"),(0,r.jsx)(d.Ay,{size:"small",type:"primary",icon:(0,r.jsx)(O.A,{}),onClick:e=>{e.stopPropagation(),tt(t.id)},children:"运行"},"run"),(0,r.jsx)(d.Ay,{size:"small",icon:(0,r.jsx)(N.A,{}),onClick:e=>{e.stopPropagation(),e9(t.id)}},"copy"),(0,r.jsx)(h.A,{title:e("documents.deleteTemplateConfirm"),disabled:t.builtIn,onConfirm:e=>{null==e||e.stopPropagation(),te(t.id)},children:(0,r.jsx)(d.Ay,{size:"small",danger:!0,icon:(0,r.jsx)(W.A,{}),disabled:t.builtIn,onClick:e=>e.stopPropagation()})},"del")],onClick:()=>ea(t.id),children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,minWidth:0,flex:1},children:[function(e,t){let s=er[e]||(0,r.jsx)(R.A,{});return(0,r.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:s})}(t.category,el===t.id),(0,r.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,r.jsx)("span",{style:{fontWeight:el===t.id?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name}),t.builtIn&&(0,r.jsx)(x.A,{color:"gold",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"内置"}),el===t.id&&(0,r.jsx)(x.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"当前"}),(0,r.jsx)(x.A,{style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:t.category}),eM[t.id]&&(0,r.jsxs)(x.A,{color:eM[t.id].issues.some(e=>"error"===e.level)?"error":eM[t.id].issues.length?"warning":"success",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:["检查 ",eM[t.id].fileDiagnostics.length," 文件 / ",eM[t.id].promptDiagnostics.length," 提示词"]})]}),t.description&&(0,r.jsx)($,{type:"secondary",style:{fontSize:12,lineHeight:"18px"},children:t.description}),eM[t.id]&&(0,r.jsx)("div",{onClick:e=>e.stopPropagation(),style:{marginTop:8,padding:10,border:"1px solid ".concat(eM[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBorder)":eM[t.id].issues.length?"var(--colorWarningBorder)":"var(--colorSuccessBorder)"),borderRadius:10,background:eM[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBg)":eM[t.id].issues.length?"var(--colorWarningBg)":"var(--colorSuccessBg)"},children:(0,r.jsxs)(g.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,r.jsxs)(g.A,{wrap:!0,children:[(0,r.jsx)($,{strong:!0,children:eM[t.id].issues.some(e=>"error"===e.level)?"运行前检查未通过":eM[t.id].issues.length?"运行前检查存在警告":"运行前检查通过"}),(0,r.jsxs)(x.A,{color:"blue",children:["文件角色 ",eM[t.id].fileDiagnostics.length]}),(0,r.jsxs)(x.A,{color:"purple",children:["提示词角色 ",eM[t.id].promptDiagnostics.length]}),eM[t.id].spec&&(0,r.jsxs)(x.A,{color:"cyan",children:["规范包 ",eM[t.id].spec.name]})]}),eM[t.id].issues.length>0?eM[t.id].issues.map(e=>(0,r.jsx)(f.A,{type:"error"===e.level?"error":"warning",message:e.message,showIcon:!0},e.message)):(0,r.jsx)(f.A,{type:"success",message:"文件角色、提示词角色和规范包检查通过,可以运行。",showIcon:!0}),!eM[t.id].issues.some(e=>"error"===e.level)&&eM[t.id].issues.length>0&&(0,r.jsx)("div",{children:(0,r.jsx)(d.Ay,{size:"small",type:"primary",icon:(0,r.jsx)(O.A,{}),onClick:()=>eJ(t.id),children:"忽略警告并继续运行"})})]})})]})]})})}):0===eA.length?(0,r.jsx)(p.A,{description:e("common.noData")}):(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:eA.slice(0,15).map((e,t)=>{var s,n,i;let l,a;return(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 12px",border:"1px solid var(--colorBorderSecondary)",borderRadius:10,cursor:"pointer",background:eS===e.id?"var(--colorFillAlter)":void 0,minWidth:0},onClick:()=>{eY(e)},children:["completed"===e.status?(0,r.jsx)(L.A,{style:{fontSize:18,color:"var(--colorOk)",flexShrink:0,marginTop:2}}):"failed"===e.status?(0,r.jsx)(K.A,{style:{fontSize:18,color:"var(--colorDanger)",flexShrink:0,marginTop:2}}):"warning"===e.status?(0,r.jsx)(F.A,{style:{fontSize:18,color:"var(--colorWarning)",flexShrink:0,marginTop:2}}):(0,r.jsx)(U.A,{spin:!0,style:{fontSize:18,color:"#1677ff",flexShrink:0,marginTop:2}}),(0,r.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,r.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:3},children:e.title}),(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px 10px",color:"var(--colorTextSecondary)",fontSize:11},children:[(0,r.jsx)("span",{children:new Date(e.updatedAt).toLocaleString()}),(0,r.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 s=Math.floor(t/60),r=t%60;if(s<60)return r?"".concat(s," 分 ").concat(r," 秒"):"".concat(s," 分");let n=Math.floor(s/60),i=s%60;return i?"".concat(n," 小时 ").concat(i," 分"):"".concat(n," 小时")})(e)]})]}),("warning"===e.status||"failed"===e.status)&&(0,r.jsx)("div",{style:{marginTop:3,color:"failed"===e.status?"var(--colorError)":"var(--colorWarning)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null==(s=e.warningIssues)?void 0:s[0])||(null==(i=e.draft)||null==(n=i.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:n.message)||"需复核"})]}),(0,r.jsxs)(g.A,{size:4,align:"center",children:[(0,r.jsx)(x.A,{color:"completed"===(l=e.status)?"success":"warning"===l?"warning":"failed"===l?"error":"processing",style:{margin:0,fontSize:10,lineHeight:"18px"},children:"completed"===(a=e.status)?"已完成":"warning"===a?"需复核":"failed"===a?"失败":"生成中"}),(0,r.jsxs)(x.A,{style:{margin:0,fontSize:10,lineHeight:"18px"},children:["#",t+1]}),(0,r.jsx)(h.A,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),ts(e.id)},children:(0,r.jsx)(d.Ay,{size:"small",danger:!0,icon:(0,r.jsx)(W.A,{}),onClick:e=>e.stopPropagation()})}),e0(e.status)&&(0,r.jsx)(h.A,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),tl(e)},children:(0,r.jsx)(d.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),children:"中止"})}),(0,r.jsx)(d.Ay,{size:"small",type:"primary",icon:e0(e.status)?(0,r.jsx)(U.A,{spin:!0}):(0,r.jsx)(O.A,{}),onClick:t=>{t.stopPropagation(),eY(e)},children:"打开"})]})]},e.id)})})}),(0,r.jsx)(v.A,{title:td,open:eW,onClose:()=>{eG(!1),eN.current&&(clearInterval(eN.current),eN.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:ev?(0,r.jsxs)(g.A,{wrap:!0,children:[(0,r.jsx)(d.Ay,{icon:(0,r.jsx)(X.A,{}),onClick:()=>{to()},children:e("documents.saveDraft")}),(0,r.jsx)(d.Ay,{icon:(0,r.jsx)(P.A,{}),loading:eb,onClick:()=>{ta("markdown")},children:"MD"}),(0,r.jsx)(d.Ay,{loading:eb,onClick:()=>{ta("html")},children:"HTML"}),(0,r.jsx)(d.Ay,{loading:eb,onClick:()=>{ta("docx")},children:"DOCX"}),(0,r.jsx)(d.Ay,{type:"primary",loading:eb,onClick:()=>{ta("pdf")},children:"PDF"})]}):eg&&"workflow"===eH?(0,r.jsx)(d.Ay,{danger:!0,onClick:()=>{(async()=>{eS&&await (0,Q.r)(eS).catch(()=>void 0),ee&&(ee.loading=!1,ee.error="用户中止",et(),ee=null),localStorage.removeItem("activeGenDocId"),eN.current&&(clearInterval(eN.current),eN.current=null),ef(!1),eB([]),eR(null),eG(!1),await eK(),t.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,r.jsxs)(g.A,{direction:"vertical",style:{width:"100%"},size:"middle",children:["workflow"===eH&&eL.length>0&&(0,r.jsx)(u.A,{size:"small",type:"inner",title:e("documents.executionStatus"),style:{maxHeight:360,overflow:"auto"},children:(0,r.jsx)(w.A,{direction:"vertical",size:"small",current:eQ,items:eL.map(e=>{let t;return{title:e.title,description:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:e.description}),(0,r.jsx)("div",{style:{marginTop:4},children:e.subSteps.map(e=>{var t;return(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,r.jsx)(q.A,{}):"finish"===t?(0,r.jsx)(L.A,{}):"warning"===t?(0,r.jsx)(F.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,r.jsx)(W.A,{}):(0,r.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,r.jsx)("span",{children:e.title})]},e.key)})})]}),status:"warning"===(t=e.status)?"finish":t,icon:"process"===e.status?(0,r.jsx)(q.A,{}):"warning"===e.status?(0,r.jsx)(F.A,{style:{color:"var(--colorWarning)"}}):e.icon}})})}),"workflow"===eH&&eg&&0===eL.length&&(0,r.jsx)("div",{style:{textAlign:"center",padding:40},children:(0,r.jsx)(j.A,{tip:"正在准备生成…"})}),ev&&(0,r.jsx)("div",{ref:l,children:(0,r.jsx)(u.A,{size:"small",title:"编辑器",children:(0,r.jsx)(y.A,{items:[{key:"edit",label:e("documents.edit"),children:(0,r.jsx)(Y,{rows:22,value:ej,onChange:e=>ey(e.target.value)})},{key:"chapters-facts",label:"章节与事实",children:(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16,maxHeight:500,overflow:"auto"},children:[ev.chapters.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",ev.chapters.length,")"]}),(0,r.jsx)(m.A,{size:"small",dataSource:ev.chapters,renderItem:e=>(0,r.jsx)(m.A.Item,{actions:[(0,r.jsx)(d.Ay,{size:"small",icon:(0,r.jsx)(V.A,{}),loading:ez===e.id,onClick:()=>{tc(e)},children:"重新生成"},"regen")],children:(0,r.jsx)(m.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),ev.structuredFacts.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",ev.structuredFacts.length,")"]}),(0,r.jsx)(A.A,{size:"small",column:1,bordered:!0,children:ev.structuredFacts.map((e,t)=>(0,r.jsxs)(A.A.Item,{label:e.key,children:[(0,r.jsx)("span",{children:e.value}),(0,r.jsx)(x.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,r.jsx)($,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",ev.sources.length,")"]}),0===ev.sources.length?(0,r.jsx)(p.A,{description:"暂无"}):(0,r.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:ev.sources.map(e=>(0,r.jsxs)(x.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",ev.missingItems.length,")"]}),0===ev.missingItems.length?(0,r.jsx)(p.A,{description:"无缺失"}):(0,r.jsx)(m.A,{size:"small",dataSource:ev.missingItems,renderItem:e=>(0,r.jsx)(m.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(ev.validationIssues.length,")"),children:0===ev.validationIssues.length?(0,r.jsx)(p.A,{description:"校验通过"}):(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8,maxHeight:500,overflow:"auto"},children:[ev.validationIssues.map(e=>(0,r.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,r.jsx)(x.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,r.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,r.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))),ev.exportGate.checklist.length>0&&(0,r.jsxs)("div",{style:{marginTop:8},children:[(0,r.jsx)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,r.jsx)(m.A,{size:"small",dataSource:ev.exportGate.checklist,renderItem:e=>(0,r.jsxs)(m.A.Item,{children:[(0,r.jsx)($,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,r.jsx)(x.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(ev.executionStages.length,")"),children:(0,r.jsx)(m.A,{size:"small",dataSource:ev.executionStages,renderItem:e=>(0,r.jsxs)(m.A.Item,{children:[(0,r.jsx)(m.A.Item.Meta,{avatar:es[e.type]||(0,r.jsx)(R.A,{}),title:(0,r.jsx)($,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(en[e.type]||e.type," \xb7 ").concat(e.roleId)}),description:(0,r.jsx)($,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,r.jsx)(x.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})})]})}),(0,r.jsx)(k.A,{maskClosable:!1,title:e("documents.templateEditor"),open:e_,onOk:()=>{e4()},onCancel:()=>eD(!1),width:760,centered:!0,okText:e("common.save"),cancelText:e("common.cancel"),children:(0,r.jsxs)(o.A,{form:s,layout:"vertical",requiredMark:"optional",children:[(0,r.jsxs)(S.A,{gutter:12,children:[(0,r.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,r.jsx)(i.A,{})}),(0,r.jsx)(I.A,{xs:24,md:8,children:(0,r.jsx)(o.A.Item,{name:"name",label:e("documents.templateName"),rules:[{required:!0}],children:(0,r.jsx)(i.A,{})})}),(0,r.jsx)(I.A,{xs:24,md:8,children:(0,r.jsx)(o.A.Item,{name:"category",label:e("documents.templateCategory"),children:(0,r.jsx)(i.A,{})})}),(0,r.jsx)(I.A,{xs:24,md:8,children:(0,r.jsx)(o.A.Item,{name:"outputTitle",label:e("documents.outputTitle"),children:(0,r.jsx)(i.A,{})})}),(0,r.jsx)(I.A,{xs:24,md:12,children:(0,r.jsx)(o.A.Item,{name:"description",label:e("documents.templateDescription"),children:(0,r.jsx)(i.A,{})})})]}),(0,r.jsx)(o.A.Item,{name:"projectRoleConfigId",label:e("documents.projectRoleConfig"),rules:[{required:!0,message:e("documents.projectRoleConfigRequired")}],children:(0,r.jsx)(b.A,{showSearch:!0,placeholder:e("documents.projectRoleConfigRequired"),options:eX})}),(0,r.jsx)(o.A.Item,{name:"documentSpecId",label:e("documents.documentSpec"),children:(0,r.jsx)(b.A,{allowClear:!0,showSearch:!0,placeholder:e("documents.documentSpecPlaceholder"),options:eV})}),(0,r.jsx)(o.A.List,{name:"chapters",children:(e,t)=>{let{add:s,remove:n}=t;return(0,r.jsxs)("div",{children:[(0,r.jsxs)(g.A,{style:{marginBottom:8},children:[(0,r.jsx)($,{strong:!0,children:"章节结构"}),(0,r.jsx)(d.Ay,{size:"small",icon:(0,r.jsx)(G.A,{}),onClick:()=>s({id:"chapter-".concat(Date.now()),title:"",purpose:"",queries:[],requiredFacts:[]}),children:"添加章节"})]}),e.map(e=>(0,r.jsx)(u.A,{size:"small",style:{marginBottom:8},children:(0,r.jsxs)(S.A,{gutter:8,children:[(0,r.jsx)(I.A,{span:6,children:(0,r.jsx)(o.A.Item,{name:[e.name,"id"],label:"章节 ID",rules:[{required:!0}],children:(0,r.jsx)(i.A,{})})}),(0,r.jsx)(I.A,{span:8,children:(0,r.jsx)(o.A.Item,{name:[e.name,"title"],label:"标题",rules:[{required:!0}],children:(0,r.jsx)(i.A,{})})}),(0,r.jsx)(I.A,{span:8,children:(0,r.jsx)(o.A.Item,{name:[e.name,"purpose"],label:"目的",children:(0,r.jsx)(i.A,{})})}),(0,r.jsx)(I.A,{span:2,children:(0,r.jsx)(d.Ay,{danger:!0,size:"small",onClick:()=>n(e.name),children:"删除"})}),(0,r.jsx)(I.A,{span:12,children:(0,r.jsx)(o.A.Item,{name:[e.name,"queriesText"],label:"查询词(每行一个)",children:(0,r.jsx)(Y,{rows:3})})}),(0,r.jsx)(I.A,{span:12,children:(0,r.jsx)(o.A.Item,{name:[e.name,"requiredFactsText"],label:"必需事实(每行一个)",children:(0,r.jsx)(Y,{rows:3})})})]})},e.key))]})}})]})})]})}}},e=>{e.O(0,[347,8787,4277,7889,4833,7271,7576,2884,9144,9189,3455,5292,4052,6506,4427,3057,2225,6578,636,6593,8792],()=>e(e.s=16403)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6920],{2548:(e,s,l)=>{"use strict";l.r(s),l.d(s,{default:()=>D});var i=l(65321),c=l(35292),r=l(68787),n=l(2256),d=l(38770),t=l(11702),x=l(9730),h=l(13399),a=l(55122),j=l(15622),o=l(71330),m=l(8579),g=l(66926),p=l(7851),A=l(84742),u=l(32620);let{Paragraph:k,Title:N,Text:w}=c.A,y=[{icon:(0,i.jsx)(o.A,{}),title:"准备阶段",color:"blue",items:["配置模型","上传知识库资料","创建提示词"]},{icon:(0,i.jsx)(m.A,{}),title:"编排阶段",color:"purple",items:["创建文件角色","创建提示词角色","创建项目角色配置并排序"]},{icon:(0,i.jsx)(g.A,{}),title:"生成阶段",color:"geekblue",items:["创建模板","后台生成轮询","动态执行状态"]},{icon:(0,i.jsx)(p.A,{}),title:"交付阶段",color:"green",items:["审查事实和来源","检查导出门禁","导出正式文件"]}],z=[{title:"第一步:配置模型",goal:"让系统具备 LLM JSON 事实抽取、章节生成和校验能力。",path:"左侧菜单 → 模型配置",steps:["点击新增供应商,选择 OpenAI、DeepSeek、OpenRouter、Ollama 或其他兼容 OpenAI 协议的服务。","填写 Base URL、API Key、供应商名称并保存。","添加模型名称,建议至少准备一个用于生成和推理的模型。","把模型设置为当前启用模型。","执行健康检查,确认模型可调用。"],checks:["模型健康检查通过","至少有一个启用模型","API Key 和 Base URL 正确"],tips:"如果模型不可用,系统会回退到本地确定性抽取,但事实抽取质量会下降。"},{title:"第二步:上传知识库资料",goal:"把项目资料放入系统,让后续文件角色可以绑定。",path:"左侧菜单 → 知识库 → 文件管理 / 管理",steps:["上传招标文件、工程概况、合同条件、技术要求等项目事实资料。","上传工程量清单、劳动力计划、机械设备计划、材料计划等表格资料。","上传图纸目录、图纸说明、设计说明等图纸类资料。","上传规范、规程、企业标准、评分办法、编制要求等规则类资料。","等待索引完成,并在知识库文件列表中确认文件可见。"],checks:["文件上传成功","索引完成","文件能在文件角色绑定下拉框中看到"],tips:"表格资料最好有清晰表头;图纸资料最好附带目录或文字说明。"},{title:"第三步:创建提示词",goal:"定义每个执行阶段的模型行为。",path:"左侧菜单 → 提示词管理",steps:["创建事实抽取提示词:要求只抽取资料中明确出现的事实,返回结构化 JSON,不允许编造。","创建章节生成提示词:定义文档类型、专业语气、章节风格、引用事实和禁止事项。","创建校验提示词:检查工程名称、工期、质量目标、数字、表格引用、章节完整性。","创建格式化提示词:定义封面、目录、编号、表格、分页和正式输出样式。","保存后确认提示词能在提示词角色绑定下拉框中看到。"],checks:["事实抽取提示词已创建","章节生成提示词已创建","校验或格式化提示词已创建"],tips:"提示词越明确,生成结果越稳定。建议明确写上“没有来源的数据不要写”。"},{title:"第四步:创建文件角色",goal:"告诉系统每个文件在生成流程中的用途。",path:"左侧菜单 → 角色配置 → 新建文件角色",steps:["填写角色名称,例如“招标文件事实源”“工程量清单表格”“图纸说明文件”。","选择处理类型:规则文件、项目事实文件、表格数据、图纸文件、规范文件或参考资料。","绑定对应知识库文件。","保存角色。","按文件用途创建多个文件角色,不建议把不同用途资料混在一个角色里。"],checks:["文件角色有名称","已选择处理类型","已绑定知识库文件"],tips:"处理类型很重要:系统会根据它决定是否进行表格解析、事实抽取、规则引用或来源追踪。"},{title:"第五步:创建提示词角色",goal:"告诉系统每条提示词在哪个执行阶段使用。",path:"左侧菜单 → 角色配置 → 新建提示词角色",steps:["填写角色名称,例如“施工组织设计事实抽取”“章节生成规则”“导出前校验规则”。","选择执行类型:事实抽取、章节生成、校验、格式化或参考。","绑定对应提示词。","保存角色。","一个执行阶段可以有多个提示词角色,后续在项目角色配置中排序。"],checks:["提示词角色有名称","已选择执行类型","已绑定提示词"],tips:"角色名称可以完全自定义,但执行类型必须选对。系统依赖执行类型驱动多阶段流程。"},{title:"第六步:创建项目角色配置并排序",goal:"把文件角色和提示词角色组合成一个可复用的项目生成方案。",path:"左侧菜单 → 角色配置 → 新建项目配置",steps:["填写配置名称,例如“某项目施工组织设计配置”。","添加文件角色,并设置顺序。推荐:规则文件 → 项目事实文件 → 表格数据 → 图纸文件 → 规范文件 → 参考资料。","添加提示词角色,并设置顺序。推荐:事实抽取 → 章节生成 → 校验 → 格式化 → 参考。","保存项目角色配置。","后续模板只绑定项目角色配置,不再重复绑定文件和提示词。"],checks:["至少包含一个文件角色","至少包含一个提示词角色","顺序符合业务流程"],tips:"排序决定系统读取资料和应用提示词的优先级,是生产级生成稳定性的关键。"},{title:"第七步:创建模板并绑定项目配置",goal:"定义要生成哪种文档,以及使用哪套项目角色配置。",path:"左侧菜单 → 生成编辑 → 新建模板",steps:["填写模板 ID。ID 由系统生成或保持唯一,不建议手动频繁修改。","填写模板名称,例如“施工组织设计”“技术标文件”“专项施工方案”。","填写分类、输出标题和模板说明。","选择第六步创建的项目角色配置。","保存模板。"],checks:["模板名称清晰","输出标题正确","已绑定项目角色配置"],tips:"模板负责文档入口;项目角色配置负责资料、提示词和顺序。两者分离后更容易复用。"},{title:"第八步:执行生成并查看状态",goal:"让用户明确知道生成流程进行到哪一步。",path:"左侧菜单 → 生成编辑 → 选择模板 → 点击生成",steps:["点击生成按钮后,页面会出现“执行状态”卡片。","执行状态会根据当前模板、文档规范包、文件角色、提示词角色和章节自动生成,不是固定工程流程。","当前执行节点会高亮显示,子状态会展示正在处理的章节、事实字段、文件角色或门禁规则。","生成任务在后台运行,页面通过 documentId 轮询;切换页面后回到生成编辑仍可恢复状态。","生成完成后,系统会用后端真实 executionStages 回填最终状态。","如果导出门禁未通过,生成完成节点会提示需要检查校验结果。"],checks:["执行状态 Card 出现","当前节点有高亮","生成完成后有执行阶段结果"],tips:"如果长时间停留在某一步,优先检查模型配置、知识库索引和文件角色绑定。"},{title:"第九步:审查结果并导出",goal:"确保文档可追溯、可校验、可交付,同时能区分阻断问题和可复核 warning。",path:"生成编辑 → 编辑器下方 Tabs → 导出按钮 / 草稿历史",steps:["查看“结构化事实”,确认事实字段是否按文档规范包动态 schema 抽取,并检查冲突提示。","查看“来源”,确认事实来自规范包要求的文件角色和绑定资料。","查看“缺失项”,补齐缺失资料或调整角色配置。","查看“校验”,优先处理 error;warning 表示可导出但建议复核。","查看“导出门禁”,真实 blockingIssues 会阻断 PDF/DOCX 导出,普通 warning 不阻断。","在草稿历史中确认生成状态、warning 原因、整体生成耗时,并可删除不需要的记录。","可以先导出 HTML 预览排版,再导出 DOCX/PDF。"],checks:["无真实阻断问题","关键事实有来源","章节有证据","warning 原因已复核","导出文件可打开"],tips:"导出不是简单放行:真实阻断仍会拦截;生成完成但存在可复核问题时显示 warning,用户可以继续导出并按原因优化资料。"}];function D(){let e=(0,u.Vr)();return(0,i.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,i.jsxs)(r.A,{className:"cardGlass",styles:{body:{padding:24}},children:[(0,i.jsx)(N,{level:2,className:"mb-2",children:e("guide.title")}),(0,i.jsx)(k,{className:"pageDesc mb-0",children:e("guide.description")})]}),(0,i.jsx)(n.A,{gutter:[16,16],children:y.map(e=>(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(r.A,{className:"h-full",title:(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[e.icon,e.title]}),children:(0,i.jsx)("div",{className:"space-y-2",children:e.items.map(s=>(0,i.jsx)("div",{children:(0,i.jsx)(t.A,{color:e.color,children:s})},s))})})},e.title))}),(0,i.jsx)(r.A,{title:e("guide.fullFlow"),children:(0,i.jsx)(x.A,{direction:"vertical",items:z.map(e=>({title:e.title,description:"".concat(e.goal,"(入口:").concat(e.path,")")}))})}),(0,i.jsx)(r.A,{title:"详细步骤说明:照着做即可跑通",children:(0,i.jsx)(h.A,{mode:"left",items:z.map(e=>({dot:(0,i.jsx)(A.A,{}),children:(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)(N,{level:4,className:"mb-0",children:e.title}),(0,i.jsxs)(k,{children:[(0,i.jsx)(w,{strong:!0,children:"目标:"}),e.goal]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(w,{strong:!0,children:"入口:"}),e.path]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(w,{strong:!0,children:"操作步骤:"}),(0,i.jsx)("ol",{className:"list-decimal pl-6 mt-2 space-y-1",children:e.steps.map(e=>(0,i.jsx)("li",{children:e},e))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(w,{strong:!0,children:"完成检查:"}),(0,i.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.checks.map(e=>(0,i.jsx)(t.A,{color:"success",children:e},e))})]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(w,{strong:!0,children:"提示:"}),e.tips]}),(0,i.jsx)(a.A,{})]})}))})}),(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(r.A,{title:e("guide.roleDesign"),children:[(0,i.jsx)(k,{children:e("guide.roleDesignDesc")}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"blue",children:"file"}),(0,i.jsx)(w,{strong:!0,children:e("guide.fileRole")}),(0,i.jsx)(k,{children:e("guide.fileRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"purple",children:"prompt"}),(0,i.jsx)(w,{strong:!0,children:e("guide.promptRole")}),(0,i.jsx)(k,{children:e("guide.promptRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"geekblue",children:"config"}),(0,i.jsx)(w,{strong:!0,children:e("guide.projectConfig")}),(0,i.jsx)(k,{children:e("guide.projectConfigDesc")})]})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(r.A,{title:e("guide.generationEngine"),children:[(0,i.jsx)(k,{children:e("guide.generationEngineDesc")}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(t.A,{children:e("roles.factExtraction")}),(0,i.jsx)(t.A,{children:e("roles.chapterGeneration")}),(0,i.jsx)(t.A,{children:e("roles.validation")}),(0,i.jsx)(t.A,{children:e("roles.formatting")}),(0,i.jsx)(t.A,{children:e("documents.exportGate")})]})]})})]}),(0,i.jsx)(r.A,{title:"我的数据、内置示例和门禁规则说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"默认优先看我的数据",children:(0,i.jsx)(k,{children:"文件、提示词、角色配置和规范包默认优先展示用户自己创建的内容。内置示例只用于学习,不能直接覆盖或删除,需要使用时请先复制。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"自定义门禁类型会执行",children:(0,i.jsx)(k,{children:"用户在文档规范包中创建的门禁类型,需要选择校验对象和校验方式。保存后它会和系统门禁类型一样参与生成校验,不只是备注说明。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"上传后关注索引状态",children:(0,i.jsx)(k,{children:"文件上传完成后,知识库索引会继续在后台写入。请在文件管理页查看状态,如果失败,页面会展示原因,方便重新配置模型或重试。"})})})]})}),(0,i.jsx)(r.A,{title:"动态 schema、证据和执行状态说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"动态事实 schema",children:(0,i.jsx)(k,{children:"系统不会写死工程字段。文档规范包的事实字段、模板章节 requiredFacts、字段 sourceRoleIds 和 extractionHint 会共同组成抽取 schema,并驱动事实抽取、冲突检测和导出门禁。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"结构化资源证据",children:(0,i.jsx)(k,{children:"文本、PDF/Word、Excel/CSV、图片、地图图纸和其他附件都会被整理成资源证据,包含文件角色、处理类型、正文用途、关联事实和证据片段,模型据此理解资料关系。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"动态执行状态",children:(0,i.jsx)(k,{children:"生成编辑页的执行节点会随模板、规范包、文件角色、提示词角色、章节和门禁规则变化;用户生成不同项目文件时看到的是对应项目的流程,而不是固定示例流程。"})})})]})}),(0,i.jsx)(r.A,{title:"生成记录、warning 和导出门禁怎么理解",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(r.A,{size:"small",title:"草稿历史记录",children:[(0,i.jsxs)(k,{children:["每次后台生成都会写入全局项目目录 ",(0,i.jsxs)(w,{code:!0,children:["~/.customize-agent/projects/","{projectId}","/generatedDocuments"]}),"。记录会保存标题、模板、状态、创建时间、完成时间、生成耗时、正文、结构化结果和资源引用。"]}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"completed:生成完成且无需要关注的问题。"}),(0,i.jsx)("li",{children:"warning:生成完成,但存在可复核问题。"}),(0,i.jsx)("li",{children:"failed:生成失败,需要查看错误原因。"}),(0,i.jsx)("li",{children:"generating:后台任务仍在执行,可轮询恢复。"})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(r.A,{size:"small",title:"warning 不是失败",children:[(0,i.jsx)(k,{children:"warning 用于提醒用户“文档已经生成,但建议复核”。例如必需事实没有在最佳来源角色中抽到、部分来源需要人工确认、格式或内容有优化建议。warning 会显示在草稿历史和校验详情中,并保留导出能力。"}),(0,i.jsx)(k,{children:"如果是明确阻断问题,例如正文包含临时图片生成 URL、出现“资料未提供”占位、真实 blockingIssues 未解决,则导出门禁仍会阻断 DOCX/PDF。"})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(r.A,{size:"small",title:"导出门禁规则",children:[(0,i.jsx)(k,{children:"门禁分为“真实阻断”和“复核建议”。系统不会因为普通 warning 简单禁止导出,但会在出现阻断级问题时保护交付质量。"}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"Markdown/HTML 更适合快速预览和人工调整。"}),(0,i.jsx)("li",{children:"DOCX/PDF 会启用真实门禁检查。"}),(0,i.jsx)("li",{children:"草稿历史可保留多个版本,便于对比和再次导出。"})]})]})})]})}),(0,i.jsx)(r.A,{title:"生成资源和知识库的关系",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(r.A,{size:"small",title:"生成资源自动回流知识库",children:[(0,i.jsx)(k,{children:"模型生成的图片、封面或后处理资源会登记到生成资源管理页,并自动回流到 knowledgeBase/生成资源 下完成索引。"}),(0,i.jsx)(k,{children:"后续文档可以继续检索和复用这些已生成资源,资源管理页也会展示入库状态。"})]})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(r.A,{size:"small",title:"资源预览和坏图处理",children:[(0,i.jsx)(k,{children:"资源预览会从全局 generatedDocuments 目录解析文件,不依赖当前页面临时路径。图片下载会识别“image is generating”等占位响应,并校验 PNG/JPEG/WebP 字节,避免把占位文本当成图片保存。"}),(0,i.jsx)(k,{children:"如果预览失败,优先查看资源管理页中的文件路径、资源状态和原始生成记录。"})]})})]})}),(0,i.jsx)(r.A,{title:"文件角色处理类型大白话说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(r.A,{size:"small",title:"规则文件",children:(0,i.jsx)(k,{children:"用来告诉系统“必须怎么写、不能怎么写、按什么标准判断”。适合放评分办法、甲方编制要求、攻略写作要求、输出格式要求。生成时会优先作为约束使用。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(r.A,{size:"small",title:"项目事实文件",children:(0,i.jsx)(k,{children:"用来告诉系统“真实情况是什么”。适合放项目概况、合同摘要、招标文件关键信息、游戏角色资料、产品资料。事实字段通常从这里抽取。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(r.A,{size:"small",title:"表格数据",children:(0,i.jsx)(k,{children:"用来解析结构化数据。适合放 Excel、CSV、清单、计划表、评分表、推荐指数表。系统会读取 Sheet、表头、行列和来源范围。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(r.A,{size:"small",title:"图纸文件",children:(0,i.jsx)(k,{children:"用来表达空间关系、路线、结构、站位或设计说明。可以是图纸目录、设计说明、路线示意、阵型图说明。没有 CAD 时也可以用文字图纸说明。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(r.A,{size:"small",title:"规范文件",children:(0,i.jsx)(k,{children:"用来作为专业依据。适合放国家规范、行业标准、企业标准、攻略结构规范、质量标准。校验和生成时会把它当成依据。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(r.A,{size:"small",title:"参考资料",children:(0,i.jsx)(k,{children:"只作为辅助阅读材料,不建议放关键事实。适合放图片来源、公开网页链接、背景资料、案例资料。系统可以参考,但不应把它当成强事实。"})})})]})}),(0,i.jsx)(r.A,{title:"推荐资料清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"必备资料",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"项目事实文件"}),(0,i.jsx)("li",{children:"招标或编制规则"}),(0,i.jsx)("li",{children:"章节生成提示词"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"强烈建议",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"表格数据"}),(0,i.jsx)("li",{children:"图纸说明"}),(0,i.jsx)("li",{children:"规范或企业标准"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(r.A,{size:"small",title:"导出前确认",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"无 error 校验"}),(0,i.jsx)("li",{children:"事实有来源"}),(0,i.jsx)("li",{children:"导出门禁通过"})]})})})]})}),(0,i.jsx)(r.A,{title:"生产级生成前检查清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(r.A,{size:"small",title:"资料完整性",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"事实源、规则源、表格源、图片/图纸源分开绑定。"}),(0,i.jsx)("li",{children:"关键事实在知识库检索中可以搜索到。"}),(0,i.jsx)("li",{children:"表格有清晰表头,图片和图纸有说明文字。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(r.A,{size:"small",title:"角色配置",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"文件角色处理类型选对。"}),(0,i.jsx)("li",{children:"提示词角色执行类型选对。"}),(0,i.jsx)("li",{children:"项目角色配置排序符合生成流程。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(r.A,{size:"small",title:"规范包",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"required fact 不要过度配置。"}),(0,i.jsx)("li",{children:"sourceRoleIds 只绑定真正应该提供该事实的角色。"}),(0,i.jsx)("li",{children:"gateRules 区分 error 和 warning。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(r.A,{size:"small",title:"交付检查",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"草稿历史记录状态合理。"}),(0,i.jsx)("li",{children:"warning 原因已经阅读。"}),(0,i.jsx)("li",{children:"导出文件打开正常,图片和表格可读。"})]})})})]})}),(0,i.jsx)(r.A,{title:"常见问题和处理建议",children:(0,i.jsx)(j.A,{items:[{key:"warning-export",label:"为什么生成完成后显示 warning,但仍然可以导出?",children:(0,i.jsx)(k,{children:"warning 表示文档已生成,但存在建议复核的问题,例如来源角色不完全匹配、某些事实需要人工确认或格式可优化。它不是失败,也不是导出阻断。只有真实 blockingIssues 或 error 级门禁问题才会阻断 DOCX/PDF 导出。"})},{key:"missing-facts",label:"为什么提示必需事实缺失?",children:(0,i.jsx)(k,{children:"优先检查文档规范包中的 factFields、sourceRoleIds、模板章节 requiredFacts 和文件角色绑定。很多情况下不是模型失败,而是资料没有被绑定到正确角色,或字段要求比资料实际内容更严格。"})},{key:"draft-duration",label:"草稿历史里的耗时怎么计算?",children:(0,i.jsx)(k,{children:"耗时使用生成记录的 createdAt 到 completedAt 计算;旧记录或未完成记录会使用 updatedAt 兜底。它用于判断本次生成链路整体成本,包括知识库检索、事实抽取、章节生成、资源处理、校验和格式化。"})},{key:"asset-index",label:"生成资源会如何进入知识库?",children:(0,i.jsx)(k,{children:"生成资源完成后会自动回流到 knowledgeBase/生成资源 并建立索引,便于后续模板继续复用。资源管理页会展示入库状态,错误资源可以删除后重新生成。"})}]})}),(0,i.jsx)(j.A,{items:[{key:"prepare",label:e("guide.prepareTitle"),children:(0,i.jsx)(k,{children:e("guide.prepareContent")})},{key:"roles",label:e("guide.rolesTitle"),children:(0,i.jsx)(k,{children:e("guide.rolesContent")})},{key:"template",label:e("guide.templateTitle"),children:(0,i.jsx)(k,{children:e("guide.templateContent")})},{key:"generate",label:e("guide.generateTitle"),children:(0,i.jsx)(k,{children:e("guide.generateContent")})},{key:"qa",label:e("guide.qaTitle"),children:(0,i.jsx)(k,{children:e("guide.qaContent")})}]})]})}},34899:(e,s,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/guide",function(){return l(2548)}])}},e=>{e.O(0,[347,8787,4277,4833,5292,4427,8326,636,6593,8792],()=>e(e.s=34899)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5207],{838:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"}},4184:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var l=s(65321),r=s(43220),n=s.n(r),i=s(97109),a=s(35292),c=s(68787),o=s(33442),d=s(7576),u=s(85114),h=s(48318),_=s(76506),m=s(11702),p=s(85493),x=s(42700),j=s(84253),y=s(30486),f=s(6578),b=s(14569),w=s.n(b);let{Paragraph:v}=a.A;function A(e){return"number"==typeof e?e.toFixed(2):"-"}function g(){var e,t,s;let[r,a]=(0,i.useState)(""),[b,g]=(0,i.useState)(!1),[C,k]=(0,i.useState)([]),[S,E]=(0,i.useState)(),[P,N]=(0,i.useState)(),[I,R]=(0,i.useState)(""),[L,O]=(0,i.useState)({keyword:1,vector:.9,rewrite:.72,hybridBonus:.35}),B=async()=>{let e=r.trim();if(e){g(!0),R("");try{let t=await (0,f.W2)(e,{limit:10,weights:L});k(t.results),E(t.queryTimeMs),N(t.debug)}catch(e){k([]),R(e instanceof Error?e.message:"搜索失败")}finally{g(!1)}}};return(0,l.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"pageTitle",children:"知识库搜索"}),(0,l.jsx)("p",{className:"pageDesc",children:"查看 hybrid 检索、parent 回填、分块来源和评分明细。"})]}),(0,l.jsx)(c.A,{size:"small",children:(0,l.jsxs)(o.A.Compact,{className:"w-full",children:[(0,l.jsx)(d.A,{value:r,onChange:e=>a(e.target.value),onPressEnter:()=>{B()},placeholder:"输入要搜索的知识库内容"}),(0,l.jsx)(u.Ay,{type:"primary",icon:(0,l.jsx)(y.A,{}),loading:b,onClick:()=>{B()},children:"搜索"})]})}),(0,l.jsx)(c.A,{size:"small",title:"召回权重调节",children:(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsxs)("span",{children:["Keyword ",(0,l.jsx)(h.A,{min:0,max:5,step:.1,value:L.keyword,onChange:e=>O(t=>({...t,keyword:Number(null!=e?e:1)}))})]}),(0,l.jsxs)("span",{children:["Vector ",(0,l.jsx)(h.A,{min:0,max:5,step:.1,value:L.vector,onChange:e=>O(t=>({...t,vector:Number(null!=e?e:.9)}))})]}),(0,l.jsxs)("span",{children:["Rewrite ",(0,l.jsx)(h.A,{min:0,max:5,step:.1,value:L.rewrite,onChange:e=>O(t=>({...t,rewrite:Number(null!=e?e:.72)}))})]}),(0,l.jsxs)("span",{children:["Hybrid Bonus ",(0,l.jsx)(h.A,{min:0,max:2,step:.05,value:L.hybridBonus,onChange:e=>O(t=>({...t,hybridBonus:Number(null!=e?e:.35)}))})]})]})}),P&&(0,l.jsx)(c.A,{size:"small",title:"检索调试面板",children:(0,l.jsxs)(_.A,{size:"small",column:2,bordered:!0,children:[(0,l.jsx)(_.A.Item,{label:"原始查询",children:P.originalQuery}),(0,l.jsx)(_.A.Item,{label:"Reranker",children:P.reranker}),(0,l.jsx)(_.A.Item,{label:"查询改写",span:2,children:(0,l.jsx)(o.A,{wrap:!0,children:null==(e=P.rewrittenQueries)?void 0:e.map(e=>(0,l.jsx)(m.A,{children:e},e))})}),(0,l.jsx)(_.A.Item,{label:"召回数量",span:2,children:(0,l.jsx)(o.A,{wrap:!0,children:Object.entries(null!=(t=P.recallCounts)?t:{}).map(e=>{let[t,s]=e;return(0,l.jsxs)(m.A,{children:[t,": ",s]},t)})})}),(0,l.jsx)(_.A.Item,{label:"召回权重",span:2,children:(0,l.jsx)(o.A,{wrap:!0,children:Object.entries(null!=(s=P.weights)?s:{}).map(e=>{let[t,s]=e;return(0,l.jsxs)(m.A,{children:[t,": ",s]},t)})})})]})}),(0,l.jsxs)(c.A,{size:"small",title:"搜索结果",extra:"number"==typeof S?"".concat(S," ms"):void 0,children:[I?(0,l.jsx)(p.A,{type:"error",showIcon:!0,message:"搜索失败",description:I,className:"mb-4"}):null,b?(0,l.jsx)(x.A,{}):0===C.length?(0,l.jsx)(j.A,{description:"暂无结果"}):(0,l.jsx)("div",{className:w().searchResultList,children:C.map((e,t)=>{var s,i,a,c,d,u;return(0,l.jsxs)("div",{className:w().searchResultItem,children:[(0,l.jsxs)("div",{className:w().searchResultHeader,children:[(0,l.jsxs)(o.A,{size:8,wrap:!0,children:[(0,l.jsxs)(m.A,{children:["序号 ",t+1]}),(0,l.jsx)(m.A,{color:"hybrid"===e.source?"purple":"vector"===e.source?"blue":"green",children:null!=(u=e.source)?u:"keyword"}),(0,l.jsx)(m.A,{children:e.scope}),e.chunkKind&&(0,l.jsx)(m.A,{color:"geekblue",children:e.chunkKind}),e.rowRange&&(0,l.jsxs)(m.A,{color:"gold",children:["行 ",e.rowRange]}),e.sectionTitle&&(0,l.jsx)(m.A,{color:"cyan",children:e.sectionTitle})]}),(0,l.jsx)("strong",{children:A(e.score)})]}),(0,l.jsxs)("div",{className:w().statusPath,children:[(0,l.jsx)(n(),{href:"/knowledge/file-detail?relativePath=".concat(encodeURIComponent(e.filePath)),children:e.filePath}),"number"==typeof e.chunkIndex?" #".concat(e.chunkIndex):""]}),(0,l.jsx)(v,{ellipsis:{rows:6,expandable:!0,symbol:"展开"},className:w().searchContent,children:function(e,t){let s=[t.trim(),...t.split(/[\s,,。;;::、]+/u)].filter(Boolean).sort((e,t)=>t.length-e.length);if(0===s.length)return e;let r=RegExp("(".concat(s.map(e=>e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join("|"),")"),"giu");return e.split(r).map((e,t)=>s.some(t=>t.toLowerCase()===e.toLowerCase())?(0,l.jsx)("mark",{children:e},t):e)}(e.content,r)}),e.facets&&Object.keys(e.facets).length>0&&(0,l.jsx)("div",{className:w().statusMeta,children:Object.entries(e.facets).slice(0,8).map(e=>{let[t,s]=e;return(0,l.jsxs)("span",{children:[t," ",(0,l.jsx)("b",{children:Array.isArray(s)?s.join(", "):String(s)})]},t)})}),(0,l.jsxs)("div",{className:w().statusMeta,children:[(0,l.jsxs)("span",{children:["keyword ",(0,l.jsx)("b",{children:A(null==(s=e.scoreDetails)?void 0:s.keywordScore)})]}),(0,l.jsxs)("span",{children:["bm25 ",(0,l.jsx)("b",{children:A(null==(i=e.scoreDetails)?void 0:i.bm25Score)})]}),(0,l.jsxs)("span",{children:["vector ",(0,l.jsx)("b",{children:A(null==(a=e.scoreDetails)?void 0:a.vectorScore)})]}),(0,l.jsxs)("span",{children:["rerank ",(0,l.jsx)("b",{children:A(null==(c=e.scoreDetails)?void 0:c.rerankBoost)})]}),(0,l.jsxs)("span",{children:["hybrid ",(0,l.jsx)("b",{children:A(null==(d=e.scoreDetails)?void 0:d.hybridScore)})]})]})]},e.id)})})]})]})}},9208:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/search",function(){return s(4184)}])},14569:e=>{e.exports={featureLabel:"style_featureLabel__XFSTX",featureValue:"style_featureValue__I_wMP",filterInput:"style_filterInput__4_Elu",filterSelect:"style_filterSelect__vUBJ9",statusCard:"style_statusCard__H7Mee",statusSummary:"style_statusSummary__7KavF",statusSummaryText:"style_statusSummaryText__Shw3j",statusClearBtn:"style_statusClearBtn__uJ9bE",statusExpandBtn:"style_statusExpandBtn__HhgIj",statusFilters:"style_statusFilters__g_LbG",filterPill:"style_filterPill__1pjFW",filterPillActive:"style_filterPillActive___UZVi",statusPanel:"style_statusPanel__9arTu",statusEmpty:"style_statusEmpty__8LWzH",timelineList:"style_timelineList__dqJrz",timelineItem:"style_timelineItem__dbuL_",timelineStatusIcon:"style_timelineStatusIcon__SkRwb",timelinePercent:"style_timelinePercent__pEyH4",timelineRow:"style_timelineRow__EDOVa",timelineTitle:"style_timelineTitle__Yujr8",timelineClose:"style_timelineClose__Byx_9",timelineDetail:"style_timelineDetail__nALei",timelineDesc:"style_timelineDesc__FMjWE",timelinePath:"style_timelinePath__C9VQI",timelineMeta:"style_timelineMeta__u_pCn",timelineMetaTag:"style_timelineMetaTag__G3jF1",timelineExpandArrow:"style_timelineExpandArrow__xIBdF",timelineExpandArrowOpen:"style_timelineExpandArrowOpen__TWWDC",fileNameCell:"style_fileNameCell__EHsnt",folderName:"style_folderName__VhLXP",folderRow:"style_folderRow__d7k9S",searchResultList:"style_searchResultList__cVKZg",searchResultItem:"style_searchResultItem__boj6D",searchResultHeader:"style_searchResultHeader__meVdJ",searchContent:"style_searchContent__XbUVk",pdfPreviewStrip:"style_pdfPreviewStrip__94_eG",drawingPreview:"style_drawingPreview__lkk_L"}},30486:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var l=s(97109),r=s(58758),n=s(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e}).apply(this,arguments)}let a=l.forwardRef((e,t)=>l.createElement(n.A,i({},e,{ref:t,icon:r.A})))},58758:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"}},60470:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var l=s(97109),r=s(838),n=s(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e}).apply(this,arguments)}let a=l.forwardRef((e,t)=>l.createElement(n.A,i({},e,{ref:t,icon:r.A})))},73458:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"}},99650:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var l=s(97109),r=s(73458),n=s(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e}).apply(this,arguments)}let a=l.forwardRef((e,t)=>l.createElement(n.A,i({},e,{ref:t,icon:r.A})))}},e=>{e.O(0,[347,8787,4277,7889,4833,7576,2884,5292,6506,5938,6578,636,6593,8792],()=>e(e.s=9208)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5449],{27795:(e,l,s)=>{"use strict";s.r(l),s.d(l,{default:()=>T});var r=s(65321),t=s(97109),i=s(32620),c=s(85114),n=s(2256),o=s(38770),a=s(68787),x=s(99605),d=s(54849),m=s(33442),v=s(11702),u=s(99811),j=s(520),h=s(93314),A=s(13114),y=s(29071),p=s(26631),g=s(84742),f=s(38762),k=s(8579),w=s(9020),z=s(32632),S=s(95118),N=s(24810),_=s(6578);function T(){var e,l,s,T,b,P,C,D,E,O,M,F;let I=(0,i.Vr)(),[B,W]=(0,t.useState)(null),[U,X]=(0,t.useState)(!0),[R,V]=(0,t.useState)(0),[Z,q]=(0,t.useState)(0),[G,H]=(0,t.useState)(0),[J,K]=(0,t.useState)(0),[L,Q]=(0,t.useState)(0),[Y,$]=(0,t.useState)(null),ee=(0,t.useCallback)(async()=>{X(!0);try{let[e,l,s,r,t,i]=await Promise.all([(0,_.FC)(),(0,_.Z3)().catch(()=>[]),(0,_.lv)().catch(()=>({roles:[],configs:[]})),(0,_.mx)().catch(()=>({specs:[]})),(0,_.Dl)().catch(()=>({templates:[]})),(0,_.II)().catch(()=>null)]);W(e),V(Array.isArray(l)?l.length:0);let c=Array.isArray(s.roles)?s.roles:[];q(c.filter(e=>"file"===e.type).length),H(c.filter(e=>"prompt"===e.type).length),K(Array.isArray(r.specs)?r.specs.length:0),Q(Array.isArray(t.templates)?t.templates.length:0),$(i)}catch(e){}finally{X(!1)}},[]);(0,t.useEffect)(()=>{ee();let e=setInterval(()=>{ee()},1e4);return()=>clearInterval(e)},[ee]);let el=(null!=(l=null==B?void 0:B.cpu.usagePercent)?l:0)>80?"var(--colorDanger)":(null!=(s=null==B?void 0:B.cpu.usagePercent)?s:0)>50?"var(--colorWarning)":"var(--colorOk)",es=(null!=(T=null==B?void 0:B.memory.usagePercent)?T:0)>80?"var(--colorDanger)":(null!=(b=null==B?void 0:B.memory.usagePercent)?b:0)>50?"var(--colorWarning)":"var(--colorOk)",er=(null==B?void 0:B.tasks.total)?Math.round(B.tasks.success/B.tasks.total*100):0,et=null==B||null==(e=B.models)?void 0:e[0];return(0,r.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"pageTitle",children:I("overview.title")}),(0,r.jsx)("p",{className:"pageDesc",children:I("overview.description")})]}),(0,r.jsx)(c.Ay,{icon:(0,r.jsx)(u.A,{spin:U}),loading:U,onClick:()=>{ee()},children:I("common.retry")})]}),(0,r.jsxs)(n.A,{gutter:[16,16],children:[(0,r.jsx)(o.A,{xs:24,sm:12,children:(0,r.jsx)(a.A,{size:"small",title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.A,{})," CPU"]}),children:(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsx)(x.A,{type:"circle",percent:null!=(P=null==B?void 0:B.cpu.usagePercent)?P:0,size:120,strokeColor:el,format:e=>"".concat(null==e?void 0:e.toFixed(1),"%")}),(0,r.jsxs)("div",{className:"text-xs mt-2",style:{color:"var(--colorTextSecondary)"},children:[null!=(C=null==B?void 0:B.cpu.cores)?C:0," ",I("overview.cores")]})]})})}),(0,r.jsx)(o.A,{xs:24,sm:12,children:(0,r.jsx)(a.A,{size:"small",title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.A,{})," ",I("overview.memory")]}),children:(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsx)(x.A,{type:"circle",percent:null!=(D=null==B?void 0:B.memory.usagePercent)?D:0,size:120,strokeColor:es,format:e=>"".concat(e,"%")}),(0,r.jsxs)("div",{className:"text-xs mt-2",style:{color:"var(--colorTextSecondary)"},children:[null!=(E=null==B?void 0:B.memory.processMB)?E:0," MB / ",null!=(O=null==B?void 0:B.memory.totalMB)?O:0," MB"]})]})})})]}),(0,r.jsxs)(n.A,{gutter:[16,16],children:[(0,r.jsx)(o.A,{xs:12,sm:6,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:"运行时间",value:B?Math.floor(B.uptime/3600):0,suffix:"小时",prefix:(0,r.jsx)(A.A,{})})})}),(0,r.jsx)(o.A,{xs:12,sm:6,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:I("overview.tokensUsed"),value:null!=(M=null==B?void 0:B.tokens.total)?M:0,prefix:(0,r.jsx)(y.A,{})})})}),(0,r.jsx)(o.A,{xs:12,sm:6,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:I("overview.tasksTotal"),value:null!=(F=null==B?void 0:B.tasks.total)?F:0,prefix:(0,r.jsx)(p.A,{})})})}),(0,r.jsx)(o.A,{xs:12,sm:6,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:I("overview.successRate"),value:er,suffix:"%",prefix:er>80?(0,r.jsx)(g.A,{style:{color:"var(--colorOk)"}}):(0,r.jsx)(f.A,{style:{color:"var(--colorDanger)"}})})})})]}),(0,r.jsx)(a.A,{size:"small",title:"资源概览",children:(0,r.jsxs)(n.A,{gutter:[16,16],children:[(0,r.jsx)(o.A,{xs:24,sm:12,md:8,lg:4,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:"文件角色",value:Z,prefix:(0,r.jsx)(p.A,{style:{color:"var(--colorAccent)"}})})})}),(0,r.jsx)(o.A,{xs:24,sm:12,md:8,lg:4,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:"提示词角色",value:G,prefix:(0,r.jsx)(k.A,{style:{color:"var(--colorWarning)"}})})})}),(0,r.jsx)(o.A,{xs:24,sm:12,md:8,lg:4,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:"文档规范包",value:J,prefix:(0,r.jsx)(w.A,{style:{color:"var(--colorOk)"}})})})}),(0,r.jsx)(o.A,{xs:24,sm:12,md:8,lg:4,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:"模板",value:L,prefix:(0,r.jsx)(z.A,{style:{color:"var(--colorDanger)"}})})})}),(0,r.jsx)(o.A,{xs:24,sm:12,md:8,lg:4,children:(0,r.jsxs)(a.A,{size:"small",children:[(0,r.jsx)(d.A,{title:"Embedding",value:(null==Y?void 0:Y.provider)==="openai-compatible"?"外部 Embedding":Y?"本地语义模型":"—",prefix:(0,r.jsx)(S.A,{style:{color:"var(--colorAccent)"}})}),(null==Y?void 0:Y.model)&&(0,r.jsxs)("div",{className:"text-xs mt-1",style:{color:"var(--colorTextSecondary)"},children:[Y.model,Y.dimensions?" \xb7 ".concat(Y.dimensions,"维"):""]})]})}),(0,r.jsx)(o.A,{xs:24,sm:12,md:8,lg:4,children:(0,r.jsx)(a.A,{size:"small",children:(0,r.jsx)(d.A,{title:"模型供应商",value:R,prefix:(0,r.jsx)(N.A,{style:{color:"var(--colorAccent)"}})})})})]})}),(0,r.jsxs)(n.A,{gutter:[16,16],children:[(0,r.jsx)(o.A,{xs:24,sm:12,children:(0,r.jsx)(a.A,{size:"small",title:I("overview.topModel"),style:{height:"100%"},children:et?(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)(A.A,{style:{fontSize:24,color:"var(--colorAccent)"}}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold",children:et.model}),(0,r.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["@",et.provider," — ",et.count," ",I("overview.calls")]})]})]}):(0,r.jsx)("span",{style:{color:"var(--colorTextSecondary)"},children:I("common.noData")})})}),(0,r.jsx)(o.A,{xs:24,sm:12,children:(0,r.jsx)(a.A,{size:"small",title:I("overview.taskTypes"),style:{height:"100%"},children:(null==B?void 0:B.tasks.types)&&Object.keys(B.tasks.types).length>0?(0,r.jsx)(m.A,{wrap:!0,children:Object.entries(B.tasks.types).map(e=>{let[l,s]=e;return(0,r.jsxs)(v.A,{children:[l.slice(0,30),": ",s]},l)})}):(0,r.jsx)("span",{style:{color:"var(--colorTextSecondary)"},children:I("common.noData")})})})]})]})}},53139:(e,l,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return s(27795)}])}},e=>{e.O(0,[347,8787,4277,8732,261,6578,636,6593,8792],()=>e(e.s=53139)),_N_E=e.O()}]);
|
|
File without changes
|