@customize-agent/server 4.0.107 → 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 (64) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +31 -33
  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 +24 -24
  27. package/.next/static/OeaS6h5VJsA7MHq1qOZN_/_buildManifest.js +1 -0
  28. package/.next/static/chunks/238-16333381c574f65b.js +1 -0
  29. package/.next/static/chunks/289-789ef042acd53608.js +78 -0
  30. package/.next/static/chunks/375-4a1c73eb22d653d2.js +1 -0
  31. package/.next/static/chunks/478-6a65262872ea0bbc.js +1 -0
  32. package/.next/static/chunks/788-7f7359a830e3f4fd.js +1 -0
  33. package/.next/static/chunks/795-e18d1f7843b8f683.js +1 -0
  34. package/.next/static/chunks/pages/{_app-d98d9d52c6257579.js → _app-b0159557c8407d35.js} +38 -38
  35. package/.next/static/chunks/pages/asset-library-6d9b11ae4af036cb.js +1 -0
  36. package/.next/static/chunks/pages/documents-e85faaadf4dc6777.js +1 -0
  37. package/.next/static/chunks/pages/knowledge/file-detail-1a82bb3c9b266edc.js +1 -0
  38. package/.next/static/chunks/pages/knowledge/files-8ca2d555a722d8f0.js +1 -0
  39. package/.next/static/chunks/pages/knowledge/manage-e7fbdb89f65913b2.js +1 -0
  40. package/.next/static/chunks/pages/models-2cc758fed54c92e2.js +1 -0
  41. package/.next/static/chunks/pages/prompt-5e681123122f38a9.js +1 -0
  42. package/.next/static/chunks/pages/system/logs-2126e5cbbce48e88.js +1 -0
  43. package/.next/static/css/029ff7574443cc55.css +1 -0
  44. package/messages/en-US.json +147 -3
  45. package/messages/zh-CN.json +150 -6
  46. package/package.json +3 -3
  47. package/.next/static/chunks/102-881dcc464f983c89.js +0 -41
  48. package/.next/static/chunks/289-0031e62ca424247b.js +0 -38
  49. package/.next/static/chunks/375-1e1be370b94c7512.js +0 -1
  50. package/.next/static/chunks/478-ac4777b05b3c42e8.js +0 -1
  51. package/.next/static/chunks/767-e97ea5dee1ab87b5.js +0 -1
  52. package/.next/static/chunks/788-72bd97a04f2aee27.js +0 -1
  53. package/.next/static/chunks/795-ed2375ec938022d8.js +0 -1
  54. package/.next/static/chunks/pages/asset-library-b76abaab31043cdb.js +0 -1
  55. package/.next/static/chunks/pages/documents-487ce1b434da9b82.js +0 -1
  56. package/.next/static/chunks/pages/knowledge/file-detail-8c37a455e6cc010f.js +0 -1
  57. package/.next/static/chunks/pages/knowledge/files-a4e5c4e1151fc40e.js +0 -1
  58. package/.next/static/chunks/pages/knowledge/manage-1363f53928abf98c.js +0 -1
  59. package/.next/static/chunks/pages/models-3371ebcdc9cb85fa.js +0 -1
  60. package/.next/static/chunks/pages/prompt-5adc3ca18a2764f4.js +0 -1
  61. package/.next/static/chunks/pages/system/logs-8c5d90301a273cd2.js +0 -1
  62. package/.next/static/css/f7490ae02e9f72c2.css +0 -1
  63. package/.next/static/jmjNyz47EnCu0Y_eZMyIl/_buildManifest.js +0 -1
  64. /package/.next/static/{jmjNyz47EnCu0Y_eZMyIl → OeaS6h5VJsA7MHq1qOZN_}/_ssgManifest.js +0 -0
package/.next/BUILD_ID CHANGED
@@ -1 +1 @@
1
- jmjNyz47EnCu0Y_eZMyIl
1
+ OeaS6h5VJsA7MHq1qOZN_
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/jmjNyz47EnCu0Y_eZMyIl/_buildManifest.js",
9
- "static/jmjNyz47EnCu0Y_eZMyIl/_ssgManifest.js"
8
+ "static/OeaS6h5VJsA7MHq1qOZN_/_buildManifest.js",
9
+ "static/OeaS6h5VJsA7MHq1qOZN_/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [],
12
12
  "rootMainFilesTree": {},
