@customize-agent/server 4.59.0 → 4.59.2
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 +9 -9
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/chunks/1928.js +1 -1
- package/.next/server/chunks/{5547.js → 4435.js} +31 -31
- package/.next/server/chunks/6321.js +1 -1
- package/.next/server/chunks/8204.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/api/assets/generated/preview.js +1 -1
- package/.next/server/pages/api/assets/generated/preview.js.nft.json +1 -1
- package/.next/server/pages/api/assets/generated.js +1 -1
- package/.next/server/pages/api/assets/generated.js.nft.json +1 -1
- package/.next/server/pages/api/documents/canvas/[id].js +1 -1
- package/.next/server/pages/api/documents/canvas/[id].js.nft.json +1 -1
- package/.next/server/pages/api/documents/export.js +1 -1
- package/.next/server/pages/api/documents/export.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generate/preview.js +1 -1
- package/.next/server/pages/api/documents/generate/preview.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generate.js +1 -1
- package/.next/server/pages/api/documents/generate.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/events.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/events.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/figure/[name].js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/figure/[name].js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/nodes/[nodeId].js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/nodes/[nodeId].js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/nodes.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/nodes.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/pause.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/pause.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/preview.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/preview.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/repair/[rid]/confirm.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/repair/[rid]/confirm.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/repair/[rid]/rollback.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/repair/[rid]/rollback.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/repair.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/repair.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id]/resume-generate.js +1 -1
- package/.next/server/pages/api/documents/generated/[id]/resume-generate.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id].js +1 -1
- package/.next/server/pages/api/documents/generated/[id].js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated.js +1 -1
- package/.next/server/pages/api/documents/generated.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/reindex.js +1 -1
- package/.next/server/pages/api/kb/files/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/intelligence.js +1 -1
- package/.next/server/pages/api/kb/intelligence.js.nft.json +1 -1
- package/.next/server/pages/api/kb/reindex.js +1 -1
- package/.next/server/pages/api/kb/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload/complete.js +1 -1
- package/.next/server/pages/api/kb/upload/complete.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload.js +1 -1
- package/.next/server/pages/api/kb/upload.js.nft.json +1 -1
- package/.next/server/pages/api/skills/[id].js +1 -1
- package/.next/server/pages/api/skills/[id].js.nft.json +1 -1
- package/.next/server/pages/api/skills/validate.js +1 -1
- package/.next/server/pages/api/skills/validate.js.nft.json +1 -1
- package/.next/server/pages/api/skills.js +1 -1
- package/.next/server/pages/api/skills.js.nft.json +1 -1
- package/.next/server/pages/api/system/data-health.js +2 -0
- package/.next/server/pages/api/system/data-health.js.nft.json +1 -0
- package/.next/server/pages/canvas/[id].html +1 -1
- package/.next/server/pages/canvas.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.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/skills.html +1 -1
- package/.next/server/pages/system/logs.html +1 -1
- package/.next/server/pages-manifest.json +33 -32
- package/.next/static/{Z8psgNSpy4sSg2lIho8Uw → 2MjosIoMmZUcFnY_P02ZD}/_buildManifest.js +1 -1
- package/.next/static/chunks/530-df2ce692cf0fa512.js +1 -0
- package/.next/static/chunks/795-81a3e3973fc43791.js +1 -0
- package/.next/static/chunks/pages/{_app-74fce107cacfaee7.js → _app-c560816f0a8a0815.js} +15 -15
- package/.next/static/chunks/pages/canvas/[id]-515edd3e72acaf82.js +1 -0
- package/.next/static/css/85c434f8fd3a17ae.css +1 -0
- package/package.json +1 -1
- package/scripts/half-built-scan.mjs +150 -0
- package/.next/static/chunks/530-1b18bb11570dc44a.js +0 -1
- package/.next/static/chunks/795-9e0cb0bb11e8c89f.js +0 -1
- package/.next/static/chunks/pages/canvas/[id]-9f4e9f49e512418b.js +0 -1
- package/.next/static/css/0e46e39b61e4e262.css +0 -1
- /package/.next/static/{Z8psgNSpy4sSg2lIho8Uw → 2MjosIoMmZUcFnY_P02ZD}/_ssgManifest.js +0 -0
package/.next/BUILD_ID
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2MjosIoMmZUcFnY_P02ZD
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"ampDevFiles": [],
|
|
7
7
|
"lowPriorityFiles": [
|
|
8
|
-
"static/
|
|
9
|
-
"static/
|
|
8
|
+
"static/2MjosIoMmZUcFnY_P02ZD/_buildManifest.js",
|
|
9
|
+
"static/2MjosIoMmZUcFnY_P02ZD/_ssgManifest.js"
|
|
10
10
|
],
|
|
11
11
|
"rootMainFiles": [],
|
|
12
12
|
"rootMainFilesTree": {},
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"static/chunks/framework-4b565b3ddc94cdac.js",
|
|
17
17
|
"static/chunks/main-0c91f573696223ca.js",
|
|
18
18
|
"static/chunks/880-64d8a15c524106d2.js",
|
|
19
|
-
"static/chunks/795-
|
|
19
|
+
"static/chunks/795-81a3e3973fc43791.js",
|
|
20
20
|
"static/chunks/pages/index-cb27bfa36c212ab5.js"
|
|
21
21
|
],
|
|
22
22
|
"/_app": [
|
|
23
23
|
"static/chunks/webpack-6224d37324e372cb.js",
|
|
24
24
|
"static/chunks/framework-4b565b3ddc94cdac.js",
|
|
25
25
|
"static/chunks/main-0c91f573696223ca.js",
|
|
26
|
-
"static/css/
|
|
27
|
-
"static/chunks/pages/_app-
|
|
26
|
+
"static/css/85c434f8fd3a17ae.css",
|
|
27
|
+
"static/chunks/pages/_app-c560816f0a8a0815.js"
|
|
28
28
|
],
|
|
29
29
|
"/_error": [
|
|
30
30
|
"static/chunks/webpack-6224d37324e372cb.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"static/chunks/700-5d29b0475311f590.js",
|
|
41
41
|
"static/chunks/174-1bc48f295d7dd075.js",
|
|
42
42
|
"static/chunks/243-03eba51d5d737e98.js",
|
|
43
|
-
"static/chunks/530-
|
|
43
|
+
"static/chunks/530-df2ce692cf0fa512.js",
|
|
44
44
|
"static/chunks/pages/canvas-323d44fe56d685a7.js"
|
|
45
45
|
],
|
|
46
46
|
"/canvas/[id]": [
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"static/chunks/243-03eba51d5d737e98.js",
|
|
56
56
|
"static/chunks/506-93f730bc149d0dce.js",
|
|
57
57
|
"static/chunks/709-a7c652953ccd3b4b.js",
|
|
58
|
-
"static/chunks/530-
|
|
59
|
-
"static/chunks/pages/canvas/[id]-
|
|
58
|
+
"static/chunks/530-df2ce692cf0fa512.js",
|
|
59
|
+
"static/chunks/pages/canvas/[id]-515edd3e72acaf82.js"
|
|
60
60
|
],
|
|
61
61
|
"/documents": [
|
|
62
62
|
"static/chunks/webpack-6224d37324e372cb.js",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"static/chunks/framework-4b565b3ddc94cdac.js",
|
|
132
132
|
"static/chunks/main-0c91f573696223ca.js",
|
|
133
133
|
"static/chunks/880-64d8a15c524106d2.js",
|
|
134
|
-
"static/chunks/795-
|
|
134
|
+
"static/chunks/795-81a3e3973fc43791.js",
|
|
135
135
|
"static/chunks/pages/overview-8713b5d37af0eeb3.js"
|
|
136
136
|
],
|
|
137
137
|
"/prompt": [
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"routes": {},
|
|
4
4
|
"dynamicRoutes": {},
|
|
5
5
|
"preview": {
|
|
6
|
-
"previewModeId": "
|
|
7
|
-
"previewModeSigningKey": "
|
|
8
|
-
"previewModeEncryptionKey": "
|
|
6
|
+
"previewModeId": "c4a237e87db087dffe69d177a5a2fd6d",
|
|
7
|
+
"previewModeSigningKey": "5c00043b1f346d4cc0632353b3f3020a74608295158553d9ecbb42a70d8e3478",
|
|
8
|
+
"previewModeEncryptionKey": "d57399c30d4e1512e5c90700f6e1a01894a3b64cd793d4b95d79494be65f4c5d"
|
|
9
9
|
},
|
|
10
10
|
"notFoundRoutes": []
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=1928,exports.ids=[1928],exports.modules={18463:(a,b,c)=>{c.d(b,{Zk:()=>f,dh:()=>g,wD:()=>e});var d=c(8732);c(82015);let e="rounded-xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] hover:shadow-[var(--shadowSurfaceHover)] transition-shadow";function f({title:a,count:b,description:c,extra:e,className:f,children:g}){return(0,d.jsxs)("section",{className:`rounded-2xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] p-6 animateFadeIn ${f??""}`,children:[(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start justify-between gap-3 mb-5",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide flex items-center gap-2 m-0",children:[a,void 0!==b&&(0,d.jsx)("span",{className:"text-[var(--colorTextTertiary)] font-normal text-sm",children:b})]}),c&&(0,d.jsx)("p",{className:"text-xs text-[var(--colorTextTertiary)] mt-1.5 mb-0 leading-relaxed max-w-3xl",children:c})]}),e]}),g]})}function g({children:a}){return(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:a})}},61928:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>o});var e=c(8732),f=c(82015),g=c(94487),h=c(60056),i=c(79270),j=c(22147),k=c(89668),l=c(18463),m=a([g]);function n({title:a,value:b,subtext:c,icon:d,colorClass:f,animationClass:g}){return(0,e.jsxs)("div",{className:`p-4 ${l.wD} flex flex-col justify-between animateFadeIn ${g||""}`,style:{opacity:0},children:[(0,e.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,e.jsx)("div",{className:"text-xs font-semibold text-[var(--colorTextSecondary)] tracking-wide uppercase",children:a}),d&&(0,e.jsx)("div",{className:f,style:{opacity:.7},children:d})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-3xl font-bold tracking-tight",children:b}),c&&(0,e.jsx)("div",{className:"text-xs mt-1 truncate font-medium",style:{color:"var(--colorTextTertiary)"},children:c})]})]})}function o(){let a=(0,g.Vr)(),{locale:b}=(0,g.x_)(),[c,d]=(0,f.useState)(null),[m,o]=(0,f.useState)(!0),[p,q]=(0,f.useState)(0),[r,s]=(0,f.useState)(0),[t,u]=(0,f.useState)(0),[v,w]=(0,f.useState)(0),[x,y]=(0,f.useState)(null),[z,A]=(0,f.useState)(null),B=(0,f.useCallback)(async()=>{o(!0);try{let[a,b,c,e,f,g]=await Promise.all([(0,j.FC)(),(0,j.Z3)().catch(()=>[]),(0,j.dx)().catch(()=>[]),(0,j.cQ)().catch(()=>({documents:[]})),(0,j.II)().catch(()=>null),(0,j.BO)().catch(()=>[])]);d(a),q(Array.isArray(b)?b.length:0),s(Array.isArray(c)?c.length:0),u(Array.isArray(e.documents)?e.documents.length:0),w(Array.isArray(g)?g.filter(a=>a.fileCount>0).length:0),y(f),A(Date.now())}catch{}finally{o(!1)}},[]),C=c?.tasks.total?Math.round(c.tasks.success/c.tasks.total*100):null,D=c?.models?.[0],E=c?.logs.latestAt?(0,k.fw)(new Date(c.logs.latestAt).getTime(),b):a("overview.noLogs");return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 border-b border-[var(--borderColor)]",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:a("overview.title")}),(0,e.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:a("overview.description")})]}),(0,e.jsxs)(h.$x,{children:[(0,e.jsxs)("span",{className:"text-xs font-mono",style:{color:"var(--colorTextTertiary)"},children:[a("overview.updated"),": ",z?new Date(z).toLocaleTimeString(b):"—"]}),(0,e.jsx)(h.$n,{type:"text",icon:(0,e.jsx)(i.ReloadOutlined,{spin:m}),onClick:()=>{B()}})]})]}),(0,e.jsx)(l.Zk,{title:a("overview.coreMetrics"),description:a("overview.coreMetricsDesc"),children:(0,e.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,e.jsx)(n,{title:a("overview.uptime"),value:(0,k.a3)(c?.serviceUptimeSeconds??0,b),subtext:`${a("overview.processUptime")} ${(0,k.a3)(c?.uptime??0,b)}`,icon:(0,e.jsx)(i.ApiOutlined,{size:16}),colorClass:"text-[var(--colorBrand)]",animationClass:"stagger-1"}),(0,e.jsx)(n,{title:a("overview.tokensUsed"),value:(c?.tokens.total??0).toLocaleString(),subtext:`P ${c?.tokens.prompt??0} / C ${c?.tokens.completion??0}`,icon:(0,e.jsx)(i.ThunderboltOutlined,{size:16}),colorClass:"text-[var(--colorWarn)]",animationClass:"stagger-2"}),(0,e.jsx)(n,{title:a("overview.tasksTotal"),value:(c?.tasks.total??0).toLocaleString(),subtext:`✓ ${c?.tasks.success??0} | ✗ ${c?.tasks.failed??0} | ↻ ${c?.tasks.running??0}`,icon:(0,e.jsx)(i.FileTextOutlined,{size:16}),colorClass:"text-[var(--colorInfo)]",animationClass:"stagger-3"}),(0,e.jsx)(n,{title:a("overview.successRate"),value:null===C?"—":`${C}%`,subtext:null===C?a("overview.noDataAvailable"):void 0,icon:null!==C&&C>80?(0,e.jsx)(i.CheckCircleOutlined,{size:16}):(0,e.jsx)(i.CloseCircleOutlined,{size:16}),colorClass:null!==C&&C>80?"text-[var(--colorOk)]":"text-[var(--colorDanger)]",animationClass:"stagger-4"})]})}),(0,e.jsx)(l.Zk,{title:a("overview.systemResources"),description:a("overview.systemResourcesDesc"),children:(0,e.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[(0,e.jsx)(n,{title:a("overview.materialUnderstanding"),value:v>0?String(v):"—",subtext:a(v>0?"overview.materialKinds":"common.noData"),animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.prompts"),value:r,animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.templateCount"),value:t,animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.semanticModel"),value:x?.provider==="openai-compatible"?a("overview.external"):x?a("overview.local"):"—",subtext:x?.model??a("overview.notConfigured"),animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.modelProviders"),value:p,animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.auditLogs"),value:c?.logs.events??0,subtext:`${a("overview.lastActivity")} ${E}`,animationClass:"stagger-5"})]})}),(0,e.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,e.jsx)(l.Zk,{title:a("overview.hardwareUsage"),description:a("overview.hardwareUsageDesc"),children:(0,e.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,e.jsxs)("div",{className:`flex items-center gap-4 p-4 ${l.wD}`,children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:c?.cpu.usagePercent??0,size:64,strokeColor:(c?.cpu.usagePercent??0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:10}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:a("overview.cpuUsage")}),(0,e.jsxs)("div",{className:"text-xl font-bold",children:[c?.cpu.usagePercent?.toFixed(1)??"0.0","%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[c?.cpu.cores??0," ",a("overview.cores")]})]})]}),(0,e.jsxs)("div",{className:`flex items-center gap-4 p-4 ${l.wD}`,children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:c?.memory.usagePercent??0,size:64,strokeColor:(c?.memory.usagePercent??0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:10}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:a("overview.memoryUsage")}),(0,e.jsxs)("div",{className:"text-xl font-bold",children:[c?.memory.usagePercent??0,"%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[c?.memory.processMB??0," MB / ",c?.memory.totalMB??0," MB"]})]})]})]})}),(0,e.jsx)(l.Zk,{title:a("overview.activityContext"),description:a("overview.activityContextDesc"),children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:`p-4 ${l.wD}`,children:[(0,e.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:a("overview.topModel")}),D?(0,e.jsxs)("div",{className:"font-semibold flex items-center gap-2 min-w-0",children:[(0,e.jsx)(i.RobotOutlined,{className:"text-[var(--colorTextSecondary)] shrink-0"}),(0,e.jsx)("span",{className:"truncate",children:D.model}),(0,e.jsxs)("span",{className:"font-normal text-[var(--colorTextTertiary)] text-sm shrink-0",children:["@",D.provider]})]}):(0,e.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:a("overview.noDataAvailable")})]}),(0,e.jsxs)("div",{className:`p-4 ${l.wD}`,children:[(0,e.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-3",children:a("overview.recentTaskTypes")}),c?.tasks.types&&Object.keys(c.tasks.types).length>0?(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(c.tasks.types).sort((a,b)=>b[1]-a[1]).map(([a,b])=>(0,e.jsxs)("div",{className:"px-2 py-1 rounded-lg text-xs font-mono bg-[var(--colorFillAlter)] text-[var(--colorTextSecondary)]",children:[a.slice(0,30)," ",(0,e.jsx)("span",{className:"ml-2 font-bold text-[var(--colorText)]",children:b})]},a))}):(0,e.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:a("common.noData")})]})]})})]})]})}g=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},89668:(a,b,c)=>{function d(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024)),c=a/Math.pow(1024,b);return`${c.toFixed(+(0!==b))} ${["B","KB","MB","GB","TB"][b]}`}function e(a,b="zh-CN"){let c=Math.max(0,Math.floor(a)),d=Math.floor(c/86400),f=Math.floor(c%86400/3600),g=Math.floor(c%3600/60),h="en-US"===b;return d>0?h?`${d}d ${f}h`:`${d} 天 ${f} 小时`:f>0?h?`${f}h ${g}m`:`${f} 小时 ${g} 分`:g>0?h?`${g}m`:`${g} 分`:h?"Just now":"刚刚"}function f(a,b="zh-CN"){if(!a||a<=0)return"en-US"===b?"Never":"从未";let c=Math.floor(Math.floor((Date.now()-a)/1e3)/60),d=Math.floor(c/60),e=Math.floor(d/24);return e>30?new Date(a).toLocaleDateString(b):"en-US"===b?e>0?`${e}d ago`:d>0?`${d}h ago`:c>0?`${c}m ago`:"Just now":e>0?`${e} 天前`:d>0?`${d} 小时前`:c>0?`${c} 分钟前`:"刚刚"}c.d(b,{Jm:()=>i,a3:()=>e,fw:()=>f,mc:()=>j,z3:()=>d});let g={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},h={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function i(a,b="zh-CN"){return("en-US"===b?h:g)[a]??a}let j={active:"common.statusIndexed",outdated:"common.statusOutdated",error:"common.statusAbnormal",deleted:"common.statusDeleted",disk:"common.statusNotIndexed"}}};
|
|
1
|
+
"use strict";exports.id=1928,exports.ids=[1928],exports.modules={18463:(a,b,c)=>{c.d(b,{Zk:()=>f,dh:()=>g,wD:()=>e});var d=c(8732);c(82015);let e="rounded-xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] hover:shadow-[var(--shadowSurfaceHover)] transition-shadow";function f({title:a,count:b,description:c,extra:e,className:f,children:g}){return(0,d.jsxs)("section",{className:`rounded-2xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] p-6 animateFadeIn ${f??""}`,children:[(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start justify-between gap-3 mb-5",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide flex items-center gap-2 m-0",children:[a,void 0!==b&&(0,d.jsx)("span",{className:"text-[var(--colorTextTertiary)] font-normal text-sm",children:b})]}),c&&(0,d.jsx)("p",{className:"text-xs text-[var(--colorTextTertiary)] mt-1.5 mb-0 leading-relaxed max-w-3xl",children:c})]}),e]}),g]})}function g({children:a}){return(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:a})}},61928:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>o});var e=c(8732),f=c(82015),g=c(94487),h=c(60056),i=c(79270),j=c(22147),k=c(89668),l=c(18463),m=a([g]);function n({title:a,value:b,subtext:c,icon:d,colorClass:f,animationClass:g}){return(0,e.jsxs)("div",{className:`p-4 ${l.wD} flex flex-col justify-between animateFadeIn ${g||""}`,style:{opacity:0},children:[(0,e.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,e.jsx)("div",{className:"text-xs font-semibold text-[var(--colorTextSecondary)] tracking-wide uppercase",children:a}),d&&(0,e.jsx)("div",{className:f,style:{opacity:.7},children:d})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-3xl font-bold tracking-tight",children:b}),c&&(0,e.jsx)("div",{className:"text-xs mt-1 truncate font-medium",style:{color:"var(--colorTextTertiary)"},children:c})]})]})}function o(){let a=(0,g.Vr)(),{locale:b}=(0,g.x_)(),[c,d]=(0,f.useState)(null),[m,o]=(0,f.useState)(!0),[p,q]=(0,f.useState)(0),[r,s]=(0,f.useState)(0),[t,u]=(0,f.useState)(0),[v,w]=(0,f.useState)(0),[x,y]=(0,f.useState)(null),[z,A]=(0,f.useState)(null),[B,C]=(0,f.useState)(null),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)([]),[H,I]=(0,f.useState)(!1),[J,K]=(0,f.useState)(null),L=(0,f.useCallback)(async()=>{o(!0);try{let[a,b,c,e,f,g]=await Promise.all([(0,j.FC)(),(0,j.Z3)().catch(()=>[]),(0,j.dx)().catch(()=>[]),(0,j.cQ)().catch(()=>({documents:[]})),(0,j.II)().catch(()=>null),(0,j.BO)().catch(()=>[])]);d(a),q(Array.isArray(b)?b.length:0),s(Array.isArray(c)?c.length:0),u(Array.isArray(e.documents)?e.documents.length:0),w(Array.isArray(g)?g.filter(a=>a.fileCount>0).length:0),y(f),C(await (0,j.nn)().catch(()=>null)),A(Date.now())}catch{}finally{o(!1)}},[]),M=c?.tasks.total?Math.round(c.tasks.success/c.tasks.total*100):null,N=c?.models?.[0],O=c?.logs.latestAt?(0,k.fw)(new Date(c.logs.latestAt).getTime(),b):a("overview.noLogs");return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 border-b border-[var(--borderColor)]",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:a("overview.title")}),(0,e.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:a("overview.description")})]}),(0,e.jsxs)(h.$x,{children:[(0,e.jsxs)("span",{className:"text-xs font-mono",style:{color:"var(--colorTextTertiary)"},children:[a("overview.updated"),": ",z?new Date(z).toLocaleTimeString(b):"—"]}),(0,e.jsx)(h.$n,{type:"text",icon:(0,e.jsx)(i.ReloadOutlined,{spin:m}),onClick:()=>{L()}})]})]}),(0,e.jsx)(l.Zk,{title:a("overview.coreMetrics"),description:a("overview.coreMetricsDesc"),children:(0,e.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,e.jsx)(n,{title:a("overview.uptime"),value:(0,k.a3)(c?.serviceUptimeSeconds??0,b),subtext:`${a("overview.processUptime")} ${(0,k.a3)(c?.uptime??0,b)}`,icon:(0,e.jsx)(i.ApiOutlined,{size:16}),colorClass:"text-[var(--colorBrand)]",animationClass:"stagger-1"}),(0,e.jsx)(n,{title:a("overview.tokensUsed"),value:(c?.tokens.total??0).toLocaleString(),subtext:`P ${c?.tokens.prompt??0} / C ${c?.tokens.completion??0}`,icon:(0,e.jsx)(i.ThunderboltOutlined,{size:16}),colorClass:"text-[var(--colorWarn)]",animationClass:"stagger-2"}),(0,e.jsx)(n,{title:a("overview.tasksTotal"),value:(c?.tasks.total??0).toLocaleString(),subtext:`✓ ${c?.tasks.success??0} | ✗ ${c?.tasks.failed??0} | ↻ ${c?.tasks.running??0}`,icon:(0,e.jsx)(i.FileTextOutlined,{size:16}),colorClass:"text-[var(--colorInfo)]",animationClass:"stagger-3"}),(0,e.jsx)(n,{title:a("overview.successRate"),value:null===M?"—":`${M}%`,subtext:null===M?a("overview.noDataAvailable"):void 0,icon:null!==M&&M>80?(0,e.jsx)(i.CheckCircleOutlined,{size:16}):(0,e.jsx)(i.CloseCircleOutlined,{size:16}),colorClass:null!==M&&M>80?"text-[var(--colorOk)]":"text-[var(--colorDanger)]",animationClass:"stagger-4"})]})}),(0,e.jsx)(l.Zk,{title:a("overview.systemResources"),description:a("overview.systemResourcesDesc"),children:(0,e.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[(0,e.jsx)(n,{title:a("overview.materialUnderstanding"),value:v>0?String(v):"—",subtext:a(v>0?"overview.materialKinds":"common.noData"),animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.prompts"),value:r,animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.templateCount"),value:t,animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.semanticModel"),value:x?.provider==="openai-compatible"?a("overview.external"):x?a("overview.local"):"—",subtext:x?.model??a("overview.notConfigured"),animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.modelProviders"),value:p,animationClass:"stagger-5"}),(0,e.jsx)(n,{title:a("overview.auditLogs"),value:c?.logs.events??0,subtext:`${a("overview.lastActivity")} ${O}`,animationClass:"stagger-5"})]})}),(0,e.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,e.jsx)(l.Zk,{title:a("overview.hardwareUsage"),description:a("overview.hardwareUsageDesc"),children:(0,e.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,e.jsxs)("div",{className:`flex items-center gap-4 p-4 ${l.wD}`,children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:c?.cpu.usagePercent??0,size:64,strokeColor:(c?.cpu.usagePercent??0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:10}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:a("overview.cpuUsage")}),(0,e.jsxs)("div",{className:"text-xl font-bold",children:[c?.cpu.usagePercent?.toFixed(1)??"0.0","%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[c?.cpu.cores??0," ",a("overview.cores")]})]})]}),(0,e.jsxs)("div",{className:`flex items-center gap-4 p-4 ${l.wD}`,children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:c?.memory.usagePercent??0,size:64,strokeColor:(c?.memory.usagePercent??0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:10}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:a("overview.memoryUsage")}),(0,e.jsxs)("div",{className:"text-xl font-bold",children:[c?.memory.usagePercent??0,"%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[c?.memory.processMB??0," MB / ",c?.memory.totalMB??0," MB"]})]})]})]})}),(0,e.jsx)(l.Zk,{title:a("overview.activityContext"),description:a("overview.activityContextDesc"),children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:`p-4 ${l.wD}`,children:[(0,e.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:a("overview.topModel")}),N?(0,e.jsxs)("div",{className:"font-semibold flex items-center gap-2 min-w-0",children:[(0,e.jsx)(i.RobotOutlined,{className:"text-[var(--colorTextSecondary)] shrink-0"}),(0,e.jsx)("span",{className:"truncate",children:N.model}),(0,e.jsxs)("span",{className:"font-normal text-[var(--colorTextTertiary)] text-sm shrink-0",children:["@",N.provider]})]}):(0,e.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:a("overview.noDataAvailable")})]}),(0,e.jsxs)("div",{className:`p-4 ${l.wD}`,children:[(0,e.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-3",children:a("overview.recentTaskTypes")}),c?.tasks.types&&Object.keys(c.tasks.types).length>0?(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(c.tasks.types).sort((a,b)=>b[1]-a[1]).map(([a,b])=>(0,e.jsxs)("div",{className:"px-2 py-1 rounded-lg text-xs font-mono bg-[var(--colorFillAlter)] text-[var(--colorTextSecondary)]",children:[a.slice(0,30)," ",(0,e.jsx)("span",{className:"ml-2 font-bold text-[var(--colorText)]",children:b})]},a))}):(0,e.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:a("common.noData")})]})]})})]}),(0,e.jsx)(l.Zk,{title:"数据体检与清理",description:"升级后旧数据会不会碍事、占了多少地方——先看清,再决定清什么",children:B?(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:`存储根 ${B.storageRoot}|工作流版本 ${B.workflowVersion}`}),(0,e.jsx)("div",{className:"flex flex-col gap-2",children:B.scopes.map(a=>(0,e.jsx)("div",{className:`p-3 flex items-start gap-3 ${l.wD}`,children:(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,e.jsx)("span",{className:"text-sm font-medium",children:a.label}),a.deletable?(0,e.jsx)(h.vw,{color:"blue",children:"可清理"}):(0,e.jsx)(h.vw,{children:"只体检"}),(0,e.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:`${a.files} 项|${(a.bytes/1048576).toFixed(1)} MB`})]}),(0,e.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mt-1",children:a.note})]})},a.key))}),(0,e.jsxs)("div",{className:"p-3 flex flex-col gap-1",style:{background:"var(--colorFillQuaternary)",borderRadius:8},children:[(0,e.jsx)("div",{className:"text-sm",children:`历史类型残留:${B.legacy.recordsWithLegacyTypes}/${B.legacy.totalRecords} 条记录含已删除的节点类型(共 ${B.legacy.legacyNodes} 个节点)`}),(0,e.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:B.legacy.note})]}),(0,e.jsxs)(h.$x,{children:[(0,e.jsx)(h.$n,{size:"small",disabled:B.scopes.every(a=>!a.deletable),onClick:()=>{G([]),K(null),E(!0)},children:"清理可重建数据…"}),(0,e.jsx)(h.$n,{size:"small",type:"text",onClick:()=>{L()},children:"重新体检"})]}),J&&(0,e.jsx)(h.o5.Text,{type:"success",style:{fontSize:12},children:J})]}):(0,e.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:a("common.noData")})}),(0,e.jsx)(h.aF,{title:"清理可重建数据",open:D,onCancel:()=>E(!1),okText:H?"清理中…":"确认清理",okButtonProps:{disabled:0===F.length||H,danger:!0},onOk:()=>{I(!0),(0,j.fc)(F).then(a=>{let b=a.removed.reduce((a,b)=>a+b.bytes,0);K(`已清理 ${a.removed.length} 项,释放 ${(b/1048576).toFixed(1)} MB`),C(a.report),E(!1)}).catch(a=>K(`清理失败:${a instanceof Error?a.message:String(a)}`)).finally(()=>I(!1))},children:(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)(h.o5.Text,{type:"secondary",style:{fontSize:12},children:["只列**可重建**的数据:缓存键含内容与判据指纹,删掉只是下次重算。",(0,e.jsx)("br",{}),"生成记录、节点日志、技能库、知识库**不在清理范围**(那是你的资产)。"]}),(B?.scopes??[]).filter(a=>a.deletable).map(a=>(0,e.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,e.jsx)("input",{type:"checkbox",checked:F.includes(a.key),onChange:b=>G(c=>b.target.checked?[...c,a.key]:c.filter(b=>b!==a.key))}),(0,e.jsxs)("span",{className:"min-w-0",children:[(0,e.jsx)("span",{className:"text-sm",children:`${a.label}(${a.files} 项|${(a.bytes/1048576).toFixed(1)} MB)`}),(0,e.jsx)("span",{className:"block text-xs text-[var(--colorTextTertiary)]",children:a.note})]})]},a.key))]})})]})}g=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},89668:(a,b,c)=>{function d(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024)),c=a/Math.pow(1024,b);return`${c.toFixed(+(0!==b))} ${["B","KB","MB","GB","TB"][b]}`}function e(a,b="zh-CN"){let c=Math.max(0,Math.floor(a)),d=Math.floor(c/86400),f=Math.floor(c%86400/3600),g=Math.floor(c%3600/60),h="en-US"===b;return d>0?h?`${d}d ${f}h`:`${d} 天 ${f} 小时`:f>0?h?`${f}h ${g}m`:`${f} 小时 ${g} 分`:g>0?h?`${g}m`:`${g} 分`:h?"Just now":"刚刚"}function f(a,b="zh-CN"){if(!a||a<=0)return"en-US"===b?"Never":"从未";let c=Math.floor(Math.floor((Date.now()-a)/1e3)/60),d=Math.floor(c/60),e=Math.floor(d/24);return e>30?new Date(a).toLocaleDateString(b):"en-US"===b?e>0?`${e}d ago`:d>0?`${d}h ago`:c>0?`${c}m ago`:"Just now":e>0?`${e} 天前`:d>0?`${d} 小时前`:c>0?`${c} 分钟前`:"刚刚"}c.d(b,{Jm:()=>i,a3:()=>e,fw:()=>f,mc:()=>j,z3:()=>d});let g={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},h={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function i(a,b="zh-CN"){return("en-US"===b?h:g)[a]??a}let j={active:"common.statusIndexed",outdated:"common.statusOutdated",error:"common.statusAbnormal",deleted:"common.statusDeleted",disk:"common.statusNotIndexed"}}};
|