@customize-agent/server 4.18.2 → 4.18.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.
Files changed (51) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +20 -20
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/chunks/2661.js +1 -1
  5. package/.next/server/middleware-build-manifest.js +1 -1
  6. package/.next/server/pages/404.html +1 -1
  7. package/.next/server/pages/500.html +1 -1
  8. package/.next/server/pages/api/kb/files/reindex.js +1 -1
  9. package/.next/server/pages/api/kb/files/reindex.js.nft.json +1 -1
  10. package/.next/server/pages/api/kb/reindex.js +1 -1
  11. package/.next/server/pages/api/kb/reindex.js.nft.json +1 -1
  12. package/.next/server/pages/api/kb/upload/complete.js +1 -1
  13. package/.next/server/pages/api/kb/upload/complete.js.nft.json +1 -1
  14. package/.next/server/pages/api/kb/upload.js +1 -1
  15. package/.next/server/pages/api/kb/upload.js.nft.json +1 -1
  16. package/.next/server/pages/asset-library.html +1 -1
  17. package/.next/server/pages/document-roles.html +1 -1
  18. package/.next/server/pages/documents.html +1 -1
  19. package/.next/server/pages/guide.html +1 -1
  20. package/.next/server/pages/index.html +1 -1
  21. package/.next/server/pages/knowledge/file-detail.html +1 -1
  22. package/.next/server/pages/knowledge/files.html +1 -1
  23. package/.next/server/pages/knowledge/manage.html +1 -1
  24. package/.next/server/pages/knowledge.html +1 -1
  25. package/.next/server/pages/models.html +1 -1
  26. package/.next/server/pages/overview.html +1 -1
  27. package/.next/server/pages/prompt.html +1 -1
  28. package/.next/server/pages/settings.html +1 -1
  29. package/.next/server/pages/system/logs.html +1 -1
  30. package/.next/server/pages/template-references.html +1 -1
  31. package/.next/server/pages-manifest.json +28 -28
  32. package/.next/static/{-s5AGjUlXmDFJsd_rKdo2 → WobG3Rg1MRdPd8ZMdlIf3}/_buildManifest.js +1 -1
  33. package/.next/static/chunks/{224-0415408fff1d1c8b.js → 224-790cf01fcf6820ee.js} +1 -1
  34. package/.next/static/chunks/260-244c94eacd903620.js +1 -0
  35. package/.next/static/chunks/{289-fc1b25371e004552.js → 289-42781fb699646699.js} +1 -1
  36. package/.next/static/chunks/788-e98701da4d6ca319.js +1 -0
  37. package/.next/static/chunks/pages/documents-185ab225628d4705.js +1 -0
  38. package/.next/static/chunks/pages/knowledge/files-98ec72061cdb64d3.js +1 -0
  39. package/.next/static/chunks/pages/knowledge/manage-558987c599dc4cd5.js +1 -0
  40. package/.next/static/chunks/pages/prompt-839287c514595765.js +1 -0
  41. package/.next/static/chunks/pages/system/logs-2e849bcdf371d791.js +1 -0
  42. package/package.json +2 -2
  43. package/scripts/kb-index-worker.cjs +6 -4
  44. package/.next/static/chunks/260-580088826d643423.js +0 -1
  45. package/.next/static/chunks/788-dca0d550ad6bd8b2.js +0 -1
  46. package/.next/static/chunks/pages/documents-66057ee3c8ffff6d.js +0 -1
  47. package/.next/static/chunks/pages/knowledge/files-33782c4b41f33750.js +0 -1
  48. package/.next/static/chunks/pages/knowledge/manage-5b1b4d3804752f8b.js +0 -1
  49. package/.next/static/chunks/pages/prompt-edc2dfea09aaedc1.js +0 -1
  50. package/.next/static/chunks/pages/system/logs-ee67e2c93147dfc3.js +0 -1
  51. /package/.next/static/{-s5AGjUlXmDFJsd_rKdo2 → WobG3Rg1MRdPd8ZMdlIf3}/_ssgManifest.js +0 -0
package/.next/BUILD_ID CHANGED
@@ -1 +1 @@
1
- -s5AGjUlXmDFJsd_rKdo2
1
+ WobG3Rg1MRdPd8ZMdlIf3
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/-s5AGjUlXmDFJsd_rKdo2/_buildManifest.js",
9
- "static/-s5AGjUlXmDFJsd_rKdo2/_ssgManifest.js"
8
+ "static/WobG3Rg1MRdPd8ZMdlIf3/_buildManifest.js",
9
+ "static/WobG3Rg1MRdPd8ZMdlIf3/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [],
12
12
  "rootMainFilesTree": {},
@@ -40,9 +40,9 @@
40
40
  "static/chunks/883-506cbca959974997.js",
41
41
  "static/chunks/69-34d57b77fd2eed20.js",
42
42
  "static/chunks/700-5d29b0475311f590.js",
43
- "static/chunks/224-0415408fff1d1c8b.js",
43
+ "static/chunks/224-790cf01fcf6820ee.js",
44
44
  "static/chunks/102-881dcc464f983c89.js",
45
- "static/chunks/289-fc1b25371e004552.js",
45
+ "static/chunks/289-42781fb699646699.js",
46
46
  "static/chunks/994-241f87efc61005b8.js",
47
47
  "static/chunks/pages/asset-library-f6319fc04559e43d.js"
48
48
  ],
@@ -55,11 +55,11 @@
55
55
  "static/chunks/69-34d57b77fd2eed20.js",
56
56
  "static/chunks/700-5d29b0475311f590.js",
57
57
  "static/chunks/44-d3545eedd5c75ef1.js",
58
- "static/chunks/224-0415408fff1d1c8b.js",
58
+ "static/chunks/224-790cf01fcf6820ee.js",
59
59
  "static/chunks/787-c18af810af3433f6.js",
60
60
  "static/chunks/102-881dcc464f983c89.js",
61
61
  "static/chunks/195-2c0168eacab722d2.js",
62
- "static/chunks/289-fc1b25371e004552.js",
62
+ "static/chunks/289-42781fb699646699.js",
63
63
  "static/chunks/455-e1b41ac4946d2b6f.js",
64
64
  "static/chunks/pages/document-roles-4ccb2db16dc4b63c.js"
65
65
  ],
@@ -72,13 +72,13 @@
72
72
  "static/chunks/69-34d57b77fd2eed20.js",
73
73
  "static/chunks/700-5d29b0475311f590.js",
74
74
  "static/chunks/44-d3545eedd5c75ef1.js",
75
- "static/chunks/224-0415408fff1d1c8b.js",
75
+ "static/chunks/224-790cf01fcf6820ee.js",
76
76
  "static/chunks/787-c18af810af3433f6.js",
77
77
  "static/chunks/195-2c0168eacab722d2.js",
78
78
  "static/chunks/455-e1b41ac4946d2b6f.js",
79
79
  "static/chunks/506-93f730bc149d0dce.js",
80
80
  "static/chunks/930-0436dcaa92fb41f6.js",
81
- "static/chunks/pages/documents-66057ee3c8ffff6d.js"
81
+ "static/chunks/pages/documents-185ab225628d4705.js"
82
82
  ],
83
83
  "/guide": [
84
84
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -105,10 +105,10 @@
105
105
  "static/chunks/69-34d57b77fd2eed20.js",
106
106
  "static/chunks/700-5d29b0475311f590.js",
107
107
  "static/chunks/44-d3545eedd5c75ef1.js",
108
- "static/chunks/224-0415408fff1d1c8b.js",
108
+ "static/chunks/224-790cf01fcf6820ee.js",
109
109
  "static/chunks/787-c18af810af3433f6.js",
110
110
  "static/chunks/102-881dcc464f983c89.js",
111
- "static/chunks/289-fc1b25371e004552.js",
111
+ "static/chunks/289-42781fb699646699.js",
112
112
  "static/chunks/506-93f730bc149d0dce.js",
113
113
  "static/chunks/850-0f48354694fc6b3e.js",
114
114
  "static/css/ad5a592c79d1448b.css",
@@ -123,11 +123,11 @@
123
123
  "static/chunks/69-34d57b77fd2eed20.js",
124
124
  "static/chunks/700-5d29b0475311f590.js",
125
125
  "static/chunks/44-d3545eedd5c75ef1.js",
126
- "static/chunks/224-0415408fff1d1c8b.js",
126
+ "static/chunks/224-790cf01fcf6820ee.js",
127
127
  "static/chunks/102-881dcc464f983c89.js",
128
- "static/chunks/289-fc1b25371e004552.js",
128
+ "static/chunks/289-42781fb699646699.js",
129
129
  "static/css/ad5a592c79d1448b.css",
130
- "static/chunks/pages/knowledge/files-33782c4b41f33750.js"
130
+ "static/chunks/pages/knowledge/files-98ec72061cdb64d3.js"
131
131
  ],
132
132
  "/knowledge/manage": [
133
133
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -138,8 +138,8 @@
138
138
  "static/chunks/69-34d57b77fd2eed20.js",
139
139
  "static/chunks/787-c18af810af3433f6.js",
140
140
  "static/chunks/506-93f730bc149d0dce.js",
141
- "static/chunks/788-dca0d550ad6bd8b2.js",
142
- "static/chunks/pages/knowledge/manage-5b1b4d3804752f8b.js"
141
+ "static/chunks/788-e98701da4d6ca319.js",
142
+ "static/chunks/pages/knowledge/manage-558987c599dc4cd5.js"
143
143
  ],
144
144
  "/models": [
145
145
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -170,8 +170,8 @@
170
170
  "static/chunks/700-5d29b0475311f590.js",
171
171
  "static/chunks/44-d3545eedd5c75ef1.js",
172
172
  "static/chunks/195-2c0168eacab722d2.js",
173
- "static/chunks/260-580088826d643423.js",
174
- "static/chunks/pages/prompt-edc2dfea09aaedc1.js"
173
+ "static/chunks/260-244c94eacd903620.js",
174
+ "static/chunks/pages/prompt-839287c514595765.js"
175
175
  ],
176
176
  "/settings": [
177
177
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -188,11 +188,11 @@
188
188
  "static/chunks/69-34d57b77fd2eed20.js",
189
189
  "static/chunks/700-5d29b0475311f590.js",
190
190
  "static/chunks/44-d3545eedd5c75ef1.js",
191
- "static/chunks/224-0415408fff1d1c8b.js",
191
+ "static/chunks/224-790cf01fcf6820ee.js",
192
192
  "static/chunks/102-881dcc464f983c89.js",
193
193
  "static/chunks/195-2c0168eacab722d2.js",
194
- "static/chunks/289-fc1b25371e004552.js",
195
- "static/chunks/pages/system/logs-ee67e2c93147dfc3.js"
194
+ "static/chunks/289-42781fb699646699.js",
195
+ "static/chunks/pages/system/logs-2e849bcdf371d791.js"
196
196
  ],
197
197
  "/template-references": [
198
198
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -3,9 +3,9 @@
3
3
  "routes": {},
4
4
  "dynamicRoutes": {},
5
5
  "preview": {
6
- "previewModeId": "dabe7f381fd9f259c2268f82b6c4e260",
7
- "previewModeSigningKey": "578a39f3afd3e67ec6ce94df190af1f27a99db314a2dba6f8a8342c5c6ed315c",
8
- "previewModeEncryptionKey": "58b21613dce886663857b4f73378f384e0af75d770c7231e5d4a1c4596cf0968"
6
+ "previewModeId": "16559ec00a3515fcf625686711c7d232",
7
+ "previewModeSigningKey": "56695f40050422757747c241a5789ce9e2190be1d128cac6d9d47a169952541b",
8
+ "previewModeEncryptionKey": "ca12916b740afc52c105b4880f13b144793e8d3ce5f54d84c997973c3137f621"
9
9
  },
10
10
  "notFoundRoutes": []
11
11
  }
