@customize-agent/server 4.0.50 → 4.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/chunks/432.js +5 -0
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/api/kb/files/reindex.js +1 -5
- package/.next/server/pages/api/kb/files/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/reindex.js +1 -5
- package/.next/server/pages/api/kb/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload.js +1 -5
- package/.next/server/pages/api/kb/upload.js.nft.json +1 -1
- package/.next/server/pages/asset-library.html +1 -1
- package/.next/server/pages/context/long-term.html +1 -1
- package/.next/server/pages/context/short-term.html +1 -1
- package/.next/server/pages/document-roles.html +1 -1
- package/.next/server/pages/documents.html +1 -1
- package/.next/server/pages/guide.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/knowledge/file-detail.html +1 -1
- package/.next/server/pages/knowledge/files.html +1 -1
- package/.next/server/pages/knowledge/manage.html +1 -1
- package/.next/server/pages/knowledge/search.html +1 -1
- package/.next/server/pages/knowledge.html +1 -1
- package/.next/server/pages/models.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/prompt.html +1 -1
- package/.next/server/pages/settings.html +1 -1
- package/.next/server/pages/system/logs.html +1 -1
- package/.next/server/pages-manifest.json +25 -25
- package/package.json +4 -4
- /package/.next/static/{CJlmeaK1PDR-c4sfDG8EN → Ki0fhhnkp5kCGWyYdaCEa}/_buildManifest.js +0 -0
- /package/.next/static/{CJlmeaK1PDR-c4sfDG8EN → Ki0fhhnkp5kCGWyYdaCEa}/_ssgManifest.js +0 -0
package/.next/BUILD_ID
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Ki0fhhnkp5kCGWyYdaCEa
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"ampDevFiles": [],
|
|
7
7
|
"lowPriorityFiles": [
|
|
8
|
-
"static/
|
|
9
|
-
"static/
|
|
8
|
+
"static/Ki0fhhnkp5kCGWyYdaCEa/_buildManifest.js",
|
|
9
|
+
"static/Ki0fhhnkp5kCGWyYdaCEa/_ssgManifest.js"
|
|
10
10
|
],
|
|
11
11
|
"rootMainFiles": [],
|
|
12
12
|
"rootMainFilesTree": {},
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"routes": {},
|
|
4
4
|
"dynamicRoutes": {},
|
|
5
5
|
"preview": {
|
|
6
|
-
"previewModeId": "
|
|
7
|
-
"previewModeSigningKey": "
|
|
8
|
-
"previewModeEncryptionKey": "
|
|
6
|
+
"previewModeId": "5c3b2fa17f84cd0401a8b93dc0a01b65",
|
|
7
|
+
"previewModeSigningKey": "c142ba7ad58ee8c931c0991384c8a1d1bbcd89430e9226d7dc8351b3717f06f3",
|
|
8
|
+
"previewModeEncryptionKey": "73cb13e924484c3d355020772cecaf27f71a985353b554356fb4b258fb6285fc"
|
|
9
9
|
},
|
|
10
10
|
"notFoundRoutes": []
|
|
11
11
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";exports.id=432,exports.ids=[432],exports.modules={6708:(a,b,c)=>{c.d(b,{CU:()=>q,H7:()=>p,JB:()=>m,Qf:()=>k,kW:()=>n,oy:()=>l,sn:()=>o});var d=c(29021),e=c(21820),f=c(33873),g=c(19898);function h(a){return f.join(e.homedir(),".customize-agent","projects",(0,g.computeProjectId)(a),"kb-operations.jsonl")}function i(a){let b=h(a);return d.existsSync(b)?d.readFileSync(b,"utf8").split("\n").filter(Boolean).flatMap(a=>{try{return[JSON.parse(a)]}catch{return[]}}):[]}function j(a,b){let c=h(a);d.mkdirSync(f.dirname(c),{recursive:!0}),d.writeFileSync(c,`${b.slice(-200).map(a=>JSON.stringify(a)).join("\n")}
|
|
2
|
+
`,"utf8")}function k(a,b){let c=Date.now(),d=i(a),e=d.findIndex(a=>a.id===b.id),f=e>=0?d[e]:void 0,g={id:b.id,type:b.type,title:b.title,stage:b.stage??f?.stage??"uploading",status:b.status??f?.status??"processing",message:b.message??f?.message??"",percent:b.percent??f?.percent??0,fileName:b.fileName??f?.fileName,filePath:b.filePath??f?.filePath,chunkCount:b.chunkCount??f?.chunkCount,textLength:b.textLength??f?.textLength,extractionMode:b.extractionMode??f?.extractionMode,error:b.error??f?.error,createdAt:f?.createdAt??c,updatedAt:c};return e>=0?d[e]=g:d.push(g),j(a,d),g}function l(a,b=50){return i(a).sort((a,b)=>b.updatedAt-a.updatedAt).slice(0,b)}function m(a,b){return i(a).find(a=>a.id===b)}function n(a,b){return i(a).filter(a=>!b||a.type===b).sort((a,b)=>b.updatedAt-a.updatedAt)[0]}function o(a){return i(a).filter(a=>"processing"===a.status).sort((a,b)=>b.updatedAt-a.updatedAt)}function p(a){let b=i(a),c=h(a);return d.existsSync(c)&&d.unlinkSync(c),b.length}function q(a,b){let c=i(a),d=c.filter(a=>a.id!==b);return d.length!==c.length&&(j(a,d),!0)}},23328:(a,b,c)=>{c.d(b,{Qh:()=>l,VS:()=>p,Yy:()=>o,aY:()=>n});var d=c(19898),e=c(87550),f=c.n(e),g=c(33873),h=c(21820),i=c(29021);let j=null;function k(){return g.join(h.homedir(),".customize-agent")}function l(){return j||(j=new d.MultiProjectManager(k())),j}function m(a){let b=g.resolve(a),c=g.resolve(g.join(h.homedir(),".customize-agent"));return!(i.existsSync(g.join(b,"pnpm-workspace.yaml"))&&i.existsSync(g.join(b,"apps","server")))&&(b===c||b.includes(`${g.sep}.customize-agent${g.sep}`)||b.endsWith(`${g.sep}apps${g.sep}server`)||b.endsWith(`${g.sep}apps${g.sep}cli`))}function n(){let a=process.env.CUSTOMIZE_PROJECT_ROOT??process.env.INIT_CWD;if(a&&i.existsSync(a)&&!m(a))return g.resolve(a);let b=function(){let a=g.join(k(),"projects","registry.db");if(!i.existsSync(a))return[];let b=new(f())(a,{readonly:!0});try{return b.prepare("SELECT project_root FROM project_registry ORDER BY last_opened_at DESC").all().map(a=>g.resolve(a.project_root)).filter(a=>!m(a))}finally{b.close()}}();return b.length>0?b[0]:process.env.INIT_CWD&&!m(process.env.INIT_CWD)?process.env.INIT_CWD:g.resolve(process.cwd(),"../..")}function o(a,b={}){let c=new Map;for(let b of function(a){let b=g.join(h.homedir(),".customize-agent","projects",(0,d.computeProjectId)(g.resolve(a)),"kb.db");if(!i.existsSync(b))return[];let c=new d.IndexStateStore(b);try{return c.listRecords().map(a=>({...a,matchedBy:"metadata"}))}finally{c.close()}}(a))c.set(b.relativePath,b);for(let b of function(a){let b=g.join(a,"knowledgeBase");if(!i.existsSync(b))return[];let c=[],d=a=>{for(let e of i.readdirSync(a,{withFileTypes:!0})){let f=g.join(a,e.name);if(e.isDirectory()){d(f);continue}if(e.name.endsWith(".source.txt"))continue;let h=i.statSync(f),j=g.relative(b,f).split(g.sep).join("/");c.push({relativePath:j,category:j.includes("表格数据/")?"spreadsheet":j.includes("图片素材/")?"image":j.includes("图纸文件/")?"cad":j.includes("文档资料/")?"document":"other",format:g.extname(j).slice(1).toLowerCase()||"text",contentHash:"",fileSize:h.size,mtime:h.mtimeMs,chunkCount:0,collectionName:"",indexedAt:0,lastVerifiedAt:0,status:"disk",matchedBy:"disk"})}};return d(b),c}(a)){let a=c.get(b.relativePath);c.set(b.relativePath,a?{...a,fileSize:b.fileSize,mtime:b.mtime,matchedBy:"metadata"}:b)}return Array.from(c.values()).filter(a=>!b.category||a.category===b.category).sort((a,b)=>b.mtime-a.mtime||a.relativePath.localeCompare(b.relativePath,"zh-CN"))}async function p(a,b={}){let c=(b.query||"").trim(),d=Math.max(1,Math.min(500,b.limit??50)),e=new Map,f=o(a,{category:b.category});for(let a of f)(!c||`${a.relativePath}
|
|
3
|
+
${a.category}
|
|
4
|
+
${a.format}
|
|
5
|
+
${a.status}`.toLowerCase().includes(c.toLowerCase()))&&e.set(a.relativePath,{...a,matchedBy:c?"path":a.matchedBy});if(c&&!1!==b.includeContent)try{for(let b of(await l().search(a,c,{limit:Math.max(20,d)})).results){let a=b.filePath,c=e.get(a)||f.find(b=>b.relativePath===a);e.set(a,{...c||{relativePath:a,category:"content",format:"knowledge",fileSize:0,mtime:0,chunkCount:0,indexedAt:0,lastVerifiedAt:0,status:"active"},matchedBy:"content",score:b.score})}}catch{}let g=Array.from(e.values()).sort((a,b)=>{let c=a=>"content"===a.matchedBy?3:"path"===a.matchedBy?2:+("metadata"===a.matchedBy);return c(b)-c(a)||(b.score??0)-(a.score??0)||b.mtime-a.mtime||a.relativePath.localeCompare(b.relativePath,"zh-CN")});return{files:g.slice(0,d),total:g.length}}},70432:(a,b,c)=>{c.d(b,{DA:()=>k,ls:()=>l});var d=c(79646),e=c(33873),f=c.n(e),g=c(23328),h=c(6708);let i=new Map;async function j(a,b,c,d){let e;try{e=await (0,g.Qh)().getProject(a.projectRoot);let f=e=>{var f;return(0,h.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})},i=a.relativePath?await e.reindexFile(a.relativePath,{vectorMode:a.vectorMode,onProgress:f}):a.forceReindexAll?await e.forceReindexAll({vectorMode:a.vectorMode,onProgress:f}):await e.consumePendingIndexJobs({vectorMode:a.vectorMode,onProgress:f,waitForUploadId:a.uploadOperationId}),j=0;for(;!a.relativePath&&(e.countPendingIndexJobs()>0||a.uploadOperationId&&e.uploadSessionIsOpen(a.uploadOperationId)&&j<120);){if(0===e.countPendingIndexJobs()){j+=1,await new Promise(a=>setTimeout(a,1e3));continue}j=0;let b=await e.consumePendingIndexJobs({vectorMode:a.vectorMode,onProgress:f,waitForUploadId:a.uploadOperationId});i={newFiles:[...i.newFiles,...b.newFiles],modifiedFiles:[...i.modifiedFiles,...b.modifiedFiles],deletedFiles:[...i.deletedFiles,...b.deletedFiles],unchangedCount:i.unchangedCount+b.unchangedCount,mtimeOnlyCount:i.mtimeOnlyCount+b.mtimeOnlyCount,skippedFiles:[...i.skippedFiles,...b.skippedFiles],hasChanges:i.hasChanges||b.hasChanges,diffTimeMs:i.diffTimeMs+b.diffTimeMs}}let k=e.getVectorStatus();if("error"===k.status){let f=k.error||"HNSWLib 向量入库失败";return(0,h.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"error",status:"error",percent:100,message:f,error:f}),{success:!1,error:f,stats:{...e.getStats(),vectorStatus:k}}}return(0,h.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:k}}}catch(g){let f=g instanceof Error?g.stack||g.message:String(g);return e?.failPendingIndexJobs?.(f),(0,h.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"error",status:"error",percent:100,message:f,error:f}),{success:!1,error:f}}}function k(a){!function(a){let b=i.get(a.projectRoot);if(b)return b.promise;let c=a.uploadOperationId??a.id,e=a.uploadOperationId?"upload":"reindex",g=a.uploadOperationId?`上传 ${a.uploadTitle??"文件"}`:a.relativePath?`重新解析 ${a.relativePath}`:"知识库后台索引";(0,h.Qf)(a.projectRoot,{id:c,type:e,title:g,stage:"uploading",status:"processing",percent:5,message:"索引任务已进入后台队列",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()});let k=("1"===process.env.CUSTOMIZE_AGENT_DISABLE_KB_CHILD_PROCESS?j(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 i=(0,d.fork)(g,[JSON.stringify({...a,operationId:b})],{cwd:process.cwd(),stdio:["ignore","pipe","pipe","ipc"],env:process.env});i.stdout?.on("data",d=>{let f=String(d).trim();f&&(0,h.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"parsing",status:"processing",percent:5,message:`后台索引输出:${f.slice(-1e3)}`})}),i.stderr?.on("data",d=>{let f=String(d).trim();f&&(0,h.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"parsing",status:"processing",percent:5,message:`后台索引错误输出:${f.slice(-1e3)}`})}),i.on("error",d=>{let g=d instanceof Error?d.message:String(d);(0,h.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"error",status:"error",percent:100,message:g,error:g}),f({success:!1,error:g})}),i.on("exit",d=>{if(0===d)f({success:!0});else{let g=`知识库后台进程退出,退出码 ${d??"unknown"}`;(0,h.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"error",status:"error",percent:100,message:g,error:g}),f({success:!1,error:g})}})})}(a,c,e,g)).finally(()=>i.delete(a.projectRoot));i.set(a.projectRoot,{operationId:c,promise:k,startedAt:Date.now()})}(a)}function l(a){let b=i.get(a);return b?{operationId:b.operationId,startedAt:b.startedAt}:void 0}}};
|
|
@@ -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/38dba0a7a42a8df3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/38dba0a7a42a8df3.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-77d10b4726f13aa5.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-62cd5d1172d08036.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/CJlmeaK1PDR-c4sfDG8EN/_buildManifest.js" defer=""></script><script src="/_next/static/CJlmeaK1PDR-c4sfDG8EN/_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="sidebarLogoTitle" style="font-size:20px;font-weight:800;letter-spacing:0.5px"><span class="logoGradient">Customize Agent</span></div></div></a><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><nav class="sidebarNav"><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>总览</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>知识库</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>模型配置</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>提示词管理</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>角色配置</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>工作流模版库</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>生成资源</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-brain"><path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"></path><path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"></path><path d="M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"></path><path d="M17.599 6.5a3 3 0 0 0 .399-1.375"></path><path d="M6.003 5.125A3 3 0 0 0 6.401 6.5"></path><path d="M3.477 10.896a4 4 0 0 1 .585-.396"></path><path d="M19.938 10.5a4 4 0 0 1 .585.396"></path><path d="M6 18a4 4 0 0 1-1.967-.516"></path><path d="M19.967 17.484A4 4 0 0 1 18 18"></path></svg><span>上下文工程</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="/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>系统日志</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>指引</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>设置</span></div></a></nav></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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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":"CJlmeaK1PDR-c4sfDG8EN","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/38dba0a7a42a8df3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/38dba0a7a42a8df3.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-77d10b4726f13aa5.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-62cd5d1172d08036.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/Ki0fhhnkp5kCGWyYdaCEa/_buildManifest.js" defer=""></script><script src="/_next/static/Ki0fhhnkp5kCGWyYdaCEa/_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="sidebarLogoTitle" style="font-size:20px;font-weight:800;letter-spacing:0.5px"><span class="logoGradient">Customize Agent</span></div></div></a><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><nav class="sidebarNav"><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>总览</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>知识库</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>模型配置</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>提示词管理</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>角色配置</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>工作流模版库</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>生成资源</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-brain"><path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"></path><path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"></path><path d="M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"></path><path d="M17.599 6.5a3 3 0 0 0 .399-1.375"></path><path d="M6.003 5.125A3 3 0 0 0 6.401 6.5"></path><path d="M3.477 10.896a4 4 0 0 1 .585-.396"></path><path d="M19.938 10.5a4 4 0 0 1 .585.396"></path><path d="M6 18a4 4 0 0 1-1.967-.516"></path><path d="M19.967 17.484A4 4 0 0 1 18 18"></path></svg><span>上下文工程</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="/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>系统日志</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>指引</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>设置</span></div></a></nav></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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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":"Ki0fhhnkp5kCGWyYdaCEa","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/38dba0a7a42a8df3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/38dba0a7a42a8df3.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-77d10b4726f13aa5.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-62cd5d1172d08036.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/CJlmeaK1PDR-c4sfDG8EN/_buildManifest.js" defer=""></script><script src="/_next/static/CJlmeaK1PDR-c4sfDG8EN/_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="sidebarLogoTitle" style="font-size:20px;font-weight:800;letter-spacing:0.5px"><span class="logoGradient">Customize Agent</span></div></div></a><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><nav class="sidebarNav"><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>总览</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>知识库</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>模型配置</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>提示词管理</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>角色配置</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>工作流模版库</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>生成资源</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-brain"><path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"></path><path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"></path><path d="M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"></path><path d="M17.599 6.5a3 3 0 0 0 .399-1.375"></path><path d="M6.003 5.125A3 3 0 0 0 6.401 6.5"></path><path d="M3.477 10.896a4 4 0 0 1 .585-.396"></path><path d="M19.938 10.5a4 4 0 0 1 .585.396"></path><path d="M6 18a4 4 0 0 1-1.967-.516"></path><path d="M19.967 17.484A4 4 0 0 1 18 18"></path></svg><span>上下文工程</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="/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>系统日志</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>指引</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>设置</span></div></a></nav></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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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":"CJlmeaK1PDR-c4sfDG8EN","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/38dba0a7a42a8df3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/38dba0a7a42a8df3.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-77d10b4726f13aa5.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-62cd5d1172d08036.js" defer=""></script><script src="/_next/static/chunks/pages/_error-282257fbdcc167b4.js" defer=""></script><script src="/_next/static/Ki0fhhnkp5kCGWyYdaCEa/_buildManifest.js" defer=""></script><script src="/_next/static/Ki0fhhnkp5kCGWyYdaCEa/_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="sidebarLogoTitle" style="font-size:20px;font-weight:800;letter-spacing:0.5px"><span class="logoGradient">Customize Agent</span></div></div></a><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><nav class="sidebarNav"><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>总览</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>知识库</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>模型配置</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>提示词管理</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>角色配置</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>工作流模版库</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>生成资源</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-brain"><path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"></path><path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"></path><path d="M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"></path><path d="M17.599 6.5a3 3 0 0 0 .399-1.375"></path><path d="M6.003 5.125A3 3 0 0 0 6.401 6.5"></path><path d="M3.477 10.896a4 4 0 0 1 .585-.396"></path><path d="M19.938 10.5a4 4 0 0 1 .585.396"></path><path d="M6 18a4 4 0 0 1-1.967-.516"></path><path d="M19.967 17.484A4 4 0 0 1 18 18"></path></svg><span>上下文工程</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="/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>系统日志</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>指引</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>设置</span></div></a></nav></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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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":"Ki0fhhnkp5kCGWyYdaCEa","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=5796,a.ids=[5796],a.modules={
|
|
2
|
-
`,"utf8")}function k(a,b){let c=Date.now(),d=i(a),e=d.findIndex(a=>a.id===b.id),f=e>=0?d[e]:void 0,g={id:b.id,type:b.type,title:b.title,stage:b.stage??f?.stage??"uploading",status:b.status??f?.status??"processing",message:b.message??f?.message??"",percent:b.percent??f?.percent??0,fileName:b.fileName??f?.fileName,filePath:b.filePath??f?.filePath,chunkCount:b.chunkCount??f?.chunkCount,textLength:b.textLength??f?.textLength,extractionMode:b.extractionMode??f?.extractionMode,error:b.error??f?.error,createdAt:f?.createdAt??c,updatedAt:c};return e>=0?d[e]=g:d.push(g),j(a,d),g}function l(a,b=50){return i(a).sort((a,b)=>b.updatedAt-a.updatedAt).slice(0,b)}function m(a,b){return i(a).find(a=>a.id===b)}function n(a,b){return i(a).filter(a=>!b||a.type===b).sort((a,b)=>b.updatedAt-a.updatedAt)[0]}function o(a){return i(a).filter(a=>"processing"===a.status).sort((a,b)=>b.updatedAt-a.updatedAt)}function p(a){let b=i(a),c=h(a);return d.existsSync(c)&&d.unlinkSync(c),b.length}function q(a,b){let c=i(a),d=c.filter(a=>a.id!==b);return d.length!==c.length&&(j(a,d),!0)}},19898:a=>{a.exports=require("@customize-agent/knowledge")},21820:a=>{a.exports=require("os")},23328:(a,b,c)=>{c.d(b,{Qh:()=>l,VS:()=>p,Yy:()=>o,aY:()=>n});var d=c(19898),e=c(87550),f=c.n(e),g=c(33873),h=c(21820),i=c(29021);let j=null;function k(){return g.join(h.homedir(),".customize-agent")}function l(){return j||(j=new d.MultiProjectManager(k())),j}function m(a){let b=g.resolve(a),c=g.resolve(g.join(h.homedir(),".customize-agent"));return!(i.existsSync(g.join(b,"pnpm-workspace.yaml"))&&i.existsSync(g.join(b,"apps","server")))&&(b===c||b.includes(`${g.sep}.customize-agent${g.sep}`)||b.endsWith(`${g.sep}apps${g.sep}server`)||b.endsWith(`${g.sep}apps${g.sep}cli`))}function n(){let a=process.env.CUSTOMIZE_PROJECT_ROOT??process.env.INIT_CWD;if(a&&i.existsSync(a)&&!m(a))return g.resolve(a);let b=function(){let a=g.join(k(),"projects","registry.db");if(!i.existsSync(a))return[];let b=new(f())(a,{readonly:!0});try{return b.prepare("SELECT project_root FROM project_registry ORDER BY last_opened_at DESC").all().map(a=>g.resolve(a.project_root)).filter(a=>!m(a))}finally{b.close()}}();return b.length>0?b[0]:process.env.INIT_CWD&&!m(process.env.INIT_CWD)?process.env.INIT_CWD:g.resolve(process.cwd(),"../..")}function o(a,b={}){let c=new Map;for(let b of function(a){let b=g.join(h.homedir(),".customize-agent","projects",(0,d.computeProjectId)(g.resolve(a)),"kb.db");if(!i.existsSync(b))return[];let c=new d.IndexStateStore(b);try{return c.listRecords().map(a=>({...a,matchedBy:"metadata"}))}finally{c.close()}}(a))c.set(b.relativePath,b);for(let b of function(a){let b=g.join(a,"knowledgeBase");if(!i.existsSync(b))return[];let c=[],d=a=>{for(let e of i.readdirSync(a,{withFileTypes:!0})){let f=g.join(a,e.name);if(e.isDirectory()){d(f);continue}if(e.name.endsWith(".source.txt"))continue;let h=i.statSync(f),j=g.relative(b,f).split(g.sep).join("/");c.push({relativePath:j,category:j.includes("表格数据/")?"spreadsheet":j.includes("图片素材/")?"image":j.includes("图纸文件/")?"cad":j.includes("文档资料/")?"document":"other",format:g.extname(j).slice(1).toLowerCase()||"text",contentHash:"",fileSize:h.size,mtime:h.mtimeMs,chunkCount:0,collectionName:"",indexedAt:0,lastVerifiedAt:0,status:"disk",matchedBy:"disk"})}};return d(b),c}(a)){let a=c.get(b.relativePath);c.set(b.relativePath,a?{...a,fileSize:b.fileSize,mtime:b.mtime,matchedBy:"metadata"}:b)}return Array.from(c.values()).filter(a=>!b.category||a.category===b.category).sort((a,b)=>b.mtime-a.mtime||a.relativePath.localeCompare(b.relativePath,"zh-CN"))}async function p(a,b={}){let c=(b.query||"").trim(),d=Math.max(1,Math.min(500,b.limit??50)),e=new Map,f=o(a,{category:b.category});for(let a of f)(!c||`${a.relativePath}
|
|
3
|
-
${a.category}
|
|
4
|
-
${a.format}
|
|
5
|
-
${a.status}`.toLowerCase().includes(c.toLowerCase()))&&e.set(a.relativePath,{...a,matchedBy:c?"path":a.matchedBy});if(c&&!1!==b.includeContent)try{for(let b of(await l().search(a,c,{limit:Math.max(20,d)})).results){let a=b.filePath,c=e.get(a)||f.find(b=>b.relativePath===a);e.set(a,{...c||{relativePath:a,category:"content",format:"knowledge",fileSize:0,mtime:0,chunkCount:0,indexedAt:0,lastVerifiedAt:0,status:"active"},matchedBy:"content",score:b.score})}}catch{}let g=Array.from(e.values()).sort((a,b)=>{let c=a=>"content"===a.matchedBy?3:"path"===a.matchedBy?2:+("metadata"===a.matchedBy);return c(b)-c(a)||(b.score??0)-(a.score??0)||b.mtime-a.mtime||a.relativePath.localeCompare(b.relativePath,"zh-CN")});return{files:g.slice(0,d),total:g.length}}},29021:a=>{a.exports=require("fs")},33873:a=>{a.exports=require("path")},70432:(a,b,c)=>{c.d(b,{DA:()=>k,ls:()=>l});var d=c(79646),e=c(33873),f=c.n(e),g=c(23328),h=c(6708);let i=new Map;async function j(a,b,c,d){let e;try{e=await (0,g.Qh)().getProject(a.projectRoot);let f=e=>{var f;return(0,h.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})},i=a.relativePath?await e.reindexFile(a.relativePath,{vectorMode:a.vectorMode,onProgress:f}):a.forceReindexAll?await e.forceReindexAll({vectorMode:a.vectorMode,onProgress:f}):await e.consumePendingIndexJobs({vectorMode:a.vectorMode,onProgress:f,waitForUploadId:a.uploadOperationId}),j=0;for(;!a.relativePath&&(e.countPendingIndexJobs()>0||a.uploadOperationId&&e.uploadSessionIsOpen(a.uploadOperationId)&&j<120);){if(0===e.countPendingIndexJobs()){j+=1,await new Promise(a=>setTimeout(a,1e3));continue}j=0;let b=await e.consumePendingIndexJobs({vectorMode:a.vectorMode,onProgress:f,waitForUploadId:a.uploadOperationId});i={newFiles:[...i.newFiles,...b.newFiles],modifiedFiles:[...i.modifiedFiles,...b.modifiedFiles],deletedFiles:[...i.deletedFiles,...b.deletedFiles],unchangedCount:i.unchangedCount+b.unchangedCount,mtimeOnlyCount:i.mtimeOnlyCount+b.mtimeOnlyCount,skippedFiles:[...i.skippedFiles,...b.skippedFiles],hasChanges:i.hasChanges||b.hasChanges,diffTimeMs:i.diffTimeMs+b.diffTimeMs}}let k=e.getVectorStatus();if("error"===k.status){let f=k.error||"HNSWLib 向量入库失败";return(0,h.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"error",status:"error",percent:100,message:f,error:f}),{success:!1,error:f,stats:{...e.getStats(),vectorStatus:k}}}return(0,h.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:k}}}catch(g){let f=g instanceof Error?g.stack||g.message:String(g);return e?.failPendingIndexJobs?.(f),(0,h.Qf)(a.projectRoot,{id:b,type:c,title:d,stage:"error",status:"error",percent:100,message:f,error:f}),{success:!1,error:f}}}function k(a){!function(a){let b=i.get(a.projectRoot);if(b)return b.promise;let c=a.uploadOperationId??a.id,e=a.uploadOperationId?"upload":"reindex",g=a.uploadOperationId?`上传 ${a.uploadTitle??"文件"}`:a.relativePath?`重新解析 ${a.relativePath}`:"知识库后台索引";(0,h.Qf)(a.projectRoot,{id:c,type:e,title:g,stage:"uploading",status:"processing",percent:5,message:"索引任务已进入后台队列",filePath:a.relativePath,fileName:a.relativePath?.split("/").pop()});let k=("1"===process.env.CUSTOMIZE_AGENT_DISABLE_KB_CHILD_PROCESS?j(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 i=(0,d.fork)(g,[JSON.stringify({...a,operationId:b})],{cwd:process.cwd(),stdio:["ignore","ignore","ignore","ipc"],env:process.env});i.on("error",d=>{let g=d instanceof Error?d.message:String(d);(0,h.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"error",status:"error",percent:100,message:g,error:g}),f({success:!1,error:g})}),i.on("exit",d=>{if(0===d)f({success:!0});else{let g=`知识库后台进程退出,退出码 ${d??"unknown"}`;(0,h.Qf)(a.projectRoot,{id:b,type:c,title:e,stage:"error",status:"error",percent:100,message:g,error:g}),f({success:!1,error:g})}})})}(a,c,e,g)).finally(()=>i.delete(a.projectRoot));i.set(a.projectRoot,{operationId:c,promise:k,startedAt:Date.now()})}(a)}function l(a){let b=i.get(a);return b?{operationId:b.operationId,startedAt:b.startedAt}:void 0}},75600:a=>{a.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(23328),l=c(70432),m=c(6708);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=j.join(c,"knowledgeBase"),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 not found"});let g=(0,l.ls)(c);if(g){let a=(0,m.JB)(c,g.operationId);return b.status(202).json({success:!0,accepted:!0,alreadyRunning:!0,operationId:g.operationId,job:a})}let h=`file-reindex-${Date.now()}-${Math.random().toString(36).slice(2)}`,n=`重新解析 ${d}`,o=(0,m.Qf)(c,{id:h,type:"reindex",title:n,stage:"uploading",status:"processing",percent:5,message:"单文件重新解析任务已提交,正在后台排队执行",filePath:d,fileName:d.split("/").pop()});return(0,l.DA)({id:h,projectRoot:c,relativePath:d,forceReindexAll:!1}),b.status(202).json({success:!0,accepted:!0,operationId:h,job:o})}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")}};var b=require("../../../../webpack-api-runtime.js");b.C(a);var c=b.X(0,[9705],()=>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")},75600:a=>{a.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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(23328),l=c(70432),m=c(6708);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=j.join(c,"knowledgeBase"),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 not found"});let g=(0,l.ls)(c);if(g){let a=(0,m.JB)(c,g.operationId);return b.status(202).json({success:!0,accepted:!0,alreadyRunning:!0,operationId:g.operationId,job:a})}let h=`file-reindex-${Date.now()}-${Math.random().toString(36).slice(2)}`,n=`重新解析 ${d}`,o=(0,m.Qf)(c,{id:h,type:"reindex",title:n,stage:"uploading",status:"processing",percent:5,message:"单文件重新解析任务已提交,正在后台排队执行",filePath:d,fileName:d.split("/").pop()});return(0,l.DA)({id:h,projectRoot:c,relativePath:d,forceReindexAll:!1}),b.status(202).json({success:!0,accepted:!0,operationId:h,job:o})}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")}};var b=require("../../../../webpack-api-runtime.js");b.C(a);var c=b.X(0,[9705,432],()=>b(b.s=87176));module.exports=c})();
|