@customize-agent/server 4.0.108 → 4.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +20 -20
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/chunks/1928.js +1 -1
  5. package/.next/server/chunks/1936.js +3 -3
  6. package/.next/server/chunks/8204.js +1 -1
  7. package/.next/server/chunks/9301.js +3 -3
  8. package/.next/server/middleware-build-manifest.js +1 -1
  9. package/.next/server/pages/404.html +1 -1
  10. package/.next/server/pages/500.html +1 -1
  11. package/.next/server/pages/_error.js +1 -1
  12. package/.next/server/pages/asset-library.html +1 -1
  13. package/.next/server/pages/document-roles.html +1 -1
  14. package/.next/server/pages/documents.html +1 -1
  15. package/.next/server/pages/guide.html +1 -1
  16. package/.next/server/pages/index.html +1 -1
  17. package/.next/server/pages/knowledge/file-detail.html +1 -1
  18. package/.next/server/pages/knowledge/files.html +1 -1
  19. package/.next/server/pages/knowledge/manage.html +1 -1
  20. package/.next/server/pages/knowledge.html +1 -1
  21. package/.next/server/pages/models.html +1 -1
  22. package/.next/server/pages/overview.html +1 -1
  23. package/.next/server/pages/prompt.html +1 -1
  24. package/.next/server/pages/settings.html +1 -1
  25. package/.next/server/pages/system/logs.html +1 -1
  26. package/.next/server/pages-manifest.json +29 -29
  27. package/.next/static/OeaS6h5VJsA7MHq1qOZN_/_buildManifest.js +1 -0
  28. package/.next/static/chunks/375-4a1c73eb22d653d2.js +1 -0
  29. package/.next/static/chunks/478-6a65262872ea0bbc.js +1 -0
  30. package/.next/static/chunks/788-7f7359a830e3f4fd.js +1 -0
  31. package/.next/static/chunks/795-e18d1f7843b8f683.js +1 -0
  32. package/.next/static/chunks/pages/{_app-d98d9d52c6257579.js → _app-b0159557c8407d35.js} +38 -38
  33. package/.next/static/chunks/pages/asset-library-6d9b11ae4af036cb.js +1 -0
  34. package/.next/static/chunks/pages/documents-e85faaadf4dc6777.js +1 -0
  35. package/.next/static/chunks/pages/knowledge/file-detail-1a82bb3c9b266edc.js +1 -0
  36. package/.next/static/chunks/pages/knowledge/files-8ca2d555a722d8f0.js +1 -0
  37. package/.next/static/chunks/pages/knowledge/manage-e7fbdb89f65913b2.js +1 -0
  38. package/.next/static/chunks/pages/models-2cc758fed54c92e2.js +1 -0
  39. package/.next/static/chunks/pages/prompt-5e681123122f38a9.js +1 -0
  40. package/.next/static/chunks/pages/system/logs-2126e5cbbce48e88.js +1 -0
  41. package/messages/en-US.json +147 -3
  42. package/messages/zh-CN.json +150 -6
  43. package/package.json +3 -3
  44. package/.next/static/chunks/375-1e1be370b94c7512.js +0 -1
  45. package/.next/static/chunks/478-ac4777b05b3c42e8.js +0 -1
  46. package/.next/static/chunks/788-72bd97a04f2aee27.js +0 -1
  47. package/.next/static/chunks/795-ed2375ec938022d8.js +0 -1
  48. package/.next/static/chunks/pages/asset-library-dda51e0651d970ed.js +0 -1
  49. package/.next/static/chunks/pages/documents-5f3e8e1439988355.js +0 -1
  50. package/.next/static/chunks/pages/knowledge/file-detail-5c2b9a22d3d521e0.js +0 -1
  51. package/.next/static/chunks/pages/knowledge/files-57f72cae47532ab9.js +0 -1
  52. package/.next/static/chunks/pages/knowledge/manage-1363f53928abf98c.js +0 -1
  53. package/.next/static/chunks/pages/models-5d75c007cb2e8c25.js +0 -1
  54. package/.next/static/chunks/pages/prompt-87eeee86405f1356.js +0 -1
  55. package/.next/static/chunks/pages/system/logs-05259fa91f2e0903.js +0 -1
  56. package/.next/static/wkCOJRi841-n7F2_lCGdW/_buildManifest.js +0 -1
  57. /package/.next/static/{wkCOJRi841-n7F2_lCGdW → OeaS6h5VJsA7MHq1qOZN_}/_ssgManifest.js +0 -0