@@ -15,15 +15,15 @@
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": [
22
22
  "static/chunks/webpack-4224e970a97a4a86.js",
23
23
  "static/chunks/framework-161be364fd69a7ce.js",
24
24
  "static/chunks/main-91fb767ebd74c9c1.js",
25
- "static/css/f7490ae02e9f72c2.css",
26
- "static/chunks/pages/_app-d98d9d52c6257579.js"
25
+ "static/css/029ff7574443cc55.css",
26
+ "static/chunks/pages/_app-b0159557c8407d35.js"
27
27
  ],
28
28
  "/_error": [
29
29
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -36,10 +36,11 @@
36
36
  "static/chunks/framework-161be364fd69a7ce.js",
37
37
  "static/chunks/main-91fb767ebd74c9c1.js",
38
38
  "static/chunks/433-233659be69169c19.js",
39
- "static/chunks/787-c18af810af3433f6.js",
40
- "static/chunks/102-881dcc464f983c89.js",
41
- "static/chunks/767-e97ea5dee1ab87b5.js",
42
- "static/chunks/pages/asset-library-b76abaab31043cdb.js"
39
+ "static/chunks/985-4b4a3ed36ada16eb.js",
40
+ "static/chunks/375-4a1c73eb22d653d2.js",
41
+ "static/chunks/289-789ef042acd53608.js",
42
+ "static/chunks/238-16333381c574f65b.js",
43
+ "static/chunks/pages/asset-library-6d9b11ae4af036cb.js"
43
44
  ],
44
45
  "/document-roles": [
45
46
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -59,13 +60,13 @@
59
60
  "static/chunks/main-91fb767ebd74c9c1.js",
60
61
  "static/chunks/433-233659be69169c19.js",
61
62
  "static/chunks/576-6699fed6c88502fe.js",
63
+ "static/chunks/375-4a1c73eb22d653d2.js",
62
64
  "static/chunks/787-c18af810af3433f6.js",
63
65
  "static/chunks/195-2c0168eacab722d2.js",
64
- "static/chunks/375-1e1be370b94c7512.js",
65
66
  "static/chunks/455-97ad88d6604f54b7.js",
66
67
  "static/chunks/506-93f730bc149d0dce.js",
67
68
  "static/chunks/651-b650f9bca2edf976.js",
68
- "static/chunks/pages/documents-487ce1b434da9b82.js"
69
+ "static/chunks/pages/documents-e85faaadf4dc6777.js"
69
70
  ],
70
71
  "/guide": [
71
72
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -88,15 +89,14 @@
88
89
  "static/chunks/main-91fb767ebd74c9c1.js",
89
90
  "static/chunks/433-233659be69169c19.js",
90
91
  "static/chunks/576-6699fed6c88502fe.js",
91
- "static/chunks/787-c18af810af3433f6.js",
92
92
  "static/chunks/985-4b4a3ed36ada16eb.js",
93
- "static/chunks/375-1e1be370b94c7512.js",
94
- "static/chunks/102-881dcc464f983c89.js",
95
- "static/chunks/289-0031e62ca424247b.js",
93
+ "static/chunks/375-4a1c73eb22d653d2.js",
94
+ "static/chunks/787-c18af810af3433f6.js",
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-8c37a455e6cc010f.js"
99
+ "static/chunks/pages/knowledge/file-detail-1a82bb3c9b266edc.js"
100
100
  ],
101
101
  "/knowledge/files": [
102
102
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -105,11 +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",
109
- "static/chunks/102-881dcc464f983c89.js",
110
- "static/chunks/289-0031e62ca424247b.js",
108
+ "static/chunks/375-4a1c73eb22d653d2.js",
109
+ "static/chunks/289-789ef042acd53608.js",
111
110
  "static/css/df824e8d8cadbeb1.css",
112
- "static/chunks/pages/knowledge/files-a4e5c4e1151fc40e.js"
111
+ "static/chunks/pages/knowledge/files-8ca2d555a722d8f0.js"
113
112
  ],