@@ -134,4 +134,4 @@ ${b.join("\n")}`:""}(aD)})),aX=(0,ex.up)({plan:cG.plan,chapter:d,context:bV,evid
134
134
 
135
135
  ${c}`,evidence:ae,missingFacts:ai,sections:d.sections||[],tablePlans:d.tablePlans||[],inProgress:!0}])},bs=a=>{"complete"===a.phase&&a.partialSections&&br(a.partialSections)};if(o)f=dD(o,d),f=await du(f,bJ),g=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",promptId:ap.primaryPromptId,status:"success",message:`${(0,t.GQ)(d.title)} 已复用已有章节正文:当前 ${(0,w.V7)(f)} 字,跳过 Writer,直接进入章节收口`,details:[`有效证据:${ae.length} 条`,`事实需求:${aZ.satisfied}/${aZ.total} 已满足,缺失 ${aZ.missing},低置信 ${aZ.lowConfidence}`,"来源:resumeChapters/checkpointChapters"],progress:{current:h+1,total:b8.length,label:"复用章节"}},{subtitle:(0,t.GQ)(d.title),order:h}),ab[j]=g,V(A);else{let e;ab[j]=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",promptId:ap.primaryPromptId,status:"running",message:bn?`${(0,t.GQ)(d.title)} 正在规划主题块并准备并发成稿`:bo?`${(0,t.GQ)(d.title)} 正在按小节并发成稿`:`${(0,t.GQ)(d.title)} 正在整章一次成稿`,details:bn||bo?[...as,`有效证据:${ae.length} 条`,`事实需求:${aZ.satisfied}/${aZ.total} 已满足,缺失 ${aZ.missing},低置信 ${aZ.lowConfidence}`,a2.label,`生成上限约 ${a3} 字`,`模板细目:${d.sections?.length||0} 条`,bn?"细目较多,先由章级 Planner 聚类为主题块并语义合并,再按主题块全并发出稿,避免逐小节碎片化":"按章节结构拆分小节自然并发生成,章节聚合后再审查修复"]:[...as,`有效证据:${ae.length} 条`,`事实需求:${aZ.satisfied}/${aZ.total} 已满足,缺失 ${aZ.missing},低置信 ${aZ.lowConfidence}`,a2.label,`生成上限约 ${a3} 字`,`规划小节:${a0} 个`,"首次生成必须覆盖章节结构、小节和事实,篇幅目标仅作为规划参考"],progress:{current:h+1,total:b8.length,label:bn?"主题块并发":bo?"小节并发":"整章成稿"}},{subtitle:(0,t.GQ)(d.title),order:h}),V();let g=async(a,b,c)=>{let d=await Promise.all(b.map(({block:b})=>(0,by.nl)({...a,targetWords:b.targetWords,maxWords:Math.ceil(1.1*b.targetWords)},{blocks:[b],coveredSections:[],fallbackSections:[],llmPlanned:!1}).then(a=>a?.markdown).catch(()=>void 0))),e=[...c];return b.forEach(({index:a},b)=>{let c=d[b];c&&(e[a]=c.replace(/^##\s+.+$/mu,"").trim())}),e};if(bn){let c=(0,t.GQ)(d.title),f=cA.split("\n").filter(a=>a.includes(c)),i=f.length>0?f.join("\n"):cA,k=await Y(()=>(0,bv.X6)(cK,`chapter-plan:${d.id}`,()=>bL({template:p,chapter:d,evidence:ae,projectContext:cb,requirement:a.requirement,roleContext:ao,targetWords:bb,graphContext:aX.task.graphContext,blueprintContext:i,signal:a.signal,diagnostics:cK})));if(k.blocks.length>0){b=k;let c=[aq,(0,ex.$8)(aX.task,k)].filter(Boolean).join("\n\n"),f=k.blocks.reduce((a,b)=>a+b.subPoints.length,0),i=k.blocks.reduce((a,b)=>a+b.subPoints.reduce((a,b)=>a+Math.max(0,b.sources.length-1),0),0),l=k.llmPlanned?k.llmFailure?`(部分主题块降级:${k.llmFailure.slice(0,80)})`:k.fallbackSections.length>0?`(${k.fallbackSections.length} 条细目由覆盖校验挂回主题块)`:"":`(LLM 规划未命中:${(k.llmFailure||"未返回有效结构").slice(0,80)},已按语义域确定性分组)`;ab[j]=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",promptId:ap.primaryPromptId,status:"running",message:`${(0,t.GQ)(d.title)} 已规划 ${k.blocks.length} 个主题块,正在按主题块并发成稿${l}`,details:[...as,`有效证据:${ae.length} 条`,`输入细目 ${a0} 条 → 主题块 ${k.blocks.length} 个(每块 2~4 个 H4 要点)`,`语义合并 ${i} 条细目,目录级 H4 合计 ${f} 个`,"单块 1200~2200 字,主题块间全并发,单节深度与整体耗时双优"],progress:{current:h+1,total:b8.length,label:"主题块并发"}},{subtitle:(0,t.GQ)(d.title),order:h});let m=ab.find(a=>a.roleId===`agent-chapter-task-${d.id}`);m&&(m.message=`${aX.task.sections.filter(a=>a.ready).length}/${aX.task.sections.length} 条细目任务就绪(已规划为 ${k.blocks.length} 个主题块)`),V(A);let n={template:p,chapter:d,evidence:ae,missingFacts:ai,promptTexts:c,projectContext:cE(d),requirement:a.requirement,roleContext:ao,targetWords:bb,maxWords:a3,forbidDrawingImages:!1,factCoverageContext:aV,compactProjectContext:!0,scopedProjectContext:cD,planDataMasterText:dd,decisionLockText:de,sectionEvidenceProvider:aN,onSectionProgress:bs,diagnostics:cK,signal:a.signal},o=await Y(()=>(0,bv.X6)(cK,`chapter-planned-block-draft:${d.id}`,()=>(0,by.nl)(n,k)));if(o?.allSucceeded)e=o.markdown;else if(o){let a=await g(n,o.failedBlocks,o.sections),b=o.failedBlocks.filter(({index:b})=>!a[b]);b.length>0&&(a=await g(n,b,a)),a.every(a=>!!a)&&(e=`## ${d.title}
136
136
 
137
- ${a.join("\n\n")}`)}}}else e=bo?await Y(()=>(0,bv.X6)(cK,`chapter-section-draft:${d.id}`,()=>(0,by.N1)({template:p,chapter:d,evidence:ae,missingFacts:ai,promptTexts:aY,projectContext:cE(d),requirement:a.requirement,roleContext:ao,targetWords:bb,maxWords:a3,forbidDrawingImages:!1,factCoverageContext:aV,projectRoot:c,modelName:(0,U.$y)()?.model.name,materialContextHash:(0,z.c6)({materialFilePaths:af,promptTexts:aq}),allowPartialResult:!1,compactProjectContext:!0,scopedProjectContext:cD,planDataMasterText:dd,decisionLockText:de,sectionEvidenceProvider:aN,onSectionProgress:bs,diagnostics:cK,signal:a.signal}))):await Y(()=>(0,bv.X6)(cK,`chapter-draft:${d.id}`,()=>(0,by.eu)(p,d,ae,ai,aY,cE(d),a.requirement,ao,{forbidDrawingImages:!1,minWords:a4,targetWords:a4,maxWords:a3,maxTokens:a7,factCoverageContext:aV,planDataMasterText:dd,decisionLockText:de,signal:a.signal,diagnostics:cK,supplementEvidenceProvider:aO,evidenceFloorChars:cJ.evidenceFloorChars,evidenceCeilingChars:cJ.evidenceCeilingChars})));if(e||(cK.llm.lastError=cK.llm.lastError||"全部成稿路径未返回有效正文"),e&&dc){let a=function(a,b){let c=[],d=a;for(let a of[/高峰(?:期)?(?:总)?(?:人数|劳动力|用工|投入)(?:为|约|控制在|不超过|达)?\s*(\d+)\s*人/u,/劳动力(?:峰值|高峰)(?:为|约|控制在|不超过|达)?\s*(\d+)\s*人/u,/高峰(?:投入|用工)(?:为|约|控制在|不超过|达)?\s*(\d+)\s*人/u])d=d.replace(a,(a,d)=>{let e=Number(d);return e===b.laborPeak.count||e<=0?a:(c.push({anchor:"劳动力峰值",from:`${e}人`,to:`${b.laborPeak.count}人`}),a.replace(d,String(b.laborPeak.count)))});for(let a of b.machines){let b=a.name.trim();if(b.length<2)continue;let e=RegExp(`${b.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}[^\\n。;;]{0,20}?(\\d+)\\s*台`,"gu");d=d.replace(e,(b,d)=>{let e=Number(d);return e===a.count||e<=0?b:(c.push({anchor:a.name,from:`${e}台`,to:`${a.count}台`}),b.replace(d,String(a.count)))})}return{markdown:d,fixed:c}}(e,dc);a.fixed.length>0&&(e=a.markdown,cK.llm.lastInfo=`计划数据主表对齐:${d.title} 回填 ${a.fixed.length} 处(${a.fixed.map(a=>`${a.anchor} ${a.from}→${a.to}`).join("、")})`)}if((0,z.Te)(a.signal),!e){let a=`${(0,t.GQ)(d.title)} 大模型未返回有效正文,已阻断生成`;throw ab[j]=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",promptId:ap.primaryPromptId,status:"failed",message:a,details:[`LLM 最近错误:${cK.llm.lastError||"空响应或超时"}`,`证据条数:${ae.length}`],progress:{current:h+1,total:b8.length,label:"章节阻断"}},{subtitle:(0,t.GQ)(d.title),order:h}),V(A),Error(a)}if(!e.trim())throw Error(`${(0,t.GQ)(d.title)} 首次生成失败,未获得可用于定稿的正文`);let i=b&&b.blocks.length>0?b.blocks.map(a=>a.title):(d.sections||[]).filter(Boolean),k=b&&b.blocks.length>0?b.blocks.flatMap(a=>a.subPoints.map(a=>a.title)):[],l=e;i.length>0&&(l=(0,z.Ww)(l,i,3)),k.length>0&&(l=(0,z.Ww)(l,k,4)),f=dD(l,d),f=await du(f,bJ)}let bw=await bM({chapter:d,content:f,evidence:ae}),bB=(0,w.V7)(f),bC=(0,v.r4)(f),bF=b&&b.blocks.length>0?b.blocks.map(a=>a.title):(d.sections||[]).filter(Boolean),bG=bF.length>0?bF:bC.length>0?bC:[],bI=(0,x.qK)(f,[{title:d.title,content:f,sections:bG}]).map(a=>a.message),bO=bw.slice(0,6).map(a=>`小节事实密度需优化:${a}`),bP=[...bI,...bO],bR=function(a,b,c=[]){return a<=0||c.some(a=>/未返回有效章节正文|生成失败/u.test(a))||c.some(a=>/空小节|缺少规划小节/u.test(a))?"failed":"success"}(bB,0,bP);return g=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",promptId:ap.primaryPromptId,status:bR,message:(0,bu.AQ)(`${(0,t.GQ)(d.title)} 已由大模型成稿:当前 ${bB} 字;章节预算约 ${a2.budgetTarget} 字,本轮目标约 ${a2.roundTarget} 字${bP.length?`;待优化:${bP.slice(0,8).join("、")}`:""}`,i),details:[`本轮完成率:${Math.round(bB/Math.max(1,a2.roundTarget)*100)}%`,`结构目标约 ${a2.structureTarget} 字`,...as,`二级小节:${bG.length} 个`],progress:{current:h+1,total:b8.length,label:bP.length?"章节已生成":"章节达标"}},{subtitle:(0,t.GQ)(d.title),order:h}),bz[h]=g,async()=>{let a={id:d.id,title:d.title,content:f,evidence:ae,missingFacts:ai,sections:bG,tablePlans:d.tablePlans||[]};bp[h]=a,A=bp.filter(a=>!!a),V(A)}}catch(c){if(a.signal?.aborted)throw c;console.error(`[gen] chapter ${d.title} failed:`,c);let b=`${d.title}:${c instanceof Error?c.message:"生成失败"}`;bn.push(b),g=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",status:"failed",message:`${(0,t.GQ)(d.title)} 生成失败:${b}`},{subtitle:(0,t.GQ)(d.title),order:h}),bz[h]=g}g&&(ab[j]=g),V(A)}))))f&&c0.push(cY.run(f))}await Promise.all(c0),cK.metrics.push({name:"phase:draft",startedAt:df,endedAt:Date.now(),durationMs:Date.now()-df});let dg=Date.now(),dh=bp.filter(a=>!!a);bo.push(...bz.filter(a=>!!a));let di=[],dj=!1;if(cI.enableGlobalReview){let b=await eF({globalReviewSamplingRate:cI.globalReviewSamplingRate,chapterDraftsFinal:dh,template:p,reviewPromptTexts:aU,repairPromptTexts:aV,requirement:a.requirement,signal:a.signal,projectContext:cb,generationDiagnostics:cK,preliminaryFactsModel:bU,scopeConflicts:bX.scopeConflicts,progressStages:ab,emitProgress:V,withProgressHeartbeat:Y});di=b.issues,dj=b.dedupRan}let{tableFixApplied:dk}=await eE({effectiveChapters:b8,chapterDraftsFinal:dh,template:p,repairPromptTexts:aV,requirement:a.requirement,signal:a.signal,generationDiagnostics:cK,progressStages:ab,emitProgress:V,withProgressHeartbeat:Y});return(dk||!dj)&&(di=await eD({chapterDraftsFinal:dh,globalConsistencyIssues:di,progressStages:ab,emitProgress:V})),!function(a){let{generationDiagnostics:b,progressStages:c,chapterDraftsFinal:d,emitProgress:e}=a,f=b.evidence,g=b.llm,h=(0,R.Bd)();b.semantic=h;let i=h.embedCacheHits+h.embedCacheMisses,j=i>0?Math.round(1e4*h.embedCacheHits/i)/100:null,k=(g.promptCacheHitTokens||0)+(g.promptCacheMissTokens||0),l=k>0?Math.round(1e4*(g.promptCacheHitTokens||0)/k)/100:null,m=g.layerChars,n=m?m.l0+m.l1+m.l2+m.l3:0,o=a=>n>0?Math.round(1e4*a/n)/100:0,p=m&&n>0?`上下文分层:L0 system 恒定 ${m.l0} 字(${o(m.l0)}%)、L1 任务级 ${m.l1} 字(${o(m.l1)}%)、L2 章级 ${m.l2} 字(${o(m.l2)}%)、L3 小节级 ${m.l3} 字(${o(m.l3)}%)`:"上下文分层:本次生成未采集 L0-L3 分层统计";(0,bu.fx)(c,(0,bu.X5)({type:"validation",roleId:"budget-trim-report",status:"success",message:`预算裁剪报告:证据 ${f.raw} 条 → 采用 ${f.used} 条(噪声过滤 ${f.filteredNoise} 条、预算兜底裁剪 ${f.budgetDropped} 条),证据上下文 ${f.contextChars} 字`,details:[`证据质量:平均噪声分 ${f.avgNoiseScore},平均事实密度 ${f.avgFactDensity}`,`证据分层(T0 关键事实/T1 高相关片段/T2 目录索引):T0 注入 ${f.t0Chars||0} 字、T1 注入 ${f.t1Chars||0} 字、T2 索引 ${f.t2Lines||0} 行、目录省略 ${f.omittedChars||0} 字——A2 块级增量压缩后 T1 应显著低于 T0+T2`,`检索:${f.searchQueries} 组查询,耗时 ${Math.round(f.searchMs/1e3)} 秒`,`LLM:${g.calls} 次调用,失败 ${g.failures} 次,重试 ${g.retries} 次,schema 校验失败 ${g.schemaFailures} 次`,`LLM 上下文输入:${g.inputChars||0} 字符(system+user)${g.unlayeredChars?`(其中未分层调用 ${g.unlayeredChars} 字符,占比 ${Math.round(g.unlayeredChars/(g.inputChars||1)*1e4)/100}%)`:""},输入 ${g.inputTokens||0} token / 输出 ${g.outputTokens||0} token`,p,null===l?"上下文缓存:提供商未返回 prefix cache 指标(prompt_cache_hit/miss_tokens),无法观测命中率":`上下文缓存:命中 ${g.promptCacheHitTokens} token / 未命中 ${g.promptCacheMissTokens} token(命中率 ${l}%)——未命中占比高说明固定前缀未收敛,system/user 分离(A5)后应显著上升`,`推理 token:${g.reasoningTokens?`${g.reasoningTokens} token(思考未完全关闭,disableThinking 未生效风险)`:"0(思考已关闭)"}`,null===j?"bge 嵌入缓存:本次生成无嵌入调用":`bge 嵌入缓存:命中 ${h.embedCacheHits} 条 / 未命中 ${h.embedCacheMisses} 条(命中率 ${j}%,全局 LRU 容量 ${process.env.DOCUMENT_EMBED_CACHE_SIZE||2e3})`,"防爆兜底类软限制(保留并逐项记录裁剪量):selectEvidenceByBudget 的 maxItems/maxChars、uniqueEvidence 噪声过滤、evidenceBundlePrompt 的 maxChars、块级证据 top-k 截断、块级 facts 截断","语义取舍类软限制(已迁移本地语义模型):evaluationTexts 词面过滤→条目对象化、criterionFeatures 二字滑窗→bge-small 余弦、章节证据字符硬截→语义排序取 top-k","LLM 输出侧:schema 校验(截断位置可诊断)、空响应重试提示词收敛、块成稿 maxTokens 按目标字数 1:1.2(不走 thinking \xd76 放大)"]},{subtitle:"预算裁剪审计"})),e(d)}({generationDiagnostics:cK,progressStages:ab,chapterDraftsFinal:dh,emitProgress:V}),cK.metrics.push({name:"phase:global-review",startedAt:dg,endedAt:Date.now(),durationMs:Date.now()-dg}),(0,bv.X6)(cK,"phase:finalize",()=>eu({chapterDrafts:dh,chapterDraftsByOrder:bp,chapterGenerationStagesByOrder:bz,chapterGenerationStages:bo,effectiveChapters:b8,template:p,allEvidence:bi,projectMaterialScope:a9,progressStages:ab,documentSpec:ar,projectMaterialProfile:ag,projectMaterialSummary:ap,domainProfile:at,documentBudget:cF,promptTexts:aR,reviewPromptTexts:aU,input:a,generationStrategy:cI,generationDiagnostics:cK,chapterScopedContext:cE,promptBindings:ae,promptDocumentRules:aL,projectUnderstanding:ah,projectContext:cb,projectRoot:c,projectId:o,readiness:au,factExtractionPromptTexts:aS,hasExplicitOutline:ao,missingItems:bm,retrievalCoverageReports:bj,failedChapterMessages:bn,webResearchReport:bl,indexHealth:a7,promptPlan:ad,globalConsistencyIssues:di,scopeConflicts:bX.scopeConflicts,writingTaskBrief:cy,evaluationCriteriaItems:b0.map(a=>a.title).filter(Boolean),tenderRequirements:cj,requirementsSimilarity:cu,factTokenScopeClassifier:cw,professionalDepthClassifier:cx,agentWorkflow:bV,emitProgress:V,withProgressHeartbeat:Y}))}},79227:(a,b,c)=>{c.d(b,{C:()=>f,previewGenerationBudgetForTemplate:()=>g});var d=c(46482),e=c(95734);function f(a){let b=Math.max(1,a.chapters.length),c=a.targetWords>0?Math.round(a.targetWords/b):1200,d=a.strategy,f=[],g=a.materialFileCount<4&&a.evidenceCount<6,h=Math.max(1,Math.min(b,(Number.isFinite(a.configuredChapterConcurrency)&&a.configuredChapterConcurrency>0?Math.floor(a.configuredChapterConcurrency):void 0)??b)),i=(0,e.Qf)(a.targetWords),j="fast"===d.mode?1:Math.max(1,b),{floorChars:k,ceilingChars:l}=c>=6e3?{floorChars:14e3,ceilingChars:4e4}:c>=3e3?{floorChars:11e3,ceilingChars:28e3}:{floorChars:8e3,ceilingChars:18e3},m=d.repairRoundBudget?d.repairRoundBudget:Math.max(2,Math.min(4,2+ +(a.targetWords>=2e4)+ +!!g)),n=Math.min(m*b,Math.max(12,2*b));return"strict"===d.mode&&f.push("strict:风险领域关键词命中(专项/安全/质量/验收/合同/合规等)"),a.targetWords>=4e4&&f.push("strict:目标篇幅超长(≥4 万字)"),g&&f.push("strict:资料稀疏(资料包文件 <4 且可用证据 <6 条)"),"fast"===d.mode&&f.push("fast:小文档(≤6000 字且 ≤4 章)全局审查降级为 35% 抽检"),"longform"===d.mode&&f.push("longform:长文档(≥3 万字或 ≥8 章)"),"balanced"===d.mode&&f.push("balanced:常规篇幅文档,标准审查深度"),f.push(`全章节并行生成(${h}/${b} 章同批),审查流水线 ${j} 路,全局 LLM 并发不设上限,每章证据预算 ${Math.round(k/1e3)}k-${Math.round(l/1e3)}k 字符,修复轮次预算每章 ${m} 轮(文档级总池 ${n} 轮,收敛判定优先)`),{strategy:d,chapterConcurrency:h,reviewConcurrency:j,llmConcurrency:i,evidenceFloorChars:k,evidenceCeilingChars:l,repairRoundBudget:m,repairPoolBudget:n,triggers:f}}function g(a){let b=Math.max(1,a.chapters.length),c=Math.max(0,Math.round(a.targetWords??0)),e=(0,d.JP)({template:a.template,targetWords:c,requirement:a.requirement,materialFileCount:a.materialFileCount,evidenceCount:a.evidenceCount}),g=f({template:a.template,chapters:a.chapters,targetWords:c,requirement:a.requirement,materialFileCount:a.materialFileCount,evidenceCount:a.evidenceCount,hasVeryLargeExplicitChapter:a.hasVeryLargeExplicitChapter??!1,configuredChapterConcurrency:a.configuredChapterConcurrency??0,strategy:e});return{mode:e.mode,enableGlobalReview:e.enableGlobalReview,globalReviewSamplingRate:e.globalReviewSamplingRate??1,repairRoundBudget:g.repairRoundBudget,chapterConcurrency:g.chapterConcurrency,reviewConcurrency:g.reviewConcurrency,evidenceFloorChars:g.evidenceFloorChars,evidenceCeilingChars:g.evidenceCeilingChars,targetWords:c,chapterCount:b,triggers:g.triggers}}},87942:(a,b,c)=>{c.d(b,{x:()=>d});let d={version:"professional-document-workflow-v9",rules:["complete-local-knowledge-assumption","knowledge-coverage-recovery","fact-trace-placement","chapter-coverage-gate","structured-quality-report","post-repair-verification"]}}};
137
+ ${a.join("\n\n")}`)}}}else e=bo?await Y(()=>(0,bv.X6)(cK,`chapter-section-draft:${d.id}`,()=>(0,by.N1)({template:p,chapter:d,evidence:ae,missingFacts:ai,promptTexts:aY,projectContext:cE(d),requirement:a.requirement,roleContext:ao,targetWords:bb,maxWords:a3,forbidDrawingImages:!1,factCoverageContext:aV,projectRoot:c,modelName:(0,U.$y)()?.model.name,materialContextHash:(0,z.c6)({materialFilePaths:af,promptTexts:aq}),allowPartialResult:!1,compactProjectContext:!0,scopedProjectContext:cD,planDataMasterText:dd,decisionLockText:de,sectionEvidenceProvider:aN,onSectionProgress:bs,diagnostics:cK,signal:a.signal}))):await Y(()=>(0,bv.X6)(cK,`chapter-draft:${d.id}`,()=>(0,by.eu)(p,d,ae,ai,aY,cE(d),a.requirement,ao,{forbidDrawingImages:!1,minWords:a4,targetWords:a4,maxWords:a3,maxTokens:a7,factCoverageContext:aV,planDataMasterText:dd,decisionLockText:de,signal:a.signal,diagnostics:cK,supplementEvidenceProvider:aO,evidenceFloorChars:cJ.evidenceFloorChars,evidenceCeilingChars:cJ.evidenceCeilingChars})));if(e||(cK.llm.lastError=cK.llm.lastError||"全部成稿路径未返回有效正文"),e&&dc){let a=function(a,b){let c=[],d=a;for(let a of[/高峰(?:期)?(?:总)?(?:人数|劳动力|用工|投入)(?:为|约|控制在|不超过|达)?\s*(\d+)\s*人/u,/劳动力(?:峰值|高峰)(?:为|约|控制在|不超过|达)?\s*(\d+)\s*人/u,/高峰(?:投入|用工)(?:为|约|控制在|不超过|达)?\s*(\d+)\s*人/u])d=d.replace(a,(a,d)=>{let e=Number(d);return e===b.laborPeak.count||e<=0?a:(c.push({anchor:"劳动力峰值",from:`${e}人`,to:`${b.laborPeak.count}人`}),a.replace(d,String(b.laborPeak.count)))});for(let a of b.machines){let b=a.name.trim();if(b.length<2)continue;let e=RegExp(`${b.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}[^\\n。;;]{0,20}?(\\d+)\\s*台`,"gu");d=d.replace(e,(b,d)=>{let e=Number(d);return e===a.count||e<=0?b:(c.push({anchor:a.name,from:`${e}台`,to:`${a.count}台`}),b.replace(d,String(a.count)))})}return{markdown:d,fixed:c}}(e,dc);a.fixed.length>0&&(e=a.markdown,cK.llm.lastInfo=`计划数据主表对齐:${d.title} 回填 ${a.fixed.length} 处(${a.fixed.map(a=>`${a.anchor} ${a.from}→${a.to}`).join("、")})`)}if((0,z.Te)(a.signal),!e){let a=`${(0,t.GQ)(d.title)} 大模型未返回有效正文,已阻断生成`;throw ab[j]=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",promptId:ap.primaryPromptId,status:"failed",message:a,details:[`LLM 最近错误:${cK.llm.lastError||"空响应或超时"}`,`证据条数:${ae.length}`],progress:{current:h+1,total:b8.length,label:"章节阻断"}},{subtitle:(0,t.GQ)(d.title),order:h}),V(A),Error(a)}if(!e.trim())throw Error(`${(0,t.GQ)(d.title)} 首次生成失败,未获得可用于定稿的正文`);let i=b&&b.blocks.length>0?b.blocks.map(a=>a.title):(d.sections||[]).filter(Boolean),k=b&&b.blocks.length>0?b.blocks.flatMap(a=>a.subPoints.map(a=>a.title)):[],l=e;i.length>0&&(l=(0,z.Ww)(l,i,3)),k.length>0&&(l=(0,z.Ww)(l,k,4)),f=dD(l,d),f=await du(f,bJ)}let bw=await bM({chapter:d,content:f,evidence:ae}),bB=(0,w.V7)(f),bC=(0,v.r4)(f),bF=b&&b.blocks.length>0?b.blocks.map(a=>a.title):(d.sections||[]).filter(Boolean),bG=bF.length>0?bF:bC.length>0?bC:[],bI=(0,x.qK)(f,[{title:d.title,content:f,sections:bG}]).map(a=>a.message),bO=bw.slice(0,6).map(a=>`小节事实密度需优化:${a}`),bP=[...bI,...bO],bR=function(a,b,c=[]){return a<=0||c.some(a=>/未返回有效章节正文|生成失败/u.test(a))||c.some(a=>/空小节|缺少规划小节/u.test(a))?"failed":"success"}(bB,0,bP);return g=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",promptId:ap.primaryPromptId,status:bR,message:(0,bu.AQ)(`${(0,t.GQ)(d.title)} 已由大模型成稿:当前 ${bB} 字;章节预算约 ${a2.budgetTarget} 字,本轮目标约 ${a2.roundTarget} 字${bP.length?`;待优化:${bP.slice(0,8).join("、")}`:""}`,i),details:[`本轮完成率:${Math.round(bB/Math.max(1,a2.roundTarget)*100)}%`,`结构目标约 ${a2.structureTarget} 字`,...as,`二级小节:${bG.length} 个`],progress:{current:h+1,total:b8.length,label:bP.length?"章节已生成":"章节达标"}},{subtitle:(0,t.GQ)(d.title),order:h}),bz[h]=g,async()=>{let a={id:d.id,title:d.title,content:f,evidence:ae,missingFacts:ai,sections:bG,tablePlans:d.tablePlans||[]};bp[h]=a,A=bp.filter(a=>!!a),V(A)}}catch(f){if(a.signal?.aborted)throw f;let b=cK.llm.lastError,c=`failures=${cK.llm.failures} retries=${cK.llm.retries} reasoningTokens=${cK.llm.reasoningTokens||0}`;console.error(`[gen] chapter ${d.title} failed:`,f,b?`| LLM lastError: ${b}`:"| LLM lastError: (none)","|",c);let e=`${d.title}:${f instanceof Error?f.message:"生成失败"}`;bn.push(e),g=(0,bu.X5)({type:"chapter_generation",roleId:"chapter_generation",status:"failed",message:`${(0,t.GQ)(d.title)} 生成失败:${e}`,details:[`LLM 最近错误:${b||"无记录"}`,`LLM 调用失败 ${cK.llm.failures} 次、重试 ${cK.llm.retries} 次`]},{subtitle:(0,t.GQ)(d.title),order:h}),bz[h]=g}g&&(ab[j]=g),V(A)}))))f&&c0.push(cY.run(f))}await Promise.all(c0),cK.metrics.push({name:"phase:draft",startedAt:df,endedAt:Date.now(),durationMs:Date.now()-df});let dg=Date.now(),dh=bp.filter(a=>!!a);bo.push(...bz.filter(a=>!!a));let di=[],dj=!1;if(cI.enableGlobalReview){let b=await eF({globalReviewSamplingRate:cI.globalReviewSamplingRate,chapterDraftsFinal:dh,template:p,reviewPromptTexts:aU,repairPromptTexts:aV,requirement:a.requirement,signal:a.signal,projectContext:cb,generationDiagnostics:cK,preliminaryFactsModel:bU,scopeConflicts:bX.scopeConflicts,progressStages:ab,emitProgress:V,withProgressHeartbeat:Y});di=b.issues,dj=b.dedupRan}let{tableFixApplied:dk}=await eE({effectiveChapters:b8,chapterDraftsFinal:dh,template:p,repairPromptTexts:aV,requirement:a.requirement,signal:a.signal,generationDiagnostics:cK,progressStages:ab,emitProgress:V,withProgressHeartbeat:Y});return(dk||!dj)&&(di=await eD({chapterDraftsFinal:dh,globalConsistencyIssues:di,progressStages:ab,emitProgress:V})),!function(a){let{generationDiagnostics:b,progressStages:c,chapterDraftsFinal:d,emitProgress:e}=a,f=b.evidence,g=b.llm,h=(0,R.Bd)();b.semantic=h;let i=h.embedCacheHits+h.embedCacheMisses,j=i>0?Math.round(1e4*h.embedCacheHits/i)/100:null,k=(g.promptCacheHitTokens||0)+(g.promptCacheMissTokens||0),l=k>0?Math.round(1e4*(g.promptCacheHitTokens||0)/k)/100:null,m=g.layerChars,n=m?m.l0+m.l1+m.l2+m.l3:0,o=a=>n>0?Math.round(1e4*a/n)/100:0,p=m&&n>0?`上下文分层:L0 system 恒定 ${m.l0} 字(${o(m.l0)}%)、L1 任务级 ${m.l1} 字(${o(m.l1)}%)、L2 章级 ${m.l2} 字(${o(m.l2)}%)、L3 小节级 ${m.l3} 字(${o(m.l3)}%)`:"上下文分层:本次生成未采集 L0-L3 分层统计";(0,bu.fx)(c,(0,bu.X5)({type:"validation",roleId:"budget-trim-report",status:"success",message:`预算裁剪报告:证据 ${f.raw} 条 → 采用 ${f.used} 条(噪声过滤 ${f.filteredNoise} 条、预算兜底裁剪 ${f.budgetDropped} 条),证据上下文 ${f.contextChars} 字`,details:[`证据质量:平均噪声分 ${f.avgNoiseScore},平均事实密度 ${f.avgFactDensity}`,`证据分层(T0 关键事实/T1 高相关片段/T2 目录索引):T0 注入 ${f.t0Chars||0} 字、T1 注入 ${f.t1Chars||0} 字、T2 索引 ${f.t2Lines||0} 行、目录省略 ${f.omittedChars||0} 字——A2 块级增量压缩后 T1 应显著低于 T0+T2`,`检索:${f.searchQueries} 组查询,耗时 ${Math.round(f.searchMs/1e3)} 秒`,`LLM:${g.calls} 次调用,失败 ${g.failures} 次,重试 ${g.retries} 次,schema 校验失败 ${g.schemaFailures} 次`,`LLM 上下文输入:${g.inputChars||0} 字符(system+user)${g.unlayeredChars?`(其中未分层调用 ${g.unlayeredChars} 字符,占比 ${Math.round(g.unlayeredChars/(g.inputChars||1)*1e4)/100}%)`:""},输入 ${g.inputTokens||0} token / 输出 ${g.outputTokens||0} token`,p,null===l?"上下文缓存:提供商未返回 prefix cache 指标(prompt_cache_hit/miss_tokens),无法观测命中率":`上下文缓存:命中 ${g.promptCacheHitTokens} token / 未命中 ${g.promptCacheMissTokens} token(命中率 ${l}%)——未命中占比高说明固定前缀未收敛,system/user 分离(A5)后应显著上升`,`推理 token:${g.reasoningTokens?`${g.reasoningTokens} token(思考未完全关闭,disableThinking 未生效风险)`:"0(思考已关闭)"}`,null===j?"bge 嵌入缓存:本次生成无嵌入调用":`bge 嵌入缓存:命中 ${h.embedCacheHits} 条 / 未命中 ${h.embedCacheMisses} 条(命中率 ${j}%,全局 LRU 容量 ${process.env.DOCUMENT_EMBED_CACHE_SIZE||2e3})`,"防爆兜底类软限制(保留并逐项记录裁剪量):selectEvidenceByBudget 的 maxItems/maxChars、uniqueEvidence 噪声过滤、evidenceBundlePrompt 的 maxChars、块级证据 top-k 截断、块级 facts 截断","语义取舍类软限制(已迁移本地语义模型):evaluationTexts 词面过滤→条目对象化、criterionFeatures 二字滑窗→bge-small 余弦、章节证据字符硬截→语义排序取 top-k","LLM 输出侧:schema 校验(截断位置可诊断)、空响应重试提示词收敛、块成稿 maxTokens 按目标字数 1:1.2(不走 thinking \xd76 放大)"]},{subtitle:"预算裁剪审计"})),e(d)}({generationDiagnostics:cK,progressStages:ab,chapterDraftsFinal:dh,emitProgress:V}),cK.metrics.push({name:"phase:global-review",startedAt:dg,endedAt:Date.now(),durationMs:Date.now()-dg}),(0,bv.X6)(cK,"phase:finalize",()=>eu({chapterDrafts:dh,chapterDraftsByOrder:bp,chapterGenerationStagesByOrder:bz,chapterGenerationStages:bo,effectiveChapters:b8,template:p,allEvidence:bi,projectMaterialScope:a9,progressStages:ab,documentSpec:ar,projectMaterialProfile:ag,projectMaterialSummary:ap,domainProfile:at,documentBudget:cF,promptTexts:aR,reviewPromptTexts:aU,input:a,generationStrategy:cI,generationDiagnostics:cK,chapterScopedContext:cE,promptBindings:ae,promptDocumentRules:aL,projectUnderstanding:ah,projectContext:cb,projectRoot:c,projectId:o,readiness:au,factExtractionPromptTexts:aS,hasExplicitOutline:ao,missingItems:bm,retrievalCoverageReports:bj,failedChapterMessages:bn,webResearchReport:bl,indexHealth:a7,promptPlan:ad,globalConsistencyIssues:di,scopeConflicts:bX.scopeConflicts,writingTaskBrief:cy,evaluationCriteriaItems:b0.map(a=>a.title).filter(Boolean),tenderRequirements:cj,requirementsSimilarity:cu,factTokenScopeClassifier:cw,professionalDepthClassifier:cx,agentWorkflow:bV,emitProgress:V,withProgressHeartbeat:Y}))}},79227:(a,b,c)=>{c.d(b,{C:()=>f,previewGenerationBudgetForTemplate:()=>g});var d=c(46482),e=c(95734);function f(a){let b=Math.max(1,a.chapters.length),c=a.targetWords>0?Math.round(a.targetWords/b):1200,d=a.strategy,f=[],g=a.materialFileCount<4&&a.evidenceCount<6,h=Math.max(1,Math.min(b,(Number.isFinite(a.configuredChapterConcurrency)&&a.configuredChapterConcurrency>0?Math.floor(a.configuredChapterConcurrency):void 0)??b)),i=(0,e.Qf)(a.targetWords),j="fast"===d.mode?1:Math.max(1,b),{floorChars:k,ceilingChars:l}=c>=6e3?{floorChars:14e3,ceilingChars:4e4}:c>=3e3?{floorChars:11e3,ceilingChars:28e3}:{floorChars:8e3,ceilingChars:18e3},m=d.repairRoundBudget?d.repairRoundBudget:Math.max(2,Math.min(4,2+ +(a.targetWords>=2e4)+ +!!g)),n=Math.min(m*b,Math.max(12,2*b));return"strict"===d.mode&&f.push("strict:风险领域关键词命中(专项/安全/质量/验收/合同/合规等)"),a.targetWords>=4e4&&f.push("strict:目标篇幅超长(≥4 万字)"),g&&f.push("strict:资料稀疏(资料包文件 <4 且可用证据 <6 条)"),"fast"===d.mode&&f.push("fast:小文档(≤6000 字且 ≤4 章)全局审查降级为 35% 抽检"),"longform"===d.mode&&f.push("longform:长文档(≥3 万字或 ≥8 章)"),"balanced"===d.mode&&f.push("balanced:常规篇幅文档,标准审查深度"),f.push(`全章节并行生成(${h}/${b} 章同批),审查流水线 ${j} 路,全局 LLM 并发不设上限,每章证据预算 ${Math.round(k/1e3)}k-${Math.round(l/1e3)}k 字符,修复轮次预算每章 ${m} 轮(文档级总池 ${n} 轮,收敛判定优先)`),{strategy:d,chapterConcurrency:h,reviewConcurrency:j,llmConcurrency:i,evidenceFloorChars:k,evidenceCeilingChars:l,repairRoundBudget:m,repairPoolBudget:n,triggers:f}}function g(a){let b=Math.max(1,a.chapters.length),c=Math.max(0,Math.round(a.targetWords??0)),e=(0,d.JP)({template:a.template,targetWords:c,requirement:a.requirement,materialFileCount:a.materialFileCount,evidenceCount:a.evidenceCount}),g=f({template:a.template,chapters:a.chapters,targetWords:c,requirement:a.requirement,materialFileCount:a.materialFileCount,evidenceCount:a.evidenceCount,hasVeryLargeExplicitChapter:a.hasVeryLargeExplicitChapter??!1,configuredChapterConcurrency:a.configuredChapterConcurrency??0,strategy:e});return{mode:e.mode,enableGlobalReview:e.enableGlobalReview,globalReviewSamplingRate:e.globalReviewSamplingRate??1,repairRoundBudget:g.repairRoundBudget,chapterConcurrency:g.chapterConcurrency,reviewConcurrency:g.reviewConcurrency,evidenceFloorChars:g.evidenceFloorChars,evidenceCeilingChars:g.evidenceCeilingChars,targetWords:c,chapterCount:b,triggers:g.triggers}}},87942:(a,b,c)=>{c.d(b,{x:()=>d});let d={version:"professional-document-workflow-v9",rules:["complete-local-knowledge-assumption","knowledge-coverage-recovery","fact-trace-placement","chapter-coverage-gate","structured-quality-report","post-repair-verification"]}}};
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:[],rootMainFilesTree:{},pages:{"/":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/880-64d8a15c524106d2.js","static/chunks/795-61fe67c7203b6001.js","static/chunks/pages/index-cb27bfa36c212ab5.js"],"/_app":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/css/3854c6b3c59c0c44.css","static/chunks/pages/_app-24bef62eef01afe6.js"],"/_error":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/pages/_error-282257fbdcc167b4.js"],"/asset-library":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/224-0415408fff1d1c8b.js","static/chunks/102-881dcc464f983c89.js","static/chunks/289-fc1b25371e004552.js","static/chunks/994-241f87efc61005b8.js","static/chunks/pages/asset-library-f6319fc04559e43d.js"],"/document-roles":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-0415408fff1d1c8b.js","static/chunks/787-c18af810af3433f6.js","static/chunks/102-881dcc464f983c89.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/289-fc1b25371e004552.js","static/chunks/455-e1b41ac4946d2b6f.js","static/chunks/pages/document-roles-4ccb2db16dc4b63c.js"],"/documents":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-0415408fff1d1c8b.js","static/chunks/787-c18af810af3433f6.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/455-e1b41ac4946d2b6f.js","static/chunks/506-93f730bc149d0dce.js","static/chunks/930-0436dcaa92fb41f6.js","static/chunks/pages/documents-66057ee3c8ffff6d.js"],"/guide":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/787-c18af810af3433f6.js","static/chunks/986-771dc425e7b25964.js","static/chunks/pages/guide-139f55bcc9c6548b.js"],"/knowledge":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/pages/knowledge-905248d8dcb15453.js"],"/knowledge/file-detail":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-0415408fff1d1c8b.js","static/chunks/787-c18af810af3433f6.js","static/chunks/102-881dcc464f983c89.js","static/chunks/289-fc1b25371e004552.js","static/chunks/506-93f730bc149d0dce.js","static/chunks/850-0f48354694fc6b3e.js","static/css/ad5a592c79d1448b.css","static/chunks/pages/knowledge/file-detail-3a04722f7720abf5.js"],"/knowledge/files":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-0415408fff1d1c8b.js","static/chunks/102-881dcc464f983c89.js","static/chunks/289-fc1b25371e004552.js","static/css/ad5a592c79d1448b.css","static/chunks/pages/knowledge/files-33782c4b41f33750.js"],"/knowledge/manage":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/787-c18af810af3433f6.js","static/chunks/506-93f730bc149d0dce.js","static/chunks/788-dca0d550ad6bd8b2.js","static/chunks/pages/knowledge/manage-5b1b4d3804752f8b.js"],"/models":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/455-e1b41ac4946d2b6f.js","static/chunks/827-a6dc09e42833e6a3.js","static/chunks/pages/models-1fe7c964edefdd30.js"],"/overview":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/880-64d8a15c524106d2.js","static/chunks/795-61fe67c7203b6001.js","static/chunks/pages/overview-8713b5d37af0eeb3.js"],"/prompt":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/260-580088826d643423.js","static/chunks/pages/prompt-edc2dfea09aaedc1.js"],"/settings":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/pages/settings-17632b1471b4862f.js"],"/system/logs":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-0415408fff1d1c8b.js","static/chunks/102-881dcc464f983c89.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/289-fc1b25371e004552.js","static/chunks/pages/system/logs-ee67e2c93147dfc3.js"],"/template-references":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/787-c18af810af3433f6.js","static/chunks/102-881dcc464f983c89.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/564-30bfcb28e1d2c309.js","static/chunks/pages/template-references-e0ab1466f28cc4fc.js"]},ampFirstPages:[]},globalThis.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"];
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:[],rootMainFilesTree:{},pages:{"/":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/880-64d8a15c524106d2.js","static/chunks/795-61fe67c7203b6001.js","static/chunks/pages/index-cb27bfa36c212ab5.js"],"/_app":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/css/3854c6b3c59c0c44.css","static/chunks/pages/_app-24bef62eef01afe6.js"],"/_error":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/pages/_error-282257fbdcc167b4.js"],"/asset-library":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/224-790cf01fcf6820ee.js","static/chunks/102-881dcc464f983c89.js","static/chunks/289-42781fb699646699.js","static/chunks/994-241f87efc61005b8.js","static/chunks/pages/asset-library-f6319fc04559e43d.js"],"/document-roles":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-790cf01fcf6820ee.js","static/chunks/787-c18af810af3433f6.js","static/chunks/102-881dcc464f983c89.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/289-42781fb699646699.js","static/chunks/455-e1b41ac4946d2b6f.js","static/chunks/pages/document-roles-4ccb2db16dc4b63c.js"],"/documents":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-790cf01fcf6820ee.js","static/chunks/787-c18af810af3433f6.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/455-e1b41ac4946d2b6f.js","static/chunks/506-93f730bc149d0dce.js","static/chunks/930-0436dcaa92fb41f6.js","static/chunks/pages/documents-185ab225628d4705.js"],"/guide":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/787-c18af810af3433f6.js","static/chunks/986-771dc425e7b25964.js","static/chunks/pages/guide-139f55bcc9c6548b.js"],"/knowledge":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/pages/knowledge-905248d8dcb15453.js"],"/knowledge/file-detail":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-790cf01fcf6820ee.js","static/chunks/787-c18af810af3433f6.js","static/chunks/102-881dcc464f983c89.js","static/chunks/289-42781fb699646699.js","static/chunks/506-93f730bc149d0dce.js","static/chunks/850-0f48354694fc6b3e.js","static/css/ad5a592c79d1448b.css","static/chunks/pages/knowledge/file-detail-3a04722f7720abf5.js"],"/knowledge/files":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-790cf01fcf6820ee.js","static/chunks/102-881dcc464f983c89.js","static/chunks/289-42781fb699646699.js","static/css/ad5a592c79d1448b.css","static/chunks/pages/knowledge/files-98ec72061cdb64d3.js"],"/knowledge/manage":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/787-c18af810af3433f6.js","static/chunks/506-93f730bc149d0dce.js","static/chunks/788-e98701da4d6ca319.js","static/chunks/pages/knowledge/manage-558987c599dc4cd5.js"],"/models":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/455-e1b41ac4946d2b6f.js","static/chunks/827-a6dc09e42833e6a3.js","static/chunks/pages/models-1fe7c964edefdd30.js"],"/overview":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/880-64d8a15c524106d2.js","static/chunks/795-61fe67c7203b6001.js","static/chunks/pages/overview-8713b5d37af0eeb3.js"],"/prompt":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/260-244c94eacd903620.js","static/chunks/pages/prompt-839287c514595765.js"],"/settings":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/pages/settings-17632b1471b4862f.js"],"/system/logs":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/883-506cbca959974997.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/44-d3545eedd5c75ef1.js","static/chunks/224-790cf01fcf6820ee.js","static/chunks/102-881dcc464f983c89.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/289-42781fb699646699.js","static/chunks/pages/system/logs-2e849bcdf371d791.js"],"/template-references":["static/chunks/webpack-4224e970a97a4a86.js","static/chunks/framework-161be364fd69a7ce.js","static/chunks/main-91fb767ebd74c9c1.js","static/chunks/717-743b697a417dd5ee.js","static/chunks/69-34d57b77fd2eed20.js","static/chunks/700-5d29b0475311f590.js","static/chunks/787-c18af810af3433f6.js","static/chunks/102-881dcc464f983c89.js","static/chunks/195-2c0168eacab722d2.js","static/chunks/564-30bfcb28e1d2c309.js","static/chunks/pages/template-references-e0ab1466f28cc4fc.js"]},ampFirstPages:[]},globalThis.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"];
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" data-next-head=""/><title data-next-head="">404: This page could not be found</title><link rel="preload" href="/_next/static/css/3854c6b3c59c0c44.css" as="style"/><link rel="stylesheet" href="/_next/static/css/3854c6b3c59c0c44.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4224e970a97a4a86.js" defer=""></script><script src="/_next/static/chunks/framework-161be364fd69a7ce.js" defer=""></script><script src="/_next/static/chunks/main-91fb767ebd74c9c1.js" defer=""></script><script src="/_next/static/chunks/pages/_app-24bef62eef01afe6.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/-s5AGjUlXmDFJsd_rKdo2/_buildManifest.js" defer=""></script><script src="/_next/static/-s5AGjUlXmDFJsd_rKdo2/_ssgManifest.js" defer=""></script></head><body><div id="__next"><script>((e,i,s,u,m,a,l,h)=>{let d=document.documentElement,w=["light","dark"];function p(n){(Array.isArray(e)?e:[e]).forEach(y=>{let k=y==="class",S=k&&a?m.map(f=>a[f]||f):m;k?(d.classList.remove(...S),d.classList.add(a&&a[n]?a[n]:n)):d.setAttribute(y,n)}),R(n)}function R(n){h&&w.includes(n)&&(d.style.colorScheme=n)}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let n=localStorage.getItem(i)||s,y=l&&n==="system"?c():n;p(y)}catch(n){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div class="css-1pi45l5 ant-app css-var-_R_16_"><aside class="sidebar"><a href="/overview"><div class="sidebarLogo"><div class="w-8 h-8 rounded-lg bg-black dark:bg-white flex items-center justify-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon text-white dark:text-black"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg></div><div class="sidebarLogoTitle"><span class="logoGradient">Customize Agent</span></div></div></a><nav class="sidebarNav mt-2"><a href="/overview"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg><span class="sidebarLabel">总览</span></div></a><div><div class="sidebarItem sidebarParent"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M3 5V19A9 3 0 0 0 21 19V5"></path><path d="M3 12A9 3 0 0 0 21 12"></path></svg><span class="sidebarLabel">知识库</span><span class="sidebarChevron"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right"><path d="m9 18 6-6-6-6"></path></svg></span></div></div><a href="/models"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu"><rect width="16" height="16" x="4" y="4" rx="2"></rect><rect width="6" height="6" x="9" y="9" rx="1"></rect><path d="M15 2v2"></path><path d="M15 20v2"></path><path d="M2 15h2"></path><path d="M2 9h2"></path><path d="M20 15h2"></path><path d="M20 9h2"></path><path d="M9 2v2"></path><path d="M9 20v2"></path></svg><span class="sidebarLabel">模型配置</span></div></a><a href="/prompt"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg><span class="sidebarLabel">提示词管理</span></div></a><a href="/document-roles"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">角色配置</span></div></a><a href="/documents"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-files"><path d="M20 7h-3a2 2 0 0 1-2-2V2"></path><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"></path><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"></path></svg><span class="sidebarLabel">工作流模版库</span></div></a><a href="/template-references"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library-big"><rect width="8" height="18" x="3" y="3" rx="1"></rect><path d="M7 3v18"></path><path d="M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z"></path></svg><span class="sidebarLabel">模板参考</span></div></a><a href="/asset-library"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg><span class="sidebarLabel">生成资源</span></div></a><a href="/system/logs"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bug"><path d="m8 2 1.88 1.88"></path><path d="M14.12 3.88 16 2"></path><path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"></path><path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"></path><path d="M12 20v-9"></path><path d="M6.53 9C4.6 8.8 3 7.1 3 5"></path><path d="M6 13H2"></path><path d="M3 21c0-2.1 1.7-3.9 3.8-4"></path><path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"></path><path d="M22 13h-4"></path><path d="M17.2 17c2.1.1 3.8 1.9 3.8 4"></path></svg><span class="sidebarLabel">系统日志</span></div></a><a href="/guide"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-open"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg><span class="sidebarLabel">指引</span></div></a><a href="/settings"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">设置</span></div></a></nav><div class="sidebarCollapseWrapper"><button class="sidebarCollapseBtn" aria-label="收起侧边栏"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-panel-left-close"><rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M9 3v18"></path><path d="m16 15-3-3 3-3"></path></svg></button></div></aside><div class="mainContent"><header class="topbar"><div class="flex-1"></div><span class="ant-badge css-1pi45l5 css-var-_R_16_"><button type="button" class="ant-btn css-1pi45l5 css-var-_R_16_ ant-btn-default ant-btn-color-default ant-btn-variant-outlined topbarBtn"><span class="ant-btn-icon"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle"><svg viewBox="64 64 896 896" focusable="false" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path 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"></path><path 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"></path></svg></span></span><span>后台任务</span></button></span><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span>深色</span></button><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg><span>English</span></button></header><main class="mainInner"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"-s5AGjUlXmDFJsd_rKdo2","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" data-next-head=""/><title data-next-head="">404: This page could not be found</title><link rel="preload" href="/_next/static/css/3854c6b3c59c0c44.css" as="style"/><link rel="stylesheet" href="/_next/static/css/3854c6b3c59c0c44.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4224e970a97a4a86.js" defer=""></script><script src="/_next/static/chunks/framework-161be364fd69a7ce.js" defer=""></script><script src="/_next/static/chunks/main-91fb767ebd74c9c1.js" defer=""></script><script src="/_next/static/chunks/pages/_app-24bef62eef01afe6.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/WobG3Rg1MRdPd8ZMdlIf3/_buildManifest.js" defer=""></script><script src="/_next/static/WobG3Rg1MRdPd8ZMdlIf3/_ssgManifest.js" defer=""></script></head><body><div id="__next"><script>((e,i,s,u,m,a,l,h)=>{let d=document.documentElement,w=["light","dark"];function p(n){(Array.isArray(e)?e:[e]).forEach(y=>{let k=y==="class",S=k&&a?m.map(f=>a[f]||f):m;k?(d.classList.remove(...S),d.classList.add(a&&a[n]?a[n]:n)):d.setAttribute(y,n)}),R(n)}function R(n){h&&w.includes(n)&&(d.style.colorScheme=n)}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let n=localStorage.getItem(i)||s,y=l&&n==="system"?c():n;p(y)}catch(n){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div class="css-1pi45l5 ant-app css-var-_R_16_"><aside class="sidebar"><a href="/overview"><div class="sidebarLogo"><div class="w-8 h-8 rounded-lg bg-black dark:bg-white flex items-center justify-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon text-white dark:text-black"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg></div><div class="sidebarLogoTitle"><span class="logoGradient">Customize Agent</span></div></div></a><nav class="sidebarNav mt-2"><a href="/overview"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg><span class="sidebarLabel">总览</span></div></a><div><div class="sidebarItem sidebarParent"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M3 5V19A9 3 0 0 0 21 19V5"></path><path d="M3 12A9 3 0 0 0 21 12"></path></svg><span class="sidebarLabel">知识库</span><span class="sidebarChevron"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right"><path d="m9 18 6-6-6-6"></path></svg></span></div></div><a href="/models"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu"><rect width="16" height="16" x="4" y="4" rx="2"></rect><rect width="6" height="6" x="9" y="9" rx="1"></rect><path d="M15 2v2"></path><path d="M15 20v2"></path><path d="M2 15h2"></path><path d="M2 9h2"></path><path d="M20 15h2"></path><path d="M20 9h2"></path><path d="M9 2v2"></path><path d="M9 20v2"></path></svg><span class="sidebarLabel">模型配置</span></div></a><a href="/prompt"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg><span class="sidebarLabel">提示词管理</span></div></a><a href="/document-roles"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">角色配置</span></div></a><a href="/documents"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-files"><path d="M20 7h-3a2 2 0 0 1-2-2V2"></path><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"></path><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"></path></svg><span class="sidebarLabel">工作流模版库</span></div></a><a href="/template-references"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library-big"><rect width="8" height="18" x="3" y="3" rx="1"></rect><path d="M7 3v18"></path><path d="M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z"></path></svg><span class="sidebarLabel">模板参考</span></div></a><a href="/asset-library"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg><span class="sidebarLabel">生成资源</span></div></a><a href="/system/logs"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bug"><path d="m8 2 1.88 1.88"></path><path d="M14.12 3.88 16 2"></path><path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"></path><path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"></path><path d="M12 20v-9"></path><path d="M6.53 9C4.6 8.8 3 7.1 3 5"></path><path d="M6 13H2"></path><path d="M3 21c0-2.1 1.7-3.9 3.8-4"></path><path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"></path><path d="M22 13h-4"></path><path d="M17.2 17c2.1.1 3.8 1.9 3.8 4"></path></svg><span class="sidebarLabel">系统日志</span></div></a><a href="/guide"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-open"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg><span class="sidebarLabel">指引</span></div></a><a href="/settings"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">设置</span></div></a></nav><div class="sidebarCollapseWrapper"><button class="sidebarCollapseBtn" aria-label="收起侧边栏"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-panel-left-close"><rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M9 3v18"></path><path d="m16 15-3-3 3-3"></path></svg></button></div></aside><div class="mainContent"><header class="topbar"><div class="flex-1"></div><span class="ant-badge css-1pi45l5 css-var-_R_16_"><button type="button" class="ant-btn css-1pi45l5 css-var-_R_16_ ant-btn-default ant-btn-color-default ant-btn-variant-outlined topbarBtn"><span class="ant-btn-icon"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle"><svg viewBox="64 64 896 896" focusable="false" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path 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"></path><path 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"></path></svg></span></span><span>后台任务</span></button></span><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span>深色</span></button><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg><span>English</span></button></header><main class="mainInner"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"WobG3Rg1MRdPd8ZMdlIf3","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><link rel="preload" href="/_next/static/css/3854c6b3c59c0c44.css" as="style"/><link rel="stylesheet" href="/_next/static/css/3854c6b3c59c0c44.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4224e970a97a4a86.js" defer=""></script><script src="/_next/static/chunks/framework-161be364fd69a7ce.js" defer=""></script><script src="/_next/static/chunks/main-91fb767ebd74c9c1.js" defer=""></script><script src="/_next/static/chunks/pages/_app-24bef62eef01afe6.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/-s5AGjUlXmDFJsd_rKdo2/_buildManifest.js" defer=""></script><script src="/_next/static/-s5AGjUlXmDFJsd_rKdo2/_ssgManifest.js" defer=""></script></head><body><div id="__next"><script>((e,i,s,u,m,a,l,h)=>{let d=document.documentElement,w=["light","dark"];function p(n){(Array.isArray(e)?e:[e]).forEach(y=>{let k=y==="class",S=k&&a?m.map(f=>a[f]||f):m;k?(d.classList.remove(...S),d.classList.add(a&&a[n]?a[n]:n)):d.setAttribute(y,n)}),R(n)}function R(n){h&&w.includes(n)&&(d.style.colorScheme=n)}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let n=localStorage.getItem(i)||s,y=l&&n==="system"?c():n;p(y)}catch(n){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div class="css-1pi45l5 ant-app css-var-_R_16_"><aside class="sidebar"><a href="/overview"><div class="sidebarLogo"><div class="w-8 h-8 rounded-lg bg-black dark:bg-white flex items-center justify-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon text-white dark:text-black"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg></div><div class="sidebarLogoTitle"><span class="logoGradient">Customize Agent</span></div></div></a><nav class="sidebarNav mt-2"><a href="/overview"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg><span class="sidebarLabel">总览</span></div></a><div><div class="sidebarItem sidebarParent"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M3 5V19A9 3 0 0 0 21 19V5"></path><path d="M3 12A9 3 0 0 0 21 12"></path></svg><span class="sidebarLabel">知识库</span><span class="sidebarChevron"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right"><path d="m9 18 6-6-6-6"></path></svg></span></div></div><a href="/models"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu"><rect width="16" height="16" x="4" y="4" rx="2"></rect><rect width="6" height="6" x="9" y="9" rx="1"></rect><path d="M15 2v2"></path><path d="M15 20v2"></path><path d="M2 15h2"></path><path d="M2 9h2"></path><path d="M20 15h2"></path><path d="M20 9h2"></path><path d="M9 2v2"></path><path d="M9 20v2"></path></svg><span class="sidebarLabel">模型配置</span></div></a><a href="/prompt"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg><span class="sidebarLabel">提示词管理</span></div></a><a href="/document-roles"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">角色配置</span></div></a><a href="/documents"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-files"><path d="M20 7h-3a2 2 0 0 1-2-2V2"></path><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"></path><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"></path></svg><span class="sidebarLabel">工作流模版库</span></div></a><a href="/template-references"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library-big"><rect width="8" height="18" x="3" y="3" rx="1"></rect><path d="M7 3v18"></path><path d="M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z"></path></svg><span class="sidebarLabel">模板参考</span></div></a><a href="/asset-library"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg><span class="sidebarLabel">生成资源</span></div></a><a href="/system/logs"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bug"><path d="m8 2 1.88 1.88"></path><path d="M14.12 3.88 16 2"></path><path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"></path><path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"></path><path d="M12 20v-9"></path><path d="M6.53 9C4.6 8.8 3 7.1 3 5"></path><path d="M6 13H2"></path><path d="M3 21c0-2.1 1.7-3.9 3.8-4"></path><path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"></path><path d="M22 13h-4"></path><path d="M17.2 17c2.1.1 3.8 1.9 3.8 4"></path></svg><span class="sidebarLabel">系统日志</span></div></a><a href="/guide"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-open"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg><span class="sidebarLabel">指引</span></div></a><a href="/settings"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">设置</span></div></a></nav><div class="sidebarCollapseWrapper"><button class="sidebarCollapseBtn" aria-label="收起侧边栏"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-panel-left-close"><rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M9 3v18"></path><path d="m16 15-3-3 3-3"></path></svg></button></div></aside><div class="mainContent"><header class="topbar"><div class="flex-1"></div><span class="ant-badge css-1pi45l5 css-var-_R_16_"><button type="button" class="ant-btn css-1pi45l5 css-var-_R_16_ ant-btn-default ant-btn-color-default ant-btn-variant-outlined topbarBtn"><span class="ant-btn-icon"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle"><svg viewBox="64 64 896 896" focusable="false" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path 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"></path><path 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"></path></svg></span></span><span>后台任务</span></button></span><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span>深色</span></button><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg><span>English</span></button></header><main class="mainInner"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"-s5AGjUlXmDFJsd_rKdo2","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><link rel="preload" href="/_next/static/css/3854c6b3c59c0c44.css" as="style"/><link rel="stylesheet" href="/_next/static/css/3854c6b3c59c0c44.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4224e970a97a4a86.js" defer=""></script><script src="/_next/static/chunks/framework-161be364fd69a7ce.js" defer=""></script><script src="/_next/static/chunks/main-91fb767ebd74c9c1.js" defer=""></script><script src="/_next/static/chunks/pages/_app-24bef62eef01afe6.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/WobG3Rg1MRdPd8ZMdlIf3/_buildManifest.js" defer=""></script><script src="/_next/static/WobG3Rg1MRdPd8ZMdlIf3/_ssgManifest.js" defer=""></script></head><body><div id="__next"><script>((e,i,s,u,m,a,l,h)=>{let d=document.documentElement,w=["light","dark"];function p(n){(Array.isArray(e)?e:[e]).forEach(y=>{let k=y==="class",S=k&&a?m.map(f=>a[f]||f):m;k?(d.classList.remove(...S),d.classList.add(a&&a[n]?a[n]:n)):d.setAttribute(y,n)}),R(n)}function R(n){h&&w.includes(n)&&(d.style.colorScheme=n)}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let n=localStorage.getItem(i)||s,y=l&&n==="system"?c():n;p(y)}catch(n){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div class="css-1pi45l5 ant-app css-var-_R_16_"><aside class="sidebar"><a href="/overview"><div class="sidebarLogo"><div class="w-8 h-8 rounded-lg bg-black dark:bg-white flex items-center justify-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon text-white dark:text-black"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg></div><div class="sidebarLogoTitle"><span class="logoGradient">Customize Agent</span></div></div></a><nav class="sidebarNav mt-2"><a href="/overview"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg><span class="sidebarLabel">总览</span></div></a><div><div class="sidebarItem sidebarParent"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M3 5V19A9 3 0 0 0 21 19V5"></path><path d="M3 12A9 3 0 0 0 21 12"></path></svg><span class="sidebarLabel">知识库</span><span class="sidebarChevron"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right"><path d="m9 18 6-6-6-6"></path></svg></span></div></div><a href="/models"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu"><rect width="16" height="16" x="4" y="4" rx="2"></rect><rect width="6" height="6" x="9" y="9" rx="1"></rect><path d="M15 2v2"></path><path d="M15 20v2"></path><path d="M2 15h2"></path><path d="M2 9h2"></path><path d="M20 15h2"></path><path d="M20 9h2"></path><path d="M9 2v2"></path><path d="M9 20v2"></path></svg><span class="sidebarLabel">模型配置</span></div></a><a href="/prompt"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg><span class="sidebarLabel">提示词管理</span></div></a><a href="/document-roles"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">角色配置</span></div></a><a href="/documents"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-files"><path d="M20 7h-3a2 2 0 0 1-2-2V2"></path><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"></path><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"></path></svg><span class="sidebarLabel">工作流模版库</span></div></a><a href="/template-references"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library-big"><rect width="8" height="18" x="3" y="3" rx="1"></rect><path d="M7 3v18"></path><path d="M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z"></path></svg><span class="sidebarLabel">模板参考</span></div></a><a href="/asset-library"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg><span class="sidebarLabel">生成资源</span></div></a><a href="/system/logs"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bug"><path d="m8 2 1.88 1.88"></path><path d="M14.12 3.88 16 2"></path><path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"></path><path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"></path><path d="M12 20v-9"></path><path d="M6.53 9C4.6 8.8 3 7.1 3 5"></path><path d="M6 13H2"></path><path d="M3 21c0-2.1 1.7-3.9 3.8-4"></path><path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"></path><path d="M22 13h-4"></path><path d="M17.2 17c2.1.1 3.8 1.9 3.8 4"></path></svg><span class="sidebarLabel">系统日志</span></div></a><a href="/guide"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-open"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg><span class="sidebarLabel">指引</span></div></a><a href="/settings"><div class="sidebarItem"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="sidebarLabel">设置</span></div></a></nav><div class="sidebarCollapseWrapper"><button class="sidebarCollapseBtn" aria-label="收起侧边栏"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-panel-left-close"><rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M9 3v18"></path><path d="m16 15-3-3 3-3"></path></svg></button></div></aside><div class="mainContent"><header class="topbar"><div class="flex-1"></div><span class="ant-badge css-1pi45l5 css-var-_R_16_"><button type="button" class="ant-btn css-1pi45l5 css-var-_R_16_ ant-btn-default ant-btn-color-default ant-btn-variant-outlined topbarBtn"><span class="ant-btn-icon"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle"><svg viewBox="64 64 896 896" focusable="false" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path 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"></path><path 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"></path></svg></span></span><span>后台任务</span></button></span><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span>深色</span></button><button class="topbarBtn"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg><span>English</span></button></header><main class="mainInner"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></main></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"WobG3Rg1MRdPd8ZMdlIf3","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=5796,a.ids=[5796],a.modules={19898:a=>{a.exports=require("@customize-agent/knowledge")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},33873:a=>{a.exports=require("path")},48161:a=>{a.exports=require("node:os")},48203:(a,b,c)=>{c.d(b,{DA:()=>m,P2:()=>n,ls:()=>o});var d=c(79646),e=c(33873),f=c.n(e),g=c(19898),h=c(44533),i=c(37095),j=c(25284);let k=new Map;async function l(a,b,c,d){let e;try{e=await (0,h.Qh)().getProject(a.projectRoot);let{vectorStatus:f}=await (0,g.runIndexLoop)(e,a,e=>{var f;return(0,i.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:(f=e.stage,"parsing"===f||"chunking"===f||"vectorizing"===f||"done"===f||"error"===f?f:"indexing"===f?"chunking":"scanning"===f?"uploading":"vectorizing"),status:"error"===e.stage?"error":"processing",percent:e.percent,message:e.message,filePath:e.filePath||a.relativePath,chunkCount:e.chunkCount,error:e.vectorStatus?.error})});if("error"===f.status){let g=f.error||"HNSWLib 向量入库失败";return(0,i.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"error",status:"error",percent:100,message:g,error:g}),{success:!1,error:g,stats:{...e.getStats(),vectorStatus:f}}}return(0,i.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"done",status:"success",percent:100,message:a.relativePath?"单文件重新解析完成,正在后台更新项目理解缓存":"知识库后台索引完成,正在后台更新项目理解缓存",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()}),{success:!0,stats:{...e.getStats(),vectorStatus:f}}}catch(g){let f=g instanceof Error?g.stack||g.message:String(g);return e?.failPendingIndexJobs?.(f),(0,i.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"error",status:"error",percent:100,message:f,error:f}),{success:!1,error:f}}}function m(a){!function(a){let b=k.get(a.projectRoot),c=a.uploadOperationId??a.id,e=a.uploadOperationId?"upload":"reindex",g=a.uploadOperationId?`上传 ${a.uploadTitle??"文件"}`:a.relativePath?`重新解析 ${a.relativePath}`:"知识库后台索引",h=()=>((0,i.Qf)(a.projectRoot,{id:c,type:e,title:g,stage:"uploading",status:"processing",percent:5,message:"索引任务已进入后台队列",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()}),("1"===process.env.CUSTOMIZE_AGENT_DISABLE_KB_CHILD_PROCESS?l(a,c,e,g):function(a,b,c,e){let g=f().resolve(process.cwd(),"scripts/kb-index-worker.cjs");return new Promise(f=>{let h=(0,d.fork)(g,[JSON.stringify({...a,operationId:b})],{cwd:process.cwd(),stdio:["ignore","pipe","pipe","ipc"],env:process.env}),j=new Map,k=null,l=()=>{for(let[d,f]of(k&&(clearTimeout(k),k=null),j))0!==f.length&&(0,i.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"parsing",status:"processing",percent:5,message:`${d}${f.join("\n").slice(-1e3)}`});j.clear()},m=(a,b)=>{let c=String(a).split(/\r?\n/u).map(a=>a.trim()).filter(a=>a&&!/^Image too small to scale!!/u.test(a)&&"Line cannot be recognized!!"!==a).join("\n");if(!c)return;let d=j.get(b)??[];d.push(c),j.set(b,d),k||(k=setTimeout(l,500),k.unref?.())};h.stdout?.on("data",a=>m(a,"后台索引输出:")),h.stderr?.on("data",a=>m(a,"后台索引错误输出:")),h.on("error",d=>{l();let g=d instanceof Error?d.message:String(d);(0,i.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"error",status:"error",percent:100,message:g,error:g}),f({success:!1,error:g})});let n=!1,o=!1;h.on("message",b=>{b?.type==="log"&&b?.patch&&("done"===b.patch.stage&&(n=!0),"error"===b.patch.status&&(o=!0),(0,i.Qf)(a.projectRoot,b.patch))}),h.on("exit",(d,g)=>{if(l(),0===d||n)f({success:!0});else{let h=`知识库后台进程退出,退出码 ${d??g??"unknown"}`;console.error("[kb-worker] exit",{operationId:b,code:d,signal:g}),o||(0,i.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"error",status:"error",percent:100,message:h,error:h}),f({success:!1,error:h})}})})}(a,c,e,g)).then(b=>(b.success&&((0,i.Qf)(a.projectRoot,{id:c,type:e,title:g,stage:"done",status:"success",percent:100,message:a.relativePath?"单文件重新解析完成,正在后台更新项目理解缓存":"知识库后台索引完成,正在后台更新项目理解缓存",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()}),(0,j.b3)(a.projectRoot)),b))),m=b?b.promise.then(h,h):h(),n={operationId:c,promise:m,startedAt:b?.startedAt??Date.now()};k.set(a.projectRoot,n),m.finally(()=>{k.get(a.projectRoot)===n&&k.delete(a.projectRoot)})}(a)}function n(a){return k.has(a)}function o(a){let b=k.get(a);return b?{operationId:b.operationId,startedAt:b.startedAt}:void 0}},73024:a=>{a.exports=require("node:fs")},75600:a=>{a.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},87176:(a,b,c)=>{c.r(b),c.d(b,{config:()=>r,default:()=>q,handler:()=>t});var d={};c.r(d),c.d(d,{default:()=>n});var e=c(11400),f=c(50029),g=c(71086),h=c(38513),i=c(29021),j=c(33873),k=c(44533),l=c(48203),m=c(37095);async function n(a,b){if("POST"!==a.method)return b.status(405).json({error:"method not allowed"});try{let c=a.body?.projectRoot||(0,k.aY)(),d=a.body?.relativePath;if(!c||!d)return b.status(400).json({error:"projectRoot and relativePath are required"});let e=(0,k.NW)(c),f=j.resolve(e,d);if(!f.startsWith(j.resolve(e)+j.sep))return b.status(400).json({error:"invalid relativePath"});if(!i.existsSync(f))return b.status(404).json({error:"file or folder not found"});let g=i.statSync(f),h=g.isDirectory()?function a(b,c){let d=[];for(let e of i.readdirSync(b,{withFileTypes:!0})){let f=j.join(b,e.name);e.isDirectory()?d.push(...a(f,c)):e.name.endsWith(".source.txt")||d.push(j.relative(c,f).split(j.sep).join("/"))}return d}(f,e):[d];if(0===h.length)return b.status(400).json({error:"folder has no indexable files"});let n=(0,l.ls)(c);if(n){let a=(0,m.JB)(c,n.operationId);return b.status(202).json({success:!0,accepted:!0,alreadyRunning:!0,operationId:n.operationId,job:a})}let o=`file-reindex-${Date.now()}-${Math.random().toString(36).slice(2)}`,p=g.isDirectory()?`重新解析文件夹 ${d}`:`重新解析 ${d}`,q=(0,m.Qf)(c,{id:o,type:"reindex",title:p,stage:"uploading",status:"processing",percent:5,message:g.isDirectory()?`文件夹重新解析任务已提交,共 ${h.length} 个文件`:"单文件重新解析任务已提交,正在后台排队执行",filePath:d,fileName:d.split("/").filter(Boolean).pop()});return(0,l.DA)({id:o,projectRoot:c,relativePath:d,relativePaths:h,forceReindexAll:!1}),b.status(202).json({success:!0,accepted:!0,operationId:o,job:q,fileCount:h.length})}catch(a){console.error("[api] kb/files/reindex",a),b.status(500).json({error:"Internal server error"})}}var o=c(68970),p=c(50296);let q=(0,h.M)(d,"default"),r=(0,h.M)(d,"config"),s=new g.PagesAPIRouteModule({definition:{kind:f.A.PAGES_API,page:"/api/kb/files/reindex",pathname:"/api/kb/files/reindex",bundlePath:"",filename:""},userland:d,distDir:".next",relativeProjectDir:""});async function t(a,b,c){let d=await s.prepare(a,b,{srcPage:"/api/kb/files/reindex"});if(!d){b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve());return}let{query:f,params:g,prerenderManifest:h,routerServerContext:i}=d;try{let c=a.method||"GET",d=(0,o.getTracer)(),e=d.getActiveScopeSpan(),j=s.instrumentationOnRequestError.bind(s),k=async e=>s.render(a,b,{query:{...f,...g},params:g,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:h.preview,propagateError:!1,dev:s.isDev,page:"/api/kb/files/reindex",internalRevalidate:null==i?void 0:i.revalidate,onError:(...b)=>j(a,...b)}).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let f=d.getRootSpanAttributes();if(!f)return;if(f.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${f.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let g=f.get("next.route");if(g){let a=`${c} ${g}`;e.setAttributes({"next.route":g,"http.route":g,"next.span_name":a}),e.updateName(a)}else e.updateName(`${c} ${a.url}`)});e?await k(e):await d.withPropagatedContext(a.headers,()=>d.trace(p.BaseServerSpan.handleRequest,{spanName:`${c} ${a.url}`,kind:o.SpanKind.SERVER,attributes:{"http.method":c,"http.target":a.url}},k))}catch(a){if(s.isDev)throw a;(0,e.sendError)(b,500,"Internal Server Error")}finally{null==c.waitUntil||c.waitUntil.call(c,Promise.resolve())}}},87550:a=>{a.exports=require("better-sqlite3")},95393:a=>{a.exports=require("@customize-agent/llm")},96770:a=>{a.exports=require("@customize-agent/runtime")}};var b=require("../../../../webpack-api-runtime.js");b.C(a);var c=b.X(0,[9705,1001,5840,208,6482,5284],()=>b(b.s=87176));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=5796,a.ids=[5796],a.modules={19898:a=>{a.exports=require("@customize-agent/knowledge")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},33873:a=>{a.exports=require("path")},48161:a=>{a.exports=require("node:os")},48203:(a,b,c)=>{c.d(b,{DA:()=>o,P2:()=>p,ls:()=>q});var d=c(79646),e=c(73024),f=c.n(e),g=c(33873),h=c.n(g),i=c(19898),j=c(44533),k=c(37095),l=c(25284);let m=new Map;async function n(a,b,c,d){let e;try{e=await (0,j.Qh)().getProject(a.projectRoot);let{vectorStatus:f}=await (0,i.runIndexLoop)(e,a,e=>{var f;return(0,k.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:(f=e.stage,"parsing"===f||"chunking"===f||"vectorizing"===f||"done"===f||"error"===f?f:"indexing"===f?"chunking":"scanning"===f?"uploading":"vectorizing"),status:"error"===e.stage?"error":"processing",percent:e.percent,message:e.message,filePath:e.filePath||a.relativePath,chunkCount:e.chunkCount,error:e.vectorStatus?.error})}),g="error"===f.status?f.error||"HNSWLib 向量入库失败":"unavailable"===f.status?f.error||"hnswlib-node native 绑定不可用,向量索引已降级":void 0;if(g)return(0,k.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"done",status:"warning",percent:100,message:a.relativePath?"单文件重新解析完成(向量索引降级),正在后台更新项目理解缓存":"知识库后台索引完成(向量索引降级),正在后台更新项目理解缓存",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop(),error:g}),{success:!0,warning:g,stats:{...e.getStats(),vectorStatus:f}};return(0,k.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"done",status:"success",percent:100,message:a.relativePath?"单文件重新解析完成,正在后台更新项目理解缓存":"知识库后台索引完成,正在后台更新项目理解缓存",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()}),{success:!0,stats:{...e.getStats(),vectorStatus:f}}}catch(g){let f=g instanceof Error?g.stack||g.message:String(g);return e?.failPendingIndexJobs?.(f),(0,k.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"error",status:"error",percent:100,message:f,error:f}),{success:!1,error:f}}}function o(a){!function(a){let b=m.get(a.projectRoot),c=a.uploadOperationId??a.id,e=a.uploadOperationId?"upload":"reindex",g=a.uploadOperationId?`上传 ${a.uploadTitle??"文件"}`:a.relativePath?`重新解析 ${a.relativePath}`:"知识库后台索引",i=()=>((0,k.Qf)(a.projectRoot,{id:c,type:e,title:g,stage:"uploading",status:"processing",percent:5,message:"索引任务已进入后台队列",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()}),("1"===process.env.CUSTOMIZE_AGENT_DISABLE_KB_CHILD_PROCESS?n(a,c,e,g):function(a,b,c,e){let g=function(){let a=new Set,b=b=>{for(let c=h().resolve(b);a.add(h().join(c,"scripts/kb-index-worker.cjs")),h().dirname(c)!==c;c=h().dirname(c));};for(let c of(b(process.cwd()),b(__dirname),a))if(f().existsSync(c))return c}();return g?new Promise(f=>{let h,i=(0,d.fork)(g,[JSON.stringify({...a,operationId:b})],{cwd:process.cwd(),stdio:["ignore","pipe","pipe","ipc"],env:process.env}),j=!1,l=new Map,m=null,o=()=>{for(let[d,f]of(m&&(clearTimeout(m),m=null),l))0!==f.length&&(0,k.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"parsing",status:"processing",percent:5,message:`${d}${f.join("\n").slice(-1e3)}`});l.clear()},p=(a,b)=>{let c=String(a).split(/\r?\n/u).map(a=>a.trim()).filter(a=>a&&!/^Image too small to scale!!/u.test(a)&&"Line cannot be recognized!!"!==a).join("\n");if(!c)return;let d=l.get(b)??[];d.push(c),l.set(b,d),m||(m=setTimeout(o,500),m.unref?.())};i.stdout?.on("data",a=>p(a,"后台索引输出:")),i.stderr?.on("data",a=>p(a,"后台索引错误输出:")),i.on("error",d=>{if(j)return;j=!0,o();let g=d instanceof Error?d.message:String(d);console.error("[kb-worker] spawn error, falling back to in-process indexing:",g),(0,k.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"parsing",status:"processing",percent:5,message:`后台子进程启动失败(${g}),已自动切换为主进程内索引`}),f(n(a,b,c,e))});let q=!1,r=!1,s=!1;i.on("message",b=>{b?.type==="log"&&b?.patch&&(s=!0,"done"===b.patch.stage&&(q=!0),"error"===b.patch.status&&(r=!0),"warning"===b.patch.status&&(h=b.patch.error||b.patch.message),(0,k.Qf)(a.projectRoot,b.patch))}),i.on("exit",(d,g)=>{if(j)return;if(j=!0,o(),0===d||q)return void f({success:!0,warning:h});if(!s){console.error("[kb-worker] exit without any IPC, falling back to in-process indexing",{operationId:b,code:d,signal:g}),(0,k.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"parsing",status:"processing",percent:5,message:`后台子进程启动失败(退出码 ${d??g??"unknown"}),已自动切换为主进程内索引`}),f(n(a,b,c,e));return}let i=`知识库后台进程退出,退出码 ${d??g??"unknown"}`;console.error("[kb-worker] exit",{operationId:b,code:d,signal:g}),r||(0,k.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"error",status:"error",percent:100,message:i,error:i}),f({success:!1,error:i})})}):(console.warn("[kb-worker] worker script not found, running index loop in-process"),n(a,b,c,e))}(a,c,e,g)).then(b=>(b.success&&(b.warning?(0,k.Qf)(a.projectRoot,{id:c,type:e,title:g,stage:"done",status:"warning",percent:100,message:a.relativePath?"单文件重新解析完成(向量索引降级),正在后台更新项目理解缓存":"知识库后台索引完成(向量索引降级),正在后台更新项目理解缓存",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop(),error:b.warning}):(0,k.Qf)(a.projectRoot,{id:c,type:e,title:g,stage:"done",status:"success",percent:100,message:a.relativePath?"单文件重新解析完成,正在后台更新项目理解缓存":"知识库后台索引完成,正在后台更新项目理解缓存",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()}),(0,l.b3)(a.projectRoot)),b))),j=b?b.promise.then(i,i):i(),o={operationId:c,promise:j,startedAt:b?.startedAt??Date.now()};m.set(a.projectRoot,o),j.finally(()=>{m.get(a.projectRoot)===o&&m.delete(a.projectRoot)})}(a)}function p(a){return m.has(a)}function q(a){let b=m.get(a);return b?{operationId:b.operationId,startedAt:b.startedAt}:void 0}},73024:a=>{a.exports=require("node:fs")},75600:a=>{a.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},87176:(a,b,c)=>{c.r(b),c.d(b,{config:()=>r,default:()=>q,handler:()=>t});var d={};c.r(d),c.d(d,{default:()=>n});var e=c(11400),f=c(50029),g=c(71086),h=c(38513),i=c(29021),j=c(33873),k=c(44533),l=c(48203),m=c(37095);async function n(a,b){if("POST"!==a.method)return b.status(405).json({error:"method not allowed"});try{let c=a.body?.projectRoot||(0,k.aY)(),d=a.body?.relativePath;if(!c||!d)return b.status(400).json({error:"projectRoot and relativePath are required"});let e=(0,k.NW)(c),f=j.resolve(e,d);if(!f.startsWith(j.resolve(e)+j.sep))return b.status(400).json({error:"invalid relativePath"});if(!i.existsSync(f))return b.status(404).json({error:"file or folder not found"});let g=i.statSync(f),h=g.isDirectory()?function a(b,c){let d=[];for(let e of i.readdirSync(b,{withFileTypes:!0})){let f=j.join(b,e.name);e.isDirectory()?d.push(...a(f,c)):e.name.endsWith(".source.txt")||d.push(j.relative(c,f).split(j.sep).join("/"))}return d}(f,e):[d];if(0===h.length)return b.status(400).json({error:"folder has no indexable files"});let n=(0,l.ls)(c);if(n){let a=(0,m.JB)(c,n.operationId);return b.status(202).json({success:!0,accepted:!0,alreadyRunning:!0,operationId:n.operationId,job:a})}let o=`file-reindex-${Date.now()}-${Math.random().toString(36).slice(2)}`,p=g.isDirectory()?`重新解析文件夹 ${d}`:`重新解析 ${d}`,q=(0,m.Qf)(c,{id:o,type:"reindex",title:p,stage:"uploading",status:"processing",percent:5,message:g.isDirectory()?`文件夹重新解析任务已提交,共 ${h.length} 个文件`:"单文件重新解析任务已提交,正在后台排队执行",filePath:d,fileName:d.split("/").filter(Boolean).pop()});return(0,l.DA)({id:o,projectRoot:c,relativePath:d,relativePaths:h,forceReindexAll:!1}),b.status(202).json({success:!0,accepted:!0,operationId:o,job:q,fileCount:h.length})}catch(a){console.error("[api] kb/files/reindex",a),b.status(500).json({error:"Internal server error"})}}var o=c(68970),p=c(50296);let q=(0,h.M)(d,"default"),r=(0,h.M)(d,"config"),s=new g.PagesAPIRouteModule({definition:{kind:f.A.PAGES_API,page:"/api/kb/files/reindex",pathname:"/api/kb/files/reindex",bundlePath:"",filename:""},userland:d,distDir:".next",relativeProjectDir:""});async function t(a,b,c){let d=await s.prepare(a,b,{srcPage:"/api/kb/files/reindex"});if(!d){b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve());return}let{query:f,params:g,prerenderManifest:h,routerServerContext:i}=d;try{let c=a.method||"GET",d=(0,o.getTracer)(),e=d.getActiveScopeSpan(),j=s.instrumentationOnRequestError.bind(s),k=async e=>s.render(a,b,{query:{...f,...g},params:g,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:h.preview,propagateError:!1,dev:s.isDev,page:"/api/kb/files/reindex",internalRevalidate:null==i?void 0:i.revalidate,onError:(...b)=>j(a,...b)}).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let f=d.getRootSpanAttributes();if(!f)return;if(f.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${f.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let g=f.get("next.route");if(g){let a=`${c} ${g}`;e.setAttributes({"next.route":g,"http.route":g,"next.span_name":a}),e.updateName(a)}else e.updateName(`${c} ${a.url}`)});e?await k(e):await d.withPropagatedContext(a.headers,()=>d.trace(p.BaseServerSpan.handleRequest,{spanName:`${c} ${a.url}`,kind:o.SpanKind.SERVER,attributes:{"http.method":c,"http.target":a.url}},k))}catch(a){if(s.isDev)throw a;(0,e.sendError)(b,500,"Internal Server Error")}finally{null==c.waitUntil||c.waitUntil.call(c,Promise.resolve())}}},87550:a=>{a.exports=require("better-sqlite3")},95393:a=>{a.exports=require("@customize-agent/llm")},96770:a=>{a.exports=require("@customize-agent/runtime")}};var b=require("../../../../webpack-api-runtime.js");b.C(a);var c=b.X(0,[9705,1001,5840,208,6482,5284],()=>b(b.s=87176));module.exports=c})();