package/.next/BUILD_ID CHANGED
@@ -1 +1 @@
1
- wkCOJRi841-n7F2_lCGdW
1
+ OeaS6h5VJsA7MHq1qOZN_
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/wkCOJRi841-n7F2_lCGdW/_buildManifest.js",
9
- "static/wkCOJRi841-n7F2_lCGdW/_ssgManifest.js"
8
+ "static/OeaS6h5VJsA7MHq1qOZN_/_buildManifest.js",
9
+ "static/OeaS6h5VJsA7MHq1qOZN_/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [],
12
12
  "rootMainFilesTree": {},
@@ -15,7 +15,7 @@
15
15
  "static/chunks/webpack-4224e970a97a4a86.js",
16
16
  "static/chunks/framework-161be364fd69a7ce.js",
17
17
  "static/chunks/main-91fb767ebd74c9c1.js",
18
- "static/chunks/795-ed2375ec938022d8.js",
18
+ "static/chunks/795-e18d1f7843b8f683.js",
19
19
  "static/chunks/pages/index-9df5670a1487dbb1.js"
20
20
  ],
21
21
  "/_app": [
@@ -23,7 +23,7 @@
23
23
  "static/chunks/framework-161be364fd69a7ce.js",
24
24
  "static/chunks/main-91fb767ebd74c9c1.js",
25
25
  "static/css/029ff7574443cc55.css",
26
- "static/chunks/pages/_app-d98d9d52c6257579.js"
26
+ "static/chunks/pages/_app-b0159557c8407d35.js"
27
27
  ],
28
28
  "/_error": [
29
29
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -37,10 +37,10 @@
37
37
  "static/chunks/main-91fb767ebd74c9c1.js",
38
38
  "static/chunks/433-233659be69169c19.js",
39
39
  "static/chunks/985-4b4a3ed36ada16eb.js",
40
- "static/chunks/375-1e1be370b94c7512.js",
40
+ "static/chunks/375-4a1c73eb22d653d2.js",
41
41
  "static/chunks/289-789ef042acd53608.js",
42
42
  "static/chunks/238-16333381c574f65b.js",
43
- "static/chunks/pages/asset-library-dda51e0651d970ed.js"
43
+ "static/chunks/pages/asset-library-6d9b11ae4af036cb.js"
44
44
  ],
45
45
  "/document-roles": [
46
46
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -60,13 +60,13 @@
60
60
  "static/chunks/main-91fb767ebd74c9c1.js",
61
61
  "static/chunks/433-233659be69169c19.js",
62
62
  "static/chunks/576-6699fed6c88502fe.js",
63
- "static/chunks/375-1e1be370b94c7512.js",
63
+ "static/chunks/375-4a1c73eb22d653d2.js",
64
64
  "static/chunks/787-c18af810af3433f6.js",
65
65
  "static/chunks/195-2c0168eacab722d2.js",
66
66
  "static/chunks/455-97ad88d6604f54b7.js",
67
67
  "static/chunks/506-93f730bc149d0dce.js",
68
68
  "static/chunks/651-b650f9bca2edf976.js",
69
- "static/chunks/pages/documents-5f3e8e1439988355.js"
69
+ "static/chunks/pages/documents-e85faaadf4dc6777.js"
70
70
  ],
71
71
  "/guide": [
72
72
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -90,13 +90,13 @@
90
90
  "static/chunks/433-233659be69169c19.js",
91
91
  "static/chunks/576-6699fed6c88502fe.js",
92
92
  "static/chunks/985-4b4a3ed36ada16eb.js",
93
- "static/chunks/375-1e1be370b94c7512.js",
93
+ "static/chunks/375-4a1c73eb22d653d2.js",
94
94
  "static/chunks/787-c18af810af3433f6.js",
95
95
  "static/chunks/289-789ef042acd53608.js",
96
96
  "static/chunks/506-93f730bc149d0dce.js",
97
97
  "static/chunks/850-0f48354694fc6b3e.js",
98
98
  "static/css/df824e8d8cadbeb1.css",
99
- "static/chunks/pages/knowledge/file-detail-5c2b9a22d3d521e0.js"
99
+ "static/chunks/pages/knowledge/file-detail-1a82bb3c9b266edc.js"
100
100
  ],
