@geminilight/mindos 0.6.58 → 0.6.59

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 (219) hide show
  1. package/_standalone/.mindos-build-version +1 -1
  2. package/_standalone/.next/BUILD_ID +1 -1
  3. package/_standalone/.next/app-path-routes-manifest.json +24 -24
  4. package/_standalone/.next/build-manifest.json +3 -3
  5. package/_standalone/.next/cache/.previewinfo +1 -1
  6. package/_standalone/.next/cache/.rscinfo +1 -1
  7. package/_standalone/.next/cache/config.json +3 -3
  8. package/_standalone/.next/prerender-manifest.json +3 -3
  9. package/_standalone/.next/react-loadable-manifest.json +1 -1
  10. package/_standalone/.next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
  11. package/_standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  12. package/_standalone/.next/server/app/_global-error.html +2 -2
  13. package/_standalone/.next/server/app/_global-error.rsc +1 -1
  14. package/_standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  15. package/_standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  16. package/_standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  17. package/_standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  18. package/_standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  19. package/_standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  20. package/_standalone/.next/server/app/_not-found/page.js +1 -1
  21. package/_standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  22. package/_standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/_standalone/.next/server/app/agents/[agentKey]/page.js +1 -1
  24. package/_standalone/.next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
  25. package/_standalone/.next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
  26. package/_standalone/.next/server/app/agents/page.js +2 -2
  27. package/_standalone/.next/server/app/agents/page.js.nft.json +1 -1
  28. package/_standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  29. package/_standalone/.next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
  30. package/_standalone/.next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
  31. package/_standalone/.next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
  32. package/_standalone/.next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
  33. package/_standalone/.next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
  34. package/_standalone/.next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
  35. package/_standalone/.next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
  36. package/_standalone/.next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
  37. package/_standalone/.next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
  38. package/_standalone/.next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
  39. package/_standalone/.next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
  40. package/_standalone/.next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
  41. package/_standalone/.next/server/app/api/ask/route.js +3 -3
  42. package/_standalone/.next/server/app/api/ask/route_client-reference-manifest.js +1 -1
  43. package/_standalone/.next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
  44. package/_standalone/.next/server/app/api/auth/route_client-reference-manifest.js +1 -1
  45. package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
  46. package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
  47. package/_standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
  48. package/_standalone/.next/server/app/api/export/route_client-reference-manifest.js +1 -1
  49. package/_standalone/.next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
  50. package/_standalone/.next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
  51. package/_standalone/.next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
  52. package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
  53. package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  54. package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  55. package/_standalone/.next/server/app/api/graph/route_client-reference-manifest.js +1 -1
  56. package/_standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  57. package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
  58. package/_standalone/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  59. package/_standalone/.next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
  60. package/_standalone/.next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
  61. package/_standalone/.next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
  62. package/_standalone/.next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
  63. package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  64. package/_standalone/.next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
  65. package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
  66. package/_standalone/.next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
  67. package/_standalone/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  68. package/_standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  69. package/_standalone/.next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
  70. package/_standalone/.next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
  71. package/_standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  72. package/_standalone/.next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
  73. package/_standalone/.next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
  74. package/_standalone/.next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
  75. package/_standalone/.next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
  76. package/_standalone/.next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
  77. package/_standalone/.next/server/app/api/setup/route_client-reference-manifest.js +1 -1
  78. package/_standalone/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  79. package/_standalone/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
  80. package/_standalone/.next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
  81. package/_standalone/.next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
  82. package/_standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  83. package/_standalone/.next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
  84. package/_standalone/.next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
  85. package/_standalone/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
  86. package/_standalone/.next/server/app/changes/page.js +2 -2
  87. package/_standalone/.next/server/app/changes/page.js.nft.json +1 -1
  88. package/_standalone/.next/server/app/changes/page_client-reference-manifest.js +1 -1
  89. package/_standalone/.next/server/app/echo/[segment]/page.js +3 -3
  90. package/_standalone/.next/server/app/echo/[segment]/page.js.nft.json +1 -1
  91. package/_standalone/.next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
  92. package/_standalone/.next/server/app/echo/page.js +1 -1
  93. package/_standalone/.next/server/app/echo/page.js.nft.json +1 -1
  94. package/_standalone/.next/server/app/echo/page_client-reference-manifest.js +1 -1
  95. package/_standalone/.next/server/app/explore/page.js +2 -2
  96. package/_standalone/.next/server/app/explore/page.js.nft.json +1 -1
  97. package/_standalone/.next/server/app/explore/page_client-reference-manifest.js +1 -1
  98. package/_standalone/.next/server/app/help/page.js +2 -2
  99. package/_standalone/.next/server/app/help/page.js.nft.json +1 -1
  100. package/_standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
  101. package/_standalone/.next/server/app/inbox/history/page.js +1 -1
  102. package/_standalone/.next/server/app/inbox/history/page.js.nft.json +1 -1
  103. package/_standalone/.next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
  104. package/_standalone/.next/server/app/login/page.js +2 -2
  105. package/_standalone/.next/server/app/login/page.js.nft.json +1 -1
  106. package/_standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  107. package/_standalone/.next/server/app/page.js +2 -8
  108. package/_standalone/.next/server/app/page.js.nft.json +1 -1
  109. package/_standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  110. package/_standalone/.next/server/app/setup/page.js +2 -2
  111. package/_standalone/.next/server/app/setup/page.js.nft.json +1 -1
  112. package/_standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  113. package/_standalone/.next/server/app/trash/page.js +3 -3
  114. package/_standalone/.next/server/app/trash/page.js.nft.json +1 -1
  115. package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
  116. package/_standalone/.next/server/app/view/[...path]/page.js +3 -3
  117. package/_standalone/.next/server/app/view/[...path]/page.js.nft.json +1 -1
  118. package/_standalone/.next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
  119. package/_standalone/.next/server/app/wiki/page.js +2 -2
  120. package/_standalone/.next/server/app/wiki/page.js.nft.json +1 -1
  121. package/_standalone/.next/server/app/wiki/page_client-reference-manifest.js +1 -1
  122. package/_standalone/.next/server/app-paths-manifest.json +24 -24
  123. package/_standalone/.next/server/chunks/3484.js +1 -1
  124. package/_standalone/.next/server/chunks/530.js +65 -66
  125. package/_standalone/.next/server/chunks/{6793.js → 8343.js} +2 -2
  126. package/_standalone/.next/server/chunks/9787.js +2 -0
  127. package/_standalone/.next/server/middleware-build-manifest.js +1 -1
  128. package/_standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  129. package/_standalone/.next/server/pages/500.html +2 -2
  130. package/_standalone/.next/server/server-reference-manifest.js +1 -1
  131. package/_standalone/.next/server/server-reference-manifest.json +1 -1
  132. package/_standalone/.next/static/chunks/{1814.a7c127b2c73d1f70.js → 1814.a79b84d37df75c43.js} +1 -1
  133. package/_standalone/.next/static/chunks/3427-2e61a5df1f5e55fb.js +1 -0
  134. package/_standalone/.next/static/chunks/{1053-fe009233cff06e72.js → 5581-dac72e9f16e5ea29.js} +3 -3
  135. package/_standalone/.next/static/chunks/6297-085daa21037d5f81.js +1 -0
  136. package/_standalone/.next/static/chunks/{7249-fa98ca10e9a10f39.js → 7249-6cf8f2b78718c59e.js} +1 -1
  137. package/_standalone/.next/static/chunks/8520-56ec9ff087c15204.js +22 -0
  138. package/_standalone/.next/static/chunks/9905-a19d379cb225246e.js +1 -0
  139. package/_standalone/.next/static/chunks/app/agents/[agentKey]/{page-7bdeab5af8e4f5f2.js → page-35ea6de1af2be3b5.js} +1 -1
  140. package/_standalone/.next/static/chunks/app/agents/page-b172ea3743adb047.js +1 -0
  141. package/_standalone/.next/static/chunks/app/changes/{page-5a72144d1080a699.js → page-6d2f49651c0061f7.js} +1 -1
  142. package/_standalone/.next/static/chunks/app/echo/[segment]/page-84b95256f6e38aae.js +11 -0
  143. package/_standalone/.next/static/chunks/app/explore/{page-d3d99308146c2240.js → page-d9f58000bc445360.js} +2 -2
  144. package/_standalone/.next/static/chunks/app/help/{page-222df603080b5fab.js → page-f8cb806371b3175f.js} +1 -1
  145. package/_standalone/.next/static/chunks/app/inbox/history/{page-07819cf95cb0805f.js → page-26e71fb6f716a4c4.js} +1 -1
  146. package/_standalone/.next/static/chunks/app/layout-b89b0d955f39a753.js +164 -0
  147. package/_standalone/.next/static/chunks/app/login/{page-0eeef685052869a6.js → page-18fb00d568cd1f0e.js} +1 -1
  148. package/_standalone/.next/static/chunks/app/page-a8e6f085f38388bf.js +1 -0
  149. package/_standalone/.next/static/chunks/app/setup/{page-99fcfc460fa29733.js → page-821714e7477be46c.js} +1 -1
  150. package/_standalone/.next/static/chunks/app/trash/{page-54cbd5c98d9de69b.js → page-f92b728b78ac0f7e.js} +1 -1
  151. package/_standalone/.next/static/chunks/app/view/[...path]/{not-found-fc04c2bd4f35bc6f.js → not-found-6e0c75ad26ce8572.js} +1 -1
  152. package/_standalone/.next/static/chunks/app/view/[...path]/page-f87f4901b5e1a88f.js +12 -0
  153. package/_standalone/.next/static/chunks/app/wiki/page-641edb1f3cff2f93.js +1 -0
  154. package/_standalone/.next/static/chunks/{webpack-2c19436659aa657b.js → webpack-72e8d9e9073fd1f9.js} +1 -1
  155. package/_standalone/.next/static/css/6c104b118d3bc9b7.css +1 -0
  156. package/_standalone/.next/trace +64 -64
  157. package/_standalone/app/globals.css +2 -1
  158. package/_standalone/components/AskFab.tsx +4 -4
  159. package/_standalone/components/AskModal.tsx +1 -1
  160. package/_standalone/components/GuideCard.tsx +101 -152
  161. package/_standalone/components/RightAskPanel.tsx +2 -2
  162. package/_standalone/components/ask/AskContent.tsx +90 -51
  163. package/_standalone/components/ask/AskHeader.tsx +218 -18
  164. package/_standalone/components/ask/MessageList.tsx +66 -47
  165. package/_standalone/components/ask/SessionHistory.tsx +86 -60
  166. package/_standalone/components/ask/SessionTabBar.tsx +29 -21
  167. package/_standalone/components/ask/ThinkingBlock.tsx +6 -5
  168. package/_standalone/components/ask/ToolCallBlock.tsx +10 -9
  169. package/_standalone/components/settings/SettingsContent.tsx +1 -1
  170. package/_standalone/data/skills/mindos/SKILL.md +67 -15
  171. package/_standalone/data/skills/mindos-zh/SKILL.md +67 -11
  172. package/_standalone/hooks/useAskSession.ts +23 -1
  173. package/_standalone/lib/stores/locale-store.ts +20 -6
  174. package/_standalone/tsconfig.tsbuildinfo +1 -1
  175. package/app/app/globals.css +2 -1
  176. package/app/app/layout.tsx +16 -4
  177. package/app/components/AskFab.tsx +4 -4
  178. package/app/components/AskModal.tsx +1 -1
  179. package/app/components/GuideCard.tsx +101 -152
  180. package/app/components/HomeContent.tsx +116 -575
  181. package/app/components/RightAskPanel.tsx +2 -2
  182. package/app/components/WikiHomeContent.tsx +151 -3
  183. package/app/components/ask/AskContent.tsx +90 -51
  184. package/app/components/ask/AskHeader.tsx +218 -18
  185. package/app/components/ask/MessageList.tsx +66 -47
  186. package/app/components/ask/SessionHistory.tsx +86 -60
  187. package/app/components/ask/SessionTabBar.tsx +29 -21
  188. package/app/components/ask/ThinkingBlock.tsx +6 -5
  189. package/app/components/ask/ToolCallBlock.tsx +10 -9
  190. package/app/components/settings/SettingsContent.tsx +1 -1
  191. package/app/data/skills/mindos/SKILL.md +67 -15
  192. package/app/data/skills/mindos-zh/SKILL.md +67 -11
  193. package/app/hooks/useAskSession.ts +23 -1
  194. package/app/lib/i18n/modules/ai-chat.ts +97 -10
  195. package/app/lib/i18n/modules/onboarding.ts +12 -12
  196. package/app/lib/stores/LocaleStoreInit.tsx +24 -1
  197. package/app/lib/stores/locale-store.ts +20 -6
  198. package/app/lib/types.ts +1 -0
  199. package/package.json +1 -1
  200. package/skills/mindos/SKILL.md +67 -15
  201. package/skills/mindos/references/knowledge-health.md +120 -0
  202. package/skills/mindos-max/SKILL.md +52 -5
  203. package/skills/mindos-max-zh/SKILL.md +55 -6
  204. package/skills/mindos-zh/SKILL.md +67 -11
  205. package/_standalone/.next/server/chunks/2364.js +0 -2
  206. package/_standalone/.next/server/chunks/357.js +0 -1
  207. package/_standalone/.next/static/chunks/178-105779afb62d36d9.js +0 -1
  208. package/_standalone/.next/static/chunks/2218-d54538000574ffef.js +0 -1
  209. package/_standalone/.next/static/chunks/2549-e63cf57fa927a41d.js +0 -1
  210. package/_standalone/.next/static/chunks/9274-296ab35f9f09e42e.js +0 -1
  211. package/_standalone/.next/static/chunks/app/agents/page-5d1446665ddb3801.js +0 -1
  212. package/_standalone/.next/static/chunks/app/echo/[segment]/page-b0103509ce34444b.js +0 -11
  213. package/_standalone/.next/static/chunks/app/layout-7e02ddf4144b01f1.js +0 -186
  214. package/_standalone/.next/static/chunks/app/page-6a6a12bd6d6812d0.js +0 -7
  215. package/_standalone/.next/static/chunks/app/view/[...path]/page-ca7bdcbf27f88a46.js +0 -12
  216. package/_standalone/.next/static/chunks/app/wiki/page-d492256a93f0b8bc.js +0 -1
  217. package/_standalone/.next/static/css/fd84c8316ead16eb.css +0 -1
  218. /package/_standalone/.next/static/{2ksXveDzEcnCMRIElDkLq → u8p6oIRTcr_ns-ElNZ9rl}/_buildManifest.js +0 -0
  219. /package/_standalone/.next/static/{2ksXveDzEcnCMRIElDkLq → u8p6oIRTcr_ns-ElNZ9rl}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7165],{2431:(e,t,s)=>{"use strict";s.d(t,{z:()=>a});var r=s(12115);let n="mindos:acp-detection";function a(){let e=(0,r.useRef)(function(){try{let e=sessionStorage.getItem(n);if(!e)return null;let t=JSON.parse(e);if("number"!=typeof t.ts||Date.now()-t.ts>18e5)return null;return t}catch{return null}}()),[t,s]=(0,r.useState)(e.current?.installed??[]),[a,l]=(0,r.useState)(e.current?.notInstalled??[]),[i,o]=(0,r.useState)(!e.current),[d,c]=(0,r.useState)(null),[u,m]=(0,r.useState)(0),x=(0,r.useRef)(!1),g=(0,r.useRef)(!1),p=(0,r.useCallback)(()=>{try{sessionStorage.removeItem(n)}catch{}e.current=null,g.current=!0,m(e=>e+1)},[]);return(0,r.useEffect)(()=>{let e=()=>p();return window.addEventListener("mindos:settings-changed",e),()=>window.removeEventListener("mindos:settings-changed",e)},[p]),(0,r.useEffect)(()=>{let r=g.current;if(g.current=!1,e.current&&Date.now()-e.current.ts<18e5&&0===u||x.current)return;x.current=!0;let i=t.length>0||a.length>0;i||o(!0),c(null);let d=!1;return fetch(`/api/acp/detect${r?"?force=1":""}`).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{if(d)return;let r=t.installed??[],a=t.notInstalled??[];try{sessionStorage.setItem(n,JSON.stringify({installed:r,notInstalled:a,ts:Date.now()}))}catch{}e.current={installed:r,notInstalled:a,ts:Date.now()},s(r),l(a)}).catch(e=>{!d&&(i||c(e.message))}).finally(()=>{x.current=!1,d||o(!1)}),()=>{d=!0}},[u]),{installedAgents:t,notInstalledAgents:a,loading:i,error:d,refresh:p}}},6296:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},12651:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},27318:(e,t,s)=>{"use strict";s.d(t,{KT:()=>c,NH:()=>d});var r=s(12115);let n={open:!1,initialMessage:"",source:"user",acpAgent:null},a=new Set;function l(){a.forEach(e=>e())}function i(e){return a.add(e),()=>{a.delete(e)}}function o(){return n}function d(e="",t="user",s=null){n={open:!0,initialMessage:e,source:t,acpAgent:s},l()}function c(){let e=(0,r.useSyncExternalStore)(i,o,o);return{open:e.open,initialMessage:e.initialMessage,source:e.source,acpAgent:e.acpAgent,openWith:(0,r.useCallback)((e,t="user",s=null)=>d(e,t,s),[]),close:(0,r.useCallback)(()=>void(n={open:!1,initialMessage:"",source:"user",acpAgent:null},l()),[])}}},33591:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},48368:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},50927:(e,t,s)=>{"use strict";s.d(t,{default:()=>eB});var r=s(95155),n=s(12115),a=s(4235),l=s(35581),i=s(70617),o=s(2857),d=s(7834),c=s(13845),u=s(3590),m=s(98500),x=s.n(m),g=s(53961),p=s(90425);let b=(0,p.A)("cable",[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]);var h=s(15573),f=s(92451),v=s(41585),j=s(66088),y=s(51914),N=s(60285),k=s(91337),w=s(39498),S=s(93219),C=s(21628),A=s(12651),z=s(13545),M=s(84980),T=s(3926),F=s(93631),D=s(68459),R=s(61878),$=s(10762);function E(e){return/search/.test(e)?"search":/read|list|get/.test(e)?"read":/create/.test(e)?"create":/delete/.test(e)?"delete":/write|update|insert|append/.test(e)?"write":"other"}let L={en:{read:"Read",write:"Write",create:"Create",delete:"Delete",search:"Search",other:"Other"},zh:{read:"读取",write:"写入",create:"创建",delete:"删除",search:"搜索",other:"其他"}},P={read:{bg:"rgba(138,180,216,0.10)",text:"#8ab4d8",border:"rgba(138,180,216,0.25)"},write:{bg:"rgba(200,135,58,0.10)",text:"var(--amber)",border:"rgba(200,135,58,0.25)"},create:{bg:"rgba(122,173,128,0.10)",text:"var(--success)",border:"rgba(122,173,128,0.25)"},delete:{bg:"rgba(200,80,80,0.10)",text:"var(--error)",border:"rgba(200,80,80,0.25)"},search:{bg:"rgba(200,160,216,0.10)",text:"#c8a0d8",border:"rgba(200,160,216,0.25)"},other:{bg:"var(--muted)",text:"var(--muted-foreground)",border:"var(--border)"}};function K({kind:e,size:t=13}){return"read"===e?(0,r.jsx)(M.A,{size:t}):"write"===e?(0,r.jsx)(T.A,{size:t}):"create"===e?(0,r.jsx)(F.A,{size:t}):"delete"===e?(0,r.jsx)(D.A,{size:t}):"search"===e?(0,r.jsx)(R.A,{size:t}):(0,r.jsx)($.A,{size:t})}function O(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return e}}function I(e){let t=Date.now()-new Date(e).getTime(),s=Math.floor(t/6e4),r=Math.floor(t/36e5),n=Math.floor(t/864e5);return s<1?"<1m":s<60?`${s}m`:r<24?`${r}h`:`${n}d`}function H(e){return"string"==typeof e.path?e.path:null}function _({kind:e,locale:t,size:s="md"}){let n=P[e],a=L[t?.startsWith("zh")?"zh":"en"][e];return(0,r.jsxs)("span",{className:"font-display",style:{display:"inline-flex",alignItems:"center",gap:3,padding:"sm"===s?"1px 6px":"2px 8px",borderRadius:999,fontSize:"sm"===s?"0.6rem":"0.68rem",fontWeight:600,background:n.bg,color:n.text,border:`1px solid ${n.border}`,flexShrink:0,whiteSpace:"nowrap"},children:[(0,r.jsx)(K,{kind:e,size:"sm"===s?9:10}),a]})}function B(){let{t:e,locale:t}=(0,l.Y)(),[s,a]=(0,n.useState)([]),[i,o]=(0,n.useState)(!0),[d,c]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=!1,t=()=>{fetch("/api/agent-activity?limit=20").then(e=>e.json()).then(t=>{e||a(t.events??[])}).catch(()=>{}).finally(()=>{e||o(!1)})};t();let s=()=>{"visible"===document.visibilityState&&t()};return document.addEventListener("visibilitychange",s),()=>{e=!0,document.removeEventListener("visibilitychange",s)}},[]);let u=(0,n.useMemo)(()=>{let e=s.filter(e=>{let t=E(e.tool);return"write"===t||"create"===t||"delete"===t});return e.length>=3?e:s},[s]),m=d?u:u.slice(0,5),g=u.length-5;if(i)return(0,r.jsxs)("section",{className:"animate-pulse","aria-label":"Recent Activity",children:[(0,r.jsx)("div",{className:"h-4 w-36 bg-muted rounded mb-3"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:"h-10 bg-muted/50 rounded-lg"}),(0,r.jsx)("div",{className:"h-10 bg-muted/50 rounded-lg"})]})]});if(0===s.length)return null;let p=e.agentsContent?.overview;return(0,r.jsxs)("section",{"aria-label":"Recent Activity",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5 mb-5",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-md bg-[var(--amber-subtle)] text-[var(--amber)]",children:(0,r.jsx)(S.A,{size:13})}),(0,r.jsx)("h2",{className:"text-[13px] font-semibold text-foreground tracking-wide",children:p?.recentActivity??"Recent Activity"}),(0,r.jsx)("div",{className:"ml-auto",children:(0,r.jsxs)(x(),{href:"/agents?tab=activity",className:"flex items-center gap-1.5 text-xs font-medium text-[var(--amber)] hover:opacity-80 transition-colors",children:[(0,r.jsx)(C.A,{size:12}),(0,r.jsx)("span",{children:p?.viewAll??"View all"})]})})]}),(0,r.jsx)("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:m.map((e,s)=>{let n=E(e.tool),a=H(e.params);return(0,r.jsxs)("div",{className:`flex items-center gap-3 px-3.5 py-2.5 ${s>0?"border-t border-border/30":""} hover:bg-muted/30 transition-colors`,children:[(0,r.jsx)(_,{kind:n,locale:t,size:"sm"}),a?(0,r.jsx)(x(),{href:`/view/${(0,k.O0)(a)}`,className:"text-xs text-[var(--amber)]/80 hover:text-[var(--amber)] truncate min-w-0 flex-1 font-display transition-colors",title:a,children:a}):(0,r.jsx)("span",{className:"flex-1"}),e.agentName&&(0,r.jsx)("span",{className:"text-[0.6rem] font-medium text-muted-foreground/70 bg-muted/60 px-1.5 py-0.5 rounded-full shrink-0",title:e.agentName,children:e.agentName.length>20?e.agentName.slice(0,20)+"...":e.agentName}),"ok"===e.result?(0,r.jsx)(A.A,{size:11,className:"shrink-0 text-[var(--success)]/60"}):(0,r.jsx)(z.A,{size:11,className:"shrink-0 text-[var(--error)]/60"}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/40 tabular-nums shrink-0",title:e.ts,children:I(e.ts)})]},e.id??s)})}),g>0&&(0,r.jsxs)("button",{onClick:()=>c(e=>!e),className:"flex items-center gap-1.5 mt-2 text-xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:[(0,r.jsx)(j.A,{size:12,className:`transition-transform duration-200 ${d?"rotate-180":""}`}),(0,r.jsx)("span",{children:d?p?.showLess??"Show less":`${g} more`})]})]})}function J({copy:e,buckets:t,riskQueue:s,mcpRunning:a,mcpPort:l,mcpToolCount:i,mcpEnabled:o=!0,enabledSkillCount:d,allAgents:c,pulseCopy:u,a2aCount:m,onAddCustomAgent:x,onEditCustomAgent:p,onRemoveCustomAgent:N}){s.length;let[w,S]=(0,n.useState)(!1),C=(0,n.useMemo)(()=>[...c].filter(e=>e.present||e.isCustom).sort((e,t)=>!e.installed-!t.installed||e.name.localeCompare(t.name)),[c]);return(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsx)("section",{className:"rounded-xl border border-border bg-gradient-to-b from-card to-card/80 overflow-hidden","aria-label":u.connected,children:(0,r.jsxs)("div",{className:"flex divide-x divide-border/50 [&>*]:flex-1",children:[(0,r.jsx)(W,{icon:(0,r.jsx)(g.A,{size:14,"aria-hidden":"true"}),label:u.connected,value:t.connected.length,total:C.length,tone:"ok"}),(0,r.jsx)(W,{icon:(0,r.jsx)(b,{size:14,"aria-hidden":"true"}),label:u.detected,value:t.detected.length,tone:t.detected.length>0?"warn":"muted"}),(0,r.jsx)(W,{icon:(0,r.jsx)(g.A,{size:14,"aria-hidden":"true"}),label:u.enabledSkills,value:d,tone:"ok"}),o&&(0,r.jsx)(W,{icon:(0,r.jsx)(h.A,{size:14,"aria-hidden":"true"}),label:e.pulseMcp,value:a?`:${l}`:"—",tone:a?"ok":"warn"}),null!=m&&(0,r.jsx)(W,{icon:(0,r.jsx)(f.A,{size:14,"aria-hidden":"true"}),label:e.a2aLabel??"A2A",value:m,tone:m>0?"ok":"muted"})]})}),s.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>S(!w),className:"inline-flex items-center gap-1.5 rounded-full border border-amber-500/25 bg-amber-500/[0.06] px-3 py-1.5 text-sm font-medium text-[var(--amber)] transition-colors duration-150 hover:bg-amber-500/[0.12] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-expanded":w,children:[(0,r.jsx)(v.A,{size:13,className:"shrink-0","aria-hidden":"true"}),e.riskQueue,(0,r.jsx)("span",{className:"tabular-nums text-2xs bg-[var(--amber-dim)] px-1.5 py-0.5 rounded-full select-none",children:s.length}),(0,r.jsx)(j.A,{size:13,className:(0,k.cn)("shrink-0 transition-transform duration-200",w&&"rotate-180"),"aria-hidden":"true"})]}),(0,r.jsx)("div",{className:(0,k.cn)("grid transition-[grid-template-rows] duration-250 ease-out",w?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:(0,r.jsx)("div",{className:"overflow-hidden",...!w&&{inert:!0},children:(0,r.jsx)("ul",{className:"mt-3 space-y-2",role:"list",children:s.map((t,s)=>(0,r.jsxs)("li",{className:`flex items-center gap-3 px-3 py-2.5 rounded-lg border text-sm ${"error"===t.severity?"border-destructive/20 bg-destructive/[0.03]":"border-amber-500/15 bg-background"}`,style:{animationDelay:`${50*s}ms`},children:[(0,r.jsx)("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${"error"===t.severity?"bg-destructive":"bg-[var(--amber)]"}`,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-foreground flex-1 min-w-0",children:t.title}),(0,r.jsx)("span",{className:`text-2xs px-1.5 py-0.5 rounded font-medium shrink-0 select-none ${"error"===t.severity?"bg-destructive/10 text-destructive":"bg-[var(--amber-dim)] text-[var(--amber-text)]"}`,children:"error"===t.severity?e.riskLevelError:e.riskLevelWarn})]},t.id))})})})]}),(0,r.jsx)(B,{}),C.length>0?(0,r.jsxs)("section",{"aria-label":e.usagePulse,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("h2",{className:"text-sm font-medium text-foreground",children:e.usagePulse}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground tabular-nums select-none",children:e.agentCount(C.length)})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:[C.map((t,s)=>(0,r.jsx)(Y,{agent:t,copy:e,index:s,mcpEnabled:o,onEdit:t.isCustom?p:void 0,onRemove:t.isCustom?N:void 0},t.key)),x&&(0,r.jsxs)("button",{type:"button",onClick:x,className:"group rounded-xl border-2 border-dashed border-border/60 bg-transparent p-3.5 hover:border-[var(--amber)]/30 hover:bg-muted/20 active:scale-[0.98] transition-all duration-150 flex flex-col items-center justify-center gap-2 min-h-[100px] cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":e.addCustomAgent,children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full border-2 border-dashed border-muted-foreground/30 flex items-center justify-center group-hover:border-[var(--amber)]/50 transition-colors duration-150",children:(0,r.jsx)(y.A,{size:16,className:"text-muted-foreground/50 group-hover:text-[var(--amber)] transition-colors duration-150"})}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground/60 group-hover:text-muted-foreground transition-colors duration-150",children:e.addCustomAgent})]})]})]}):(0,r.jsxs)("section",{className:"rounded-xl border border-border/40 bg-card/30 p-12 text-center","aria-label":e.usagePulse,children:[(0,r.jsx)("div",{className:"w-14 h-14 rounded-2xl bg-muted/40 flex items-center justify-center mx-auto mb-4",children:(0,r.jsx)(b,{size:22,className:"text-muted-foreground/50","aria-hidden":"true"})}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground/70 leading-relaxed max-w-xs mx-auto",children:e.nextActionHint})]})]})}function W({icon:e,label:t,value:s,total:n,tone:a}){return(0,r.jsxs)("div",{className:`px-3 py-4 text-center ${"ok"===a?"hover:bg-muted/20":"warn"===a?"hover:bg-[var(--amber)]/[0.04]":"hover:bg-muted/20"} transition-colors duration-150 group/stat`,role:"group","aria-label":`${t}: ${s}${void 0!==n?`/${n}`:""}`,children:[(0,r.jsx)("div",{className:`flex items-center justify-center gap-1.5 mb-2 ${"ok"===a?"text-[var(--success)]/70":"warn"===a?"text-[var(--amber)]/70":"text-muted-foreground/40"} group-hover/stat:opacity-100 transition-all duration-150`,children:e}),(0,r.jsxs)("p",{className:`text-xl font-semibold tabular-nums leading-none mb-1.5 ${"ok"===a?"text-foreground":"warn"===a?"text-amber-600 dark:text-amber-400":"text-muted-foreground"}`,children:[s,void 0!==n&&(0,r.jsxs)("span",{className:"text-xs font-normal text-muted-foreground ml-0.5",children:["/",n]})]}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/70 truncate block",children:t})]})}function Y({agent:e,copy:t,index:s,mcpEnabled:a=!0,onEdit:l,onRemove:i}){let[o,d]=(0,n.useState)(!1),c=(0,n.useRef)(null),m=(0,u.yv)(e),p=e.configuredMcpServerCount??e.configuredMcpServers?.length??0,b=e.installedSkillCount??e.installedSkillNames?.length??0,f=e.runtimeConversationSignal||e.runtimeUsageSignal,v=e.isCustom,j="connected"===m?t.connected:"detected"===m?t.detected:t.notFound,y="connected"===m?"bg-muted text-muted-foreground":"detected"===m?"bg-[var(--amber-dim)] text-[var(--amber-text)]":"bg-error/10 text-error";return(0,n.useEffect)(()=>{if(!o)return;let e=e=>{c.current&&!c.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[o]),(0,r.jsxs)(x(),{href:`/agents/${encodeURIComponent(e.key)}`,className:(0,k.cn)("group relative rounded-xl border border-border bg-card p-3.5","hover:border-[var(--amber)]/30 hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)]","active:scale-[0.98]","transition-all duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",v&&"border-l-2 border-l-[var(--amber)]/40"),children:[v&&(l||i)&&(0,r.jsxs)("div",{ref:c,className:"absolute top-2.5 right-2.5 z-10",children:[(0,r.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(!o)},className:"w-6 h-6 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted opacity-0 group-hover:opacity-100 transition-all duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:opacity-100","aria-label":"Agent options",children:(0,r.jsx)(N.A,{size:14})}),o&&(0,r.jsxs)("div",{className:"absolute right-0 top-full mt-1 w-32 bg-card border border-border rounded-lg shadow-lg py-1 animate-in fade-in-0 zoom-in-95 duration-100",children:[l&&(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),d(!1),l(e)},className:"w-full text-left px-3 py-1.5 text-sm text-foreground hover:bg-muted transition-colors duration-100 cursor-pointer",children:t.customAgentEdit}),i&&(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),d(!1),i(e)},className:"w-full text-left px-3 py-1.5 text-sm text-destructive hover:bg-muted transition-colors duration-100 cursor-pointer",children:t.customAgentRemove})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2.5 mb-3",children:[(0,r.jsx)(w.lx,{name:e.name,status:m,size:"sm"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground block truncate group-hover:text-[var(--amber)] transition-colors duration-150",children:e.name}),e.transport&&"connected"===m&&(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/60 font-mono",children:e.transport})]}),(0,r.jsx)("span",{className:`text-2xs px-2 py-0.5 rounded-full font-medium shrink-0 select-none ${y}`,children:j})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 pt-2.5 border-t border-border/40",children:[a&&(0,r.jsx)(U,{icon:(0,r.jsx)(h.A,{size:11,"aria-hidden":"true"}),value:p,label:t.colMcp}),(0,r.jsx)(U,{icon:(0,r.jsx)(g.A,{size:11,"aria-hidden":"true"}),value:b,label:t.colSkills}),(0,r.jsx)("span",{className:"flex-1 min-w-[4px]"}),f&&(0,r.jsxs)("span",{className:"flex items-center gap-1 text-[var(--success)]",title:t.runtimeActive,children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--success)] animate-pulse","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-2xs font-medium",children:t.runtimeActive})]})]})]})}function U({icon:e,value:t,label:s}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md ${t>0?"bg-muted/40":""}`,title:s,"aria-label":`${s}: ${t}`,children:[(0,r.jsx)("span",{className:t>0?"text-muted-foreground":"text-muted-foreground/30",children:e}),(0,r.jsx)("span",{className:`tabular-nums text-xs ${t>0?"text-foreground font-medium":"text-muted-foreground/40"}`,children:t})]})}var V=s(91958),q=s(22356);function G({copy:e,mcp:t,buckets:s,copyState:a,onCopySnippet:l}){let[i,o]=(0,n.useState)("byServer"),[d,c]=(0,n.useState)(""),[m,x]=(0,n.useState)("all"),[g,p]=(0,n.useState)("all"),[b,f]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),y=(0,n.useMemo)(()=>(0,u.gJ)(t.agents),[t.agents]),N=(0,n.useMemo)(()=>(0,u.gJ)((0,u.fH)(t.agents,{query:d,status:m,transport:g})),[t.agents,d,m,g]),k=(0,n.useMemo)(()=>(0,u.HL)(t.agents),[t.agents]),S=(0,n.useMemo)(()=>{let e=d.trim().toLowerCase();return e?k.filter(t=>t.serverName.toLowerCase().includes(e)):k},[k,d]);async function C(e){f(`reconnect:${e.key}`);try{let s="project"===e.scope?"project":"global",r="http"===e.transport?"http":"stdio";await t.installAgent(e.key,{scope:s,transport:r}),await t.refresh()}catch(e){console.error("[mcp] reconnect failed",e)}finally{f(null)}}async function A(e){f(`install:${e}`);try{await t.installAgent(e,{scope:"global",transport:"stdio"}),await t.refresh()}catch(e){console.error("[mcp] install mindos failed",e)}finally{f(null)}}async function z(){if(null!==b||0===N.length)return;f("bulk"),j(e.bulkRunning);let s=[];for(let e of N){let r="project"===e.scope?"project":"global",n="http"===e.transport?"http":"stdio",a=await t.installAgent(e.key,{scope:r,transport:n});s.push({agentKey:e.key,ok:a})}await t.refresh();let r=(0,u.xJ)(s);j(e.bulkSummary(r.succeeded,r.failed)),f(null)}let M="refresh"===b;return(0,r.jsxs)("section",{className:"space-y-4 overflow-hidden","aria-label":e.title,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsxs)("h2",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted/50 flex items-center justify-center",children:(0,r.jsx)(h.A,{size:13,className:"text-muted-foreground/70","aria-hidden":"true"})}),e.title]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{f("refresh"),t.refresh().finally(()=>f(null))},disabled:M,"aria-label":e.refresh,className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-md px-1.5 py-1 hover:bg-muted disabled:opacity-50 transition-colors duration-150",children:[(0,r.jsx)(V.A,{size:13,className:M?"animate-spin":""}),e.refresh]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-background",role:"tablist","aria-label":e.title,children:[(0,r.jsx)(w.KF,{active:"byServer"===i,label:e.tabs.byServer,onClick:()=>o("byServer")}),(0,r.jsx)(w.KF,{active:"byAgent"===i,label:e.tabs.byAgent,onClick:()=>o("byAgent")})]})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border/60 bg-gradient-to-r from-card to-card/80 p-3.5",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2 text-xs",children:[(0,r.jsx)(w.md,{tone:"ok",label:e.filters.connected,count:s.connected.length}),(0,r.jsx)(w.md,{tone:"warn",label:e.filters.detected,count:s.detected.length}),s.notFound.length>0&&(0,r.jsx)(w.md,{tone:"neutral",label:e.filters.notFound,count:s.notFound.length}),(0,r.jsx)("span",{className:"text-muted-foreground/40","aria-hidden":"true",children:"|"}),(0,r.jsx)(w.md,{tone:t.status?.running?"ok":"neutral",label:e.mcpServerLabel,count:+!!t.status?.running})]}),!t.status?.running&&(0,r.jsx)("div",{className:"mt-2 pt-2 border-t border-border/60",role:"alert",children:(0,r.jsxs)("p",{className:"text-xs text-destructive flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-destructive shrink-0","aria-hidden":"true"}),e.riskMcpStopped]})})]}),(0,r.jsx)(w.DO,{value:d,onChange:c,placeholder:"byAgent"===i?e.searchPlaceholder:e.searchServersPlaceholder,ariaLabel:e.searchPlaceholder,icon:R.A}),"byAgent"===i?(0,r.jsx)(Q,{copy:e,agents:N,busyAction:b,copyState:a,bulkMessage:v,statusFilter:m,transportFilter:g,onStatusFilter:x,onTransportFilter:p,onCopySnippet:l,onReconnect:C,onInstallMindos:A,onBulkReconnect:z}):(0,r.jsx)(Z,{copy:e,servers:S,allAgents:y,busyAction:b,onInstallMindos:A,onReconnect:C})]})}function Q({copy:e,agents:t,busyAction:s,copyState:n,bulkMessage:a,statusFilter:l,transportFilter:i,onStatusFilter:o,onTransportFilter:d,onCopySnippet:c,onReconnect:m,onInstallMindos:g,onBulkReconnect:p}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsxs)("div",{role:"group","aria-label":e.table.status,className:"flex items-center gap-0.5 rounded-md border border-border p-0.5 bg-background",children:[(0,r.jsx)(w.KF,{active:"all"===l,label:e.filters.all,onClick:()=>o("all")}),(0,r.jsx)(w.KF,{active:"connected"===l,label:e.filters.connected,onClick:()=>o("connected")}),(0,r.jsx)(w.KF,{active:"detected"===l,label:e.filters.detected,onClick:()=>o("detected")}),(0,r.jsx)(w.KF,{active:"notFound"===l,label:e.filters.notFound,onClick:()=>o("notFound")})]}),(0,r.jsxs)("div",{role:"group","aria-label":e.table.transport,className:"flex items-center gap-0.5 rounded-md border border-border p-0.5 bg-background",children:[(0,r.jsx)(w.KF,{active:"all"===i,label:e.transportFilters.all,onClick:()=>d("all")}),(0,r.jsx)(w.KF,{active:"stdio"===i,label:e.transportFilters.stdio,onClick:()=>d("stdio")}),(0,r.jsx)(w.KF,{active:"http"===i,label:e.transportFilters.http,onClick:()=>d("http")}),(0,r.jsx)(w.KF,{active:"other"===i,label:e.transportFilters.other,onClick:()=>d("other")})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(w.rA,{onClick:()=>void p(),disabled:null!==s||0===t.length,busy:"bulk"===s,label:e.bulkReconnectFiltered}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground tabular-nums",children:e.resultCount(t.length)}),(0,r.jsx)(w.Mv,{message:a})]}),0===t.length?(0,r.jsx)(w.pp,{message:e.emptyState}):(0,r.jsx)("div",{className:"space-y-2",children:t.map(t=>{let a=(0,u.yv)(t),l=t.configuredMcpServers??[],i=(t.installedSkillNames??[]).length;return(0,r.jsxs)("div",{className:`rounded-xl border bg-card group hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)] transition-all duration-150 ${"detected"===a?"border-l-2 border-l-[var(--amber)] border-border":"notFound"===a?"border-l-2 border-l-error border-border":"border-border"}`,children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 p-3",children:[(0,r.jsx)(w.lx,{name:t.name,status:a}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(x(),{href:`/agents/${encodeURIComponent(t.key)}`,className:"text-sm font-medium text-foreground hover:underline cursor-pointer truncate",children:t.name}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground font-mono shrink-0",children:t.transport??t.preferredTransport}),(0,r.jsx)("span",{className:`text-2xs px-1.5 py-0.5 rounded shrink-0 ${"connected"===a?"bg-muted text-muted-foreground":"detected"===a?"bg-[var(--amber-dim)] text-[var(--amber-text)]":"bg-error/10 text-error"}`,children:e.status[a]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 text-2xs text-muted-foreground",children:[(0,r.jsxs)("span",{className:"tabular-nums",children:[l.length," MCP"]}),(0,r.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,r.jsxs)("span",{className:"tabular-nums",children:[i," skills"]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0 md:opacity-0 md:group-hover:opacity-100 md:focus-within:opacity-100 transition-opacity duration-150",children:[(0,r.jsx)(w.rA,{onClick:()=>void c(t.key),disabled:!1,busy:!1,label:n===t.key?e.actions.copied:e.actions.copySnippet}),t.installed?(0,r.jsx)(w.rA,{onClick:()=>void m(t),disabled:null!==s,busy:s===`reconnect:${t.key}`,label:e.actions.reconnect}):(0,r.jsx)(w.rA,{onClick:()=>void g(t.key),disabled:null!==s,busy:s===`install:${t.key}`,label:e.installMindos,variant:"primary"}),!t.installed&&(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/60",children:"or CLI Skill"})]})]}),l.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-1 px-3 pb-3 ml-12",children:l.map(e=>(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-muted/40 border border-border/30 px-2.5 py-0.5 text-2xs text-muted-foreground hover:bg-muted/60 transition-colors duration-100",children:[(0,r.jsx)("span",{className:"w-1 h-1 rounded-full bg-[var(--amber)]","aria-hidden":"true"}),e]},e))})]},t.key)})})]})}function Z({copy:e,servers:t,allAgents:s,busyAction:a,onInstallMindos:l,onReconnect:i}){let[o,d]=(0,n.useState)(null),[c,m]=(0,n.useState)(null),[g,p]=(0,n.useState)(null),[b,f]=(0,n.useState)(null),[v,j]=(0,n.useState)({}),y=(0,n.useCallback)(async(e,t)=>{d(null),await l(e)},[l]),N=(0,n.useCallback)(async()=>{if(!c)return;let{agentKey:t}=c;m(null);let r=s.find(e=>e.key===t),n=r?.scope==="project"?"project":"global";try{await (0,q.n)("/api/mcp/uninstall",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agents:[{key:t,scope:n}]})}),p(e.removeSuccess??"Removed. Restart your agent to apply.")}catch{p(e.removeFailed??"Failed to remove. Try editing the config file manually.")}setTimeout(()=>p(null),4e3)},[c,s,e]),k=(0,n.useCallback)(async(t,s)=>{f(t),j(s=>({...s,[t]:e.reconnectAllRunning}));let r=0,n=0;for(let e of s)try{await i(e),r++}catch{n++}j(s=>({...s,[t]:e.reconnectAllDone(r,n)})),f(null),setTimeout(()=>j(e=>{let s={...e};return delete s[t],s}),4e3)},[e,i]);return 0===t.length?(0,r.jsx)(w.pp,{message:e.crossAgentServersEmpty}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("p",{className:"text-2xs text-muted-foreground tabular-nums",children:e.resultCount(t.length)}),g&&(0,r.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-md border border-border bg-muted/50 px-3 py-2 text-xs text-muted-foreground animate-in fade-in duration-200",children:g}),t.map(t=>{let n=t.agents.map(e=>s.find(t=>t.name===e)).filter(Boolean),l=t.agents.filter(e=>!n.some(t=>t.name===e)),i=s.filter(e=>!t.agents.includes(e.name)),c=n.filter(e=>"connected"===(0,u.yv)(e)).length,g=n.filter(e=>"detected"===(0,u.yv)(e)).length,p=n.length-c-g+l.length;return(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)] transition-all duration-200",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,r.jsx)("div",{className:"w-7 h-7 rounded-lg bg-[var(--amber)]/[0.08] flex items-center justify-center shrink-0",children:(0,r.jsx)(h.A,{size:13,className:"text-[var(--amber)]","aria-hidden":"true"})}),(0,r.jsx)("span",{className:"text-sm font-semibold text-foreground truncate",children:t.serverName})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[n.length>0&&(0,r.jsx)(w.rA,{onClick:()=>void k(t.serverName,n),disabled:null!==b||null!==a,busy:b===t.serverName,label:e.reconnectAllInServer,busyLabel:e.reconnectAllRunning}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(w.ZC,{onClick:()=>d(o===t.serverName?null:t.serverName),label:e.addAgent,size:"sm"}),(0,r.jsx)(w.BK,{open:o===t.serverName,agents:i.map(e=>({key:e.key,name:e.name})),emptyLabel:e.noAvailableAgents,onSelect:e=>void y(e,t.serverName),onClose:()=>d(null)})]})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-2xs text-muted-foreground mb-3",children:[(0,r.jsx)("span",{className:"tabular-nums",children:e.serverAgentCount(t.agents.length)}),c>0&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--success)]","aria-hidden":"true"}),c]}),g>0&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--amber)]","aria-hidden":"true"}),g]}),p>0&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-muted-foreground","aria-hidden":"true"}),p]})]}),v[t.serverName]&&(0,r.jsx)("p",{role:"status",className:"text-2xs text-muted-foreground mb-2 animate-in fade-in duration-200",children:v[t.serverName]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[n.map(e=>{let s=(0,u.yv)(e);return(0,r.jsx)(x(),{href:`/agents/${encodeURIComponent(e.key)}`,className:"cursor-pointer",children:(0,r.jsx)(w.lx,{name:e.name,status:s,onRemove:()=>m({agentKey:e.key,agentName:e.name,serverName:t.serverName})})},e.key)}),l.map(e=>(0,r.jsx)(w.lx,{name:e,status:"notFound"},e))]})]},t.serverName)})]}),(0,r.jsx)(w.TM,{open:null!==c,title:e.confirmRemoveTitle,message:c?e.confirmRemoveMessage(c.agentName,c.serverName):"",confirmLabel:e.removeFromServer,cancelLabel:e.cancel,onConfirm:N,onCancel:()=>m(null),variant:"destructive"})]})}var X=s(14871),ee=s(21362),et=s(20171),es=s(85641);function er({copy:e,mcp:t,buckets:s}){let[a,l]=(0,n.useState)("bySkill"),[i,o]=(0,n.useState)(""),[d,c]=(0,n.useState)("all"),[m,x]=(0,n.useState)("all"),[p,b]=(0,n.useState)("all"),[h,f]=(0,n.useState)(!1),[v,j]=(0,n.useState)(null),[y,N]=(0,n.useState)(null),k=(0,n.useMemo)(()=>(0,u.x3)(t.agents),[t.agents]),S=(0,n.useMemo)(()=>(0,u.gJ)(t.agents),[t.agents]),C=(0,n.useMemo)(()=>(0,u.ag)(t.skills,k),[t.skills,k]),A=(0,n.useMemo)(()=>t.skills.filter(e=>e.enabled).length,[t.skills]),z=(0,n.useMemo)(()=>t.skills.filter(e=>!e.enabled).length,[t.skills]),M=(0,n.useMemo)(()=>(0,u.IK)(t.skills).size,[t.skills]),T=(0,n.useMemo)(()=>C.filter(e=>"native"===e.kind).length,[C]),F=(0,n.useMemo)(()=>(0,u.Ri)(C,{query:i,source:d,status:m,capability:p}),[C,i,d,m,p]),D=(0,n.useMemo)(()=>(0,u.GU)(F),[F]),$=(0,n.useMemo)(()=>["research","coding","docs","ops","memory"].map(t=>({key:t,label:e.groupLabels[t]})),[e.groupLabels]),E=(0,n.useMemo)(()=>y?C.find(e=>e.name===y)??null:null,[y,C]),L=(0,n.useMemo)(()=>y?t.skills.find(e=>e.name===y)??null:null,[y,t.skills]),P=(0,n.useCallback)(async e=>{await (0,q.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",name:e})}),window.dispatchEvent(new Event("mindos:skills-changed")),await t.refresh()},[t]),K=async s=>{if(h)return;let r=(0,u.G9)(F,s);if(0===r.length)return void j(e.bulkNoChanges);f(!0),j(e.bulkRunning);let n=[];for(let e of r){let r=await t.toggleSkill(e,s);n.push({skillName:e,ok:r})}let a=(0,u.xR)(n);j(0===a.failed?e.bulkAllSucceeded(a.succeeded):e.bulkPartialFailed(a.succeeded,a.failed)),f(!1)};return(0,r.jsxs)("section",{className:"space-y-4 overflow-hidden","aria-label":e.title,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("h2",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted/50 flex items-center justify-center",children:(0,r.jsx)(g.A,{size:13,className:"text-muted-foreground/70","aria-hidden":"true"})}),e.title]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-background",role:"tablist","aria-label":e.title,children:[(0,r.jsx)(w.KF,{active:"bySkill"===a,label:e.tabs.bySkill,onClick:()=>l("bySkill")}),(0,r.jsx)(w.KF,{active:"byAgent"===a,label:e.tabs.byAgent,onClick:()=>l("byAgent")})]})]}),(0,r.jsx)("div",{className:"rounded-xl border border-border/60 bg-gradient-to-r from-card to-card/80 p-3.5",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2 text-xs",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--success)]","aria-hidden":"true"}),e.summaryEnabled(A)]}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-muted-foreground","aria-hidden":"true"}),e.summaryDisabled(z)]}),M>0&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[var(--amber)]",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--amber)]","aria-hidden":"true"}),e.summaryAttention(M)]}),T>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-muted-foreground/40","aria-hidden":"true",children:"|"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--amber)]","aria-hidden":"true"}),e.summaryNative(T)]})]})]})}),(0,r.jsx)(w.DO,{value:i,onChange:o,placeholder:e.searchPlaceholder,ariaLabel:e.searchPlaceholder,icon:R.A}),"bySkill"===a?(0,r.jsx)(en,{copy:e,filtered:F,grouped:D,allAgents:S,source:d,status:m,capability:p,capabilityOptions:$,bulkRunning:h,bulkMessage:v,onSourceChange:c,onStatusChange:x,onCapabilityChange:b,onBulkToggle:K,onToggleSkill:t.toggleSkill,onRefresh:t.refresh,onOpenDetail:N}):(0,r.jsx)(el,{copy:e,agents:S,skills:t.skills,crossAgentSkills:k,query:i,onToggleSkill:t.toggleSkill,onOpenDetail:N}),(0,r.jsx)(es.A,{open:null!==y,skillName:y,skill:L,agentNames:E?.agents??[],isNative:E?.kind==="native",nativeSourcePath:E?.kind==="native"&&E.agents.length>0?t.agents.find(e=>e.name===E.agents[0])?.installedSkillSourcePath:void 0,copy:e.skillPopover,onClose:()=>N(null),onToggle:t.toggleSkill,onDelete:P,onRefresh:t.refresh,allAgentNames:t.agents.filter(e=>e.present&&e.installed).map(e=>e.name)})]})}function en({copy:e,filtered:t,grouped:s,allAgents:a,source:l,status:i,capability:o,capabilityOptions:d,bulkRunning:c,bulkMessage:u,onSourceChange:m,onStatusChange:x,onCapabilityChange:g,onBulkToggle:p,onToggleSkill:b,onRefresh:h,onOpenDetail:f}){let[v,j]=(0,n.useState)(null),[y,N]=(0,n.useState)(null),[k,S]=(0,n.useState)(null),[C,A]=(0,n.useState)(null),[z,M]=(0,n.useState)(null),T=(0,n.useCallback)(()=>{j(null),A(e.manualSkillHint),setTimeout(()=>A(null),4e3)},[e.manualSkillHint]),F=(0,n.useCallback)(async t=>{N(null),M(t);try{await (0,q.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",name:t})}),A(e.skillDeleted),window.dispatchEvent(new Event("mindos:skills-changed")),await h()}catch{A(e.skillDeleteFailed)}finally{M(null),setTimeout(()=>A(null),3e3)}},[e.skillDeleted,e.skillDeleteFailed,h]),D=(0,n.useMemo)(()=>{let e=[];for(let[t,r]of Object.entries(s)){if(0===r.length)continue;let s=[...r].sort((e,t)=>e.kind!==t.kind?"mindos"===e.kind?-1:1:e.enabled!==t.enabled?e.enabled?-1:1:e.name.localeCompare(t.name));e.push([t,s])}return e},[s]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsxs)("div",{role:"group","aria-label":"Source",className:"flex items-center gap-0.5 rounded-md border border-border p-0.5 bg-background",children:[(0,r.jsx)(w.KF,{active:"all"===l,label:e.sourceAll,onClick:()=>m("all")}),(0,r.jsx)(w.KF,{active:"builtin"===l,label:e.sourceBuiltin,onClick:()=>m("builtin")}),(0,r.jsx)(w.KF,{active:"user"===l,label:e.sourceUser,onClick:()=>m("user")}),(0,r.jsx)(w.KF,{active:"native"===l,label:e.sourceNative,onClick:()=>m("native")})]}),(0,r.jsxs)("div",{role:"group","aria-label":"Status",className:"flex items-center gap-0.5 rounded-md border border-border p-0.5 bg-background",children:[(0,r.jsx)(w.KF,{active:"all"===i,label:e.statusAll,onClick:()=>x("all")}),(0,r.jsx)(w.KF,{active:"enabled"===i,label:e.statusEnabled,onClick:()=>x("enabled")}),(0,r.jsx)(w.KF,{active:"disabled"===i,label:e.statusDisabled,onClick:()=>x("disabled")}),(0,r.jsx)(w.KF,{active:"attention"===i,label:e.statusAttention,onClick:()=>x("attention")})]}),(0,r.jsxs)("div",{role:"group","aria-label":"Capability",className:"flex items-center gap-0.5 rounded-md border border-border p-0.5 bg-background",children:[(0,r.jsx)(w.KF,{active:"all"===o,label:e.capabilityAll,onClick:()=>g("all")}),d.map(e=>(0,r.jsx)(w.KF,{active:o===e.key,label:e.label,onClick:()=>g(e.key)},e.key))]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(w.rA,{onClick:()=>void p(!0),disabled:c,busy:c,label:e.bulkEnableFiltered}),(0,r.jsx)(w.rA,{onClick:()=>void p(!1),disabled:c,busy:!1,label:e.bulkDisableFiltered}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground tabular-nums",children:e.resultCount(t.length)}),(0,r.jsx)(w.Mv,{message:u})]}),C&&(0,r.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-md border border-border bg-muted/50 px-3 py-2 text-xs text-muted-foreground animate-in fade-in duration-200",children:C}),0===D.length?(0,r.jsx)(w.pp,{message:e.noSkillsMatchFilter}):(0,r.jsx)(ea,{sortedGrouped:D,allAgents:a,copy:e,pickerSkill:k,deleteBusy:z,onOpenDetail:f,onToggleSkill:b,setPickerSkill:S,setHintMessage:A,setConfirmSkillDelete:N,setConfirmAgentRemove:j}),(0,r.jsx)(w.TM,{open:null!==v,title:e.confirmRemoveAgentTitle,message:v?e.confirmRemoveAgentMessage(v.agentName,v.skillName):"",confirmLabel:e.removeAgentFromSkill,cancelLabel:e.cancelSkillAction,onConfirm:T,onCancel:()=>j(null),variant:"destructive"}),(0,r.jsx)(w.TM,{open:null!==y,title:e.confirmDeleteSkillTitle,message:y?e.confirmDeleteSkillMessage(y):"",confirmLabel:e.skillDeleteAction,cancelLabel:e.cancelSkillAction,onConfirm:()=>y&&void F(y),onCancel:()=>N(null),variant:"destructive"})]})}function ea({sortedGrouped:e,allAgents:t,copy:s,pickerSkill:a,deleteBusy:l,onOpenDetail:i,onToggleSkill:o,setPickerSkill:d,setHintMessage:c,setConfirmSkillDelete:u,setConfirmAgentRemove:m}){let x=(0,n.useRef)(null),p=(0,n.useMemo)(()=>{let t=[];for(let[s,r]of e)t.push({type:"header",groupKey:s,count:r.length}),r.forEach((e,s)=>{t.push({type:"card",skill:e,isLast:s===r.length-1})});return t},[e]),b=(0,n.useCallback)((e,n)=>{if("header"===n.type)return(0,r.jsxs)("div",{className:"flex items-center gap-2 pt-3 pb-2.5",children:[(0,r.jsx)("span",{className:"w-1 h-4 rounded-full bg-[var(--amber)]/40","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:s.groupLabels[n.groupKey]}),(0,r.jsxs)("span",{className:"text-2xs tabular-nums text-muted-foreground/50 font-medium",children:["(",n.count,")"]})]});let{skill:x}=n,p=t.filter(e=>!x.agents.includes(e.name)).map(e=>({key:e.key,name:e.name})),b="mindos"===x.kind&&"user"===x.source;return(0,r.jsx)("div",{className:n.isLast?"pb-0":"pb-3",children:(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)] transition-all duration-200",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)(g.A,{size:14,className:`shrink-0 ${x.enabled?"text-[var(--amber)]":"text-muted-foreground/50"}`,"aria-hidden":"true"}),(0,r.jsx)("button",{type:"button",onClick:()=>i(x.name),className:"text-sm font-medium text-foreground truncate hover:text-[var(--amber)] cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded text-left",children:x.name}),(0,r.jsx)("span",{className:`text-2xs shrink-0 px-1.5 py-0.5 rounded ${"native"===x.kind||"builtin"===x.source?"bg-muted text-muted-foreground":"bg-[var(--amber-dim)] text-[var(--amber-text)]"}`,children:"native"===x.kind?s.sourceNative:"builtin"===x.source?s.sourceBuiltin:s.sourceUser})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[b&&(0,r.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),u(x.name)},disabled:l===x.name,className:"text-muted-foreground hover:text-destructive cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded p-1 disabled:opacity-50 transition-colors duration-150","aria-label":`${s.skillDeleteAction} ${x.name}`,children:(0,r.jsx)(D.A,{size:14})}),"mindos"===x.kind?(0,r.jsx)(et.lM,{size:"sm",checked:x.enabled,onChange:e=>void o(x.name,e)}):(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/60 select-none","aria-label":"read-only",children:"—"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(w.ZC,{onClick:()=>d(a===x.name?null:x.name),label:s.addAgentToSkill,size:"sm"}),(0,r.jsx)(w.BK,{open:a===x.name,agents:p,emptyLabel:s.noAvailableAgentsForSkill,onSelect:()=>{d(null),c(s.manualSkillHint),setTimeout(()=>c(null),4e3)},onClose:()=>d(null)})]})]})]}),(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-2xs text-muted-foreground mb-3",children:(0,r.jsx)("span",{className:"tabular-nums",children:s.skillAgentCount(x.agents.length)})}),(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:x.agents.map(e=>(0,r.jsx)(w.lx,{name:e,onRemove:()=>m({agentName:e,skillName:x.name})},e))})]})})},[t,s,a,l,i,o,d,c,u,m]);return(0,r.jsx)(X.aY,{ref:x,style:{height:"calc(100vh - 340px)",minHeight:200},data:p,itemContent:b,overscan:200,increaseViewportBy:{top:100,bottom:100}})}function el({copy:e,agents:t,skills:s,crossAgentSkills:a,query:l,onToggleSkill:i,onOpenDetail:o}){let d=l.trim().toLowerCase(),c=(0,n.useMemo)(()=>d?t.filter(e=>!!`${e.name} ${e.key}`.toLowerCase().includes(d)||(e.installedSkillNames??[]).some(e=>e.toLowerCase().includes(d))):t,[t,d]),m=(0,n.useMemo)(()=>d?s.filter(e=>e.name.toLowerCase().includes(d)||e.description.toLowerCase().includes(d)):s,[s,d]);return 0===c.length?(0,r.jsx)(w.pp,{message:e.noAgentsYet}):(0,r.jsx)("div",{className:"space-y-3",children:c.map(t=>{let s=(0,u.yv)(t),n=(t.installedSkillNames??[]).sort(),a=t.configuredMcpServers??[],l=(t.present?m:[]).slice().sort((e,t)=>e.enabled!==t.enabled?e.enabled?-1:1:e.name.localeCompare(t.name)),d=n.length+l.length;return(0,r.jsx)(ei,{agentKey:t.key,name:t.name,status:s,skillMode:t.skillMode,mcpCount:a.length,totalSkills:d,nativeSkills:n,mindosSkills:l,copy:e,onToggleSkill:i,onOpenDetail:o},t.key)})})}function ei({agentKey:e,name:t,status:s,skillMode:a,mcpCount:l,totalSkills:i,nativeSkills:o,mindosSkills:d,copy:c,onToggleSkill:m,onOpenDetail:p}){let[b,h]=(0,n.useState)(!1),f=o.length>6,v=b?o:o.slice(0,6);return(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-card hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)] transition-all duration-200 overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 p-4 pb-0",children:[(0,r.jsx)(w.lx,{name:t,status:s}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(x(),{href:`/agents/${encodeURIComponent(e)}`,className:"text-sm font-medium text-foreground hover:underline cursor-pointer truncate",children:t}),a&&(0,r.jsx)("span",{className:`text-2xs px-1.5 py-0.5 rounded shrink-0 ${"universal"===a?"bg-muted text-muted-foreground":"additional"===a?"bg-[var(--amber-dim)] text-[var(--amber-text)]":"bg-muted text-muted-foreground"}`,children:a})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 text-2xs text-muted-foreground",children:[(0,r.jsx)("span",{className:"tabular-nums",children:c.quickStatsMcp(l)}),(0,r.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,r.jsx)("span",{className:"tabular-nums",children:c.quickStatsSkills(i)})]})]})]}),(0,r.jsxs)("div",{className:"p-4 pt-3 space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsxs)("p",{className:"text-2xs font-medium text-muted-foreground uppercase tracking-wider",children:[c.agentNativeSkills," ",(0,r.jsxs)("span",{className:"tabular-nums",children:["(",o.length,")"]})]}),f&&(0,r.jsx)("button",{type:"button",onClick:()=>h(!b),className:"text-2xs text-muted-foreground hover:text-foreground cursor-pointer flex items-center gap-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded transition-colors duration-150",children:b?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.A,{size:12}),c.collapseNative]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ee.A,{size:12}),c.showAllNative(o.length)]})})]}),0===o.length?(0,r.jsx)("p",{className:"text-2xs text-muted-foreground/60",children:"—"}):(0,r.jsxs)("div",{className:"space-y-0.5 max-h-[200px] overflow-y-auto",children:[v.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>p(e),className:"w-full flex items-center gap-1.5 py-1 min-h-[28px] hover:bg-muted/30 -mx-1.5 px-1.5 rounded transition-colors duration-100 cursor-pointer text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,r.jsx)(g.A,{size:12,className:"shrink-0 text-muted-foreground/50","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-xs text-foreground truncate hover:text-[var(--amber)] transition-colors duration-150",children:e})]},e)),!b&&o.length>6&&(0,r.jsxs)("button",{type:"button",onClick:()=>h(!0),className:"w-full text-left text-2xs text-muted-foreground hover:text-foreground py-1 px-1.5 -mx-1.5 cursor-pointer transition-colors duration-150",children:["+",o.length-6]})]})]}),d.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-2xs font-medium text-muted-foreground uppercase tracking-wider mb-1.5",children:[c.agentMindosSkills," ",(0,r.jsxs)("span",{className:"tabular-nums",children:["(",d.filter(e=>e.enabled).length,"/",d.length,")"]})]}),(0,r.jsx)("div",{className:"space-y-0.5 max-h-[240px] overflow-y-auto",children:d.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 py-1 min-h-[32px] hover:bg-muted/30 -mx-1.5 px-1.5 rounded transition-colors duration-100",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)(g.A,{size:12,className:`shrink-0 ${e.enabled?"text-[var(--amber)]":"text-muted-foreground/50"}`,"aria-hidden":"true"}),(0,r.jsx)("button",{type:"button",onClick:()=>p(e.name),className:"text-xs text-foreground truncate hover:text-[var(--amber)] cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded text-left",children:e.name}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground shrink-0",children:c.groupLabels[(0,u.$2)(e)]})]}),(0,r.jsx)(et.lM,{size:"sm",checked:e.enabled,onChange:t=>void m(e.name,t)})]},e.name))})]})]})]})}let eo=(0,p.A)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);var ed=s(33591),ec=s(32967),eu=s(96035),em=s(6296),ex=s(9921),eg=s(1164),ep=s(9199),eb=s(94514),eh=s(55243),ef=s(73035),ev=s(84755);let ej="mindos:acp-registry";function ey(){let e=(0,n.useRef)(function(){try{let e=sessionStorage.getItem(ej);if(!e)return null;let t=JSON.parse(e);if(!Array.isArray(t.agents)||"number"!=typeof t.ts||Date.now()-t.ts>18e5)return null;return t}catch{return null}}()),[t,s]=(0,n.useState)(e.current?.agents??[]),[r,a]=(0,n.useState)(!e.current),[l,i]=(0,n.useState)(null),[o,d]=(0,n.useState)(0),c=(0,n.useRef)(!1),u=(0,n.useCallback)(()=>{d(e=>e+1)},[]);return(0,n.useEffect)(()=>{if(e.current&&Date.now()-e.current.ts<6e5&&0===o||c.current)return;c.current=!0;let r=t.length>0;r||a(!0),i(null);let n=!1;return fetch("/api/acp/registry").then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{if(n)return;let r=t.registry?.agents??[];try{sessionStorage.setItem(ej,JSON.stringify({agents:r,ts:Date.now()}))}catch{}e.current={agents:r,ts:Date.now()},s(r)}).catch(e=>{!n&&(r||i(e.message))}).finally(()=>{c.current=!1,n||a(!1)}),()=>{n=!0}},[o]),{agents:t,loading:r,error:l,retry:u}}var eN=s(2431),ek=s(27318),ew=s(66709);function eS({agents:e,discovering:t,error:s,onDiscover:a,onRemove:i}){let{t:o}=(0,l.Y)(),d=o.panels.agents,[c,u]=(0,n.useState)(!1),{delegations:m}=function(e){let[t,s]=(0,n.useState)([]),[r,a]=(0,n.useState)(!1),l=(0,n.useRef)(!0),i=(0,n.useCallback)(async()=>{a(!0);try{let e=await fetch("/api/a2a/delegations");if(!e.ok)return;let t=await e.json();l.current&&s(t.delegations??[])}catch{}finally{l.current&&a(!1)}},[]);return(0,n.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]),(0,n.useEffect)(()=>{if(!e)return;i();let t=setInterval(i,5e3);return()=>clearInterval(t)},[e,i]),{delegations:t,loading:r,refresh:i}}(!0),x=ey(),g=0===e.length&&!x.loading&&0===x.agents.length;return(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-sm font-medium text-foreground",children:d.a2aTabTitle}),(0,r.jsxs)("button",{type:"button",onClick:()=>u(!0),className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-foreground text-background hover:bg-foreground/90 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,r.jsx)(f.A,{size:12}),d.a2aDiscover]})]}),g?(0,r.jsx)(eC,{onDiscover:()=>u(!0),onBrowseRegistry:x.retry}):(0,r.jsxs)(r.Fragment,{children:[0===e.length?(0,r.jsxs)("div",{className:"rounded-xl border border-border/40 bg-card/30 p-8 text-center",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-muted/40 flex items-center justify-center mx-auto mb-3",children:(0,r.jsx)(f.A,{size:20,className:"text-muted-foreground/50","aria-hidden":"true"})}),(0,r.jsx)("p",{className:"text-sm font-medium text-muted-foreground mb-1",children:d.a2aTabEmpty}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground/70 leading-relaxed max-w-xs mx-auto",children:d.a2aTabEmptyHint})]}):(0,r.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,r.jsx)(eE,{agent:e,onRemove:i,removeCopy:d.a2aRemoveAgent,skillsCopy:d.a2aSkills},e.id))}),(0,r.jsx)(ez,{}),(0,r.jsx)(eD,{delegations:m})]}),(0,r.jsx)(ew.A,{open:c,onClose:()=>u(!1),onDiscover:a,discovering:t,error:s})]})}function eC({onDiscover:e,onBrowseRegistry:t}){let{t:s}=(0,l.Y)(),n=s.panels.agents;return(0,r.jsxs)("div",{className:"rounded-xl border border-border/40 bg-card/30 p-12 text-center",children:[(0,r.jsx)("div",{className:"w-14 h-14 rounded-2xl bg-muted/40 flex items-center justify-center mx-auto mb-4",children:(0,r.jsx)(eo,{size:22,className:"text-muted-foreground/50","aria-hidden":"true"})}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground mb-1",children:n.networkEmptyTitle}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground/70 leading-relaxed max-w-sm mx-auto mb-5",children:n.networkEmptyDesc}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2.5",children:[(0,r.jsxs)("button",{type:"button",onClick:e,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-foreground text-background hover:bg-foreground/90 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,r.jsx)(f.A,{size:12}),n.networkDiscoverBtn]}),(0,r.jsxs)("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-border text-foreground hover:bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,r.jsx)(eo,{size:12}),n.networkBrowseBtn]})]})]})}let eA=[{labelKey:"acpQuickReview",icon:ed.A,promptSuffix:"review the code in this project"},{labelKey:"acpQuickFix",icon:ec.A,promptSuffix:"find and fix bugs in this project"},{labelKey:"acpQuickExplain",icon:eu.A,promptSuffix:"explain the structure of this project"}];function ez(){let{t:e}=(0,l.Y)(),t=e.panels.agents,s=ey(),a=(0,eN.z)(),i=function(){let[e,t]=(0,n.useState)({}),[s,r]=(0,n.useState)(!0),[a,l]=(0,n.useState)(!1),[i,o]=(0,n.useState)(null),[d,c]=(0,n.useState)(0),u=(0,n.useCallback)(()=>c(e=>e+1),[]);return(0,n.useEffect)(()=>{let e=!1;return r(!0),o(null),fetch("/api/acp/config").then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(s=>{e||t(s.agents??{})}).catch(t=>{e||o(t.message)}).finally(()=>{e||r(!1)}),()=>{e=!0}},[d]),{configs:e,loading:s,saving:a,error:i,save:(0,n.useCallback)(async(e,s)=>{l(!0),o(null);try{let r=await fetch("/api/acp/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e,config:s})});if(!r.ok)throw Error(`HTTP ${r.status}`);let n=await r.json();return t(n.agents??{}),!0}catch(e){return o(e.message),!1}finally{l(!1)}},[]),reset:(0,n.useCallback)(async e=>{l(!0),o(null);try{let s=await fetch("/api/acp/config",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e})});if(!s.ok)throw Error(`HTTP ${s.status}`);let r=await s.json();return t(r.agents??{}),!0}catch(e){return o(e.message),!1}finally{l(!1)}},[]),refresh:u}}(),[o,d]=(0,n.useState)(!1);if(s.loading)return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:t.acpSectionTitle}),(0,r.jsxs)("div",{className:"flex items-center justify-center py-6 gap-2",children:[(0,r.jsx)(em.A,{size:14,className:"animate-spin text-muted-foreground"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:t.acpLoading})]})]});if(s.error)return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:t.acpSectionTitle}),(0,r.jsxs)("div",{className:"rounded-lg border border-border/60 bg-card/80 p-4 text-center",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:t.acpLoadFailed}),(0,r.jsx)("button",{type:"button",onClick:s.retry,className:"text-xs font-medium text-foreground hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:t.acpRetry})]})]});if(0===s.agents.length)return null;let c=[],u=[];for(let e of s.agents){let t=a.installedAgents.find(t=>t.id===e.id);if(t)c.push({agent:e,info:t});else{let t=a.notInstalledAgents.find(t=>t.id===e.id);u.push({agent:e,installCmd:t?.installCmd??null,packageName:t?.packageName??e.packageName??null})}}return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:t.acpSectionTitle}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>a.refresh(),disabled:a.loading,className:"inline-flex items-center gap-1 px-2 py-1 text-2xs font-medium rounded-md border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",children:[(0,r.jsx)(V.A,{size:10,className:a.loading?"animate-spin":""}),t.acpScan]}),c.length>0&&(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/60",children:t.acpSectionDesc(c.length)})]})]}),c.length>0?(0,r.jsx)("div",{className:"space-y-2",children:c.map(({agent:e,info:t})=>(0,r.jsx)(eT,{agent:e,installed:t,detectionDone:!a.loading,acpConfig:i},e.id))}):a.loading?null:(0,r.jsx)("div",{className:"rounded-lg border border-border/40 bg-card/30 p-5 text-center",children:(0,r.jsx)("p",{className:"text-xs text-muted-foreground/70 leading-relaxed max-w-xs mx-auto",children:t.acpNoInstalled})}),!a.loading&&u.length>0&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:"flex items-center gap-1.5 text-xs text-muted-foreground/70 hover:text-muted-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:[o?(0,r.jsx)(ex.A,{size:12}):(0,r.jsx)(j.A,{size:12}),(0,r.jsx)("span",{className:"font-medium",children:t.acpAvailableTitle}),(0,r.jsxs)("span",{className:"text-2xs",children:["(",t.acpAvailableDesc(u.length),")"]})]}),o&&(0,r.jsx)("div",{className:"space-y-1 animate-in fade-in slide-in-from-top-1 duration-150",children:u.map(({agent:e,installCmd:t,packageName:s})=>(0,r.jsx)(eF,{agent:e,installCmd:t,packageName:s,detectionDone:!a.loading,onInstalled:a.refresh},e.id))})]})]})}let eM={npx:"bg-[var(--amber)]/15 text-[var(--amber)]",binary:"bg-muted text-muted-foreground",uvx:"bg-[var(--success)]/15 text-[var(--success)]",stdio:"bg-muted text-muted-foreground"};function eT({agent:e,installed:t,detectionDone:s,acpConfig:a}){let{t:i}=(0,l.Y)(),o=i.panels.agents,[d,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(""),[x,p]=(0,n.useState)(""),[b,h]=(0,n.useState)("idle"),f={npx:o.acpTransportNpx,binary:o.acpTransportBinary,uvx:o.acpTransportUvx,stdio:o.acpTransportStdio},v=!!t,j=t?.resolvedCommand,y=j?.source==="user-override"?o.acpConfigSourceUser:j?.source==="descriptor"?o.acpConfigSourceBuiltin:o.acpConfigSourceRegistry,N=(0,n.useCallback)(()=>{!d&&j&&(m(j.cmd),p(j.args.join(" "))),c(e=>!e),h("idle")},[d,j]),k=(0,n.useCallback)(async()=>{let t=x.trim()?x.trim().split(/\s+/):[];await a.save(e.id,{command:u.trim()||void 0,args:t.length>0?t:void 0})&&(h("saved"),setTimeout(()=>h("idle"),2e3))},[a,e.id,u,x]),w=(0,n.useCallback)(async()=>{await a.reset(e.id),h("idle"),c(!1)},[a,e.id]);return(0,r.jsxs)("div",{className:"rounded-xl border border-[var(--amber)]/20 bg-card p-3 hover:border-[var(--amber)]/40 transition-all duration-150",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[var(--amber)]/10 flex items-center justify-center shrink-0",children:(0,r.jsx)(eo,{size:14,className:"text-[var(--amber)]"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground truncate",children:e.name}),e.version&&(0,r.jsxs)("span",{className:"text-2xs text-muted-foreground/60 shrink-0",children:["v",e.version]})]}),e.description&&(0,r.jsx)("p",{className:"text-2xs text-muted-foreground truncate",children:e.description})]}),(0,r.jsx)("span",{className:`text-2xs px-1.5 py-0.5 rounded font-medium shrink-0 ${eM[e.transport]??eM.stdio}`,children:f[e.transport]??e.transport}),s&&(0,r.jsx)("span",{className:"text-2xs px-1.5 py-0.5 rounded font-medium shrink-0 bg-[var(--success)]/15 text-[var(--success)]",children:o.acpReady}),(0,r.jsx)("button",{type:"button",onClick:N,className:"p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:o.acpConfigToggle,"aria-expanded":d,children:(0,r.jsx)(eg.A,{size:13})}),(0,r.jsxs)("button",{type:"button",onClick:()=>{(0,ek.NH)("","user",{id:e.id,name:e.name})},className:"inline-flex items-center gap-1 px-2.5 py-1 text-2xs font-medium rounded-md border border-[var(--amber)] text-[var(--amber)] hover:bg-[var(--amber)]/10 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer",children:[(0,r.jsx)(g.A,{size:10}),o.acpUseAgent]})]}),d&&j&&(0,r.jsxs)("div",{className:"mt-2.5 pt-2.5 border-t border-border/40 space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-2xs text-muted-foreground w-12 shrink-0",children:o.acpConfigCommand}),(0,r.jsx)("input",{type:"text",value:u,onChange:e=>{m(e.target.value),h("idle")},className:"flex-1 rounded-md border border-border bg-background text-foreground text-xs font-mono px-2 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",placeholder:j.cmd})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-2xs text-muted-foreground w-12 shrink-0",children:o.acpConfigArgs}),(0,r.jsx)("input",{type:"text",value:x,onChange:e=>{p(e.target.value),h("idle")},className:"flex-1 rounded-md border border-border bg-background text-foreground text-xs font-mono px-2 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",placeholder:j.args.join(" ")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-2xs text-muted-foreground",children:[(0,r.jsxs)("span",{children:[o.acpConfigSource,":"]}),(0,r.jsx)("span",{className:`px-1.5 py-0.5 rounded font-medium ${"user-override"===j.source?"bg-[var(--amber)]/15 text-[var(--amber)]":"bg-muted text-muted-foreground"}`,children:y}),(0,r.jsx)("span",{className:"text-muted-foreground/50",children:"|"}),(0,r.jsxs)("span",{children:[o.acpConfigPath,": ",(0,r.jsx)("span",{className:"font-mono",children:t?.binaryPath})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a.configs[e.id]&&(0,r.jsxs)("button",{type:"button",onClick:w,className:"inline-flex items-center gap-1 px-2 py-1 text-2xs font-medium rounded-md border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,r.jsx)(ep.A,{size:10}),o.acpConfigReset]}),(0,r.jsx)("button",{type:"button",onClick:k,disabled:a.saving,className:"inline-flex items-center gap-1 px-2.5 py-1 text-2xs font-medium rounded-md bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",children:"saved"===b?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eb.A,{size:10})," ",o.acpConfigSaved]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eh.A,{size:10})," ",o.acpConfigSave]})})]})]}),v&&!d&&(0,r.jsx)("div",{className:"mt-2.5 pt-2 border-t border-border/40 flex items-center gap-1.5 flex-wrap",children:eA.map(t=>{let s=t.icon;return(0,r.jsxs)("button",{type:"button",onClick:()=>{(0,ek.NH)(t.promptSuffix,"user",{id:e.id,name:e.name})},className:"inline-flex items-center gap-1 px-2 py-0.5 text-2xs font-medium rounded-md bg-muted/60 text-muted-foreground hover:bg-muted hover:text-foreground border border-border/50 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,r.jsx)(s,{size:10}),o[t.labelKey]]},t.labelKey)})})]})}function eF({agent:e,installCmd:t}){let{t:s}=(0,l.Y)(),a=s.panels.agents,[i,o]=(0,n.useState)(!1),d=t||(e.packageName?`npm install -g ${e.packageName}`:null),c=(0,n.useCallback)(()=>{d&&navigator.clipboard.writeText(d).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)}).catch(()=>{})},[d]);return(0,r.jsx)("div",{className:"group rounded-lg border border-border/60 bg-card/60 px-3 py-2 hover:border-border transition-all duration-150",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted/40 flex items-center justify-center shrink-0",children:(0,r.jsx)(eo,{size:11,className:"text-muted-foreground/60"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.name}),e.description&&(0,r.jsx)("p",{className:"text-2xs text-muted-foreground/50 truncate",children:e.description})]}),d&&(0,r.jsx)("button",{type:"button",onClick:c,className:"inline-flex items-center gap-1 px-2 py-0.5 text-2xs font-medium rounded-md border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring shrink-0",title:d,children:i?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eb.A,{size:10})," ",a.acpCopied]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ed.A,{size:10})," ",a.acpCopyCmd]})})]})})}function eD({delegations:e}){let{t}=(0,l.Y)(),s=t.panels.agents;return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.a2aDelegations}),0===e.length?(0,r.jsx)("p",{className:"text-xs text-muted-foreground/70 py-3",children:s.a2aDelegationsEmpty}):(0,r.jsx)("div",{className:"space-y-1.5",children:e.map(e=>(0,r.jsx)(e$,{record:e},e.id))})]})}let eR={pending:"bg-muted text-muted-foreground",completed:"bg-[var(--success)]/15 text-[var(--success)]",failed:"bg-[var(--error)]/15 text-[var(--error)]"};function e$({record:e}){let{t}=(0,l.Y)(),s=t.panels.agents,n={pending:s.a2aDelegationPending,completed:s.a2aDelegationCompleted,failed:s.a2aDelegationFailed},a=e.completedAt?function(e,t){let s=t.getTime()-e.getTime();if(s<1e3)return`${s}ms`;let r=Math.round(s/1e3);if(r<60)return`${r}s`;let n=Math.floor(r/60),a=r%60;return a>0?`${n}m ${a}s`:`${n}m`}(new Date(e.startedAt),new Date(e.completedAt)):null;return(0,r.jsxs)("div",{className:"rounded-lg border border-border/60 bg-card/80 px-3 py-2.5 flex items-center gap-2.5",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-xs font-medium text-foreground truncate",children:e.agentName}),(0,r.jsx)("p",{className:"text-2xs text-muted-foreground truncate",title:e.message,children:e.message.length>60?e.message.slice(0,60)+"...":e.message})]}),(0,r.jsx)("span",{className:`text-2xs px-1.5 py-0.5 rounded font-medium shrink-0 ${eR[e.status]}`,children:n[e.status]}),a&&(0,r.jsxs)("span",{className:"text-2xs text-muted-foreground/60 shrink-0 flex items-center gap-0.5",children:[(0,r.jsx)(M.A,{size:10,"aria-hidden":"true"}),a]})]})}function eE({agent:e,onRemove:t,removeCopy:s,skillsCopy:n}){let a=e.reachable?ef.A:ev.A,l=e.reachable?"text-[var(--success)]":"text-muted-foreground/50";return(0,r.jsxs)("div",{className:"group rounded-xl border border-border bg-card p-3.5 hover:border-[var(--amber)]/30 transition-all duration-150",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-lg bg-muted/50 flex items-center justify-center shrink-0",children:(0,r.jsx)(f.A,{size:14,className:"text-muted-foreground"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground truncate",children:e.card.name}),(0,r.jsx)("p",{className:"text-2xs text-muted-foreground truncate",children:e.card.description})]}),(0,r.jsx)(a,{size:13,className:l,"aria-hidden":"true"}),(0,r.jsx)("button",{type:"button",onClick:()=>t(e.id),className:"p-1.5 rounded-md text-muted-foreground/50 hover:text-error hover:bg-error/10 transition-colors opacity-0 group-hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:opacity-100","aria-label":s,title:s,children:(0,r.jsx)(D.A,{size:12})})]}),e.card.skills.length>0&&(0,r.jsxs)("div",{className:"mt-2.5 pt-2 border-t border-border/40 flex items-center gap-1.5",children:[(0,r.jsx)(g.A,{size:11,className:"text-muted-foreground/60 shrink-0","aria-hidden":"true"}),(0,r.jsxs)("span",{className:"text-2xs text-muted-foreground",children:[n,": ",e.card.skills.length]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1 ml-1",children:[e.card.skills.slice(0,3).map(e=>(0,r.jsx)("span",{className:"text-2xs px-1.5 py-0.5 rounded bg-muted/80 text-muted-foreground border border-border/50",title:e.description,children:e.name},e.id)),e.card.skills.length>3&&(0,r.jsxs)("span",{className:"text-2xs text-muted-foreground/60",children:["+",e.card.skills.length-3]})]})]})]})}var eL=s(50538);function eP(){let[e,t]=(0,n.useState)([]),[s,a]=(0,n.useState)(!0),[l,i]=(0,n.useState)(null),o=(0,n.useCallback)(async()=>{try{a(!0);let e=await fetch("/api/acp/session");if(!e.ok)throw Error(`Failed to fetch sessions: ${e.status}`);let s=await e.json();t(s.sessions??[]),i(null)}catch(e){i(e.message)}finally{a(!1)}},[]);(0,n.useEffect)(()=>{o();let e=()=>{"visible"===document.visibilityState&&o()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[o]);let d=(0,n.useCallback)(async e=>{try{await fetch("/api/acp/session",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})}),t(t=>t.filter(t=>t.id!==e))}catch(e){console.error("Failed to close session:",e)}},[]);return s?(0,r.jsx)("div",{className:"space-y-3 animate-pulse",children:Array.from({length:3}).map((e,t)=>(0,r.jsx)("div",{className:"rounded-lg border border-border bg-card p-4",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-muted"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-4 w-32 bg-muted rounded"}),(0,r.jsx)("div",{className:"h-3 w-48 bg-muted rounded"})]})]})},t))}):l?(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-card p-6 text-center",children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:l}),(0,r.jsx)("button",{onClick:o,className:"text-sm text-[var(--amber)] hover:underline",children:"Retry"})]}):0===e.length?(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-card p-8 text-center",children:[(0,r.jsx)(eL.A,{size:32,className:"mx-auto mb-3 text-muted-foreground/40"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground mb-1",children:"No active sessions"}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Sessions appear here when you chat with ACP agents.",(0,r.jsx)("br",{}),"Select an agent from the Network tab and send a message to start."]})]}):(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsxs)("p",{className:"text-xs text-muted-foreground font-medium uppercase tracking-wider",children:["Active Sessions (",e.length,")"]}),(0,r.jsx)("button",{onClick:o,className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Refresh"})]}),e.map(e=>{var t;let s;return(0,r.jsx)("div",{className:"group rounded-lg border border-border bg-card hover:border-[var(--amber)]/30 transition-colors p-3.5",children:(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,r.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${"active"===e.state?"bg-[var(--success)]":"error"===e.state?"bg-[var(--error)]":"bg-muted-foreground/40"}`}),(0,r.jsx)("span",{className:"text-sm font-medium text-foreground truncate",children:e.agentId}),(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/60 px-1.5 py-0.5 rounded bg-muted/40",children:e.state})]}),e.cwd&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground truncate font-mono",children:e.cwd}),(0,r.jsx)("p",{className:"text-2xs text-muted-foreground/60 mt-1",children:(t=e.lastActivityAt,(s=Date.now()-new Date(t).getTime())<6e4?"just now":s<36e5?`${Math.floor(s/6e4)}m ago`:s<864e5?`${Math.floor(s/36e5)}h ago`:`${Math.floor(s/864e5)}d ago`)})]}),(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,r.jsx)("button",{onClick:()=>d(e.id),className:"p-1.5 rounded-md hover:bg-muted/60 text-muted-foreground hover:text-[var(--error)] transition-colors",title:"Close session",children:(0,r.jsx)(D.A,{size:14})})})]})},e.id)})]})}var eK=s(73321);function eO({op:e,copy:t}){let s=(0,eK.useRouter)(),{locale:a}=(0,l.Y)(),[i,o]=(0,n.useState)(!1),d=E(e.tool);P[d];let c=H(e.params);return(0,r.jsxs)("div",{style:{background:"var(--card)",border:"1px solid var(--border)",borderRadius:10,overflow:"hidden",marginBottom:8},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",cursor:"pointer",userSelect:"none"},onClick:()=>o(e=>!e),children:[(0,r.jsx)(_,{kind:d,locale:a}),c&&(0,r.jsx)("span",{style:{fontSize:"0.72rem",color:"var(--amber)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer"},onClick:e=>{e.stopPropagation(),s.push("/view/"+c.split("/").map(encodeURIComponent).join("/"))},title:c,className:"font-display",children:c}),(0,r.jsxs)("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[e.agentName&&(0,r.jsx)("span",{className:"font-display",style:{fontSize:"0.62rem",fontWeight:500,padding:"1px 6px",borderRadius:999,background:"var(--muted)",color:"var(--muted-foreground)",whiteSpace:"nowrap",maxWidth:120,overflow:"hidden",textOverflow:"ellipsis"},title:e.agentName,children:e.agentName.length>30?e.agentName.slice(0,30)+"...":e.agentName}),"ok"===e.result?(0,r.jsx)(A.A,{size:13,style:{color:"var(--success)"}}):(0,r.jsx)(z.A,{size:13,style:{color:"var(--error)"}}),(0,r.jsx)("span",{className:"font-display",style:{fontSize:"0.68rem",color:"var(--muted-foreground)",opacity:.6},title:O(e.ts),children:I(e.ts)}),(0,r.jsx)(j.A,{size:12,style:{color:"var(--muted-foreground)",transform:i?"rotate(180deg)":"none",transition:"transform .15s"}})]})]}),i&&(0,r.jsxs)("div",{style:{borderTop:"1px solid var(--border)",padding:"10px 14px",background:"var(--background)"},children:[(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:8*!!e.message},children:Object.entries(e.params).map(([e,t])=>(0,r.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[(0,r.jsx)("span",{className:"font-display",style:{fontSize:"0.68rem",color:"var(--muted-foreground)",opacity:.7,flexShrink:0,minWidth:80},children:e}),(0,r.jsx)("span",{className:"font-display",style:{fontSize:"0.72rem",color:"var(--foreground)",wordBreak:"break-all",lineHeight:1.5},children:function(e,t=120){let s="string"==typeof e?e:JSON.stringify(e);return s.length>t?s.slice(0,t)+"…":s}(t)})]},e))}),e.message&&(0,r.jsx)("div",{className:"font-display",style:{marginTop:6,padding:"5px 9px",borderRadius:5,fontSize:"0.72rem",background:"error"===e.result?"rgba(200,80,80,0.08)":"rgba(122,173,128,0.08)",color:"error"===e.result?"var(--error)":"var(--success)",border:`1px solid ${"error"===e.result?"rgba(200,80,80,0.2)":"rgba(122,173,128,0.2)"}`},children:e.message}),e.agentName&&(0,r.jsxs)("div",{className:"font-display",style:{marginTop:6,fontSize:"0.68rem",color:"var(--muted-foreground)"},children:[t?.agentLabel??"Agent",": ",(0,r.jsx)("span",{style:{color:"var(--foreground)",fontWeight:500},children:e.agentName})]}),(0,r.jsx)("div",{className:"font-display",style:{marginTop:6,fontSize:"0.65rem",color:"var(--muted-foreground)",opacity:.5},children:O(e.ts)})]})]})}let eI=["all","write","create","delete","read","search"];function eH(){let{t:e,locale:t}=(0,l.Y)(),[s,a]=(0,n.useState)([]),[i,o]=(0,n.useState)(!0),[d,c]=(0,n.useState)("all");(0,n.useEffect)(()=>{let e=!1,t=()=>{fetch("/api/agent-activity?limit=200").then(e=>e.json()).then(t=>{e||a(t.events??[])}).catch(()=>{}).finally(()=>{e||o(!1)})};t();let s=()=>{"visible"===document.visibilityState&&t()};return document.addEventListener("visibilitychange",s),()=>{e=!0,document.removeEventListener("visibilitychange",s)}},[]);let u=(0,n.useMemo)(()=>"all"===d?s:s.filter(e=>E(e.tool)===d),[s,d]),m=(0,n.useMemo)(()=>{let e={all:s.length};for(let t of s){let s=E(t.tool);e[s]=(e[s]??0)+1}return e},[s]),x=e.agentsContent?.activity;return i?(0,r.jsx)("div",{className:"flex items-center justify-center py-16 text-muted-foreground/50",children:(0,r.jsx)("div",{className:"animate-pulse text-sm font-display",children:x?.loading??"Loading activity..."})}):0===s.length?(0,r.jsxs)("div",{className:"font-display",style:{padding:"3rem 1rem",textAlign:"center",color:"var(--muted-foreground)",fontSize:12},children:[(0,r.jsx)($.A,{size:28,style:{margin:"0 auto 10px",opacity:.3}}),(0,r.jsx)("p",{children:x?.empty??"No agent operations logged yet."}),(0,r.jsx)("p",{style:{marginTop:6,opacity:.6,fontSize:11},children:x?.emptyHint??"Operations from connected agents will appear here."})]}):(0,r.jsxs)("div",{style:{maxWidth:760,margin:"0 auto",padding:"1.5rem 1rem"},children:[(0,r.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:"1.2rem",flexWrap:"wrap"},children:eI.map(e=>{let s=m[e]??0;if("all"!==e&&!s)return null;let n="all"!==e?P[e]:void 0,a=d===e;return(0,r.jsxs)("button",{onClick:()=>c(e),className:"font-display",style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:999,fontSize:"0.7rem",cursor:"pointer",border:"none",background:a?n?.bg??"var(--accent)":"var(--muted)",color:a?n?.text??"var(--foreground)":"var(--muted-foreground)",outline:a?`1px solid ${n?.border??"var(--border)"}`:"none",transition:"all .1s"},children:["all"!==e&&(0,r.jsx)(K,{kind:e,size:10}),"all"===e?t?.startsWith("zh")?"全部":"All":L[t?.startsWith("zh")?"zh":"en"][e]," ",(0,r.jsxs)("span",{style:{opacity:.6},children:["(",s,")"]})]},e)})}),(0,r.jsx)("div",{children:u.map((e,t)=>(0,r.jsx)(eO,{op:e,copy:x},e.id??t))})]})}var e_=s(90777);function eB({tab:e}){let{t}=(0,l.Y)(),s=t.agentsContent,m=(0,i.kr)(),x=(0,o.V)(),g=(0,n.useMemo)(()=>"activity"===e?{title:s.navActivity??"Activity",subtitle:s.activitySubtitle??"Agent operations audit log."}:"sessions"===e?{title:"Sessions",subtitle:"Active ACP agent sessions."}:"a2a"===e?{title:s.navNetwork,subtitle:s.a2aTabEmptyHint}:"skills"===e?{title:s.navSkills,subtitle:s.skills.capabilityGroups}:"mcp"===e?{title:s.navMcp,subtitle:s.mcp.connectionGraph}:{title:s.title,subtitle:s.subtitle},[s,e]),p=(0,n.useMemo)(()=>(0,u.$t)(m.agents),[m.agents]),b=m.status?.connectionMode?.mcp??!1,h=(0,n.useMemo)(()=>(0,u.zK)({mcpRunning:!!m.status?.running,mcpEnabled:b,detectedCount:p.detected.length,notFoundCount:p.notFound.length,allSkillsDisabled:m.skills.length>0&&m.skills.every(e=>!e.enabled),copy:s.overview}),[m.skills,m.status?.running,b,p.detected.length,p.notFound.length,s.overview]),f=(0,n.useMemo)(()=>m.skills.filter(e=>e.enabled).length,[m.skills]),[v,j]=(0,n.useState)(!1),[y,N]=(0,n.useState)(null),[k,S]=(0,n.useState)(null),[C,A]=(0,n.useState)(!1),z=(0,n.useCallback)(()=>{N(null),j(!0)},[]),M=(0,n.useCallback)(e=>{N(e),j(!0)},[]),T=(0,n.useCallback)(e=>{S(e)},[]),F=(0,n.useCallback)(async()=>{if(k){A(!0);try{let e=await fetch("/api/agents/custom",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:k.key})});if(e.ok)a.oR.success(s.overview.customAgentRemoved(k.name)),m.refresh();else{let t=await e.json();a.oR.error(t.error||s.overview.customAgentFailedRemove)}}catch{a.oR.error(s.overview.customAgentNetworkError)}finally{A(!1),S(null)}}},[k,m,s.overview]),D=(0,n.useCallback)(()=>{m.refresh()},[m]),R=async e=>{let t=m.agents.find(t=>t.key===e);if(!t)return;let s=(0,c.$k)(t,m.status,t.preferredTransport);await (0,d.l)(s.snippet)&&a.oR.copy()};return(0,r.jsxs)("div",{className:"content-width px-4 md:px-6 py-8 md:py-10",children:[(0,r.jsxs)("header",{className:"mb-6",children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:g.title}),(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:g.subtitle})]}),m.loading&&"overview"===e&&(0,r.jsx)(eJ,{}),!m.loading&&"overview"===e&&(0,r.jsx)(J,{copy:s.overview,buckets:p,riskQueue:h,mcpRunning:!!m.status?.running,mcpPort:m.status?.port??null,mcpToolCount:m.status?.toolCount??0,mcpEnabled:b,enabledSkillCount:f,allAgents:m.agents,pulseCopy:s.workspacePulse,a2aCount:x.agents.length,onAddCustomAgent:z,onEditCustomAgent:M,onRemoveCustomAgent:T}),"mcp"===e&&b&&(0,r.jsx)(G,{copy:{...s.mcp,status:s.status},mcp:m,buckets:p,copyState:null,onCopySnippet:R}),"mcp"===e&&!b&&!m.loading&&(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:s.mcp?.mcpDisabledMessage??"MCP mode is not enabled."}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground/60 mt-1",children:s.mcp?.mcpDisabledHint??"Enable it in Settings → Connections to use MCP agents."})]}),"skills"===e&&(0,r.jsx)(er,{copy:s.skills,mcp:m,buckets:p}),"a2a"===e&&(0,r.jsx)(eS,{agents:x.agents,discovering:x.discovering,error:x.error,onDiscover:x.discover,onRemove:x.remove}),"sessions"===e&&(0,r.jsx)(eP,{}),"activity"===e&&(0,r.jsx)(eH,{}),(0,r.jsx)(e_.A,{open:v,onClose:()=>{j(!1),N(null)},onSuccess:D,existingAgents:m.agents,editAgent:y}),(0,r.jsx)(w.TM,{open:!!k,title:k?s.overview.customAgentRemoveTitle(k.name):"",message:s.overview.customAgentRemoveMessage,confirmLabel:s.overview.customAgentRemoveConfirm,cancelLabel:s.overview.customAgentCancel,onConfirm:F,onCancel:()=>S(null),variant:"destructive"})]})}function eJ(){return(0,r.jsxs)("div",{className:"space-y-5 animate-pulse","aria-busy":"true","aria-label":"Loading",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[(0,r.jsx)("div",{className:"px-4 py-2.5 border-b border-border bg-muted/10",children:(0,r.jsx)("div",{className:"h-4 w-32 bg-muted rounded"})}),(0,r.jsx)("div",{className:"grid grid-cols-3 md:grid-cols-6 divide-x divide-border",children:Array.from({length:6}).map((e,t)=>(0,r.jsxs)("div",{className:"px-3 py-3.5 flex flex-col items-center gap-2",children:[(0,r.jsx)("div",{className:"h-3 w-16 bg-muted rounded"}),(0,r.jsx)("div",{className:"h-5 w-8 bg-muted rounded"})]},t))})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Array.from({length:2}).map((e,t)=>(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 flex items-start gap-3.5",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg bg-muted"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-4 w-20 bg-muted rounded"}),(0,r.jsx)("div",{className:"h-3 w-full bg-muted rounded"})]})]},t))}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("div",{className:"h-4 w-24 bg-muted rounded"}),(0,r.jsx)("div",{className:"h-3 w-16 bg-muted rounded"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:Array.from({length:6}).map((e,t)=>(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-card p-3.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5 mb-3",children:[(0,r.jsx)("div",{className:"w-7 h-7 rounded-full bg-muted"}),(0,r.jsx)("div",{className:"flex-1 h-4 bg-muted rounded"}),(0,r.jsx)("div",{className:"h-4 w-16 bg-muted rounded"})]}),(0,r.jsx)("div",{className:"h-3 w-2/3 bg-muted rounded"})]},t))})]})]})}},64616:(e,t,s)=>{Promise.resolve().then(s.bind(s,50927))},66709:(e,t,s)=>{"use strict";s.d(t,{A:()=>u});var r=s(95155),n=s(12115),a=s(92451),l=s(33210),i=s(6296),o=s(13545),d=s(12651),c=s(35581);function u({open:e,onClose:t,onDiscover:s,discovering:u,error:m}){let{t:x}=(0,c.Y)(),g=x.panels.agents,[p,b]=(0,n.useState)(""),[h,f]=(0,n.useState)(null);if(!e)return null;let v=async()=>{if(!p.trim()||u)return;f(null);let e=await s(p.trim());e&&f(e)},j=()=>{b(""),f(null),t()};return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:j,children:(0,r.jsxs)("div",{className:"bg-popover border border-border rounded-xl shadow-lg w-full max-w-md mx-4 p-5",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":g.a2aDiscover,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,r.jsx)(a.A,{size:15,className:"text-muted-foreground"}),g.a2aDiscover]}),(0,r.jsx)("button",{type:"button",onClick:j,className:"p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close",children:(0,r.jsx)(l.A,{size:14})})]}),(0,r.jsx)("p",{className:"text-2xs text-muted-foreground mb-3",children:g.a2aDiscoverHint}),(0,r.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,r.jsx)("input",{type:"url",value:p,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"===e.key&&v(),"Escape"===e.key&&t()},placeholder:g.a2aDiscoverPlaceholder,disabled:u,className:"flex-1 px-3 py-2 text-xs rounded-lg border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50",autoFocus:!0}),(0,r.jsxs)("button",{type:"button",onClick:v,disabled:u||!p.trim(),className:"px-3 py-2 text-xs font-medium rounded-lg bg-foreground text-background hover:bg-foreground/90 disabled:opacity-50 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-1.5 shrink-0",children:[u&&(0,r.jsx)(i.A,{size:12,className:"animate-spin"}),u?g.a2aDiscovering:g.a2aDiscover]})]}),m&&!h&&(0,r.jsx)("div",{className:"rounded-lg border border-error/30 bg-error/5 px-3 py-2.5 mb-3",children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)(o.A,{size:14,className:"text-error mt-0.5 shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs font-medium text-error",children:g.a2aDiscoverFailed}),(0,r.jsx)("p",{className:"text-2xs text-muted-foreground mt-0.5",children:g.a2aDiscoverFailedHint})]})]})}),h&&(0,r.jsx)("div",{className:"rounded-lg border border-success/30 bg-success/5 px-3 py-2.5",children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)(d.A,{size:14,className:"text-success mt-0.5 shrink-0"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-xs font-medium text-success mb-1.5",children:g.a2aDiscoverSuccess}),(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsxs)("p",{className:"text-xs font-medium text-foreground truncate",title:h.card.name,children:[h.card.name,(0,r.jsxs)("span",{className:"text-2xs text-muted-foreground ml-1.5",children:["v",h.card.version]})]}),(0,r.jsx)("p",{className:"text-2xs text-muted-foreground truncate",title:h.card.description,children:h.card.description}),h.card.skills.length>0&&(0,r.jsxs)("div",{className:"mt-1.5",children:[(0,r.jsxs)("p",{className:"text-2xs text-muted-foreground mb-1",children:[g.a2aSkills,":"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:h.card.skills.map(e=>(0,r.jsx)("span",{className:"text-2xs px-1.5 py-0.5 rounded bg-muted/80 text-muted-foreground border border-border/50",title:e.description,children:e.name},e.id))})]}),(0,r.jsxs)("p",{className:"text-2xs text-muted-foreground mt-1 truncate",title:h.endpoint,children:[g.a2aEndpoint,": ",h.endpoint]})]})]})]})})]})})}},73035:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]])},77800:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("toggle-left",[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]])},93219:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])}},e=>{e.O(0,[4237,8409,8658,5581,8252,6636,7249,8441,3794,7358],()=>e(e.s=64616)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9336],{21362:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},22356:(e,t,r)=>{"use strict";r.d(t,{h:()=>s,n:()=>n});class s extends Error{constructor(e,t,r){super(e),this.name="ApiError",this.status=t,this.code=r}}async function n(e,t={}){let r,a,l,{timeout:o=3e4,signal:i,...d}=t;if((o>0||i)&&(r=new AbortController),o>0&&r&&(a=setTimeout(()=>{r.abort(Error(`Request timed out after ${Math.round(o/1e3)}s`))},o)),i&&r)if(i.aborted)r.abort();else{let e=()=>r?.abort();i.addEventListener("abort",e,{once:!0}),l=()=>{i.removeEventListener("abort",e)}}let c=r?.signal??i;try{let t=await fetch(e,{...d,signal:c});if(!t.ok){let e,r=`Request failed (${t.status})`;try{let s=await t.json();s?.error?.code&&s?.error?.message?(r=s.error.message,e=s.error.code):s?.error&&(r="string"==typeof s.error?s.error:s.error.message??r)}catch{}throw new s(r,t.status,e)}return await t.json()}finally{a&&clearTimeout(a),l&&l()}}},27996:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var s=r(95155),n=r(12115),a=r(47650),l=r(94514),o=r(66088);function i(e){return"options"in e}function d({value:e,onChange:t,options:r,className:d="",size:c="md",placeholder:u}){let[m,x]=(0,n.useState)(!1),[p,h]=(0,n.useState)(-1),[f,g]=(0,n.useState)(null),b=(0,n.useRef)(null),v=(0,n.useRef)(null),y=(0,n.useMemo)(()=>(function(e){let t=[];for(let r of e)i(r)?t.push(...r.options):t.push(r);return t})(r),[r]),j=(0,n.useMemo)(()=>y.find(t=>t.value===e)??null,[y,e]),w=(0,n.useCallback)(()=>{x(!1),h(-1)},[]),N=(0,n.useCallback)(e=>{t(e),w()},[t,w]);(0,n.useEffect)(()=>{if(!m)return;let e=e=>{b.current&&!b.current.contains(e.target)&&v.current&&!v.current.contains(e.target)&&w()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[m,w]),(0,n.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),w(),b.current?.focus();break;case"ArrowDown":e.preventDefault(),h(e=>Math.min(e+1,y.length-1));break;case"ArrowUp":e.preventDefault(),h(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),p>=0&&p<y.length&&(N(y[p].value),b.current?.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[m,w,p,y,N]),(0,n.useEffect)(()=>{if(!m||!v.current||p<0)return;let e=v.current.querySelector(`[data-idx="${p}"]`);e&&e.scrollIntoView({block:"nearest"})},[m,p]);let k=(0,n.useCallback)(()=>{if(!b.current)return;let e=b.current.getBoundingClientRect(),t="sm"===c?200:260,r=window.innerHeight-e.bottom,s=e.top;g({top:r<t+8&&s>r?e.top:e.bottom,left:e.left,width:e.width,flipUp:r<t+8&&s>r})},[c]);(0,n.useEffect)(()=>{if(!m)return void g(null);let t=y.findIndex(t=>t.value===e);return h(t>=0?t:0),k(),window.addEventListener("scroll",k,!0),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k,!0),window.removeEventListener("resize",k)}},[m,y,e,k]);let C="sm"===c,A=C?`inline-flex items-center gap-1 appearance-none rounded-md border border-border bg-background text-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring transition-colors text-2xs px-1.5 py-0.5 pr-5 ${d}`:`w-full flex items-center gap-2 appearance-none rounded-lg border border-border bg-background text-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring transition-colors text-sm px-3 py-2 pr-8 ${d}`,E=C?"w-full flex items-center gap-1.5 px-2 py-1 text-2xs text-left transition-colors cursor-pointer":"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left transition-colors cursor-pointer",M=-1;function S(t){let r=++M,n=t.value===e,a=r===p;return(0,s.jsxs)("button",{type:"button",role:"option","aria-selected":n,"data-idx":r,onClick:()=>N(t.value),onMouseEnter:()=>h(r),className:`${E} ${a?"bg-muted text-foreground":"text-foreground"}`,children:[t.icon,(0,s.jsx)("span",{className:"flex-1 truncate",children:t.label}),t.suffix,n&&(0,s.jsx)(l.A,{size:C?10:12,className:"shrink-0 text-[var(--amber)]"})]},t.value)}let $=m&&f&&(0,a.createPortal)((0,s.jsx)("div",{ref:v,className:C?"fixed z-[9999] overflow-y-auto rounded-md border border-border bg-card shadow-lg py-0.5":"fixed z-[9999] overflow-y-auto rounded-lg border border-border bg-card shadow-lg py-1",role:"listbox",style:{left:f.left,minWidth:f.width,maxHeight:C?200:260,...f.flipUp?{bottom:window.innerHeight-f.top+4}:{top:f.top+4}},children:r.map((e,t)=>i(e)?(0,s.jsxs)("div",{children:[t>0&&(0,s.jsx)("div",{className:"my-0.5 border-t border-border/50"}),(0,s.jsx)("div",{className:`py-1 text-2xs font-medium text-muted-foreground uppercase tracking-wider ${C?"px-2":"px-3"}`,children:e.label}),e.options.map(S)]},e.label):S(e))}),document.body);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("button",{ref:b,type:"button",onClick:()=>x(e=>!e),"aria-haspopup":"listbox","aria-expanded":m,className:A,children:[j?.icon,(0,s.jsx)("span",{className:"flex-1 truncate text-left",children:j?.label??u??"—"}),j?.suffix,(0,s.jsx)(o.A,{size:C?12:14,className:`${C?"absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none":"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"} transition-transform duration-150 ${m?"rotate-180":""}`})]}),$]})}},50538:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},87180:(e,t,r)=>{"use strict";r.d(t,{default:()=>h});var s=r(95155),n=r(12115),a=r(98500),l=r.n(a),o=r(50538),i=r(91958),d=r(66088),c=r(21362),u=r(22356),m=r(91053),x=r(27996),p=r(97631);function h({initialPath:e=""}){let{t}=(0,m.Y)(),[r,a]=(0,n.useState)(e),[h,f]=(0,n.useState)("all"),[g,b]=(0,n.useState)("all"),[v,y]=(0,n.useState)(""),[j,w]=(0,n.useState)([]),[N,k]=(0,n.useState)({unreadCount:0,totalCount:0}),[C,A]=(0,n.useState)({}),[E,M]=(0,n.useState)(!0),[S,$]=(0,n.useState)(null),L=(0,n.useCallback)(async()=>{M(!0),$(null);try{let e=new URLSearchParams({op:"list",limit:"120"});r.trim()&&e.set("path",r.trim()),"all"!==h&&e.set("source",h),"all"!==g&&e.set("event_op",g),v.trim()&&e.set("q",v.trim());let t=`/api/changes?${e.toString()}`,[s,n]=await Promise.all([(0,u.n)(t),(0,u.n)("/api/changes?op=summary")]);w(s.events),k(n)}catch(e){$(e instanceof Error?e.message:"Failed to load changes")}finally{M(!1)}},[r,h,g,v]);(0,n.useEffect)(()=>{L()},[L]);let z=(0,n.useCallback)(async()=>{await (0,u.n)("/api/changes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({op:"mark_seen"})}),await L()},[L]),P=(0,n.useMemo)(()=>t.changes.eventsCount(j.length),[j.length,t]),q=(0,n.useMemo)(()=>{let e=Array.from(new Set(j.map(e=>e.op))).sort((e,t)=>e.localeCompare(t));return"all"===g||e.includes(g)||e.unshift(g),["all",...e]},[j,g]),T=(0,n.useMemo)(()=>[{value:"all",label:t.changes.filters.all},{value:"agent",label:t.changes.filters.agent},{value:"user",label:t.changes.filters.user},{value:"system",label:t.changes.filters.system}],[t]),_=(0,n.useMemo)(()=>q.map(e=>({value:e,label:"all"===e?t.changes.filters.operationAll:e})),[q,t]),R=(0,n.useCallback)(e=>"agent"===e?t.changes.filters.agent:"user"===e?t.changes.filters.user:t.changes.filters.system,[t]),D=(0,n.useCallback)(e=>t.changes.operations?.[e]??e,[t]);return(0,s.jsxs)("div",{className:"min-h-screen",children:[(0,s.jsx)("div",{className:"px-4 md:px-6 pt-6 md:pt-8",children:(0,s.jsx)("div",{className:"content-width xl:mr-[220px] rounded-xl border border-border bg-card px-4 py-3 md:px-5 md:py-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[(0,s.jsx)(o.A,{size:15}),t.changes.title]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:t.changes.subtitle}),(0,s.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"rounded-full bg-muted px-2 py-0.5 text-muted-foreground",children:P}),(0,s.jsx)("span",{className:"rounded-full bg-[var(--amber-dim)] px-2 py-0.5 text-[var(--amber)]",children:t.changes.unreadCount(N.unreadCount)})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>void L(),className:"px-2.5 py-1.5 rounded-md text-xs font-medium bg-muted text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,s.jsx)(i.A,{size:12})," ",t.changes.refresh]})}),(0,s.jsx)("button",{type:"button",onClick:()=>void z(),className:"px-2.5 py-1.5 rounded-md text-xs font-medium bg-muted text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:t.changes.markAllRead})]})]})})}),(0,s.jsx)("div",{className:"px-4 md:px-6 py-4 md:py-6",children:(0,s.jsxs)("div",{className:"content-width xl:mr-[220px] space-y-3",children:[(0,s.jsx)("div",{className:"rounded-lg border border-border bg-card p-3",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2.5",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.filePath}),(0,s.jsx)("input",{value:r,onChange:e=>a(e.target.value),placeholder:t.changes.filters.filePathPlaceholder,className:"mt-1 w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-lg text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"})]}),(0,s.jsxs)("div",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.source}),(0,s.jsx)(x.A,{value:h,onChange:e=>f(e),options:T,className:"mt-1"})]}),(0,s.jsxs)("div",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.operation}),(0,s.jsx)(x.A,{value:g,onChange:b,options:_,className:"mt-1"})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.keyword}),(0,s.jsx)("input",{value:v,onChange:e=>y(e.target.value),placeholder:t.changes.filters.keywordPlaceholder,className:"mt-1 w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-lg text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"})]})]})}),E&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:t.changes.loading}),S&&(0,s.jsx)("p",{className:"text-sm text-error",children:S}),!E&&!S&&0===j.length&&(0,s.jsx)("div",{className:"rounded-lg border border-border bg-card p-6 text-center text-sm text-muted-foreground",children:t.changes.empty}),!E&&!S&&j.map(e=>{var r;let n,a,o=!!C[e.id],i=(0,p.m)(e.before??"",e.after??""),u=(0,p.S)(i),m=i.filter(e=>"insert"===e.type).length,x=i.filter(e=>"delete"===e.type).length;return(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[(0,s.jsx)("button",{type:"button",onClick:()=>A(t=>({...t,[e.id]:!t[e.id]})),className:"w-full px-3 py-3 text-left hover:bg-muted/30 focus-visible:ring-2 focus-visible:ring-ring",children:(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("span",{className:"pt-0.5 text-muted-foreground",children:o?(0,s.jsx)(d.A,{size:14}):(0,s.jsx)(c.A,{size:14})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground font-display",children:e.summary}),(m>0||x>0)&&(0,s.jsxs)("span",{className:"text-xs font-mono text-muted-foreground",children:[m>0&&(0,s.jsxs)("span",{className:"text-success",children:["+",m]}),m>0&&x>0&&" ",x>0&&(0,s.jsxs)("span",{className:"text-error",children:["-",x]})]})]}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{className:"rounded-md px-2 py-0.5 font-medium",style:{background:"color-mix(in srgb, var(--amber) 16%, var(--muted))",color:"var(--foreground)",border:"1px solid color-mix(in srgb, var(--amber) 36%, var(--border))"},children:e.path}),(0,s.jsx)("span",{className:(r=e.op).startsWith("create")||"import_file"===r?"text-success":r.startsWith("delete")?"text-error":r.startsWith("rename")||r.startsWith("move")?"text-muted-foreground":"",children:D(e.op)}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{children:R(e.source)}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{children:function(e,t){let r=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(r<1)return t.changes.relativeTime.justNow;if(r<60)return t.changes.relativeTime.minutesAgo(r);let s=Math.floor(r/60);return s<24?t.changes.relativeTime.hoursAgo(s):t.changes.relativeTime.daysAgo(Math.floor(s/24))}(e.ts,t)})]})]}),(0,s.jsx)(l(),{href:`/view/${e.path.split("/").map(encodeURIComponent).join("/")}`,className:"inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium bg-[var(--amber-dim)] text-[var(--amber-text)] focus-visible:ring-2 focus-visible:ring-ring hover:opacity-90",onClick:e=>e.stopPropagation(),children:t.changes.open})]})}),o&&(n=1,a=1,(0,s.jsx)("div",{className:"border-t border-border bg-background/70 max-h-80 overflow-y-auto",children:u.map((r,l)=>{if("gap"===r.type)return n+=r.count,a+=r.count,(0,s.jsx)("div",{className:"px-3 py-1 text-2xs text-muted-foreground/60 border-y border-border/30 bg-muted/20 text-center",children:t.changes.unchangedLines(r.count)},`${e.id}-gap-${l}`);let o="insert"===r.type?"+":"delete"===r.type?"-":" ",i="insert"!==r.type?n:"",d="delete"!==r.type?a:"";return"insert"!==r.type&&n++,"delete"!==r.type&&a++,(0,s.jsxs)("div",{className:`flex items-start text-xs font-mono ${"insert"===r.type?"bg-success/8":"delete"===r.type?"bg-error/8":""}`,children:[(0,s.jsx)("span",{className:"w-8 shrink-0 text-right pr-1 select-none text-muted-foreground/40 text-2xs leading-5",children:i}),(0,s.jsx)("span",{className:"w-8 shrink-0 text-right pr-1 select-none text-muted-foreground/40 text-2xs leading-5",children:d}),(0,s.jsx)("span",{className:`w-3 shrink-0 text-center select-none leading-5 ${"insert"===r.type?"text-success":"delete"===r.type?"text-error":"text-muted-foreground/30"}`,children:o}),(0,s.jsx)("span",{className:`px-1 py-0.5 whitespace-pre-wrap break-all flex-1 ${"insert"===r.type?"text-success":"delete"===r.type?"text-error":"text-muted-foreground"}`,children:r.text||"\xa0"})]},`${e.id}-${l}`)})}))]},e.id)})]})})]})}},91958:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},97631:(e,t,r)=>{"use strict";function s(e,t){let r=e.split("\n"),s=t.split("\n"),n=r.length,a=s.length,l=Array.from({length:n+1},()=>Array(a+1).fill(0));for(let e=n-1;e>=0;e--)for(let t=a-1;t>=0;t--)l[e][t]=r[e]===s[t]?1+l[e+1][t+1]:Math.max(l[e+1][t],l[e][t+1]);let o=[],i=0,d=0;for(;i<n||d<a;){if(i<n&&d<a&&r[i]===s[d]){o.push({type:"equal",text:r[i]}),i+=1,d+=1;continue}if(d<a&&(i>=n||l[i][d+1]>=l[i+1][d])){o.push({type:"insert",text:s[d]}),d+=1;continue}o.push({type:"delete",text:r[i]}),i+=1}return o}function n(e,t=2){let r=new Set;e.forEach((s,n)=>{if("equal"!==s.type)for(let s=Math.max(0,n-t);s<=Math.min(e.length-1,n+t);s++)r.add(s)});let s=[],a=-1;for(let t=0;t<e.length;t++){if(r.has(t)){-1!==a&&(s.push({type:"gap",count:t-a}),a=-1),s.push(e[t]);continue}-1===a&&(a=t)}return -1!==a&&s.push({type:"gap",count:e.length-a}),s}r.d(t,{S:()=>n,m:()=>s})},98330:(e,t,r)=>{Promise.resolve().then(r.bind(r,87180))}},e=>{e.O(0,[4237,1053,8441,3794,7358],()=>e(e.s=98330)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9336],{21362:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},22356:(e,t,r)=>{"use strict";r.d(t,{h:()=>s,n:()=>n});class s extends Error{constructor(e,t,r){super(e),this.name="ApiError",this.status=t,this.code=r}}async function n(e,t={}){let r,a,l,{timeout:o=3e4,signal:i,...d}=t;if((o>0||i)&&(r=new AbortController),o>0&&r&&(a=setTimeout(()=>{r.abort(Error(`Request timed out after ${Math.round(o/1e3)}s`))},o)),i&&r)if(i.aborted)r.abort();else{let e=()=>r?.abort();i.addEventListener("abort",e,{once:!0}),l=()=>{i.removeEventListener("abort",e)}}let c=r?.signal??i;try{let t=await fetch(e,{...d,signal:c});if(!t.ok){let e,r=`Request failed (${t.status})`;try{let s=await t.json();s?.error?.code&&s?.error?.message?(r=s.error.message,e=s.error.code):s?.error&&(r="string"==typeof s.error?s.error:s.error.message??r)}catch{}throw new s(r,t.status,e)}return await t.json()}finally{a&&clearTimeout(a),l&&l()}}},27996:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var s=r(95155),n=r(12115),a=r(47650),l=r(94514),o=r(66088);function i(e){return"options"in e}function d({value:e,onChange:t,options:r,className:d="",size:c="md",placeholder:u}){let[m,x]=(0,n.useState)(!1),[p,h]=(0,n.useState)(-1),[f,g]=(0,n.useState)(null),b=(0,n.useRef)(null),v=(0,n.useRef)(null),y=(0,n.useMemo)(()=>(function(e){let t=[];for(let r of e)i(r)?t.push(...r.options):t.push(r);return t})(r),[r]),j=(0,n.useMemo)(()=>y.find(t=>t.value===e)??null,[y,e]),w=(0,n.useCallback)(()=>{x(!1),h(-1)},[]),N=(0,n.useCallback)(e=>{t(e),w()},[t,w]);(0,n.useEffect)(()=>{if(!m)return;let e=e=>{b.current&&!b.current.contains(e.target)&&v.current&&!v.current.contains(e.target)&&w()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[m,w]),(0,n.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),w(),b.current?.focus();break;case"ArrowDown":e.preventDefault(),h(e=>Math.min(e+1,y.length-1));break;case"ArrowUp":e.preventDefault(),h(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),p>=0&&p<y.length&&(N(y[p].value),b.current?.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[m,w,p,y,N]),(0,n.useEffect)(()=>{if(!m||!v.current||p<0)return;let e=v.current.querySelector(`[data-idx="${p}"]`);e&&e.scrollIntoView({block:"nearest"})},[m,p]);let k=(0,n.useCallback)(()=>{if(!b.current)return;let e=b.current.getBoundingClientRect(),t="sm"===c?200:260,r=window.innerHeight-e.bottom,s=e.top;g({top:r<t+8&&s>r?e.top:e.bottom,left:e.left,width:e.width,flipUp:r<t+8&&s>r})},[c]);(0,n.useEffect)(()=>{if(!m)return void g(null);let t=y.findIndex(t=>t.value===e);return h(t>=0?t:0),k(),window.addEventListener("scroll",k,!0),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k,!0),window.removeEventListener("resize",k)}},[m,y,e,k]);let C="sm"===c,A=C?`inline-flex items-center gap-1 appearance-none rounded-md border border-border bg-background text-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring transition-colors text-2xs px-1.5 py-0.5 pr-5 ${d}`:`w-full flex items-center gap-2 appearance-none rounded-lg border border-border bg-background text-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring transition-colors text-sm px-3 py-2 pr-8 ${d}`,E=C?"w-full flex items-center gap-1.5 px-2 py-1 text-2xs text-left transition-colors cursor-pointer":"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left transition-colors cursor-pointer",M=-1;function S(t){let r=++M,n=t.value===e,a=r===p;return(0,s.jsxs)("button",{type:"button",role:"option","aria-selected":n,"data-idx":r,onClick:()=>N(t.value),onMouseEnter:()=>h(r),className:`${E} ${a?"bg-muted text-foreground":"text-foreground"}`,children:[t.icon,(0,s.jsx)("span",{className:"flex-1 truncate",children:t.label}),t.suffix,n&&(0,s.jsx)(l.A,{size:C?10:12,className:"shrink-0 text-[var(--amber)]"})]},t.value)}let $=m&&f&&(0,a.createPortal)((0,s.jsx)("div",{ref:v,className:C?"fixed z-[9999] overflow-y-auto rounded-md border border-border bg-card shadow-lg py-0.5":"fixed z-[9999] overflow-y-auto rounded-lg border border-border bg-card shadow-lg py-1",role:"listbox",style:{left:f.left,minWidth:f.width,maxHeight:C?200:260,...f.flipUp?{bottom:window.innerHeight-f.top+4}:{top:f.top+4}},children:r.map((e,t)=>i(e)?(0,s.jsxs)("div",{children:[t>0&&(0,s.jsx)("div",{className:"my-0.5 border-t border-border/50"}),(0,s.jsx)("div",{className:`py-1 text-2xs font-medium text-muted-foreground uppercase tracking-wider ${C?"px-2":"px-3"}`,children:e.label}),e.options.map(S)]},e.label):S(e))}),document.body);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("button",{ref:b,type:"button",onClick:()=>x(e=>!e),"aria-haspopup":"listbox","aria-expanded":m,className:A,children:[j?.icon,(0,s.jsx)("span",{className:"flex-1 truncate text-left",children:j?.label??u??"—"}),j?.suffix,(0,s.jsx)(o.A,{size:C?12:14,className:`${C?"absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none":"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"} transition-transform duration-150 ${m?"rotate-180":""}`})]}),$]})}},50538:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},87180:(e,t,r)=>{"use strict";r.d(t,{default:()=>h});var s=r(95155),n=r(12115),a=r(98500),l=r.n(a),o=r(50538),i=r(91958),d=r(66088),c=r(21362),u=r(22356),m=r(35581),x=r(27996),p=r(97631);function h({initialPath:e=""}){let{t}=(0,m.Y)(),[r,a]=(0,n.useState)(e),[h,f]=(0,n.useState)("all"),[g,b]=(0,n.useState)("all"),[v,y]=(0,n.useState)(""),[j,w]=(0,n.useState)([]),[N,k]=(0,n.useState)({unreadCount:0,totalCount:0}),[C,A]=(0,n.useState)({}),[E,M]=(0,n.useState)(!0),[S,$]=(0,n.useState)(null),L=(0,n.useCallback)(async()=>{M(!0),$(null);try{let e=new URLSearchParams({op:"list",limit:"120"});r.trim()&&e.set("path",r.trim()),"all"!==h&&e.set("source",h),"all"!==g&&e.set("event_op",g),v.trim()&&e.set("q",v.trim());let t=`/api/changes?${e.toString()}`,[s,n]=await Promise.all([(0,u.n)(t),(0,u.n)("/api/changes?op=summary")]);w(s.events),k(n)}catch(e){$(e instanceof Error?e.message:"Failed to load changes")}finally{M(!1)}},[r,h,g,v]);(0,n.useEffect)(()=>{L()},[L]);let z=(0,n.useCallback)(async()=>{await (0,u.n)("/api/changes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({op:"mark_seen"})}),await L()},[L]),P=(0,n.useMemo)(()=>t.changes.eventsCount(j.length),[j.length,t]),q=(0,n.useMemo)(()=>{let e=Array.from(new Set(j.map(e=>e.op))).sort((e,t)=>e.localeCompare(t));return"all"===g||e.includes(g)||e.unshift(g),["all",...e]},[j,g]),T=(0,n.useMemo)(()=>[{value:"all",label:t.changes.filters.all},{value:"agent",label:t.changes.filters.agent},{value:"user",label:t.changes.filters.user},{value:"system",label:t.changes.filters.system}],[t]),_=(0,n.useMemo)(()=>q.map(e=>({value:e,label:"all"===e?t.changes.filters.operationAll:e})),[q,t]),R=(0,n.useCallback)(e=>"agent"===e?t.changes.filters.agent:"user"===e?t.changes.filters.user:t.changes.filters.system,[t]),D=(0,n.useCallback)(e=>t.changes.operations?.[e]??e,[t]);return(0,s.jsxs)("div",{className:"min-h-screen",children:[(0,s.jsx)("div",{className:"px-4 md:px-6 pt-6 md:pt-8",children:(0,s.jsx)("div",{className:"content-width xl:mr-[220px] rounded-xl border border-border bg-card px-4 py-3 md:px-5 md:py-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[(0,s.jsx)(o.A,{size:15}),t.changes.title]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:t.changes.subtitle}),(0,s.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"rounded-full bg-muted px-2 py-0.5 text-muted-foreground",children:P}),(0,s.jsx)("span",{className:"rounded-full bg-[var(--amber-dim)] px-2 py-0.5 text-[var(--amber)]",children:t.changes.unreadCount(N.unreadCount)})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>void L(),className:"px-2.5 py-1.5 rounded-md text-xs font-medium bg-muted text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,s.jsx)(i.A,{size:12})," ",t.changes.refresh]})}),(0,s.jsx)("button",{type:"button",onClick:()=>void z(),className:"px-2.5 py-1.5 rounded-md text-xs font-medium bg-muted text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:t.changes.markAllRead})]})]})})}),(0,s.jsx)("div",{className:"px-4 md:px-6 py-4 md:py-6",children:(0,s.jsxs)("div",{className:"content-width xl:mr-[220px] space-y-3",children:[(0,s.jsx)("div",{className:"rounded-lg border border-border bg-card p-3",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2.5",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.filePath}),(0,s.jsx)("input",{value:r,onChange:e=>a(e.target.value),placeholder:t.changes.filters.filePathPlaceholder,className:"mt-1 w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-lg text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"})]}),(0,s.jsxs)("div",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.source}),(0,s.jsx)(x.A,{value:h,onChange:e=>f(e),options:T,className:"mt-1"})]}),(0,s.jsxs)("div",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.operation}),(0,s.jsx)(x.A,{value:g,onChange:b,options:_,className:"mt-1"})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.changes.filters.keyword}),(0,s.jsx)("input",{value:v,onChange:e=>y(e.target.value),placeholder:t.changes.filters.keywordPlaceholder,className:"mt-1 w-full px-2.5 py-1.5 text-sm bg-background border border-border rounded-lg text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"})]})]})}),E&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:t.changes.loading}),S&&(0,s.jsx)("p",{className:"text-sm text-error",children:S}),!E&&!S&&0===j.length&&(0,s.jsx)("div",{className:"rounded-lg border border-border bg-card p-6 text-center text-sm text-muted-foreground",children:t.changes.empty}),!E&&!S&&j.map(e=>{var r;let n,a,o=!!C[e.id],i=(0,p.m)(e.before??"",e.after??""),u=(0,p.S)(i),m=i.filter(e=>"insert"===e.type).length,x=i.filter(e=>"delete"===e.type).length;return(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[(0,s.jsx)("button",{type:"button",onClick:()=>A(t=>({...t,[e.id]:!t[e.id]})),className:"w-full px-3 py-3 text-left hover:bg-muted/30 focus-visible:ring-2 focus-visible:ring-ring",children:(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("span",{className:"pt-0.5 text-muted-foreground",children:o?(0,s.jsx)(d.A,{size:14}):(0,s.jsx)(c.A,{size:14})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground font-display",children:e.summary}),(m>0||x>0)&&(0,s.jsxs)("span",{className:"text-xs font-mono text-muted-foreground",children:[m>0&&(0,s.jsxs)("span",{className:"text-success",children:["+",m]}),m>0&&x>0&&" ",x>0&&(0,s.jsxs)("span",{className:"text-error",children:["-",x]})]})]}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{className:"rounded-md px-2 py-0.5 font-medium",style:{background:"color-mix(in srgb, var(--amber) 16%, var(--muted))",color:"var(--foreground)",border:"1px solid color-mix(in srgb, var(--amber) 36%, var(--border))"},children:e.path}),(0,s.jsx)("span",{className:(r=e.op).startsWith("create")||"import_file"===r?"text-success":r.startsWith("delete")?"text-error":r.startsWith("rename")||r.startsWith("move")?"text-muted-foreground":"",children:D(e.op)}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{children:R(e.source)}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{children:function(e,t){let r=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(r<1)return t.changes.relativeTime.justNow;if(r<60)return t.changes.relativeTime.minutesAgo(r);let s=Math.floor(r/60);return s<24?t.changes.relativeTime.hoursAgo(s):t.changes.relativeTime.daysAgo(Math.floor(s/24))}(e.ts,t)})]})]}),(0,s.jsx)(l(),{href:`/view/${e.path.split("/").map(encodeURIComponent).join("/")}`,className:"inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium bg-[var(--amber-dim)] text-[var(--amber-text)] focus-visible:ring-2 focus-visible:ring-ring hover:opacity-90",onClick:e=>e.stopPropagation(),children:t.changes.open})]})}),o&&(n=1,a=1,(0,s.jsx)("div",{className:"border-t border-border bg-background/70 max-h-80 overflow-y-auto",children:u.map((r,l)=>{if("gap"===r.type)return n+=r.count,a+=r.count,(0,s.jsx)("div",{className:"px-3 py-1 text-2xs text-muted-foreground/60 border-y border-border/30 bg-muted/20 text-center",children:t.changes.unchangedLines(r.count)},`${e.id}-gap-${l}`);let o="insert"===r.type?"+":"delete"===r.type?"-":" ",i="insert"!==r.type?n:"",d="delete"!==r.type?a:"";return"insert"!==r.type&&n++,"delete"!==r.type&&a++,(0,s.jsxs)("div",{className:`flex items-start text-xs font-mono ${"insert"===r.type?"bg-success/8":"delete"===r.type?"bg-error/8":""}`,children:[(0,s.jsx)("span",{className:"w-8 shrink-0 text-right pr-1 select-none text-muted-foreground/40 text-2xs leading-5",children:i}),(0,s.jsx)("span",{className:"w-8 shrink-0 text-right pr-1 select-none text-muted-foreground/40 text-2xs leading-5",children:d}),(0,s.jsx)("span",{className:`w-3 shrink-0 text-center select-none leading-5 ${"insert"===r.type?"text-success":"delete"===r.type?"text-error":"text-muted-foreground/30"}`,children:o}),(0,s.jsx)("span",{className:`px-1 py-0.5 whitespace-pre-wrap break-all flex-1 ${"insert"===r.type?"text-success":"delete"===r.type?"text-error":"text-muted-foreground"}`,children:r.text||"\xa0"})]},`${e.id}-${l}`)})}))]},e.id)})]})})]})}},91958:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},97631:(e,t,r)=>{"use strict";function s(e,t){let r=e.split("\n"),s=t.split("\n"),n=r.length,a=s.length,l=Array.from({length:n+1},()=>Array(a+1).fill(0));for(let e=n-1;e>=0;e--)for(let t=a-1;t>=0;t--)l[e][t]=r[e]===s[t]?1+l[e+1][t+1]:Math.max(l[e+1][t],l[e][t+1]);let o=[],i=0,d=0;for(;i<n||d<a;){if(i<n&&d<a&&r[i]===s[d]){o.push({type:"equal",text:r[i]}),i+=1,d+=1;continue}if(d<a&&(i>=n||l[i][d+1]>=l[i+1][d])){o.push({type:"insert",text:s[d]}),d+=1;continue}o.push({type:"delete",text:r[i]}),i+=1}return o}function n(e,t=2){let r=new Set;e.forEach((s,n)=>{if("equal"!==s.type)for(let s=Math.max(0,n-t);s<=Math.min(e.length-1,n+t);s++)r.add(s)});let s=[],a=-1;for(let t=0;t<e.length;t++){if(r.has(t)){-1!==a&&(s.push({type:"gap",count:t-a}),a=-1),s.push(e[t]);continue}-1===a&&(a=t)}return -1!==a&&s.push({type:"gap",count:e.length-a}),s}r.d(t,{S:()=>n,m:()=>s})},98330:(e,t,r)=>{Promise.resolve().then(r.bind(r,87180))}},e=>{e.O(0,[4237,5581,8441,3794,7358],()=>e(e.s=98330)),_N_E=e.O()}]);
@@ -0,0 +1,11 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9604],{16518:(e,t,r)=>{"use strict";r.d(t,{AI:()=>n,RS:()=>s});let s=["about-you","continued","daily","past-you","growth"],n={"about-you":"/echo/about-you",continued:"/echo/continued",daily:"/echo/daily","past-you":"/echo/past-you",growth:"/echo/growth"}},22368:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]])},22721:(e,t,r)=>{"use strict";r.d(t,{default:()=>Y});var s=r(95155),n=r(12115),o=r(22368),a=r(41762),i=r(51900),l=r(50538),d=r(90718),c=r(42268),u=r(94514),p=r(35581),m=r(27318);function h({heroKicker:e,pageTitle:t,lead:r,titleId:n,children:o}){return(0,s.jsxs)("header",{className:"relative overflow-hidden rounded-xl border border-border bg-card px-5 pb-5 pt-6 shadow-sm sm:px-8 sm:pb-6 sm:pt-8",children:[(0,s.jsx)("div",{className:"absolute left-0 top-5 w-[3px] rounded-full bg-[var(--amber)] sm:top-6",style:{bottom:o?"40%":"1.25rem"},"aria-hidden":!0}),(0,s.jsxs)("div",{className:"relative pl-4 sm:pl-5",children:[(0,s.jsx)("p",{className:"mb-4 font-sans text-2xs font-semibold uppercase tracking-[0.2em] text-[var(--amber-text)]",children:e}),(0,s.jsx)("h1",{id:n,className:"text-2xl font-semibold tracking-tight text-foreground md:text-3xl",children:t}),(0,s.jsx)("p",{className:"mt-3 max-w-prose font-sans text-base leading-relaxed text-muted-foreground",children:r})]}),o]})}var g=r(98500),x=r.n(g),f=r(91337),b=r(16518);function y({activeSegment:e}){let{t}=(0,p.Y)(),r=t.panels.echo,n=t.echoPages.segmentNavAria;return(0,s.jsx)("nav",{"aria-label":n,className:"mt-5 border-t border-border/30 pt-4 font-sans",children:(0,s.jsx)("ul",{className:"flex snap-x snap-mandatory gap-1.5 overflow-x-auto pb-0.5 [scrollbar-width:thin]",children:b.RS.map(t=>{let n=b.AI[t],{label:c,icon:u}=function(e,t){switch(e){case"about-you":return{label:t.aboutYouTitle,icon:(0,s.jsx)(o.A,{size:13})};case"continued":return{label:t.continuedTitle,icon:(0,s.jsx)(a.A,{size:13})};case"daily":return{label:t.dailyEchoTitle,icon:(0,s.jsx)(i.A,{size:13})};case"past-you":return{label:t.pastYouTitle,icon:(0,s.jsx)(l.A,{size:13})};case"growth":return{label:t.intentGrowthTitle,icon:(0,s.jsx)(d.A,{size:13})}}}(t,r),p=t===e;return(0,s.jsx)("li",{className:"snap-start shrink-0",children:(0,s.jsxs)(x(),{href:n,"aria-current":p?"page":void 0,className:(0,f.cn)("inline-flex min-h-9 max-w-[11rem] items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm transition-[background-color,border-color,color] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",p?"border-[var(--amber)]/45 bg-[var(--amber-dim)]/50 font-medium text-foreground":"border-transparent bg-muted/35 text-muted-foreground hover:bg-muted/55 hover:text-foreground"),children:[(0,s.jsx)("span",{className:"shrink-0","aria-hidden":!0,children:u}),(0,s.jsx)("span",{className:"truncate",children:c})]})},t)})})})}var v=r(86901),k=r(66088),j=r(6296),w=r(66804),N=r(32957),M=r(68589),A=r(47376);function E({title:e,showLabel:t,hideLabel:r,hint:o,generateLabel:a,noAiHint:i,generatingLabel:l,errorPrefix:d,retryLabel:c,userPrompt:u}){let[m,h]=(0,n.useState)(!1),[g,x]=(0,n.useState)(!1),[b,y]=(0,n.useState)(""),[E,T]=(0,n.useState)(""),I=(0,n.useId)(),_=`${I}-btn`,L=(0,n.useRef)(null),{ready:P,loading:S}=function(){let[e,t]=(0,n.useState)(!1),[r,s]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{let e=!1,r=()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.json()).then(r=>{e||t(function(e){let t=e.ai?.provider,r=t&&(0,A.rl)(t)?t:"anthropic",s=e.envOverrides??{},n=e.ai?.providers?.[r]?.apiKey;if("string"==typeof n&&n.length>0)return!0;let o=(0,A.Ux)(r);return!!o&&!!s[o]}(r))}).catch(()=>{e||t(!1)}).finally(()=>{e||s(!1)})};r();let n=()=>r();return window.addEventListener("mindos:settings-changed",n),()=>{e=!0,window.removeEventListener("mindos:settings-changed",n)}},[]),{ready:e,loading:r}}(),{t:z}=(0,p.Y)();(0,n.useEffect)(()=>()=>L.current?.abort(),[]);let U=(0,n.useCallback)(async()=>{L.current?.abort();let e=new AbortController;L.current=e,T(""),y(""),x(!0);try{let t=await fetch("/api/ask",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:[{role:"user",content:u}],maxSteps:16}),signal:e.signal});if(!t.ok){let e=`HTTP ${t.status}`;try{let r=await t.json();e=r?.error?.message??r?.message??e}catch{}throw Error(e)}if(!t.body)throw Error("No response body");await (0,M.m)(t.body,e=>{y(e.content??"")},e.signal)}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;T(e instanceof Error?e.message:String(e))}finally{x(!1),L.current=null}},[u]),B=S||!P||g;return(0,s.jsxs)("div",{className:"mt-10 overflow-hidden rounded-xl border border-border bg-card shadow-sm transition-[border-color,box-shadow] duration-150 ease-out hover:border-[var(--amber)]/15 hover:shadow",children:[(0,s.jsxs)("button",{id:_,type:"button",className:"flex w-full items-center gap-3 px-5 py-4 text-left transition-colors duration-200 hover:bg-muted/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","aria-expanded":m,"aria-controls":I,onClick:()=>h(e=>!e),children:[(0,s.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--amber-dim)] text-[var(--amber)]","aria-hidden":!0,children:(0,s.jsx)(v.A,{size:17,strokeWidth:1.75})}),(0,s.jsx)("span",{className:"flex-1 font-sans text-sm font-medium text-foreground",children:e}),(0,s.jsx)(k.A,{size:16,className:(0,f.cn)("shrink-0 text-muted-foreground transition-transform duration-200",m&&"rotate-180"),"aria-hidden":!0}),(0,s.jsx)("span",{className:"sr-only",children:m?r:t})]}),(0,s.jsx)("div",{id:I,role:"region","aria-labelledby":_,className:(0,f.cn)("grid transition-[grid-template-rows] duration-250 ease-out",m?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:(0,s.jsx)("div",{className:"overflow-hidden",...!m&&{inert:!0},children:(0,s.jsxs)("div",{className:"border-t border-border/60 px-5 pb-5 pt-4",children:[(0,s.jsx)("p",{className:"font-sans text-sm leading-relaxed text-muted-foreground",children:o}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("button",{type:"button",disabled:B,title:B?z.hints.aiNotConfigured:void 0,onClick:U,className:"inline-flex items-center gap-2 rounded-lg bg-[var(--amber)] px-3 py-2 font-sans text-sm font-medium text-[var(--amber-foreground)] transition-opacity duration-150 hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[g?(0,s.jsx)(j.A,{size:16,className:"animate-spin shrink-0","aria-hidden":!0}):(0,s.jsx)(v.A,{size:15,className:"shrink-0","aria-hidden":!0}),g?l:a]}),E?(0,s.jsx)("button",{type:"button",onClick:U,disabled:g||!P,title:g||!P?z.hints.generationInProgress:void 0,className:"font-sans text-sm text-[var(--amber)] underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:c}):null]}),S||P?null:(0,s.jsx)("p",{className:"mt-2 font-sans text-2xs text-muted-foreground",children:i}),E?(0,s.jsxs)("p",{className:"mt-3 font-sans text-sm text-error",role:"alert",children:[d," ",E]}):null,b?(0,s.jsxs)("div",{className:(0,f.cn)("prose prose-sm prose-panel dark:prose-invert max-w-none text-foreground prose-p:my-1 prose-p:leading-relaxed prose-headings:font-semibold prose-headings:my-2 prose-headings:text-[13px] prose-ul:my-1 prose-li:my-0.5 prose-ol:my-1 prose-code:text-[0.8em] prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:text-xs prose-blockquote:border-l-[var(--amber)] prose-blockquote:text-muted-foreground prose-a:text-[var(--amber)] prose-a:no-underline hover:prose-a:underline prose-strong:text-foreground prose-strong:font-semibold","mt-4 border-t border-border/60 pt-4"),children:[(0,s.jsx)(w.oz,{remarkPlugins:[N.A],children:b}),g?(0,s.jsx)("span",{className:"ml-0.5 inline-block h-3.5 w-1 animate-pulse rounded-sm bg-[var(--amber)] align-middle","aria-hidden":!0}):null]}):null]})})})]})}let T=(0,r(90425).A)("library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);var I=r(48368),_=r(12651);function L({headingId:e,heading:t,snapshotBadge:r,emptyTitle:n,emptyBody:o,icon:a,actions:i}){return(0,s.jsxs)("section",{className:"rounded-xl border border-border bg-card p-5 shadow-sm transition-[border-color,box-shadow] duration-150 ease-out hover:border-[var(--amber)]/20 hover:shadow sm:p-6","aria-labelledby":e,children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--amber-dim)] text-[var(--amber)]","aria-hidden":!0,children:a??(0,s.jsx)(T,{size:18,strokeWidth:1.75})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{id:e,className:"font-sans text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:t}),(0,s.jsx)("p",{className:"mt-2 font-sans font-medium text-foreground",children:n})]})]}),(0,s.jsx)("span",{className:"font-sans text-2xs font-medium uppercase tracking-wide text-[var(--amber-text)] sm:mt-0.5 sm:shrink-0 rounded-md bg-[var(--amber-dim)] px-2 py-1",children:r})]}),(0,s.jsx)("p",{className:"mt-4 border-t border-border/60 pt-4 font-sans text-sm leading-relaxed text-muted-foreground",children:o}),i?(0,s.jsx)("div",{className:"mt-4 border-t border-border/60 pt-4",children:i}):null]})}function P({draftsLabel:e,todosLabel:t,subEmptyHint:r,footer:n}){let o=(e,t)=>(0,s.jsxs)("div",{className:"flex min-h-[5.75rem] flex-col justify-center rounded-xl border border-border/40 bg-card/30 px-4 py-4 transition-colors duration-150 hover:border-[var(--amber)]/25 hover:bg-[var(--amber-dim)]/15",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"shrink-0 text-muted-foreground","aria-hidden":!0,children:t}),(0,s.jsx)("h3",{className:"font-sans text-sm font-medium text-foreground",children:e})]}),(0,s.jsx)("p",{className:"mt-2 font-sans text-2xs leading-relaxed text-muted-foreground",children:r})]});return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[o(e,(0,s.jsx)(I.A,{size:15,strokeWidth:1.75})),o(t,(0,s.jsx)(_.A,{size:15,strokeWidth:1.75}))]}),n?(0,s.jsx)("div",{className:"border-t border-border/60 pt-4",children:n}):null]})}let S="mindos-echo-daily-line",z="mindos-echo-growth-intent",U={"about-you":(0,s.jsx)(o.A,{size:18,strokeWidth:1.75}),continued:(0,s.jsx)(a.A,{size:18,strokeWidth:1.75}),daily:(0,s.jsx)(i.A,{size:18,strokeWidth:1.75}),"past-you":(0,s.jsx)(l.A,{size:18,strokeWidth:1.75}),growth:(0,s.jsx)(d.A,{size:18,strokeWidth:1.75})},B="block font-sans text-2xs font-semibold uppercase tracking-wide text-muted-foreground",C="mt-2 w-full min-h-[5rem] resize-y rounded-lg border border-border bg-background px-3 py-2.5 font-sans text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-[var(--amber)]/40",O="rounded-xl border border-border bg-card p-5 shadow-sm transition-[border-color,box-shadow] duration-150 ease-out hover:border-[var(--amber)]/20 hover:shadow sm:p-6";function Y({segment:e}){let{t,locale:r}=(0,p.Y)(),o=t.echoPages,a=function(e,t){switch(e){case"about-you":return t.aboutYouTitle;case"continued":return t.continuedTitle;case"daily":return t.dailyEchoTitle;case"past-you":return t.pastYouTitle;case"growth":return t.intentGrowthTitle}}(e,t.panels.echo),i=function(e,t){switch(e){case"about-you":return t.aboutYouLead;case"continued":return t.continuedLead;case"daily":return t.dailyLead;case"past-you":return t.pastYouLead;case"growth":return t.growthLead}}(e,o),l=(0,n.useId)(),d="echo-page-title",[g,x]=(0,n.useState)(""),[f,b]=(0,n.useState)(""),[v,k]=(0,n.useState)(!1),[j,w]=(0,n.useState)(!1),N=(0,n.useRef)(void 0),M=(0,n.useRef)(void 0);(0,n.useEffect)(()=>()=>{clearTimeout(N.current),clearTimeout(M.current)},[]);let A=(0,n.useMemo)(()=>(function(e,t){switch(e){case"about-you":return{title:t.snapshotAboutYouTitle,body:t.snapshotAboutYouBody};case"continued":return{title:t.snapshotContinuedTitle,body:t.snapshotContinuedBody};case"daily":return{title:t.snapshotDailyTitle,body:t.snapshotDailyBody};case"past-you":return{title:t.snapshotPastYouTitle,body:t.snapshotPastYouBody};case"growth":return{title:t.snapshotGrowthTitle,body:t.snapshotGrowthBody}}})(e,o),[e,o]);(0,n.useEffect)(()=>{try{let e=localStorage.getItem(S);e&&x(e);let t=localStorage.getItem(z);t&&b(t)}catch{}},[]);let T=(0,n.useCallback)(()=>{try{localStorage.setItem(S,g)}catch{}clearTimeout(N.current),k(!0),N.current=setTimeout(()=>k(!1),1800)},[g]),I=(0,n.useCallback)(()=>{try{localStorage.setItem(z,f)}catch{}clearTimeout(M.current),w(!0),M.current=setTimeout(()=>w(!1),1800)},[f]),_=(0,n.useCallback)(()=>{T(),(0,m.NH)(o.dailyAskPrefill(g),"user")},[g,o,T]),Y=(0,n.useCallback)(()=>{(0,m.NH)(`${o.parent} / ${a}
2
+
3
+ `,"user")},[o.parent,a]),K=(0,n.useMemo)(()=>{var t;let s,n,i;return s="zh"===(t={locale:r,segment:e,segmentTitle:a,factsHeading:o.factsHeading,emptyTitle:A.title,emptyBody:A.body,continuedDrafts:o.continuedDrafts,continuedTodos:o.continuedTodos,subEmptyHint:o.subEmptyHint,dailyLineLabel:o.dailyLineLabel,dailyLine:g,growthIntentLabel:o.growthIntentLabel,growthIntent:f}).locale?"Chinese":"English",n=[`Echo section: ${t.segmentTitle}`,`${t.factsHeading}: ${t.emptyTitle}`,t.emptyBody],"continued"===t.segment&&n.push(`${t.continuedDrafts} — ${t.subEmptyHint}`,`${t.continuedTodos} — ${t.subEmptyHint}`),"daily"===t.segment&&t.dailyLine.trim()&&n.push(`${t.dailyLineLabel}: ${t.dailyLine.trim()}`),"growth"===t.segment&&t.growthIntent.trim()&&n.push(`${t.growthIntentLabel}: ${t.growthIntent.trim()}`),i=n.join("\n\n"),`You are a reflective assistant inside MindOS Echo (a personal, local-first notes companion). The user is viewing one Echo section. Below is exactly what they see on screen right now—it may be an empty-state placeholder until indexing fills the list.
4
+
5
+ --- Visible context ---
6
+ ${i}
7
+ ---
8
+
9
+ Write a short insight in ${s} as Markdown (under 220 words). Tone: warm, restrained, "quiet notebook"—not a hype coach. If the context is only generic empty copy, acknowledge that briefly and offer 2–3 reflection prompts instead of inventing files or facts. Do not claim you read their whole library. Prefer answering from this context; avoid unnecessary tool use.`},[r,e,a,o.factsHeading,A,o.continuedDrafts,o.continuedTodos,o.subEmptyHint,o.dailyLineLabel,g,o.growthIntentLabel,f]),H=e=>(0,s.jsxs)("button",{type:"button",onClick:e,className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-4 py-2.5 font-sans text-sm font-medium text-foreground transition-colors duration-150 hover:border-[var(--amber)]/35 hover:bg-[var(--amber-dim)]/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[o.continueAgent,(0,s.jsx)(c.A,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0})]});return(0,s.jsxs)("article",{className:"mx-auto max-w-3xl px-4 py-6 sm:px-6 md:py-11","aria-labelledby":d,children:[(0,s.jsx)(h,{heroKicker:o.heroKicker,pageTitle:a,lead:i,titleId:d,children:(0,s.jsx)(y,{activeSegment:e})}),(0,s.jsxs)("div",{className:"mt-6 space-y-6 sm:mt-8",children:[(0,s.jsx)(L,{headingId:l,heading:o.factsHeading,snapshotBadge:o.snapshotBadge,emptyTitle:A.title,emptyBody:A.body,icon:U[e],actions:"about-you"===e?H(Y):void 0}),"continued"===e?(0,s.jsx)(P,{draftsLabel:o.continuedDrafts,todosLabel:o.continuedTodos,subEmptyHint:o.subEmptyHint,footer:H(Y)}):null]}),"daily"===e?(0,s.jsxs)("section",{className:`${O} mt-6`,children:[(0,s.jsx)("label",{htmlFor:"echo-daily-line",className:B,children:o.dailyLineLabel}),(0,s.jsx)("textarea",{id:"echo-daily-line",value:g,onChange:e=>x(e.target.value),onBlur:T,rows:3,placeholder:o.dailyLinePlaceholder,className:C}),(0,s.jsxs)("p",{className:"mt-3 flex items-center gap-2 font-sans text-2xs text-muted-foreground",children:[(0,s.jsx)("span",{children:o.dailySavedNote}),(0,s.jsx)("span",{className:"inline-flex items-center gap-1 text-[var(--success)]","aria-live":"polite",children:v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{size:12,"aria-hidden":!0})," ",o.savedFlash]}):null})]}),(0,s.jsx)("div",{className:"mt-4",children:H(_)})]}):null,"growth"===e?(0,s.jsxs)("section",{className:`${O} mt-6`,children:[(0,s.jsx)("label",{htmlFor:"echo-growth-intent",className:B,children:o.growthIntentLabel}),(0,s.jsx)("textarea",{id:"echo-growth-intent",value:f,onChange:e=>b(e.target.value),onBlur:I,rows:4,placeholder:o.growthIntentPlaceholder,className:`${C} min-h-[6.5rem]`}),(0,s.jsxs)("p",{className:"mt-3 flex items-center gap-2 font-sans text-2xs text-muted-foreground",children:[(0,s.jsx)("span",{children:o.growthSavedNote}),(0,s.jsx)("span",{className:"inline-flex items-center gap-1 text-[var(--success)]","aria-live":"polite",children:j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{size:12,"aria-hidden":!0})," ",o.savedFlash]}):null})]}),(0,s.jsx)("div",{className:"mt-4 border-t border-border/60 pt-4",children:H(Y)})]}):null,"past-you"===e?(0,s.jsxs)("section",{className:`${O} mt-6`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:B,children:o.pastYouDrawLabel}),(0,s.jsx)("span",{className:"rounded-full bg-muted px-2 py-0.5 font-sans text-2xs font-medium text-muted-foreground",children:o.pastYouComingSoon})]}),(0,s.jsx)("p",{className:"mt-3 font-sans text-sm leading-relaxed text-muted-foreground",children:o.pastYouDisabledHint}),(0,s.jsx)("div",{className:"mt-4 border-t border-border/60 pt-4",children:H(Y)})]}):null,(0,s.jsx)(E,{title:o.insightTitle,showLabel:o.insightShow,hideLabel:o.insightHide,hint:o.insightHint,generateLabel:o.generateInsight,noAiHint:o.generateInsightNoAi,generatingLabel:o.insightGenerating,errorPrefix:o.insightErrorPrefix,retryLabel:o.insightRetry,userPrompt:K})]})}},27318:(e,t,r)=>{"use strict";r.d(t,{KT:()=>c,NH:()=>d});var s=r(12115);let n={open:!1,initialMessage:"",source:"user",acpAgent:null},o=new Set;function a(){o.forEach(e=>e())}function i(e){return o.add(e),()=>{o.delete(e)}}function l(){return n}function d(e="",t="user",r=null){n={open:!0,initialMessage:e,source:t,acpAgent:r},a()}function c(){let e=(0,s.useSyncExternalStore)(i,l,l);return{open:e.open,initialMessage:e.initialMessage,source:e.source,acpAgent:e.acpAgent,openWith:(0,s.useCallback)((e,t="user",r=null)=>d(e,t,r),[]),close:(0,s.useCallback)(()=>void(n={open:!1,initialMessage:"",source:"user",acpAgent:null},a()),[])}}},31683:(e,t,r)=>{Promise.resolve().then(r.bind(r,22721))},41762:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("bookmark",[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]])},42268:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]])},47376:(e,t,r)=>{"use strict";r.d(t,{Ot:()=>u,T_:()=>n,Ux:()=>c,bf:()=>i,jt:()=>o,rl:()=>a});var s=r(20699);r(87358);let n={anthropic:{id:"anthropic",name:"Anthropic",nameZh:"Anthropic",defaultModel:"claude-sonnet-4-6",supportsBaseUrl:!0,supportsThinking:!0,supportsListModels:!0,signupUrl:"https://console.anthropic.com/settings/keys",category:"primary"},openai:{id:"openai",name:"OpenAI",nameZh:"OpenAI",defaultModel:"gpt-5.4",supportsBaseUrl:!0,supportsThinking:!0,supportsListModels:!0,signupUrl:"https://platform.openai.com/api-keys",category:"primary"},google:{id:"google",name:"Google Gemini",nameZh:"Google Gemini",defaultModel:"gemini-2.5-flash",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,signupUrl:"https://aistudio.google.com/apikey",category:"primary"},groq:{id:"groq",name:"Groq",nameZh:"Groq",defaultModel:"llama-3.3-70b-versatile",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,signupUrl:"https://console.groq.com/keys",category:"more"},xai:{id:"xai",name:"xAI (Grok)",nameZh:"xAI (Grok)",defaultModel:"grok-3",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},openrouter:{id:"openrouter",name:"OpenRouter",nameZh:"OpenRouter",defaultModel:"anthropic/claude-sonnet-4",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},mistral:{id:"mistral",name:"Mistral",nameZh:"Mistral",defaultModel:"mistral-large-latest",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},deepseek:{id:"deepseek",name:"DeepSeek",nameZh:"DeepSeek",defaultModel:"deepseek-chat",piProviderOverride:"openai",fixedBaseUrl:"https://api.deepseek.com/v1",supportsBaseUrl:!0,supportsThinking:!0,supportsListModels:!0,signupUrl:"https://platform.deepseek.com/api_keys",category:"more"},zai:{id:"zai",name:"ZhipuAI (GLM)",nameZh:"智谱 AI (GLM 国际版)",defaultModel:"glm-4-plus",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},"zai-cn":{id:"zai-cn",name:"ZhipuAI (GLM China)",nameZh:"智谱 AI (GLM 国内版)",defaultModel:"glm-4-plus",piProviderOverride:"zai",fixedBaseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,signupUrl:"https://open.bigmodel.cn/",category:"more"},"kimi-coding":{id:"kimi-coding",name:"Kimi Coding",nameZh:"Kimi Coding (月之暗面)",defaultModel:"kimi-k2-thinking",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},cerebras:{id:"cerebras",name:"Cerebras",nameZh:"Cerebras",defaultModel:"llama-4-scout-17b-16e",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},minimax:{id:"minimax",name:"MiniMax",nameZh:"MiniMax (国际版)",defaultModel:"MiniMax-M2.5",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},"minimax-cn":{id:"minimax-cn",name:"MiniMax (China)",nameZh:"MiniMax (国内版)",defaultModel:"MiniMax-M2.5",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},huggingface:{id:"huggingface",name:"Hugging Face",nameZh:"Hugging Face",defaultModel:"Qwen/Qwen3-235B-A22B-Thinking-2507",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},ollama:{id:"ollama",name:"Ollama",nameZh:"Ollama (本地)",defaultModel:"llama3.2",piProviderOverride:"openai",fixedBaseUrl:"http://localhost:11434/v1",apiKeyFallback:"ollama",supportsBaseUrl:!0,supportsThinking:!1,supportsListModels:!0,signupUrl:"https://ollama.com/download",category:"more"}},o=Object.keys(n);function a(e){return e in n}function i(){let e=[],t=[];for(let r of o)"primary"===n[r].category?e.push(r):t.push(r);return t.sort((e,t)=>n[e].name.localeCompare(n[t].name)),{primary:e,more:t}}function l(e){return n[e].piProviderOverride??e}let d={deepseek:"DEEPSEEK_API_KEY"};function c(e){return d[e]?d[e]:p[l(e)]}function u(e){let t=n[e];if(t.fixedBaseUrl)return t.fixedBaseUrl;try{let t=(0,s.zr)(l(e));return t[0]?.baseUrl??""}catch{return""}}let p={anthropic:"ANTHROPIC_API_KEY",openai:"OPENAI_API_KEY","azure-openai-responses":"AZURE_OPENAI_API_KEY",google:"GEMINI_API_KEY",groq:"GROQ_API_KEY",cerebras:"CEREBRAS_API_KEY",xai:"XAI_API_KEY",openrouter:"OPENROUTER_API_KEY",zai:"ZAI_API_KEY","zai-cn":"ZAI_API_KEY",mistral:"MISTRAL_API_KEY",minimax:"MINIMAX_API_KEY","minimax-cn":"MINIMAX_API_KEY",huggingface:"HF_TOKEN","kimi-coding":"KIMI_API_KEY"}},50538:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},51900:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},60392:e=>{function t(e){return Promise.resolve().then(()=>{var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}t.keys=()=>[],t.resolve=t,t.id=60392,e.exports=t},68589:(e,t,r)=>{"use strict";r.d(t,{m:()=>n});let s=new Set(["write_file","create_file","batch_create_files","update_section","insert_after_heading","delete_file","rename_file","create_space"]);async function n(e,t,r){let n=e.getReader(),o=new TextDecoder,a="",i=[],l=new Map,d=null,c=null,u=Date.now();function p(){let e=i.map(e=>"text"===e.type?{type:"text",text:e.text}:"reasoning"===e.type?{type:"reasoning",text:e.text}:{...e});return{role:"assistant",content:e.filter(e=>"text"===e.type).map(e=>e.text).join(""),parts:e,timestamp:u}}try{for(;!r?.aborted;){let{done:e,value:r}=await n.read();if(e)break;let u=(a+=o.decode(r,{stream:!0})).split("\n");a=u.pop()??"";let m=!1;for(let e of u){let t,r=e.trim(),n=null;if(r.startsWith("data:")&&(n=r.slice(5).trim()),n){try{t=JSON.parse(n)}catch{continue}switch(t.type){case"text_delta":{let e=function(e){if(d===e){let e=i[i.length-1];if(e&&"text"===e.type)return e}let t={type:"text",text:""};return i.push(t),d=e,t}("text");e.text+=t.delta??"",m=!0;break}case"thinking_delta":c||(c={type:"reasoning",text:""},i.push(c),d=null),c.text+=t.delta??"",m=!0;break;case"tool_start":{let e=t.toolCallId,r=t.toolName,s=function(e,t){let r=l.get(e);return r||(r={type:"tool-call",toolCallId:e,toolName:t??"unknown",input:void 0,state:"pending"},l.set(e,r),i.push(r),d=null),r}(e,r);s.input=t.args,s.state="running",m=!0;break}case"tool_end":{let e=t.toolCallId,r=l.get(e);r&&(r.output=t.output??"",r.state=t.isError?"error":"done",m=!0,!t.isError&&s.has(r.toolName)&&window.dispatchEvent(new Event("mindos:files-changed")));break}case"error":{let e=t.message;i.push({type:"text",text:`
10
+
11
+ **Stream Error:** ${e}`}),d=null,m=!0}}}}m&&t(p())}}finally{n.releaseLock()}let m=!1;for(let e of l.values())("running"===e.state||"pending"===e.state)&&(e.state="error",e.output=e.output??"Stream ended before tool completed",m=!0);return m&&t(p()),p()}},84825:e=>{function t(e){return Promise.resolve().then(()=>{var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}t.keys=()=>[],t.resolve=t,t.id=84825,e.exports=t},91337:(e,t,r)=>{"use strict";r.d(t,{IX:()=>l,KW:()=>i,O0:()=>a,cn:()=>o,vr:()=>d});var s=r(29722),n=r(622);function o(...e){return(0,n.QP)((0,s.$)(e))}function a(e){return e.split("/").map(encodeURIComponent).join("/")}function i(e,t){let r=Date.now()-e,s=Math.floor(r/6e4),n=Math.floor(r/36e5),o=Math.floor(r/864e5);return s<1?t.justNow:s<60?t.minutesAgo(s):n<24?t.hoursAgo(n):o<7?t.daysAgo(o):new Date(e).toLocaleDateString()}function l(e){let t=e.match(/^[\p{Emoji_Presentation}\p{Extended_Pictographic}]+/u);return t?.[0]??""}function d(e){return e.replace(/^[\p{Emoji_Presentation}\p{Extended_Pictographic}\s]+/u,"")||e}}},e=>{e.O(0,[4913,4237,8409,9286,7266,5581,8441,3794,7358],()=>e(e.s=31683)),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5314],{1934:(e,t,a)=>{"use strict";a.d(t,{v:()=>s});var r=a(12115);let n=e=>{let t,a=new Set,r=(e,r)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=(null!=r?r:"object"!=typeof n||null===n)?n:Object.assign({},t,n),a.forEach(a=>a(t,e))}},n=()=>t,l={setState:r,getState:n,getInitialState:()=>s,subscribe:e=>(a.add(e),()=>a.delete(e))},s=t=e(r,n,l);return l},l=e=>{let t=e?n(e):n,a=e=>(function(e,t=e=>e){let a=r.useSyncExternalStore(e.subscribe,r.useCallback(()=>t(e.getState()),[e,t]),r.useCallback(()=>t(e.getInitialState()),[e,t]));return r.useDebugValue(a),a})(t,e);return Object.assign(a,t),a},s=e=>e?l(e):l},20555:(e,t,a)=>{"use strict";a.d(t,{LD:()=>r,LZ:()=>n,qQ:()=>l});let r=[{id:"c1",icon:"\uD83D\uDC64",category:"memory-sync",scenario:"first-day"},{id:"c2",icon:"\uD83D\uDCE5",category:"knowledge-management",scenario:"daily"},{id:"c3",icon:"\uD83D\uDD04",category:"memory-sync",scenario:"project"},{id:"c4",icon:"\uD83D\uDD01",category:"experience-evolution",scenario:"daily"},{id:"c5",icon:"\uD83D\uDCA1",category:"auto-execute",scenario:"daily"},{id:"c6",icon:"\uD83D\uDE80",category:"auto-execute",scenario:"project"},{id:"c7",icon:"\uD83D\uDD0D",category:"knowledge-management",scenario:"project"},{id:"c8",icon:"\uD83E\uDD1D",category:"human-insights",scenario:"daily"},{id:"c9",icon:"\uD83D\uDEE1️",category:"audit-control",scenario:"advanced"}],n=["knowledge-management","memory-sync","auto-execute","experience-evolution","human-insights","audit-control"],l=["first-day","daily","project","advanced"]},27318:(e,t,a)=>{"use strict";a.d(t,{KT:()=>d,NH:()=>o});var r=a(12115);let n={open:!1,initialMessage:"",source:"user",acpAgent:null},l=new Set;function s(){l.forEach(e=>e())}function i(e){return l.add(e),()=>{l.delete(e)}}function c(){return n}function o(e="",t="user",a=null){n={open:!0,initialMessage:e,source:t,acpAgent:a},s()}function d(){let e=(0,r.useSyncExternalStore)(i,c,c);return{open:e.open,initialMessage:e.initialMessage,source:e.source,acpAgent:e.acpAgent,openWith:(0,r.useCallback)((e,t="user",a=null)=>o(e,t,a),[]),close:(0,r.useCallback)(()=>void(n={open:!1,initialMessage:"",source:"user",acpAgent:null},s()),[])}}},33428:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var r=a(95155),n=a(12115),l=a(91053),s=a(20555),i=a(27318);function c({icon:e,image:t,title:a,description:l,prompt:s,tryItLabel:c}){let[o,d]=(0,n.useState)(!1);return(0,r.jsxs)("div",{className:"group flex flex-col gap-3 p-4 rounded-xl border border-border bg-card transition-all duration-150 hover:border-[var(--amber)]/30 hover:bg-muted/50",children:[t&&!o?(0,r.jsx)("div",{className:"w-full aspect-[16/9] rounded-lg overflow-hidden bg-muted",children:(0,r.jsx)("img",{src:t,alt:a,className:"w-full h-full object-cover",loading:"lazy",onError:()=>d(!0)})}):null,(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"text-xl leading-none shrink-0 mt-0.5",suppressHydrationWarning:!0,children:e}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold truncate text-foreground",title:a,children:a}),(0,r.jsx)("p",{className:"text-xs leading-relaxed mt-1 line-clamp-2 text-muted-foreground",title:l,children:l})]})]}),(0,r.jsxs)("button",{onClick:()=>(0,i.NH)(s,"user"),className:"self-start inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-150 hover:opacity-80 cursor-pointer bg-[var(--amber-dim)] text-[var(--amber-text)]",children:[c," →"]})]})}function o(){let{t:e}=(0,l.Y)(),t=e.explore,[a,i]=(0,n.useState)("all"),[o,u]=(0,n.useState)("all"),m=s.LD.filter(e=>("all"===a||e.category===a)&&("all"===o||e.scenario===o));return(0,r.jsxs)("div",{className:"content-width px-4 md:px-6 py-8 md:py-12",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("div",{className:"w-1 h-5 rounded-full bg-[var(--amber)]"}),(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t.title})]}),(0,r.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground pl-4",children:t.subtitle})]}),(0,r.jsxs)("div",{className:"space-y-3 mb-6",style:{paddingLeft:"1rem"},children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-2xs text-muted-foreground uppercase tracking-wider font-medium w-16 shrink-0",children:t.byCapability}),(0,r.jsx)(d,{label:t.all,active:"all"===a,onClick:()=>i("all")}),s.LZ.map(e=>(0,r.jsx)(d,{label:t.categories[e],active:a===e,onClick:()=>i(e)},e))]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-2xs text-muted-foreground uppercase tracking-wider font-medium w-16 shrink-0",children:t.byScenario}),(0,r.jsx)(d,{label:t.all,active:"all"===o,onClick:()=>u("all")}),s.qQ.map(e=>(0,r.jsx)(d,{label:t.scenarios[e],active:o===e,onClick:()=>u(e)},e))]})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",style:{paddingLeft:"1rem"},children:m.map(e=>{let a=t[e.id];return a?(0,r.jsx)(c,{icon:e.icon,image:e.image,title:a.title,description:a.desc,prompt:a.prompt,tryItLabel:t.tryIt},e.id):null})}),0===m.length&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground text-center py-12",style:{paddingLeft:"1rem"},children:"No use cases match the current filters."})]})}function d({label:e,active:t,onClick:a}){return(0,r.jsx)("button",{onClick:a,className:`
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5314],{1934:(e,t,a)=>{"use strict";a.d(t,{v:()=>s});var r=a(12115);let n=e=>{let t,a=new Set,r=(e,r)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=(null!=r?r:"object"!=typeof n||null===n)?n:Object.assign({},t,n),a.forEach(a=>a(t,e))}},n=()=>t,l={setState:r,getState:n,getInitialState:()=>s,subscribe:e=>(a.add(e),()=>a.delete(e))},s=t=e(r,n,l);return l},l=e=>{let t=e?n(e):n,a=e=>(function(e,t=e=>e){let a=r.useSyncExternalStore(e.subscribe,r.useCallback(()=>t(e.getState()),[e,t]),r.useCallback(()=>t(e.getInitialState()),[e,t]));return r.useDebugValue(a),a})(t,e);return Object.assign(a,t),a},s=e=>e?l(e):l},20555:(e,t,a)=>{"use strict";a.d(t,{LD:()=>r,LZ:()=>n,qQ:()=>l});let r=[{id:"c1",icon:"\uD83D\uDC64",category:"memory-sync",scenario:"first-day"},{id:"c2",icon:"\uD83D\uDCE5",category:"knowledge-management",scenario:"daily"},{id:"c3",icon:"\uD83D\uDD04",category:"memory-sync",scenario:"project"},{id:"c4",icon:"\uD83D\uDD01",category:"experience-evolution",scenario:"daily"},{id:"c5",icon:"\uD83D\uDCA1",category:"auto-execute",scenario:"daily"},{id:"c6",icon:"\uD83D\uDE80",category:"auto-execute",scenario:"project"},{id:"c7",icon:"\uD83D\uDD0D",category:"knowledge-management",scenario:"project"},{id:"c8",icon:"\uD83E\uDD1D",category:"human-insights",scenario:"daily"},{id:"c9",icon:"\uD83D\uDEE1️",category:"audit-control",scenario:"advanced"}],n=["knowledge-management","memory-sync","auto-execute","experience-evolution","human-insights","audit-control"],l=["first-day","daily","project","advanced"]},27318:(e,t,a)=>{"use strict";a.d(t,{KT:()=>d,NH:()=>o});var r=a(12115);let n={open:!1,initialMessage:"",source:"user",acpAgent:null},l=new Set;function s(){l.forEach(e=>e())}function i(e){return l.add(e),()=>{l.delete(e)}}function c(){return n}function o(e="",t="user",a=null){n={open:!0,initialMessage:e,source:t,acpAgent:a},s()}function d(){let e=(0,r.useSyncExternalStore)(i,c,c);return{open:e.open,initialMessage:e.initialMessage,source:e.source,acpAgent:e.acpAgent,openWith:(0,r.useCallback)((e,t="user",a=null)=>o(e,t,a),[]),close:(0,r.useCallback)(()=>void(n={open:!1,initialMessage:"",source:"user",acpAgent:null},s()),[])}}},33428:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var r=a(95155),n=a(12115),l=a(35581),s=a(20555),i=a(27318);function c({icon:e,image:t,title:a,description:l,prompt:s,tryItLabel:c}){let[o,d]=(0,n.useState)(!1);return(0,r.jsxs)("div",{className:"group flex flex-col gap-3 p-4 rounded-xl border border-border bg-card transition-all duration-150 hover:border-[var(--amber)]/30 hover:bg-muted/50",children:[t&&!o?(0,r.jsx)("div",{className:"w-full aspect-[16/9] rounded-lg overflow-hidden bg-muted",children:(0,r.jsx)("img",{src:t,alt:a,className:"w-full h-full object-cover",loading:"lazy",onError:()=>d(!0)})}):null,(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"text-xl leading-none shrink-0 mt-0.5",suppressHydrationWarning:!0,children:e}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold truncate text-foreground",title:a,children:a}),(0,r.jsx)("p",{className:"text-xs leading-relaxed mt-1 line-clamp-2 text-muted-foreground",title:l,children:l})]})]}),(0,r.jsxs)("button",{onClick:()=>(0,i.NH)(s,"user"),className:"self-start inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-150 hover:opacity-80 cursor-pointer bg-[var(--amber-dim)] text-[var(--amber-text)]",children:[c," →"]})]})}function o(){let{t:e}=(0,l.Y)(),t=e.explore,[a,i]=(0,n.useState)("all"),[o,u]=(0,n.useState)("all"),m=s.LD.filter(e=>("all"===a||e.category===a)&&("all"===o||e.scenario===o));return(0,r.jsxs)("div",{className:"content-width px-4 md:px-6 py-8 md:py-12",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("div",{className:"w-1 h-5 rounded-full bg-[var(--amber)]"}),(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t.title})]}),(0,r.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground pl-4",children:t.subtitle})]}),(0,r.jsxs)("div",{className:"space-y-3 mb-6",style:{paddingLeft:"1rem"},children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-2xs text-muted-foreground uppercase tracking-wider font-medium w-16 shrink-0",children:t.byCapability}),(0,r.jsx)(d,{label:t.all,active:"all"===a,onClick:()=>i("all")}),s.LZ.map(e=>(0,r.jsx)(d,{label:t.categories[e],active:a===e,onClick:()=>i(e)},e))]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-2xs text-muted-foreground uppercase tracking-wider font-medium w-16 shrink-0",children:t.byScenario}),(0,r.jsx)(d,{label:t.all,active:"all"===o,onClick:()=>u("all")}),s.qQ.map(e=>(0,r.jsx)(d,{label:t.scenarios[e],active:o===e,onClick:()=>u(e)},e))]})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",style:{paddingLeft:"1rem"},children:m.map(e=>{let a=t[e.id];return a?(0,r.jsx)(c,{icon:e.icon,image:e.image,title:a.title,description:a.desc,prompt:a.prompt,tryItLabel:t.tryIt},e.id):null})}),0===m.length&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground text-center py-12",style:{paddingLeft:"1rem"},children:"No use cases match the current filters."})]})}function d({label:e,active:t,onClick:a}){return(0,r.jsx)("button",{onClick:a,className:`
2
2
  px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150
3
3
  ${t?"text-[var(--amber)] bg-[var(--amber-dim)]":"text-[var(--muted-foreground)] bg-[var(--muted)] hover:text-[var(--foreground)] hover:bg-[var(--muted)]/80"}
4
- `,children:e})}},96715:(e,t,a)=>{Promise.resolve().then(a.bind(a,33428))}},e=>{e.O(0,[1053,8441,3794,7358],()=>e(e.s=96715)),_N_E=e.O()}]);
4
+ `,children:e})}},96715:(e,t,a)=>{Promise.resolve().then(a.bind(a,33428))}},e=>{e.O(0,[5581,8441,3794,7358],()=>e(e.s=96715)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[728],{1934:(e,t,s)=>{"use strict";s.d(t,{v:()=>l});var r=s(12115);let a=e=>{let t,s=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),s.forEach(s=>s(t,e))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>l,subscribe:e=>(s.add(e),()=>s.delete(e))},l=t=e(r,a,i);return i},i=e=>{let t=e?a(e):a,s=e=>(function(e,t=e=>e){let s=r.useSyncExternalStore(e.subscribe,r.useCallback(()=>t(e.getState()),[e,t]),r.useCallback(()=>t(e.getInitialState()),[e,t]));return r.useDebugValue(s),s})(t,e);return Object.assign(s,t),s},l=e=>e?i(e):i},4235:(e,t,s)=>{"use strict";s.d(t,{B1:()=>n,X8:()=>d,dV:()=>c,oR:()=>u});let r=[],a=[],i=0;function l(){for(let e of a)e()}function n(e){return a=[...a,e],()=>{a=a.filter(t=>t!==e)}}function c(){return r}function d(e){r=r.filter(t=>t.id!==e),l()}function o(e){let t=`toast-${++i}`,s={id:t,message:e.message,type:e.type??"info",duration:e.duration??2e3,action:e.action};r=[...r,s].slice(-3),l(),s.duration>0&&setTimeout(()=>d(t),s.duration)}function u(e,t){o({message:e,...t})}u.success=(e,t)=>o({message:e,type:"success",duration:t}),u.undo=(e,t,s)=>o({message:e,type:"info",duration:s?.duration??5e3,action:{label:s?.label??"Undo",onClick:t}}),u.error=(e,t)=>o({message:e,type:"error",duration:t}),u.copy=(e="Copied")=>o({message:e,type:"success",duration:1500})},7834:(e,t,s)=>{"use strict";async function r(e){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let s=document.execCommand("copy");return document.body.removeChild(t),s}catch{return!1}}s.d(t,{l:()=>r})},8249:(e,t,s)=>{"use strict";s.d(t,{default:()=>v});var r=s(95155),a=s(12115),i=s(66088),l=s(94514),n=s(67635),c=s(97810),d=s(90718),o=s(65266),u=s(49619);let m=(0,s(90425).A)("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);var x=s(94961),h=s(91053),p=s(7834),f=s(4235);function b({id:e,icon:t,title:s,defaultOpen:l=!1,children:n}){let[c,d]=(0,a.useState)(l);return(0,r.jsxs)("div",{id:e,className:"bg-card border border-border rounded-lg overflow-hidden scroll-mt-4",children:[(0,r.jsx)("h2",{className:"sr-only",children:s}),(0,r.jsxs)("button",{onClick:()=>d(e=>!e),className:"w-full flex items-center gap-3 px-5 py-4 text-left hover:bg-muted/50 transition-colors focus-visible:ring-2 focus-visible:ring-ring","aria-expanded":c,children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-md bg-[var(--amber-subtle)] text-[var(--amber)] shrink-0",children:t}),(0,r.jsx)("span",{className:"text-[13px] font-semibold text-foreground flex-1 tracking-wide",children:s}),(0,r.jsx)(i.A,{size:16,className:`text-muted-foreground transition-transform duration-200 ${c?"rotate-180":""}`})]}),c&&(0,r.jsx)("div",{className:"px-5 pb-5 pt-0",children:(0,r.jsx)("div",{className:"border-t border-border pt-4",children:n})})]})}function g({step:e,title:t,desc:s}){return(0,r.jsxs)("div",{className:"flex gap-4 items-start",children:[(0,r.jsx)("div",{className:"shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold font-mono bg-[var(--amber-dim)] text-[var(--amber)]",children:e}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:s})]})]})}function y({text:e,copyLabel:t}){let[s,i]=(0,a.useState)(!1),c=(0,a.useCallback)(()=>{let t=e.replace(/^["“]|["”]$/g,"");(0,p.l)(t).then(e=>{e&&(i(!0),setTimeout(()=>i(!1),1500),f.oR.copy())})},[e]);return(0,r.jsxs)("div",{className:"group/prompt mt-2 flex items-start gap-2 bg-background border border-border rounded-md px-3 py-2",children:[(0,r.jsx)("p",{className:"flex-1 text-xs font-mono leading-relaxed text-[var(--amber)]",children:e}),(0,r.jsx)("button",{onClick:c,className:"shrink-0 p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors opacity-0 group-hover/prompt:opacity-100 focus-visible:opacity-100","aria-label":t,title:t,children:s?(0,r.jsx)(l.A,{size:13,className:"text-success"}):(0,r.jsx)(n.A,{size:13})})]})}function k({q:e,a:t}){let[s,l]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"border-b border-border last:border-b-0",children:[(0,r.jsxs)("button",{onClick:()=>l(e=>!e),className:"w-full flex items-center justify-between py-3 text-left focus-visible:ring-2 focus-visible:ring-ring","aria-expanded":s,children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground pr-4",children:e}),(0,r.jsx)(i.A,{size:14,className:`shrink-0 text-muted-foreground transition-transform duration-200 ${s?"rotate-180":""}`})]}),s&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground pb-3 leading-relaxed",children:t})]})}function j({keys:e,label:t}){return(0,r.jsxs)("div",{className:"flex items-center justify-between py-1.5",children:[(0,r.jsx)("span",{className:"text-sm text-foreground",children:t}),(0,r.jsx)("div",{className:"flex items-center gap-1",children:e.split(" ").map((e,t)=>(0,r.jsx)("kbd",{className:"px-1.5 py-0.5 text-xs rounded border border-border bg-muted text-muted-foreground font-mono min-w-[24px] text-center",children:e},t))})]})}function v(){let{t:e}=(0,h.Y)(),t=e.help,[s,i]=(0,a.useState)("⌘");(0,a.useEffect)(()=>{i(/Mac|iPhone|iPad/.test(navigator.userAgent)?"⌘":"Ctrl")},[]);let l=(0,a.useMemo)(()=>[{keys:`${s} K`,label:t.shortcuts.search},{keys:`${s} /`,label:t.shortcuts.askAI},{keys:`${s} ,`,label:t.shortcuts.settings},{keys:`${s} ?`,label:t.shortcuts.shortcutPanel},{keys:"E",label:t.shortcuts.editFile},{keys:`${s} S`,label:t.shortcuts.save},{keys:"Esc",label:t.shortcuts.closePanel},{keys:"@",label:t.shortcuts.attachFile}],[s,t.shortcuts]),n=(0,a.useMemo)(()=>[{id:"what-is",label:t.whatIs.title},{id:"concepts",label:t.concepts.title},{id:"quick-start",label:t.quickStart.title},{id:"agent-usage",label:t.agentUsage.title},{id:"shortcuts",label:t.shortcutsTitle},{id:"faq",label:t.faq.title}],[t]),[p,f]=(0,a.useState)("");return(0,a.useEffect)(()=>{let e=n.map(e=>e.id),t=new IntersectionObserver(e=>{for(let t of e)if(t.isIntersecting){f(t.target.id);break}},{rootMargin:"-10% 0px -80% 0px",threshold:0}),s=setTimeout(()=>{for(let s of e){let e=document.getElementById(s);e&&t.observe(e)}},100);return()=>{clearTimeout(s),t.disconnect()}},[n]),(0,r.jsxs)("div",{className:"flex justify-center gap-8 px-4 md:px-6 py-8 md:py-12",children:[(0,r.jsxs)("div",{className:"min-w-0 w-full",style:{maxWidth:"var(--content-width-override, var(--content-width, 780px))"},children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,r.jsx)("div",{className:"w-1 h-6 rounded-full bg-[var(--amber)]"}),(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t.title})]}),(0,r.jsx)("p",{className:"text-muted-foreground text-sm ml-3 mt-1",children:t.subtitle})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)(b,{id:"what-is",icon:(0,r.jsx)(c.A,{size:18}),title:t.whatIs.title,defaultOpen:!0,children:(0,r.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.whatIs.body})}),(0,r.jsx)(b,{id:"concepts",icon:(0,r.jsx)(d.A,{size:18}),title:t.concepts.title,defaultOpen:!0,children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t.concepts.spaceTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.concepts.spaceDesc})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t.concepts.instructionTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.concepts.instructionDesc})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t.concepts.skillTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.concepts.skillDesc})]})]})}),(0,r.jsx)(b,{id:"quick-start",icon:(0,r.jsx)(o.A,{size:18}),title:t.quickStart.title,defaultOpen:!0,children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(g,{step:1,title:t.quickStart.step1Title,desc:t.quickStart.step1Desc}),(0,r.jsx)(g,{step:2,title:t.quickStart.step2Title,desc:t.quickStart.step2Desc}),(0,r.jsx)(g,{step:3,title:t.quickStart.step3Title,desc:t.quickStart.step3Desc})]})}),(0,r.jsxs)(b,{id:"agent-usage",icon:(0,r.jsx)(u.A,{size:18}),title:t.agentUsage.title,defaultOpen:!0,children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4",children:t.agentUsage.intro}),(0,r.jsx)("div",{className:"space-y-3",children:t.agentUsage.scenarios.map((e,s)=>{let a=e.prompt.split("\n");return(0,r.jsxs)("div",{className:"bg-muted/50 rounded-md px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-base leading-none",role:"img",suppressHydrationWarning:!0,children:e.emoji}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.title})]}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:e.desc}),a.map((e,s)=>(0,r.jsx)(y,{text:e,copyLabel:t.agentUsage.copy},s))]},s)})}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-4",children:t.agentUsage.hint})]}),(0,r.jsx)(b,{id:"shortcuts",icon:(0,r.jsx)(m,{size:18}),title:t.shortcutsTitle,children:(0,r.jsx)("div",{className:"space-y-0",children:l.map(e=>(0,r.jsx)(j,{keys:e.keys,label:e.label},e.keys))})}),(0,r.jsx)(b,{id:"faq",icon:(0,r.jsx)(x.A,{size:18}),title:t.faq.title,children:(0,r.jsx)("div",{children:t.faq.items.map((e,t)=>(0,r.jsx)(k,{q:e.q,a:e.a},t))})})]})]}),(0,r.jsx)("nav",{className:"hidden xl:block shrink-0 w-40","aria-label":"Table of contents",children:(0,r.jsx)("div",{className:"sticky top-24",children:(0,r.jsx)("ul",{className:"space-y-1 border-l border-border pl-3",children:n.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:`#${e.id}`,onClick:t=>{t.preventDefault(),document.getElementById(e.id)?.scrollIntoView({behavior:"smooth"})},className:`block text-xs py-1 transition-colors ${p===e.id?"text-[var(--amber)] font-medium border-l-2 border-[var(--amber)] -ml-[13px] pl-[11px]":"text-muted-foreground hover:text-foreground"}`,children:e.label})},e.id))})})})]})}},43703:(e,t,s)=>{Promise.resolve().then(s.bind(s,8249))},49619:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},65266:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]])},66088:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},67635:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},90425:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var r=s(12115);let a=(...e)=>e.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim(),i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:n="",children:c,iconNode:d,...o},u)=>(0,r.createElement)("svg",{ref:u,...l,width:t,height:t,stroke:e,strokeWidth:i?24*Number(s)/Number(t):s,className:a("lucide",n),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(o)&&{"aria-hidden":"true"},...o},[...d.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(c)?c:[c]])),c=(e,t)=>{let s=(0,r.forwardRef)(({className:s,...l},c)=>(0,r.createElement)(n,{ref:c,iconNode:t,className:a(`lucide-${i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...l}));return s.displayName=i(e),s}},90718:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]])},94514:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},94961:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},97810:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])}},e=>{e.O(0,[1053,8441,3794,7358],()=>e(e.s=43703)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[728],{1934:(e,t,s)=>{"use strict";s.d(t,{v:()=>l});var r=s(12115);let a=e=>{let t,s=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),s.forEach(s=>s(t,e))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>l,subscribe:e=>(s.add(e),()=>s.delete(e))},l=t=e(r,a,i);return i},i=e=>{let t=e?a(e):a,s=e=>(function(e,t=e=>e){let s=r.useSyncExternalStore(e.subscribe,r.useCallback(()=>t(e.getState()),[e,t]),r.useCallback(()=>t(e.getInitialState()),[e,t]));return r.useDebugValue(s),s})(t,e);return Object.assign(s,t),s},l=e=>e?i(e):i},4235:(e,t,s)=>{"use strict";s.d(t,{B1:()=>n,X8:()=>d,dV:()=>c,oR:()=>u});let r=[],a=[],i=0;function l(){for(let e of a)e()}function n(e){return a=[...a,e],()=>{a=a.filter(t=>t!==e)}}function c(){return r}function d(e){r=r.filter(t=>t.id!==e),l()}function o(e){let t=`toast-${++i}`,s={id:t,message:e.message,type:e.type??"info",duration:e.duration??2e3,action:e.action};r=[...r,s].slice(-3),l(),s.duration>0&&setTimeout(()=>d(t),s.duration)}function u(e,t){o({message:e,...t})}u.success=(e,t)=>o({message:e,type:"success",duration:t}),u.undo=(e,t,s)=>o({message:e,type:"info",duration:s?.duration??5e3,action:{label:s?.label??"Undo",onClick:t}}),u.error=(e,t)=>o({message:e,type:"error",duration:t}),u.copy=(e="Copied")=>o({message:e,type:"success",duration:1500})},7834:(e,t,s)=>{"use strict";async function r(e){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let s=document.execCommand("copy");return document.body.removeChild(t),s}catch{return!1}}s.d(t,{l:()=>r})},8249:(e,t,s)=>{"use strict";s.d(t,{default:()=>v});var r=s(95155),a=s(12115),i=s(66088),l=s(94514),n=s(67635),c=s(97810),d=s(90718),o=s(65266),u=s(49619);let m=(0,s(90425).A)("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);var x=s(94961),h=s(35581),p=s(7834),f=s(4235);function b({id:e,icon:t,title:s,defaultOpen:l=!1,children:n}){let[c,d]=(0,a.useState)(l);return(0,r.jsxs)("div",{id:e,className:"bg-card border border-border rounded-lg overflow-hidden scroll-mt-4",children:[(0,r.jsx)("h2",{className:"sr-only",children:s}),(0,r.jsxs)("button",{onClick:()=>d(e=>!e),className:"w-full flex items-center gap-3 px-5 py-4 text-left hover:bg-muted/50 transition-colors focus-visible:ring-2 focus-visible:ring-ring","aria-expanded":c,children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-md bg-[var(--amber-subtle)] text-[var(--amber)] shrink-0",children:t}),(0,r.jsx)("span",{className:"text-[13px] font-semibold text-foreground flex-1 tracking-wide",children:s}),(0,r.jsx)(i.A,{size:16,className:`text-muted-foreground transition-transform duration-200 ${c?"rotate-180":""}`})]}),c&&(0,r.jsx)("div",{className:"px-5 pb-5 pt-0",children:(0,r.jsx)("div",{className:"border-t border-border pt-4",children:n})})]})}function g({step:e,title:t,desc:s}){return(0,r.jsxs)("div",{className:"flex gap-4 items-start",children:[(0,r.jsx)("div",{className:"shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold font-mono bg-[var(--amber-dim)] text-[var(--amber)]",children:e}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:s})]})]})}function y({text:e,copyLabel:t}){let[s,i]=(0,a.useState)(!1),c=(0,a.useCallback)(()=>{let t=e.replace(/^["“]|["”]$/g,"");(0,p.l)(t).then(e=>{e&&(i(!0),setTimeout(()=>i(!1),1500),f.oR.copy())})},[e]);return(0,r.jsxs)("div",{className:"group/prompt mt-2 flex items-start gap-2 bg-background border border-border rounded-md px-3 py-2",children:[(0,r.jsx)("p",{className:"flex-1 text-xs font-mono leading-relaxed text-[var(--amber)]",children:e}),(0,r.jsx)("button",{onClick:c,className:"shrink-0 p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors opacity-0 group-hover/prompt:opacity-100 focus-visible:opacity-100","aria-label":t,title:t,children:s?(0,r.jsx)(l.A,{size:13,className:"text-success"}):(0,r.jsx)(n.A,{size:13})})]})}function k({q:e,a:t}){let[s,l]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"border-b border-border last:border-b-0",children:[(0,r.jsxs)("button",{onClick:()=>l(e=>!e),className:"w-full flex items-center justify-between py-3 text-left focus-visible:ring-2 focus-visible:ring-ring","aria-expanded":s,children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground pr-4",children:e}),(0,r.jsx)(i.A,{size:14,className:`shrink-0 text-muted-foreground transition-transform duration-200 ${s?"rotate-180":""}`})]}),s&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground pb-3 leading-relaxed",children:t})]})}function j({keys:e,label:t}){return(0,r.jsxs)("div",{className:"flex items-center justify-between py-1.5",children:[(0,r.jsx)("span",{className:"text-sm text-foreground",children:t}),(0,r.jsx)("div",{className:"flex items-center gap-1",children:e.split(" ").map((e,t)=>(0,r.jsx)("kbd",{className:"px-1.5 py-0.5 text-xs rounded border border-border bg-muted text-muted-foreground font-mono min-w-[24px] text-center",children:e},t))})]})}function v(){let{t:e}=(0,h.Y)(),t=e.help,[s,i]=(0,a.useState)("⌘");(0,a.useEffect)(()=>{i(/Mac|iPhone|iPad/.test(navigator.userAgent)?"⌘":"Ctrl")},[]);let l=(0,a.useMemo)(()=>[{keys:`${s} K`,label:t.shortcuts.search},{keys:`${s} /`,label:t.shortcuts.askAI},{keys:`${s} ,`,label:t.shortcuts.settings},{keys:`${s} ?`,label:t.shortcuts.shortcutPanel},{keys:"E",label:t.shortcuts.editFile},{keys:`${s} S`,label:t.shortcuts.save},{keys:"Esc",label:t.shortcuts.closePanel},{keys:"@",label:t.shortcuts.attachFile}],[s,t.shortcuts]),n=(0,a.useMemo)(()=>[{id:"what-is",label:t.whatIs.title},{id:"concepts",label:t.concepts.title},{id:"quick-start",label:t.quickStart.title},{id:"agent-usage",label:t.agentUsage.title},{id:"shortcuts",label:t.shortcutsTitle},{id:"faq",label:t.faq.title}],[t]),[p,f]=(0,a.useState)("");return(0,a.useEffect)(()=>{let e=n.map(e=>e.id),t=new IntersectionObserver(e=>{for(let t of e)if(t.isIntersecting){f(t.target.id);break}},{rootMargin:"-10% 0px -80% 0px",threshold:0}),s=setTimeout(()=>{for(let s of e){let e=document.getElementById(s);e&&t.observe(e)}},100);return()=>{clearTimeout(s),t.disconnect()}},[n]),(0,r.jsxs)("div",{className:"flex justify-center gap-8 px-4 md:px-6 py-8 md:py-12",children:[(0,r.jsxs)("div",{className:"min-w-0 w-full",style:{maxWidth:"var(--content-width-override, var(--content-width, 780px))"},children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,r.jsx)("div",{className:"w-1 h-6 rounded-full bg-[var(--amber)]"}),(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t.title})]}),(0,r.jsx)("p",{className:"text-muted-foreground text-sm ml-3 mt-1",children:t.subtitle})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)(b,{id:"what-is",icon:(0,r.jsx)(c.A,{size:18}),title:t.whatIs.title,defaultOpen:!0,children:(0,r.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.whatIs.body})}),(0,r.jsx)(b,{id:"concepts",icon:(0,r.jsx)(d.A,{size:18}),title:t.concepts.title,defaultOpen:!0,children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t.concepts.spaceTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.concepts.spaceDesc})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t.concepts.instructionTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.concepts.instructionDesc})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:t.concepts.skillTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.concepts.skillDesc})]})]})}),(0,r.jsx)(b,{id:"quick-start",icon:(0,r.jsx)(o.A,{size:18}),title:t.quickStart.title,defaultOpen:!0,children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(g,{step:1,title:t.quickStart.step1Title,desc:t.quickStart.step1Desc}),(0,r.jsx)(g,{step:2,title:t.quickStart.step2Title,desc:t.quickStart.step2Desc}),(0,r.jsx)(g,{step:3,title:t.quickStart.step3Title,desc:t.quickStart.step3Desc})]})}),(0,r.jsxs)(b,{id:"agent-usage",icon:(0,r.jsx)(u.A,{size:18}),title:t.agentUsage.title,defaultOpen:!0,children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4",children:t.agentUsage.intro}),(0,r.jsx)("div",{className:"space-y-3",children:t.agentUsage.scenarios.map((e,s)=>{let a=e.prompt.split("\n");return(0,r.jsxs)("div",{className:"bg-muted/50 rounded-md px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-base leading-none",role:"img",suppressHydrationWarning:!0,children:e.emoji}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.title})]}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:e.desc}),a.map((e,s)=>(0,r.jsx)(y,{text:e,copyLabel:t.agentUsage.copy},s))]},s)})}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-4",children:t.agentUsage.hint})]}),(0,r.jsx)(b,{id:"shortcuts",icon:(0,r.jsx)(m,{size:18}),title:t.shortcutsTitle,children:(0,r.jsx)("div",{className:"space-y-0",children:l.map(e=>(0,r.jsx)(j,{keys:e.keys,label:e.label},e.keys))})}),(0,r.jsx)(b,{id:"faq",icon:(0,r.jsx)(x.A,{size:18}),title:t.faq.title,children:(0,r.jsx)("div",{children:t.faq.items.map((e,t)=>(0,r.jsx)(k,{q:e.q,a:e.a},t))})})]})]}),(0,r.jsx)("nav",{className:"hidden xl:block shrink-0 w-40","aria-label":"Table of contents",children:(0,r.jsx)("div",{className:"sticky top-24",children:(0,r.jsx)("ul",{className:"space-y-1 border-l border-border pl-3",children:n.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:`#${e.id}`,onClick:t=>{t.preventDefault(),document.getElementById(e.id)?.scrollIntoView({behavior:"smooth"})},className:`block text-xs py-1 transition-colors ${p===e.id?"text-[var(--amber)] font-medium border-l-2 border-[var(--amber)] -ml-[13px] pl-[11px]":"text-muted-foreground hover:text-foreground"}`,children:e.label})},e.id))})})})]})}},43703:(e,t,s)=>{Promise.resolve().then(s.bind(s,8249))},49619:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},65266:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]])},66088:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},67635:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},90425:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var r=s(12115);let a=(...e)=>e.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim(),i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:n="",children:c,iconNode:d,...o},u)=>(0,r.createElement)("svg",{ref:u,...l,width:t,height:t,stroke:e,strokeWidth:i?24*Number(s)/Number(t):s,className:a("lucide",n),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(o)&&{"aria-hidden":"true"},...o},[...d.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(c)?c:[c]])),c=(e,t)=>{let s=(0,r.forwardRef)(({className:s,...l},c)=>(0,r.createElement)(n,{ref:c,iconNode:t,className:a(`lucide-${i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...l}));return s.displayName=i(e),s}},90718:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]])},94514:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},94961:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},97810:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(90425).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])}},e=>{e.O(0,[5581,8441,3794,7358],()=>e(e.s=43703)),_N_E=e.O()}]);