114
113
  "/knowledge/manage": [
115
114
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -118,25 +117,25 @@
118
117
  "static/chunks/433-233659be69169c19.js",
119
118
  "static/chunks/787-c18af810af3433f6.js",
120
119
  "static/chunks/506-93f730bc149d0dce.js",
121
- "static/chunks/788-72bd97a04f2aee27.js",
122
- "static/chunks/pages/knowledge/manage-1363f53928abf98c.js"
120
+ "static/chunks/788-7f7359a830e3f4fd.js",
121
+ "static/chunks/pages/knowledge/manage-e7fbdb89f65913b2.js"
123
122
  ],
124
123
  "/models": [
125
124
  "static/chunks/webpack-4224e970a97a4a86.js",
126
125
  "static/chunks/framework-161be364fd69a7ce.js",
127
126
  "static/chunks/main-91fb767ebd74c9c1.js",
128
127
  "static/chunks/576-6699fed6c88502fe.js",
129
- "static/chunks/195-2c0168eacab722d2.js",
130
128
  "static/chunks/985-4b4a3ed36ada16eb.js",
129
+ "static/chunks/195-2c0168eacab722d2.js",
131
130
  "static/chunks/455-97ad88d6604f54b7.js",
132
131
  "static/chunks/337-b06909f6d29f6d1f.js",
133
- "static/chunks/pages/models-3371ebcdc9cb85fa.js"
132
+ "static/chunks/pages/models-2cc758fed54c92e2.js"
134
133
  ],
135
134
  "/overview": [
136
135
  "static/chunks/webpack-4224e970a97a4a86.js",
137
136
  "static/chunks/framework-161be364fd69a7ce.js",
138
137
  "static/chunks/main-91fb767ebd74c9c1.js",
139
- "static/chunks/795-ed2375ec938022d8.js",
138
+ "static/chunks/795-e18d1f7843b8f683.js",
140
139
  "static/chunks/pages/overview-63f3dda2dde16c9e.js"
141
140
  ],
142
141
  "/prompt": [
@@ -144,10 +143,10 @@
144
143
  "static/chunks/framework-161be364fd69a7ce.js",
145
144
  "static/chunks/main-91fb767ebd74c9c1.js",
146
145
  "static/chunks/576-6699fed6c88502fe.js",
147
- "static/chunks/195-2c0168eacab722d2.js",
148
146
  "static/chunks/985-4b4a3ed36ada16eb.js",
149
- "static/chunks/478-ac4777b05b3c42e8.js",
150
- "static/chunks/pages/prompt-5adc3ca18a2764f4.js"
147
+ "static/chunks/195-2c0168eacab722d2.js",
148
+ "static/chunks/478-6a65262872ea0bbc.js",
149
+ "static/chunks/pages/prompt-5e681123122f38a9.js"
151
150
  ],
152
151
  "/settings": [
153
152
  "static/chunks/webpack-4224e970a97a4a86.js",
@@ -161,12 +160,11 @@
161
160
  "static/chunks/main-91fb767ebd74c9c1.js",
162
161
  "static/chunks/433-233659be69169c19.js",
163
162
  "static/chunks/576-6699fed6c88502fe.js",
164
- "static/chunks/195-2c0168eacab722d2.js",
165
163
  "static/chunks/985-4b4a3ed36ada16eb.js",
166
- "static/chunks/375-1e1be370b94c7512.js",
167
- "static/chunks/102-881dcc464f983c89.js",
168
- "static/chunks/289-0031e62ca424247b.js",
169
- "static/chunks/pages/system/logs-8c5d90301a273cd2.js"
164
+ "static/chunks/375-4a1c73eb22d653d2.js",
165
+ "static/chunks/195-2c0168eacab722d2.js",
166
+ "static/chunks/289-789ef042acd53608.js",
167
+ "static/chunks/pages/system/logs-2126e5cbbce48e88.js"
170
168
  ]
171
169
  },
172
170
  "ampFirstPages": []
@@ -3,9 +3,9 @@
3
3
  "routes": {},
4
4
  "dynamicRoutes": {},
5
5
  "preview": {
6
- "previewModeId": "a2f0488ca88e751ec1da92f4f4d60e54",
7
- "previewModeSigningKey": "b70ee09d75eef96e5966114458db3761a9a792cd896e0aeb9705d54bc224de6c",
8
- "previewModeEncryptionKey": "572d7907cdc005faf9d1f6086921bf7059938f0f6b99db4f15b58b2fa5a03235"
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)}})}};