101
101
  "/knowledge/files": [
102
102
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -105,10 +105,10 @@
105
105
  "static/chunks/433-233659be69169c19.js",
106
106
  "static/chunks/576-6699fed6c88502fe.js",
107
107
  "static/chunks/985-4b4a3ed36ada16eb.js",
108
- "static/chunks/375-1e1be370b94c7512.js",
108
+ "static/chunks/375-4a1c73eb22d653d2.js",
109
109
  "static/chunks/289-789ef042acd53608.js",
110
110
  "static/css/df824e8d8cadbeb1.css",
111
- "static/chunks/pages/knowledge/files-57f72cae47532ab9.js"
111
+ "static/chunks/pages/knowledge/files-8ca2d555a722d8f0.js"
112
112
  ],
113
113
  "/knowledge/manage": [
114
114
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -117,8 +117,8 @@
117
117
  "static/chunks/433-233659be69169c19.js",
118
118
  "static/chunks/787-c18af810af3433f6.js",
119
119
  "static/chunks/506-93f730bc149d0dce.js",
120
- "static/chunks/788-72bd97a04f2aee27.js",
121
- "static/chunks/pages/knowledge/manage-1363f53928abf98c.js"
120
+ "static/chunks/788-7f7359a830e3f4fd.js",
121
+ "static/chunks/pages/knowledge/manage-e7fbdb89f65913b2.js"
122
122
  ],
123
123
  "/models": [
124
124
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -129,13 +129,13 @@
129
129
  "static/chunks/195-2c0168eacab722d2.js",
130
130
  "static/chunks/455-97ad88d6604f54b7.js",
131
131
  "static/chunks/337-b06909f6d29f6d1f.js",
132
- "static/chunks/pages/models-5d75c007cb2e8c25.js"
132
+ "static/chunks/pages/models-2cc758fed54c92e2.js"
133
133
  ],
134
134
  "/overview": [
135
135
  "static/chunks/webpack-4224e970a97a4a86.js",
136
136
  "static/chunks/framework-161be364fd69a7ce.js",
137
137
  "static/chunks/main-91fb767ebd74c9c1.js",
138
- "static/chunks/795-ed2375ec938022d8.js",
138
+ "static/chunks/795-e18d1f7843b8f683.js",
139
139
  "static/chunks/pages/overview-63f3dda2dde16c9e.js"
140
140
  ],
141
141
  "/prompt": [
@@ -145,8 +145,8 @@
145
145
  "static/chunks/576-6699fed6c88502fe.js",
146
146
  "static/chunks/985-4b4a3ed36ada16eb.js",
147
147
  "static/chunks/195-2c0168eacab722d2.js",
148
- "static/chunks/478-ac4777b05b3c42e8.js",
149
- "static/chunks/pages/prompt-87eeee86405f1356.js"
148
+ "static/chunks/478-6a65262872ea0bbc.js",
149
+ "static/chunks/pages/prompt-5e681123122f38a9.js"
150
150
  ],
151
151
  "/settings": [
152
152
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -161,10 +161,10 @@
161
161
  "static/chunks/433-233659be69169c19.js",
162
162
  "static/chunks/576-6699fed6c88502fe.js",
163
163
  "static/chunks/985-4b4a3ed36ada16eb.js",
164
- "static/chunks/375-1e1be370b94c7512.js",
164
+ "static/chunks/375-4a1c73eb22d653d2.js",
165
165
  "static/chunks/195-2c0168eacab722d2.js",
166
166
  "static/chunks/289-789ef042acd53608.js",
167
- "static/chunks/pages/system/logs-05259fa91f2e0903.js"
167
+ "static/chunks/pages/system/logs-2126e5cbbce48e88.js"
168
168
  ]
169
169
  },
170
170
  "ampFirstPages": []
@@ -3,9 +3,9 @@
3
3
  "routes": {},
4
4
  "dynamicRoutes": {},
5
5
  "preview": {
6
- "previewModeId": "1fb5d7c7fbe2371d380d0d582501b9d3",
7
- "previewModeSigningKey": "62d15489410e042c43f254f8c291990bf00a4a61c62b0ad74e66c26a475b1f3d",
8
- "previewModeEncryptionKey": "8f2db80f4710ba76df0cdf2b1b67fec87aae2df28079ddb3b6c7535afeeb29fe"
6
+ "previewModeId": "89b8cba05f0dc94012958da088ae04dc",
7
+ "previewModeSigningKey": "46b2c409816db337f17940d91ab62bcb05c1351e1677d56263d759baa4ea7acc",
8
+ "previewModeEncryptionKey": "78f5b26af5c9f35f2769008a6d05ea427b6cb5a41250fadf48be98ba8e5358eb"
9
9
  },
10
10
  "notFoundRoutes": []
11
11
  }
@@ -1 +1 @@
1
- "use strict";exports.id=1928,exports.ids=[1928],exports.modules={61928:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>m});var e=c(8732),f=c(82015),g=c(94487),h=c(60056),i=c(79270),j=c(22147),k=a([g]);function l({title:a,value:b,subtext:c,icon:d,colorClass:f,animationClass:g}){return(0,e.jsxs)("div",{className:`p-4 animateFadeIn flex flex-col justify-between border-l-2 border-transparent hover:border-[var(--colorBrand)] transition-colors ${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 m(){let a=(0,g.Vr)(),[b,c]=(0,f.useState)(null),[d,k]=(0,f.useState)(!0),[m,n]=(0,f.useState)(0),[o,p]=(0,f.useState)(0),[q,r]=(0,f.useState)(0),[s,t]=(0,f.useState)(0),[u,v]=(0,f.useState)(null),w=(0,f.useCallback)(async()=>{k(!0);try{let[a,b,d,e,f]=await Promise.all([(0,j.FC)(),(0,j.Z3)().catch(()=>[]),(0,j.lv)().catch(()=>({roles:[],configs:[]})),(0,j.Dl)().catch(()=>({templates:[]})),(0,j.II)().catch(()=>null)]);c(a),n(Array.isArray(b)?b.length:0);let g=Array.isArray(d.roles)?d.roles:[];p(g.filter(a=>"file"===a.type).length),r(g.filter(a=>"prompt"===a.type).length),t(Array.isArray(e.templates)?e.templates.length:0),v(f)}catch{}finally{k(!1)}},[]),x=b?.tasks.total?Math.round(b.tasks.success/b.tasks.total*100):0,y=b?.models?.[0],z=b?.logs.latestAt?new Date(b.logs.latestAt).toLocaleString():"暂无日志";return(0,e.jsxs)("div",{className:"space-y-12",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:["UPDATED: ",z]}),(0,e.jsx)(h.$n,{type:"text",icon:(0,e.jsx)(i.ReloadOutlined,{spin:d}),onClick:()=>{w()}})]})]}),(0,e.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8 divide-x border-b pb-8 border-[var(--borderColor)] divide-[var(--borderColor)] -mx-4 px-4",children:[(0,e.jsx)(l,{title:"运行时间",value:`${b?Math.floor(b.uptime/3600):0}h`,icon:(0,e.jsx)(i.ApiOutlined,{size:16}),colorClass:"text-[var(--colorBrand)]",animationClass:"stagger-1"}),(0,e.jsx)(l,{title:a("overview.tokensUsed"),value:(b?.tokens.total??0).toLocaleString(),subtext:`P ${b?.tokens.prompt??0} / C ${b?.tokens.completion??0}`,icon:(0,e.jsx)(i.ThunderboltOutlined,{size:16}),colorClass:"text-[var(--colorWarn)]",animationClass:"stagger-2"}),(0,e.jsx)(l,{title:a("overview.tasksTotal"),value:(b?.tasks.total??0).toLocaleString(),subtext:`✓ ${b?.tasks.success??0} | ✗ ${b?.tasks.failed??0} | ↻ ${b?.tasks.running??0}`,icon:(0,e.jsx)(i.FileTextOutlined,{size:16}),colorClass:"text-[var(--colorInfo)]",animationClass:"stagger-3"}),(0,e.jsx)(l,{title:a("overview.successRate"),value:`${x}%`,icon:x>80?(0,e.jsx)(i.CheckCircleOutlined,{size:16}):(0,e.jsx)(i.CloseCircleOutlined,{size:16}),colorClass:x>80?"text-[var(--colorOk)]":"text-[var(--colorDanger)]",animationClass:"stagger-4"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)] animateFadeIn stagger-5",style:{opacity:0},children:"System Resources"}),(0,e.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-y-8 gap-x-4",children:[(0,e.jsx)(l,{title:"文件角色",value:o,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:"提示词角色",value:q,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:"模板数量",value:s,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:"语义模型",value:u?.provider==="openai-compatible"?"External":u?"Local":"—",subtext:u?.model??"Not Configured",animationClass:"stagger-5"}),(0,e.jsx)(l,{title:"模型供应商",value:m,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:"审计日志",value:b?.logs.events??0,animationClass:"stagger-5"})]})]}),(0,e.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 pt-8 border-t border-[var(--borderColor)] animateFadeIn stagger-5",style:{opacity:0},children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:"Hardware Usage"}),(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex items-center gap-6",children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:b?.cpu.usagePercent??0,size:64,strokeColor:(b?.cpu.usagePercent??0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:10}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:"CPU Usage"}),(0,e.jsxs)("div",{className:"text-xl font-bold",children:[b?.cpu.usagePercent?.toFixed(1)??"0.0","%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[b?.cpu.cores??0," ",a("overview.cores")]})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-6",children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:b?.memory.usagePercent??0,size:64,strokeColor:(b?.memory.usagePercent??0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:10}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:"Memory Usage"}),(0,e.jsxs)("div",{className:"text-xl font-bold",children:[b?.memory.usagePercent??0,"%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[b?.memory.processMB??0," MB / ",b?.memory.totalMB??0," MB"]})]})]})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:"Activity Context"}),(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-1",children:"Top Model"}),y?(0,e.jsxs)("div",{className:"font-semibold flex items-center gap-2",children:[(0,e.jsx)(i.RobotOutlined,{className:"text-[var(--colorTextSecondary)]"})," ",y.model,(0,e.jsxs)("span",{className:"font-normal text-[var(--colorTextTertiary)] text-sm",children:["@",y.provider]})]}):(0,e.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:"No data available"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-2",children:"Recent Task Types"}),b?.tasks.types&&Object.keys(b.tasks.types).length>0?(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(b.tasks.types).sort((a,b)=>b[1]-a[1]).map(([a,b])=>(0,e.jsxs)("div",{className:"px-2 py-1 rounded text-xs font-mono bg-[var(--colorBgHover)] 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=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})}};
1
+ "use strict";exports.id=1928,exports.ids=[1928],exports.modules={61928:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>m});var e=c(8732),f=c(82015),g=c(94487),h=c(60056),i=c(79270),j=c(22147),k=a([g]);function l({title:a,value:b,subtext:c,icon:d,colorClass:f,animationClass:g}){return(0,e.jsxs)("div",{className:`p-4 animateFadeIn flex flex-col justify-between border-l-2 border-transparent hover:border-[var(--colorBrand)] transition-colors ${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 m(){let a=(0,g.Vr)(),[b,c]=(0,f.useState)(null),[d,k]=(0,f.useState)(!0),[m,n]=(0,f.useState)(0),[o,p]=(0,f.useState)(0),[q,r]=(0,f.useState)(0),[s,t]=(0,f.useState)(0),[u,v]=(0,f.useState)(null),w=(0,f.useCallback)(async()=>{k(!0);try{let[a,b,d,e,f]=await Promise.all([(0,j.FC)(),(0,j.Z3)().catch(()=>[]),(0,j.lv)().catch(()=>({roles:[],configs:[]})),(0,j.Dl)().catch(()=>({templates:[]})),(0,j.II)().catch(()=>null)]);c(a),n(Array.isArray(b)?b.length:0);let g=Array.isArray(d.roles)?d.roles:[];p(g.filter(a=>"file"===a.type).length),r(g.filter(a=>"prompt"===a.type).length),t(Array.isArray(e.templates)?e.templates.length:0),v(f)}catch{}finally{k(!1)}},[]),x=b?.tasks.total?Math.round(b.tasks.success/b.tasks.total*100):0,y=b?.models?.[0],z=b?.logs.latestAt?new Date(b.logs.latestAt).toLocaleString():a("overview.noLogs");return(0,e.jsxs)("div",{className:"space-y-12",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]}),(0,e.jsx)(h.$n,{type:"text",icon:(0,e.jsx)(i.ReloadOutlined,{spin:d}),onClick:()=>{w()}})]})]}),(0,e.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8 divide-x border-b pb-8 border-[var(--borderColor)] divide-[var(--borderColor)] -mx-4 px-4",children:[(0,e.jsx)(l,{title:a("overview.uptime"),value:`${b?Math.floor(b.uptime/3600):0}h`,icon:(0,e.jsx)(i.ApiOutlined,{size:16}),colorClass:"text-[var(--colorBrand)]",animationClass:"stagger-1"}),(0,e.jsx)(l,{title:a("overview.tokensUsed"),value:(b?.tokens.total??0).toLocaleString(),subtext:`P ${b?.tokens.prompt??0} / C ${b?.tokens.completion??0}`,icon:(0,e.jsx)(i.ThunderboltOutlined,{size:16}),colorClass:"text-[var(--colorWarn)]",animationClass:"stagger-2"}),(0,e.jsx)(l,{title:a("overview.tasksTotal"),value:(b?.tasks.total??0).toLocaleString(),subtext:`✓ ${b?.tasks.success??0} | ✗ ${b?.tasks.failed??0} | ↻ ${b?.tasks.running??0}`,icon:(0,e.jsx)(i.FileTextOutlined,{size:16}),colorClass:"text-[var(--colorInfo)]",animationClass:"stagger-3"}),(0,e.jsx)(l,{title:a("overview.successRate"),value:`${x}%`,icon:x>80?(0,e.jsx)(i.CheckCircleOutlined,{size:16}):(0,e.jsx)(i.CloseCircleOutlined,{size:16}),colorClass:x>80?"text-[var(--colorOk)]":"text-[var(--colorDanger)]",animationClass:"stagger-4"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)] animateFadeIn stagger-5",style:{opacity:0},children:a("overview.systemResources")}),(0,e.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-y-8 gap-x-4",children:[(0,e.jsx)(l,{title:a("overview.fileRoles"),value:o,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:a("overview.promptRoles"),value:q,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:a("overview.templateCount"),value:s,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:a("overview.semanticModel"),value:u?.provider==="openai-compatible"?a("overview.external"):u?a("overview.local"):"—",subtext:u?.model??a("overview.notConfigured"),animationClass:"stagger-5"}),(0,e.jsx)(l,{title:a("overview.modelProviders"),value:m,animationClass:"stagger-5"}),(0,e.jsx)(l,{title:a("overview.auditLogs"),value:b?.logs.events??0,animationClass:"stagger-5"})]})]}),(0,e.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 pt-8 border-t border-[var(--borderColor)] animateFadeIn stagger-5",style:{opacity:0},children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:a("overview.hardwareUsage")}),(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex items-center gap-6",children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:b?.cpu.usagePercent??0,size:64,strokeColor:(b?.cpu.usagePercent??0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:10}),(0,e.jsxs)("div",{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:[b?.cpu.usagePercent?.toFixed(1)??"0.0","%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[b?.cpu.cores??0," ",a("overview.cores")]})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-6",children:[(0,e.jsx)(h.ke,{type:"dashboard",percent:b?.memory.usagePercent??0,size:64,strokeColor:(b?.memory.usagePercent??0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:10}),(0,e.jsxs)("div",{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:[b?.memory.usagePercent??0,"%"]}),(0,e.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[b?.memory.processMB??0," MB / ",b?.memory.totalMB??0," MB"]})]})]})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:a("overview.activityContext")}),(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-1",children:a("overview.topModel")}),y?(0,e.jsxs)("div",{className:"font-semibold flex items-center gap-2",children:[(0,e.jsx)(i.RobotOutlined,{className:"text-[var(--colorTextSecondary)]"})," ",y.model,(0,e.jsxs)("span",{className:"font-normal text-[var(--colorTextTertiary)] text-sm",children:["@",y.provider]})]}):(0,e.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:a("overview.noDataAvailable")})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-3",children:a("overview.recentTaskTypes")}),b?.tasks.types&&Object.keys(b.tasks.types).length>0?(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(b.tasks.types).sort((a,b)=>b[1]-a[1]).map(([a,b])=>(0,e.jsxs)("div",{className:"px-2 py-1 rounded text-xs font-mono bg-[var(--colorBgHover)] 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=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})}};