@devflow-tools/devflow 0.18.3 → 0.18.5

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 (174) hide show
  1. package/README.md +7 -3
  2. package/dist/cli.js +76 -80
  3. package/dist/dashboard/404.html +1 -1
  4. package/dist/dashboard/__next.__PAGE__.txt +4 -4
  5. package/dist/dashboard/__next._full.txt +4 -4
  6. package/dist/dashboard/__next._tree.txt +2 -2
  7. package/dist/dashboard/_next/static/EvEIGY0RpP7e0gDVLEPam/_buildManifest.js +1 -0
  8. package/dist/dashboard/_next/static/chunks/150-819052fe1a7b4063.js +1 -0
  9. package/dist/dashboard/_next/static/chunks/237-34a3fbfba7ff0de5.js +1 -0
  10. package/dist/dashboard/_next/static/chunks/407.105cf348816ce79d.js +1 -0
  11. package/dist/dashboard/_next/static/chunks/707.559b5bb6b367b0d8.js +1 -0
  12. package/dist/dashboard/_next/static/chunks/736.a061e521ba738792.js +1 -0
  13. package/dist/dashboard/_next/static/chunks/825-8d69033cd30489b9.js +1 -0
  14. package/dist/dashboard/_next/static/chunks/914-8a8dbb0d7c5f49dd.js +1 -0
  15. package/dist/dashboard/_next/static/chunks/app/accuracy/{page-72ef9620a52e345e.js → page-19a973c3ff0d74c7.js} +1 -1
  16. package/dist/dashboard/_next/static/chunks/app/context/page-093f938b03fefec3.js +1 -0
  17. package/dist/dashboard/_next/static/chunks/app/executions/page-3dc6f25a8270833f.js +1 -0
  18. package/dist/dashboard/_next/static/chunks/app/graph/page-27ca55336f1e5908.js +1 -0
  19. package/dist/dashboard/_next/static/chunks/app/intelligence/knowledge/page-e6a21c234798623f.js +1 -0
  20. package/dist/dashboard/_next/static/chunks/app/intelligence/memory/page-e6a21c234798623f.js +1 -0
  21. package/dist/dashboard/_next/static/chunks/app/intelligence/page-e6a21c234798623f.js +1 -0
  22. package/dist/dashboard/_next/static/chunks/app/knowledge/page-ad48a6c980322292.js +1 -0
  23. package/dist/dashboard/_next/static/chunks/app/layout-5c75ea62c5543a6e.js +1 -0
  24. package/dist/dashboard/_next/static/chunks/app/memory/page-88a6b6bce5fc6c54.js +1 -0
  25. package/dist/dashboard/_next/static/chunks/app/page-0dd1d745d94c448e.js +1 -0
  26. package/dist/dashboard/_next/static/chunks/app/replay/{page-7a6293c77eafe8b4.js → page-6decdec1bad1621e.js} +1 -1
  27. package/dist/dashboard/_next/static/chunks/app/runs/[id]/page-ae676b7ed6c7f061.js +1 -0
  28. package/dist/dashboard/_next/static/chunks/app/runs/page-33854ca5a31a5f29.js +1 -0
  29. package/dist/dashboard/_next/static/chunks/app/timeline/{page-c1f1b6c081532456.js → page-1b027d09e3ee35fe.js} +1 -1
  30. package/dist/dashboard/_next/static/chunks/app/tool-metrics/page-dc73b4433dbb9a04.js +1 -0
  31. package/dist/dashboard/_next/static/chunks/app/workflows/page-da494d4bd74cf25f.js +1 -0
  32. package/dist/dashboard/_next/static/chunks/webpack-c52cf5cbd2898ec1.js +1 -0
  33. package/dist/dashboard/_next/static/css/ec6498e6b4f4227c.css +3 -0
  34. package/dist/dashboard/_not-found/__next._full.txt +3 -3
  35. package/dist/dashboard/_not-found/__next._not-found.__PAGE__.txt +3 -3
  36. package/dist/dashboard/_not-found/__next._tree.txt +2 -2
  37. package/dist/dashboard/_not-found.html +1 -1
  38. package/dist/dashboard/_not-found.txt +3 -3
  39. package/dist/dashboard/accuracy/__next._full.txt +4 -4
  40. package/dist/dashboard/accuracy/__next._tree.txt +2 -2
  41. package/dist/dashboard/accuracy/__next.accuracy.__PAGE__.txt +4 -4
  42. package/dist/dashboard/accuracy.html +1 -1
  43. package/dist/dashboard/accuracy.txt +4 -4
  44. package/dist/dashboard/benchmark/__next._full.txt +4 -4
  45. package/dist/dashboard/benchmark/__next._tree.txt +2 -2
  46. package/dist/dashboard/benchmark/__next.benchmark.__PAGE__.txt +4 -4
  47. package/dist/dashboard/benchmark.html +1 -1
  48. package/dist/dashboard/benchmark.txt +4 -4
  49. package/dist/dashboard/context/__next._full.txt +4 -4
  50. package/dist/dashboard/context/__next._tree.txt +2 -2
  51. package/dist/dashboard/context/__next.context.__PAGE__.txt +4 -4
  52. package/dist/dashboard/context.html +1 -1
  53. package/dist/dashboard/context.txt +4 -4
  54. package/dist/dashboard/doctor/__next._full.txt +4 -4
  55. package/dist/dashboard/doctor/__next._tree.txt +2 -2
  56. package/dist/dashboard/doctor/__next.doctor.__PAGE__.txt +4 -4
  57. package/dist/dashboard/doctor.html +1 -1
  58. package/dist/dashboard/doctor.txt +4 -4
  59. package/dist/dashboard/executions/__next._full.txt +4 -4
  60. package/dist/dashboard/executions/__next._tree.txt +2 -2
  61. package/dist/dashboard/executions/__next.executions.__PAGE__.txt +4 -4
  62. package/dist/dashboard/executions.html +1 -1
  63. package/dist/dashboard/executions.txt +4 -4
  64. package/dist/dashboard/graph/__next._full.txt +4 -4
  65. package/dist/dashboard/graph/__next._tree.txt +2 -2
  66. package/dist/dashboard/graph/__next.graph.__PAGE__.txt +4 -4
  67. package/dist/dashboard/graph.html +1 -1
  68. package/dist/dashboard/graph.txt +4 -4
  69. package/dist/dashboard/index.html +1 -1
  70. package/dist/dashboard/index.txt +4 -4
  71. package/dist/dashboard/intelligence/__next._full.txt +19 -0
  72. package/dist/dashboard/intelligence/__next._tree.txt +2 -0
  73. package/dist/dashboard/intelligence/__next.intelligence.__PAGE__.txt +25 -0
  74. package/dist/dashboard/intelligence/knowledge/__next._full.txt +19 -0
  75. package/dist/dashboard/intelligence/knowledge/__next._tree.txt +2 -0
  76. package/dist/dashboard/intelligence/knowledge/__next.intelligence.knowledge.__PAGE__.txt +26 -0
  77. package/dist/dashboard/intelligence/knowledge.html +1 -0
  78. package/dist/dashboard/intelligence/knowledge.txt +19 -0
  79. package/dist/dashboard/intelligence/memory/__next._full.txt +19 -0
  80. package/dist/dashboard/intelligence/memory/__next._tree.txt +2 -0
  81. package/dist/dashboard/intelligence/memory/__next.intelligence.memory.__PAGE__.txt +26 -0
  82. package/dist/dashboard/intelligence/memory.html +1 -0
  83. package/dist/dashboard/intelligence/memory.txt +19 -0
  84. package/dist/dashboard/intelligence.html +1 -0
  85. package/dist/dashboard/intelligence.txt +19 -0
  86. package/dist/dashboard/knowledge/__next._full.txt +4 -4
  87. package/dist/dashboard/knowledge/__next._tree.txt +2 -2
  88. package/dist/dashboard/knowledge/__next.knowledge.__PAGE__.txt +4 -4
  89. package/dist/dashboard/knowledge.html +1 -1
  90. package/dist/dashboard/knowledge.txt +4 -4
  91. package/dist/dashboard/locales/en.json +60 -1
  92. package/dist/dashboard/locales/zh.json +60 -1
  93. package/dist/dashboard/memory/__next._full.txt +4 -4
  94. package/dist/dashboard/memory/__next._tree.txt +2 -2
  95. package/dist/dashboard/memory/__next.memory.__PAGE__.txt +4 -4
  96. package/dist/dashboard/memory.html +1 -1
  97. package/dist/dashboard/memory.txt +4 -4
  98. package/dist/dashboard/replay/__next._full.txt +4 -4
  99. package/dist/dashboard/replay/__next._tree.txt +2 -2
  100. package/dist/dashboard/replay/__next.replay.__PAGE__.txt +4 -4
  101. package/dist/dashboard/replay.html +1 -1
  102. package/dist/dashboard/replay.txt +4 -4
  103. package/dist/dashboard/runs/_/__next._full.txt +4 -4
  104. package/dist/dashboard/runs/_/__next._tree.txt +2 -2
  105. package/dist/dashboard/runs/_/__next.runs.$d$id.__PAGE__.txt +4 -4
  106. package/dist/dashboard/runs/_.html +1 -1
  107. package/dist/dashboard/runs/_.txt +4 -4
  108. package/dist/dashboard/runs/__next._full.txt +4 -4
  109. package/dist/dashboard/runs/__next._tree.txt +2 -2
  110. package/dist/dashboard/runs/__next.runs.__PAGE__.txt +4 -4
  111. package/dist/dashboard/runs.html +1 -1
  112. package/dist/dashboard/runs.txt +4 -4
  113. package/dist/dashboard/settings/__next._full.txt +4 -4
  114. package/dist/dashboard/settings/__next._tree.txt +2 -2
  115. package/dist/dashboard/settings/__next.settings.__PAGE__.txt +4 -4
  116. package/dist/dashboard/settings.html +1 -1
  117. package/dist/dashboard/settings.txt +4 -4
  118. package/dist/dashboard/timeline/__next._full.txt +4 -4
  119. package/dist/dashboard/timeline/__next._tree.txt +2 -2
  120. package/dist/dashboard/timeline/__next.timeline.__PAGE__.txt +4 -4
  121. package/dist/dashboard/timeline.html +1 -1
  122. package/dist/dashboard/timeline.txt +4 -4
  123. package/dist/dashboard/tool-metrics/__next._full.txt +4 -4
  124. package/dist/dashboard/tool-metrics/__next._tree.txt +2 -2
  125. package/dist/dashboard/tool-metrics/__next.tool-metrics.__PAGE__.txt +4 -4
  126. package/dist/dashboard/tool-metrics.html +1 -1
  127. package/dist/dashboard/tool-metrics.txt +4 -4
  128. package/dist/dashboard/workflows/__next._full.txt +4 -4
  129. package/dist/dashboard/workflows/__next._tree.txt +2 -2
  130. package/dist/dashboard/workflows/__next.workflows.__PAGE__.txt +4 -4
  131. package/dist/dashboard/workflows.html +1 -1
  132. package/dist/dashboard/workflows.txt +4 -4
  133. package/dist/hooks/hook-daemon.js +28 -27
  134. package/dist/hooks/post-tool-use-failure.js +2 -2
  135. package/dist/hooks/post-tool-use.js +6 -6
  136. package/dist/hooks/pre-compact.js +3 -3
  137. package/dist/hooks/pre-tool-use.js +4 -4
  138. package/dist/hooks/server-bootstrap.js +1 -109
  139. package/dist/hooks/session-end.js +5 -5
  140. package/dist/hooks/stop.js +9 -9
  141. package/dist/hooks/user-prompt-submit.js +8 -8
  142. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  143. package/dist/plugin/dist/command-registry.json +5 -5
  144. package/dist/plugin/dist/hooks/hook-daemon.js +28 -27
  145. package/dist/plugin/dist/hooks/post-tool-use-failure.js +2 -2
  146. package/dist/plugin/dist/hooks/post-tool-use.js +6 -6
  147. package/dist/plugin/dist/hooks/pre-compact.js +3 -3
  148. package/dist/plugin/dist/hooks/pre-tool-use.js +4 -4
  149. package/dist/plugin/dist/hooks/server-bootstrap.js +1 -109
  150. package/dist/plugin/dist/hooks/session-end.js +5 -5
  151. package/dist/plugin/dist/hooks/stop.js +9 -9
  152. package/dist/plugin/dist/hooks/user-prompt-submit.js +8 -8
  153. package/dist/plugin/package.json +13 -13
  154. package/dist/plugin/skills/start/SKILL.md +20 -34
  155. package/package.json +17 -15
  156. package/plugin-registry.json +29 -29
  157. package/dist/dashboard/_next/static/JAFPWp0Do4yhq-QzxqyH3/_buildManifest.js +0 -1
  158. package/dist/dashboard/_next/static/chunks/240-8f45a6db4f75278b.js +0 -1
  159. package/dist/dashboard/_next/static/chunks/722-001c96b6723e043d.js +0 -1
  160. package/dist/dashboard/_next/static/chunks/914-7e538089692b7d1b.js +0 -1
  161. package/dist/dashboard/_next/static/chunks/app/context/page-070c5ebfffb71f1b.js +0 -1
  162. package/dist/dashboard/_next/static/chunks/app/executions/page-52f9a045f91548cc.js +0 -1
  163. package/dist/dashboard/_next/static/chunks/app/graph/page-c3487fe2482e734e.js +0 -1
  164. package/dist/dashboard/_next/static/chunks/app/knowledge/page-e184866ed2e92ef1.js +0 -1
  165. package/dist/dashboard/_next/static/chunks/app/layout-a28c30513212e363.js +0 -1
  166. package/dist/dashboard/_next/static/chunks/app/memory/page-36e047153bedfce2.js +0 -1
  167. package/dist/dashboard/_next/static/chunks/app/page-1daa0024f1e5dd18.js +0 -1
  168. package/dist/dashboard/_next/static/chunks/app/runs/[id]/page-7a92db57d7fb2265.js +0 -1
  169. package/dist/dashboard/_next/static/chunks/app/runs/page-36baf64267e36b28.js +0 -1
  170. package/dist/dashboard/_next/static/chunks/app/tool-metrics/page-1c5ddf6239cf1734.js +0 -1
  171. package/dist/dashboard/_next/static/chunks/app/workflows/page-e2ed74df546c3568.js +0 -1
  172. package/dist/dashboard/_next/static/chunks/webpack-5f4649c40b052b9f.js +0 -1
  173. package/dist/dashboard/_next/static/css/6912a202a7d0c151.css +0 -3
  174. /package/dist/dashboard/_next/static/{JAFPWp0Do4yhq-QzxqyH3 → EvEIGY0RpP7e0gDVLEPam}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[49,707],{23623:(e,s,n)=>{"use strict";n.d(s,{p:()=>d});var r=n(54568),t=n(7620),l=n(64318);let d=t.forwardRef(({className:e,type:s,...n},t)=>(0,r.jsx)("input",{type:s,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:t,...n}));d.displayName="Input"},28465:(e,s,n)=>{"use strict";n.d(s,{$:()=>a});var r=n(54568),t=n(7620),l=n(64318);let d=(0,n(91397).F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),a=t.forwardRef(({className:e,variant:s,size:n,...t},a)=>(0,r.jsx)("button",{className:(0,l.cn)(d({variant:s,size:n,className:e})),ref:a,...t}));a.displayName="Button"},56707:(e,s,n)=>{"use strict";n.r(s),n.d(s,{KnowledgeView:()=>c});var r=n(54568),t=n(7620),l=n(86914),d=n(89531),a=n(23623),i=n(28465),o=n(64567);function c(){let{t:e}=(0,o.Bd)(),{data:s,isLoading:n}=(0,l.w4)(),c=(0,l.zz)(),[u,m]=(0,t.useState)(""),{data:f}=(0,l.yy)(u);return(0,r.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold",children:e("knowledge.title","Knowledge Base")}),(0,r.jsx)(i.$,{onClick:()=>c.mutate(void 0),disabled:c.isPending,children:c.isPending?e("knowledge.syncing","Syncing..."):e("knowledge.syncAll","Sync All")})]}),n?(0,r.jsx)("div",{className:"text-muted-foreground",children:e("knowledge.loading","Loading...")}):s&&s.length>0?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-muted-foreground",children:e("knowledge.sources","Sources")}),s.map(s=>(0,r.jsx)(d.Zp,{children:(0,r.jsxs)(d.Wu,{className:"p-4 flex justify-between items-center",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold",children:s.source?.name??s.name}),(0,r.jsxs)("div",{className:"text-sm text-muted-foreground",children:[s.entryCount??0," chunks \xb7 ",s.source?.urls?.length??0," URLs \xb7 ","ready"===s.status?e("knowledge.synced"):e("knowledge.notSynced"),s.lastSyncTime?` \xb7 ${e("knowledge.last")}: ${new Date(s.lastSyncTime).toLocaleDateString()}`:""]})]}),(0,r.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>c.mutate(s.source?.name??s.name),disabled:c.isPending,children:e("knowledge.sync")})]})},s.source?.name??s.name))]}):(0,r.jsx)(d.Zp,{children:(0,r.jsx)(d.Wu,{className:"p-6 text-center text-muted-foreground",children:e("knowledge.noSources","No knowledge sources. Install a plugin and sync docs.")})}),(0,r.jsxs)("div",{className:"space-y-2 pt-4",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-muted-foreground",children:e("knowledge.search","Search")}),(0,r.jsx)("div",{className:"flex gap-2",children:(0,r.jsx)(a.p,{placeholder:e("knowledge.searchPlaceholder","Search knowledge..."),value:u,onChange:e=>m(e.target.value)})}),f&&f.length>0&&(0,r.jsx)("div",{className:"space-y-2",children:f.map((s,n)=>(0,r.jsx)(d.Zp,{children:(0,r.jsxs)(d.Wu,{className:"p-4",children:[(0,r.jsx)("div",{className:"font-semibold",children:s.title}),(0,r.jsx)("div",{className:"text-sm text-muted-foreground mt-1",children:s.content?.slice(0,200)}),void 0!==s.score&&(0,r.jsxs)("div",{className:"text-xs text-muted-foreground mt-1",children:[e("knowledge.score"),": ",s.score.toFixed(2)]})]})},n))})]})]})}},64318:(e,s,n)=>{"use strict";n.d(s,{cn:()=>l});var r=n(9917),t=n(2809);function l(...e){return(0,t.QP)((0,r.$)(e))}},73983:(e,s,n)=>{Promise.resolve().then(n.bind(n,56707))},89531:(e,s,n)=>{"use strict";n.d(s,{Wu:()=>o,ZB:()=>i,Zp:()=>d,aR:()=>a});var r=n(54568),t=n(7620),l=n(64318);let d=t.forwardRef(({className:e,...s},n)=>(0,r.jsx)("div",{ref:n,className:(0,l.cn)("rounded-lg border border-border bg-card text-card-foreground",e),...s}));d.displayName="Card";let a=t.forwardRef(({className:e,...s},n)=>(0,r.jsx)("div",{ref:n,className:(0,l.cn)("flex flex-col space-y-1.5 p-4",e),...s}));a.displayName="CardHeader";let i=t.forwardRef(({className:e,...s},n)=>(0,r.jsx)("h3",{ref:n,className:(0,l.cn)("text-sm font-semibold leading-none tracking-tight",e),...s}));i.displayName="CardTitle";let o=t.forwardRef(({className:e,...s},n)=>(0,r.jsx)("div",{ref:n,className:(0,l.cn)("p-4 pt-0",e),...s}));o.displayName="CardContent"},91397:(e,s,n)=>{"use strict";n.d(s,{F:()=>d});var r=n(9917);let t=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=r.$,d=(e,s)=>n=>{var r;if((null==s?void 0:s.variants)==null)return l(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:d,defaultVariants:a}=s,i=Object.keys(d).map(e=>{let s=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===s)return null;let l=t(s)||t(r);return d[e][l]}),o=n&&Object.entries(n).reduce((e,s)=>{let[n,r]=s;return void 0===r||(e[n]=r),e},{});return l(e,i,null==s||null==(r=s.compoundVariants)?void 0:r.reduce((e,s)=>{let{class:n,className:r,...t}=s;return Object.entries(t).every(e=>{let[s,n]=e;return Array.isArray(n)?n.includes({...a,...o}[s]):({...a,...o})[s]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}}},e=>{e.O(0,[820,567,993,914,587,968,358],()=>e(e.s=73983)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{638:(e,t,n)=>{"use strict";n.d(t,{C:()=>i});var o=n(19851);let s="devflow-project-root",r="devflow-active-project-root";function a(e){try{return localStorage.getItem(e)}catch{return null}}function l(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}}let i=(0,o.vt)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:a(s),activeProjectRoot:a(r),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{l(s,t),e({projectRoot:t})},setActiveProjectRoot:t=>{l(r,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},11752:(e,t,n)=>{Promise.resolve().then(n.bind(n,30841))},30841:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>$});var o=n(54568);n(74471);var s=n(64955),r=n(68728),a=n(7620);function l({children:e}){let[t]=(0,a.useState)(()=>new s.E({defaultOptions:{queries:{staleTime:3e4,retry:1}}}));return(0,o.jsx)(r.Ht,{client:t,children:e})}var i=n(79748),c=n(638),d=n(86914),u=n(64318),m=n(64567);let p={properties:"detail.properties",imports:"detail.imports",history:"detail.history"};function g(){let{t:e}=(0,m.Bd)(),t=(0,c.C)(e=>e.selectedNodeId),n=(0,c.C)(e=>e.detailTab),s=(0,c.C)(e=>e.setDetailTab),{data:r}=(0,d.uU)(),a=r?.nodes.find(e=>e.id===t);return t?(0,o.jsxs)("div",{className:"flex flex-col h-full",children:[(0,o.jsx)("div",{className:"flex border-b border-border",children:Object.keys(p).map(t=>(0,o.jsx)("button",{onClick:()=>s(t),className:(0,u.cn)("flex-1 py-2 text-xs font-medium capitalize",n===t?"border-b-2 border-primary text-primary":"text-muted-foreground"),children:e(p[t])},t))}),(0,o.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:a?(0,o.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("span",{className:"text-muted-foreground",children:[e("detail.name"),":"]})," ",a.name]}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("span",{className:"text-muted-foreground",children:[e("detail.type"),":"]})," ",(0,o.jsx)("span",{className:"capitalize",children:a.type})]}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("span",{className:"text-muted-foreground",children:[e("detail.file"),":"]})," ",(0,o.jsx)("span",{className:"font-mono text-xs",children:a.file})]})]}):(0,o.jsx)("p",{className:"text-muted-foreground text-sm",children:e("detail.notFound")})})]}):(0,o.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:e("detail.selectNode")})}var h=n(65587),f=n.n(h),v=n(7920),y=n(22996),x=n(42154),k=n(55769),b=n(46548),w=n(48056),R=n(78914),j=n(73599),C=n(40766),S=n(30774),T=n(60527),N=n(22681),P=n(37270);let A=[{items:[{href:"/",labelKey:"nav.overview",icon:v.A},{href:"/context",labelKey:"nav.context",icon:y.A},{href:"/runs",labelKey:"nav.runs",icon:x.A},{href:"/workflows",labelKey:"nav.workflows",icon:k.A}]},{labelKey:"nav.intelligence",items:[{href:"/intelligence",labelKey:"nav.intelligence",icon:b.A}]},{labelKey:"nav.diagnostics",items:[{href:"/doctor",labelKey:"nav.doctor",icon:w.A},{href:"/executions",labelKey:"nav.executions",icon:R.A},{href:"/timeline",labelKey:"nav.timeline",icon:j.A},{href:"/tool-metrics",labelKey:"nav.toolMetrics",icon:C.A},{href:"/accuracy",labelKey:"nav.accuracy",icon:S.A},{href:"/replay",labelKey:"nav.replay",icon:T.A},{href:"/benchmark",labelKey:"nav.benchmark",icon:N.A}]},{items:[{href:"/settings",labelKey:"nav.settings",icon:P.A}]}];function M(){let{t:e,i18n:t}=(0,m.Bd)(),n=(0,i.usePathname)();return(0,o.jsxs)("nav",{className:"flex h-full min-w-max flex-row gap-1 p-2 md:min-w-0 md:flex-col md:p-3",children:[(0,o.jsx)(f(),{href:"/",className:"flex h-9 shrink-0 items-center px-2 text-base font-bold text-primary md:mb-2 md:px-3",children:e("nav.title")}),(0,o.jsx)("div",{className:"flex flex-1 gap-1 md:flex-col",children:A.map((t,s)=>(0,o.jsxs)("div",{className:"flex gap-1 md:flex-col md:border-t md:border-border md:pt-2 first:md:border-0 first:md:pt-0",children:[t.labelKey?(0,o.jsx)("span",{className:"hidden px-3 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60 md:block",children:e(t.labelKey)}):null,t.items.map(t=>{let s="/"===t.href?"/"===n:n===t.href||n.startsWith(`${t.href}/`);return(0,o.jsxs)(f(),{href:t.href,title:e(t.labelKey),className:(0,u.cn)("flex h-9 shrink-0 items-center gap-3 rounded-md px-2 text-sm transition-colors md:px-3",s?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[(0,o.jsx)(t.icon,{className:"h-4 w-4"}),(0,o.jsx)("span",{className:"hidden md:inline",children:e(t.labelKey)})]},t.href)})]},t.labelKey??`group-${s}`))}),(0,o.jsx)("div",{className:"shrink-0 border-l border-border pl-2 md:mt-auto md:border-l-0 md:border-t md:pl-0 md:pt-3",children:(0,o.jsx)("button",{onClick:()=>{t.changeLanguage("zh"===t.language?"en":"zh")},className:"h-9 w-full rounded-md px-3 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:e("nav.language")})})]})}function D({nav:e,main:t,detail:n}){return(0,o.jsxs)("div",{className:"flex h-dvh w-full flex-col md:flex-row",children:[(0,o.jsx)("aside",{className:"h-14 shrink-0 overflow-x-auto border-b border-border bg-card md:h-auto md:w-[220px] md:overflow-y-auto md:border-b-0 md:border-r",children:e}),(0,o.jsx)("main",{className:"min-h-0 min-w-0 flex-1 overflow-hidden",children:t}),n?(0,o.jsx)("aside",{className:"hidden w-[340px] shrink-0 overflow-y-auto border-l border-border bg-card xl:block",children:n}):null]})}var I=n(23555),F=n(36645);function E({className:e,...t}){return(0,o.jsx)("button",{type:"button",...t,className:(0,u.cn)("inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e)})}let O=[{href:"/",key:"home"},{href:"/context",key:"context"},{href:"/runs",key:"runs"},{href:"/intelligence",key:"intelligence"},{href:"/doctor",key:"doctor"}];function L(){let{t:e}=(0,m.Bd)(),[t,n]=(0,a.useState)(!1),[s,r]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),n(!0)),"Escape"===e.key&&n(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]);let l=O.filter(t=>e(`shell.commands.${t.key}`).toLowerCase().includes(s.toLowerCase()));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{type:"button",onClick:()=>n(!0),className:"hidden h-8 items-center gap-2 rounded-md border border-border px-2 text-xs text-muted-foreground hover:bg-accent md:flex","aria-label":e("shell.openCommandMenu"),children:[(0,o.jsx)(I.A,{className:"h-3.5 w-3.5"}),e("shell.commandMenu"),(0,o.jsx)("kbd",{className:"rounded border px-1",children:"⌘K"})]}),t?(0,o.jsx)("div",{className:"fixed inset-0 z-50 bg-background/70 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":e("shell.commandMenu"),onMouseDown:e=>{e.target===e.currentTarget&&n(!1)},children:(0,o.jsxs)("div",{className:"mx-auto mt-16 max-w-lg rounded-lg border border-border bg-background shadow-xl",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[(0,o.jsx)(I.A,{className:"h-4 w-4 text-muted-foreground"}),(0,o.jsx)("input",{autoFocus:!0,value:s,onChange:e=>r(e.target.value),placeholder:e("shell.searchCommands"),className:"h-11 flex-1 bg-transparent text-sm outline-none"}),(0,o.jsx)(E,{"aria-label":e("shell.close"),onClick:()=>n(!1),children:(0,o.jsx)(F.A,{className:"h-4 w-4"})})]}),(0,o.jsxs)("div",{className:"p-2",children:[l.map(t=>(0,o.jsx)(f(),{href:t.href,onClick:()=>n(!1),className:"block rounded-md px-3 py-2 text-sm hover:bg-accent",children:e(`shell.commands.${t.key}`)},t.href)),l.length?null:(0,o.jsx)("p",{className:"p-3 text-sm text-muted-foreground",children:e("shell.noCommands")})]})]})}):null]})}var _=n(48820),K=n(92561);function H(){let{t:e}=(0,m.Bd)(),t=(0,c.C)(e=>e.activeProjectRoot??e.projectRoot),n=(0,c.C)(e=>e.setProjectRoot),s=(0,c.C)(e=>e.setActiveProjectRoot),r=(0,_.I)({queryKey:["projects"],queryFn:K.H.projects,staleTime:6e4}).data??[];return r.length?(0,o.jsxs)("label",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground md:px-3",children:[(0,o.jsx)("span",{className:"sr-only",children:e("shell.project")}),(0,o.jsxs)("select",{"aria-label":e("shell.project"),value:t??"",onChange:e=>{n(e.target.value),s(e.target.value)},className:"min-w-0 max-w-44 rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground",children:[(0,o.jsx)("option",{value:"",disabled:!0,children:e("shell.selectProject")}),r.map(e=>(0,o.jsx)("option",{value:e.rootPath,children:e.name},e.id))]})]}):null}function B({children:e}){let t=(0,i.usePathname)(),[n,s]=(0,a.useState)(!1);return((0,a.useEffect)(()=>s(!0),[]),n)?(0,o.jsx)(D,{nav:(0,o.jsxs)("div",{className:"flex h-full flex-col",children:[(0,o.jsx)("div",{className:"flex-1",children:(0,o.jsx)(M,{})}),(0,o.jsx)(H,{})]}),main:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"flex justify-end p-2",children:(0,o.jsx)(L,{})}),e]}),detail:"/graph"===t||"/intelligence"===t?(0,o.jsx)(g,{}):void 0}):(0,o.jsx)("div",{className:"flex h-dvh items-center justify-center text-sm text-muted-foreground",children:"Loading..."})}var U=n(58202),W=n(43028);let z=JSON.parse('{"nav":{"title":"DevFlow","overview":"Overview","graph":"Graph","context":"Context","workflows":"Workflows","memory":"Memory","benchmark":"Benchmark","knowledge":"Knowledge","runs":"Runs","timeline":"Timeline","executions":"Executions","toolMetrics":"Tool Metrics","accuracy":"Accuracy","replay":"Replay","doctor":"Doctor","settings":"Settings","intelligence":"Intelligence","diagnostics":"Diagnostics","language":"中文"},"shell":{"project":"Project","selectProject":"Select project","commandMenu":"Commands","openCommandMenu":"Open command menu","searchCommands":"Search commands...","close":"Close","noCommands":"No commands found","lazyLoaded":"Project intelligence loaded","commands":{"home":"Open Home","context":"Open Context","runs":"Open Runs","intelligence":"Open Project Intelligence","doctor":"Open Diagnostics"}},"overview":{"title":"Project Overview","project":"Project","noProject":"No project connected","filesIndexed":"Files Indexed","workflows":"Workflows","agentRuns":"Agent Runs","techStack":"Tech Stack","recentRuns":"Recent Agent Runs","noRuns":"No agent runs recorded yet.","agent":"Agent","mode":"Mode","source":"Source","status":"Status","tokens":"Tokens","connectTitle":"Connect Project","connectDescription":"Enter the root path of your project to connect. The server will index and analyze the codebase.","connectPlaceholder":"/path/to/your/project","connecting":"Connecting...","connect":"Connect","connectError":"Failed to connect. Make sure the path exists and is accessible.","architectureLayers":"Architecture Layers","filesCount":"{{count}} files","keyModules":"Key Modules","keyFiles":"Key Files","recommended":"Recommended Next Steps","plugins":"Plugins","queries":"Queries","switchProject":"Switch Project","switchProjectPlaceholder":"Enter project path...","switchProjectConfirm":"Switch","disconnectProject":"Disconnect"},"home":{"eyebrow":"Project intelligence","needsAction":"Needs attention","stable":"Stable","index":"Code index","knowledge":"Knowledge sources","memory":"Memory","ready":"Ready","processing":"Processing","failed":"Failed","unavailable":"Not ready","filesSymbols":"{{files}} files \xb7 {{symbols}} symbols","sourcesSynced":"{{ready}}/{{total}} synced","memoryCounts":"{{approved}} approved \xb7 {{pending}} pending","recentRuns":"Recent Runs","viewAll":"View all","noRuns":"No runs yet. Complete a task to see its result and failure reason here.","nextStep":"Next step","nextStepHint":"Continue from the current project state.","noAction":"There are no pending actions for this project.","createContext":"Build project Context","createContextDescription":"Index the project before starting a task.","viewRun":"View current Run","retryRun":"Retry last task","statusUpdated":"Updated {{time}}"},"onboarding":{"title":"Onboarding Pack","empty":"No onboarding pack generated yet","noActiveProject":"No active project","generate":"Generate Onboarding Pack","refresh":"Refresh onboarding pack"},"context":{"title":"Context Builder","placeholder":"Search symbols or ask a question...","build":"Build","building":"Building context...","results":"Results ({{files}} files, ~{{tokens}} tokens)","taskMode":"Task Mode","taskContext":"Task Context","taskContextDescription":"Build the smallest useful context pack for the task, with required files, risks, and next actions.","confidenceTokens":"{{confidence}}% confidence \xb7 {{tokens}} tokens","requiredFiles":"Required Files","optionalFiles":"Optional Files","keySymbols":"Key Symbols","riskHints":"Risk Hints","nextActions":"Next Actions","relevanceDirect":"direct","relevanceIndirect":"indirect","levelHigh":"high","levelMedium":"medium","levelLow":"low","wasHelpful":"Was this helpful?","hit":"Hit","partial":"Partial","miss":"Miss","thanks":"Thanks for your feedback!"},"memory":{"title":"Memory","loading":"Loading...","pendingApproval":"Pending Approval","approvedMemories":"Approved Memories","approve":"Approve","reject":"Reject","noMemories":"No memories yet","noMemoriesHint":"Memories help avoid repeating mistakes","confidence":"confidence","original":"Original","yes":"Yes","no":"No","category":{"mcp_correction":"MCP Correction","project_knowledge":"Project Knowledge","failure_lesson":"Failure Lesson"},"searchPlaceholder":"Search memories...","addMemory":"Add Memory","editMemory":"Edit Memory","deleteMemory":"Delete","deleteConfirm":"Delete this memory?","categoryLabel":"Category","content":"Content","scope":"Scope (optional)","cancel":"Cancel","save":"Save"},"workflows":{"title":"Workflow Runs","available":"Available Workflows","steps":"steps","stream":"Stream","closeStream":"Close stream","runHistory":"Run History","runId":"Run ID","started":"Started","noRuns":"No runs yet. Trigger a workflow above."},"benchmark":{"title":"Benchmark","running":"Running...","run":"Run Benchmark","tasks":"tasks","task":"Task","experimentTab":"A/B Benchmark","operationsTab":"Operations","filesTouched":"Files Touched","correctness":"Correctness","regressions":"Regressions Over 10%","baselineCorrectness":"Baseline Correctness","devflowCorrectness":"DevFlow Correctness","baselineTokens":"Baseline Tokens","devflowTokens":"DevFlow Tokens","noReports":"No benchmark reports yet. Run one to get started.","roiTitle":"ROI Dashboard","loading":"Loading...","noData":"No data available. Start using DevFlow to collect telemetry.","overview":"Overview","totalRuns":"Total Runs","completed":"Completed","failed":"Failed","avgDuration":"Avg Duration","avgTokens":"Avg Tokens","firstPassRate":"First Pass Rate","feedbackHitRate":"Feedback Hit Rate","efficiency":"Efficiency","avgTimePerTask":"Avg Time Per Task","avgRetryCount":"Avg Retry Count","tokensSaved":"Tokens Saved","failureBreakdown":"Failure Breakdown","workflowHealth":"Workflow Health","workflow":"Workflow","runs":"Runs","successRate":"Success Rate","pluginEffectiveness":"Plugin Effectiveness","plugin":"Plugin","dailyTrends":"Daily Trends","date":"Date","tokens":"Tokens","failures":"Failures","empty":"No telemetry data yet. Start using DevFlow with an AI agent to collect ROI metrics.","failureCategories":{"context_insufficient":"Context Insufficient","knowledge_missing":"Knowledge Missing","workflow_design_issue":"Workflow Design Issue","tool_error":"Tool Error","agent_override":"Agent Override","unknown":"Unknown"},"seconds":"{{value}}s","period":"{{from}} → {{to}}","experimentSummary":"Experiment Summary","timeSavedRate":"Time Saved","tokenSavedRate":"Token Saved","detailedResults":"Detailed Results","faster":"{{percent}}% faster","baseline":"Baseline","devflow":"DevFlow","noExperimentData":"No experiment data","opsSummary":"Operations Summary","totalRunsCount":"Total Runs","successRatePercent":"Success Rate","avgTokenUsage":"Avg Token Usage","avgDurationTime":"Avg Duration","feedbackHitRatePercent":"Feedback Hit Rate","noOpsData":"No operations data","loadFailed":"Load failed: {{error}}","pluginAnalysis":"Plugin Value Analysis","recommendedInstall":"Recommended to Install","suggestedRemove":"Suggested to Remove","installCount":"Installs","usageRate":"Usage","successRateShort":"Success","tokenImpact":"Token Impact","lastUsed":"Last Used","noPluginData":"No plugin data","recommended":"Recommended","lowEfficiency":"Low Efficiency"},"graph":{"searchPlaceholder":"Search nodes...","filterOnly":"Filter only","highlightAll":"Highlight all"},"detail":{"selectNode":"Select a node to view details","properties":"Properties","imports":"Imports","history":"History","name":"Name","type":"Type","file":"File","notFound":"Node not found"},"knowledge":{"title":"Knowledge Base","sources":"Sources","syncing":"Syncing...","syncAll":"Sync All","loading":"Loading...","noSources":"No knowledge sources. Install a plugin and sync docs.","search":"Search","searchPlaceholder":"Search knowledge...","synced":"Synced","notSynced":"Not synced","last":"Last","sync":"Sync","score":"Score"},"runs":{"title":"Runs","empty":"No runs recorded yet.","loading":"Loading runs...","running":"Running","completed":"Completed","failed":"Failed","canceled":"Canceled"},"timeline":{"title":"Timeline","runs":"Runs","tokens":"Tokens","llmCalls":"LLM Calls","toolUses":"Tool Uses","completed":"completed","failed":"failed"},"events":{"loadMore":"Load {{count}} more events","llmCall":"LLM Call","toolUse":"Tool Use","memoryRead":"Memory Read","memoryWrite":"Memory Write","fileRead":"File Read","fileWrite":"File Write","bashCommand":"Bash","mcpToolCall":"MCP Tool","error":"Error","userInput":"User Input","stepStart":"Step Start","stepEnd":"Step End","empty":"No events recorded for this run.","steps":"Steps","eventCount":"events","selectEvent":"Select an event to view details","eventDetail":"Event Detail","kind":"Kind","step":"Step","duration":"Duration","model":"Model","tokens":"Tokens","tokensInOut":"{{input}} in / {{output}} out","prompt":"Prompt","response":"Response","stdout":"Stdout","stderr":"Stderr","truncated":"Content was truncated"},"runDetail":{"title":"Run Detail","events":"events","llm":"LLM","tokens":"tokens","failureCategory":"Failure Category","failureReason":"Failure Reason","suggestedActions":"Suggested Actions","category":{"context_insufficient":"Context Insufficient","knowledge_missing":"Knowledge Missing","workflow_design_issue":"Workflow Design Issue","tool_error":"Tool Error","agent_override":"Agent Override"}},"plugin":{"title":"Plugin Effectiveness","installCount":"Install Count","activeRate":"Active Rate","successRate":"Success Rate","avgTokenImpact":"Avg Token Impact","recommendInstall":"Recommend Install","recommendOptimize":"Recommend Optimize","recommendRemove":"Recommend Remove"},"executions":{"title":"Skill Executions","loading":"Loading executions...","overallCompliance":"Overall MCP Compliance","totalExecutions":"Total Executions","skillsTracked":"Skills Tracked","skill":"Skill","status":"Status","tools":"Tools","mcpRate":"MCP Rate","duration":"Duration","tokens":"Tokens","empty":"No executions recorded yet","traceTimeline":"Execution Trace","blocked":"Blocked","fallback":"Fallback"},"runtime":{"ready":"Runtime ready","starting":"Starting runtime","degraded":"Runtime degraded","notRunning":"Runtime is not running","dashboardUnavailable":"Dashboard is unavailable","bundleMissing":"Dashboard bundle is missing","databaseNotReady":"Database is not ready","ownerMismatch":"Runtime ownership could not be verified","projectScopeRequired":"Choose a project to view project data","openProject":"Open project","reconnect":"Reconnect"},"settings":{"title":"Project Settings","projectInfo":"Project Info","name":"Name","mode":"Mode","plugins":"Plugins","noPlugins":"No plugins installed","telemetry":"Telemetry","totalRuns":"Runs stored","totalTokens":"Total tokens","clearOldRuns":"Clear old runs (30d+)"}}'),q=JSON.parse('{"nav":{"title":"DevFlow","overview":"概览","graph":"图谱","context":"上下文","workflows":"工作流","memory":"记忆","benchmark":"基准测试","knowledge":"知识库","runs":"运行记录","timeline":"时间线","executions":"执行轨迹","toolMetrics":"工具指标","accuracy":"准确率","replay":"回放","doctor":"自检","settings":"设置","intelligence":"项目资料","diagnostics":"诊断","language":"EN"},"shell":{"project":"项目","selectProject":"选择项目","commandMenu":"命令","openCommandMenu":"打开命令菜单","searchCommands":"搜索命令...","close":"关闭","noCommands":"未找到命令","lazyLoaded":"项目资料已加载","commands":{"home":"打开首页","context":"打开上下文","runs":"打开运行记录","intelligence":"打开项目资料","doctor":"打开诊断"}},"overview":{"title":"项目概览","project":"项目","noProject":"未连接项目","filesIndexed":"已索引文件","workflows":"工作流","agentRuns":"智能体运行","techStack":"技术栈","recentRuns":"最近运行","noRuns":"暂无运行记录","agent":"智能体","mode":"模式","source":"来源","status":"状态","tokens":"令牌数","connectTitle":"连接项目","connectDescription":"输入项目根路径进行连接。服务端将索引并分析代码库。","connectPlaceholder":"/path/to/your/project","connecting":"连接中...","connect":"连接","connectError":"连接失败,请确认路径存在且可访问。","architectureLayers":"架构分层","filesCount":"{{count}} 个文件","keyModules":"关键模块","keyFiles":"关键文件","recommended":"推荐下一步","plugins":"插件","queries":"推荐查询","switchProject":"切换项目","switchProjectPlaceholder":"输入项目路径...","switchProjectConfirm":"切换","disconnectProject":"断开连接"},"home":{"eyebrow":"项目智能","needsAction":"需要处理","stable":"状态稳定","index":"代码索引","knowledge":"知识源","memory":"记忆","ready":"正常","processing":"处理中","failed":"失败","unavailable":"未就绪","filesSymbols":"{{files}} 文件 \xb7 {{symbols}} 符号","sourcesSynced":"{{ready}}/{{total}} 已同步","memoryCounts":"{{approved}} 已批准 \xb7 {{pending}} 待处理","recentRuns":"最近 Runs","viewAll":"全部","noRuns":"还没有运行记录。完成一次任务后,这里会显示结果和失败原因。","nextStep":"下一步","nextStepHint":"根据当前项目状态继续推进。","noAction":"项目当前没有待处理动作。","createContext":"建立项目 Context","createContextDescription":"先完成索引,再开始任务。","viewRun":"查看当前 Run","retryRun":"重新运行上次任务","statusUpdated":"更新于 {{time}}"},"onboarding":{"title":"启动包","empty":"尚未生成启动包","noActiveProject":"未激活项目","generate":"生成启动包","refresh":"刷新启动包"},"context":{"title":"上下文构建器","placeholder":"搜索符号或输入查询...","build":"构建","building":"正在构建上下文...","results":"结果({{files}} 个文件,约 {{tokens}} 个令牌)","taskMode":"任务模式","taskContext":"任务上下文","taskContextDescription":"为任务构建最小可用的上下文包,包含必需文件、风险和下一步动作。","confidenceTokens":"{{confidence}}% 置信度 \xb7 {{tokens}} 令牌","requiredFiles":"必需文件","optionalFiles":"可选文件","keySymbols":"关键符号","riskHints":"风险提示","nextActions":"下一步操作","relevanceDirect":"直接","relevanceIndirect":"间接","levelHigh":"高","levelMedium":"中","levelLow":"低","wasHelpful":"有帮助吗?","hit":"有用","partial":"部分有用","miss":"无用","thanks":"感谢反馈!"},"memory":{"title":"记忆","loading":"加载中...","pendingApproval":"待审批","approvedMemories":"已批准的记忆","approve":"批准","reject":"拒绝","noMemories":"暂无记忆","noMemoriesHint":"记忆有助于避免重复犯错","confidence":"置信度","original":"原始","yes":"是","no":"否","category":{"mcp_correction":"MCP 纠正","project_knowledge":"项目知识","failure_lesson":"失败教训"},"searchPlaceholder":"搜索记忆...","addMemory":"添加记忆","editMemory":"编辑记忆","deleteMemory":"删除","deleteConfirm":"确定删除这条记忆?","categoryLabel":"分类","content":"内容","scope":"作用域(可选)","cancel":"取消","save":"保存"},"workflows":{"title":"工作流运行","available":"可用工作流","steps":"步骤","stream":"流","closeStream":"关闭流","runHistory":"运行历史","runId":"运行 ID","started":"开始时间","noRuns":"暂无运行,请触发上方工作流"},"benchmark":{"title":"基准测试","running":"运行中...","run":"运行测试","tasks":"任务","task":"任务","experimentTab":"A/B 基准","operationsTab":"运行治理","filesTouched":"涉及文件","correctness":"正确率","regressions":"超过 10% 的回退","baselineCorrectness":"基线正确率","devflowCorrectness":"DevFlow 正确率","baselineTokens":"基线 Token","devflowTokens":"DevFlow Token","noReports":"暂无测试报告,点击运行开始","roiTitle":"ROI 仪表盘","loading":"加载中...","noData":"暂无数据。使用 DevFlow 与 AI Agent 协作以收集 ROI 数据。","overview":"概览","totalRuns":"总运行数","completed":"已完成","failed":"已失败","avgDuration":"平均耗时","avgTokens":"平均令牌","firstPassRate":"首次通过率","feedbackHitRate":"反馈命中率","efficiency":"效率","avgTimePerTask":"平均每任务耗时","avgRetryCount":"平均重试次数","tokensSaved":"节省令牌数","failureBreakdown":"失败分类","workflowHealth":"工作流健康度","workflow":"工作流","runs":"运行数","successRate":"成功率","pluginEffectiveness":"插件有效性","plugin":"插件","dailyTrends":"每日趋势","date":"日期","tokens":"令牌数","failures":"失败数","empty":"暂无遥测数据。使用 DevFlow 与 AI Agent 协作以收集 ROI 指标。","failureCategories":{"context_insufficient":"上下文不足","knowledge_missing":"知识缺失","workflow_design_issue":"工作流设计问题","tool_error":"工具错误","agent_override":"智能体覆盖","unknown":"未知"},"seconds":"{{value}}s","period":"{{from}} → {{to}}","experimentSummary":"实验收益总结","timeSavedRate":"时间节省率","tokenSavedRate":"Token 节省率","detailedResults":"详细结果","faster":"{{percent}}% 更快","baseline":"基线","devflow":"DevFlow","noExperimentData":"暂无实验数据","opsSummary":"运营统计","totalRunsCount":"总运行次数","successRatePercent":"成功率","avgTokenUsage":"平均 Token 使用","avgDurationTime":"平均耗时","feedbackHitRatePercent":"反馈命中率","noOpsData":"暂无运营数据","loadFailed":"加载失败: {{error}}","pluginAnalysis":"插件价值分析","recommendedInstall":"推荐安装","suggestedRemove":"建议移除","installCount":"安装量","usageRate":"使用率","successRateShort":"成功率","tokenImpact":"Token 影响","lastUsed":"最近使用","noPluginData":"暂无插件数据","recommended":"推荐","lowEfficiency":"低效"},"graph":{"searchPlaceholder":"搜索节点...","filterOnly":"仅显示匹配","highlightAll":"高亮全部"},"detail":{"selectNode":"选择一个节点查看详情","properties":"属性","imports":"导入","history":"历史","name":"名称","type":"类型","file":"文件","notFound":"节点未找到"},"knowledge":{"title":"知识库","sources":"数据源","syncing":"同步中...","syncAll":"全部同步","loading":"加载中...","noSources":"暂无知识源,安装插件并同步文档。","search":"搜索","searchPlaceholder":"搜索知识...","synced":"已同步","notSynced":"未同步","last":"最近","sync":"同步","score":"相关性"},"runs":{"title":"运行记录","empty":"暂无运行记录。","loading":"正在加载运行记录...","running":"运行中","completed":"已完成","failed":"失败","canceled":"已取消"},"timeline":{"title":"时间线","runs":"运行数","tokens":"令牌数","llmCalls":"LLM 调用","toolUses":"工具调用","completed":"已完成","failed":"已失败"},"events":{"loadMore":"加载剩余 {{count}} 条事件","llmCall":"LLM 调用","toolUse":"工具使用","memoryRead":"读取记忆","memoryWrite":"写入记忆","fileRead":"读取文件","fileWrite":"写入文件","bashCommand":"Bash","mcpToolCall":"MCP 工具","error":"错误","userInput":"用户输入","stepStart":"步骤开始","stepEnd":"步骤结束","empty":"此运行未记录任何事件。","steps":"步骤","eventCount":"个事件","selectEvent":"选择一个事件查看详情","eventDetail":"事件详情","kind":"类型","step":"步骤","duration":"耗时","model":"模型","tokens":"令牌数","tokensInOut":"{{input}} 输入 / {{output}} 输出","prompt":"提示词","response":"响应","stdout":"标准输出","stderr":"标准错误","truncated":"内容已截断"},"runDetail":{"title":"运行详情","events":"个事件","llm":"次 LLM","tokens":"tokens","failureCategory":"失败类别","failureReason":"失败原因","suggestedActions":"建议动作","category":{"context_insufficient":"上下文不足","knowledge_missing":"知识缺失","workflow_design_issue":"工作流设计问题","tool_error":"工具错误","agent_override":"Agent 覆盖"}},"plugin":{"title":"插件效果","installCount":"安装量","activeRate":"活跃率","successRate":"成功率","avgTokenImpact":"平均 Token 影响","recommendInstall":"推荐安装","recommendOptimize":"建议优化","recommendRemove":"建议淘汰"},"executions":{"title":"技能执行记录","loading":"加载执行记录中...","overallCompliance":"总体 MCP 合规率","totalExecutions":"总执行次数","skillsTracked":"追踪技能数","skill":"技能","status":"状态","tools":"工具数","mcpRate":"MCP 比率","duration":"耗时","tokens":"Token","empty":"暂无执行记录","traceTimeline":"执行时间线","blocked":"已拦截","fallback":"降级"},"runtime":{"ready":"运行时已就绪","starting":"正在启动运行时","degraded":"运行时已降级","notRunning":"运行时未运行","dashboardUnavailable":"Dashboard 不可用","bundleMissing":"缺少 Dashboard 静态资源","databaseNotReady":"数据库尚未就绪","ownerMismatch":"无法验证运行时归属","projectScopeRequired":"请选择项目以查看项目数据","openProject":"打开项目","reconnect":"重新连接"},"settings":{"title":"项目设置","projectInfo":"项目信息","name":"名称","mode":"模式","plugins":"插件","noPlugins":"未安装插件","telemetry":"遥测","totalRuns":"运行数","totalTokens":"总令牌数","clearOldRuns":"清理旧记录(30天前)"}}');function $({children:e}){return(0,o.jsx)("html",{lang:"zh",className:"dark",children:(0,o.jsx)("body",{className:"h-dvh overflow-hidden",children:(0,o.jsx)(l,{children:(0,o.jsx)(B,{children:e})})})})}U.Ay.use(W.A).use(m.r9).init({resources:{en:{translation:z},zh:{translation:q}},fallbackLng:"zh",detection:{order:["localStorage","navigator"],caches:["localStorage"]},interpolation:{escapeValue:!1}})},64318:(e,t,n)=>{"use strict";n.d(t,{cn:()=>r});var o=n(9917),s=n(2809);function r(...e){return(0,s.QP)((0,o.$)(e))}},74471:()=>{},92561:(e,t,n)=>{"use strict";n.d(t,{H:()=>s});var o=n(97787);let s={home:e=>(0,o.E)("/dashboard/home",{projectRoot:e}),runs:(e,t=20,n=0)=>(0,o.E)(`/runs?limit=${t}&offset=${n}`,{projectRoot:e}),projects:()=>(0,o.E)("/projects")}},97787:(e,t,n)=>{"use strict";n.d(t,{E:()=>r});var o=n(98368);class s extends Error{status;details;constructor(e,t,n){super(t),this.status=e,this.details=n,this.name="ApiError"}}async function r(e,t={}){let{projectRoot:n,headers:a,...l}=t,i={"Content-Type":"application/json",...(0,o.PK)(),...a};n&&(i["x-devflow-project"]=n);let c=await fetch(`${(0,o.Ez)()}/api${e}`,{...l,headers:i,credentials:"same-origin"}),d=await c.text(),u=null;try{u=d?JSON.parse(d):null}catch{u=d}if(!c.ok){let e="object"==typeof u&&u&&"message"in u?String(u.message):`API ${c.status}`;throw new s(c.status,e,u)}return u&&"object"==typeof u&&"data"in u?u.data:u}}},e=>{e.O(0,[306,820,567,993,825,237,914,587,968,358],()=>e(e.s=11752)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[407,620],{21345:(e,t,s)=>{"use strict";s.d(t,{Cf:()=>i,L3:()=>c,c7:()=>d,lG:()=>n});var a=s(54568);s(7620);var r=s(25296);let n=r.bL;r.l9;let l=r.ZL;function o({className:e,...t}){return(0,a.jsx)(r.hJ,{className:`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ${e??""}`,...t})}function i({className:e,children:t,...s}){return(0,a.jsxs)(l,{children:[(0,a.jsx)(o,{}),(0,a.jsx)(r.UC,{className:`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg ${e??""}`,...s,children:t})]})}function d({className:e,...t}){return(0,a.jsx)("div",{className:`flex flex-col space-y-1.5 text-center sm:text-left ${e??""}`,...t})}function c({className:e,...t}){return(0,a.jsx)(r.hE,{className:`text-lg font-semibold leading-none tracking-tight ${e??""}`,...t})}r.bm},23623:(e,t,s)=>{"use strict";s.d(t,{p:()=>l});var a=s(54568),r=s(7620),n=s(64318);let l=r.forwardRef(({className:e,type:t,...s},r)=>(0,a.jsx)("input",{type:t,className:(0,n.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...s}));l.displayName="Input"},27859:(e,t,s)=>{Promise.resolve().then(s.bind(s,91788))},28465:(e,t,s)=>{"use strict";s.d(t,{$:()=>o});var a=s(54568),r=s(7620),n=s(64318);let l=(0,s(91397).F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),o=r.forwardRef(({className:e,variant:t,size:s,...r},o)=>(0,a.jsx)("button",{className:(0,n.cn)(l({variant:t,size:s,className:e})),ref:o,...r}));o.displayName="Button"},32715:(e,t,s)=>{"use strict";s.d(t,{h:()=>o,v:()=>i});var a=s(7620),r=s(68728),n=s(98368);async function l(e,t,s,a){let r=await fetch(`${(0,n.Ez)()}/api${e}`,{headers:{...(0,n.PK)(),...a?{"Last-Event-ID":String(a)}:{}},credentials:"same-origin",signal:t});if(!r.ok||!r.body)throw Error(`SSE ${r.status}`);let l=r.body.getReader(),o=new TextDecoder,i="";for(;!t.aborted;){let{value:e,done:t}=await l.read();if(t)break;let a=(i+=o.decode(e,{stream:!0})).split("\n\n");for(let e of(i=a.pop()??"",a)){let t="message",a=[];for(let s of e.split("\n"))s.startsWith("event:")&&(t=s.slice(6).trim()),s.startsWith("data:")&&a.push(s.slice(5).trim());if(0!==a.length)try{s({type:t,data:JSON.parse(a.join("\n"))})}catch{}}}}function o(e){let[t,s]=(0,a.useState)([]),r=(0,a.useRef)(0);return(0,a.useEffect)(()=>{if(!e)return;let t=new AbortController;return l(`/workflows/runs/${encodeURIComponent(e)}/stream`,t.signal,e=>{let t="number"==typeof e.data.sequence?e.data.sequence:void 0;t&&t<=r.current||(t&&(r.current=t),s(t=>[...t,e]))},r.current).catch(()=>void 0),()=>t.abort()},[e]),{events:t,clear:(0,a.useCallback)(()=>s([]),[])}}function i(e,t){let s=(0,r.jE)(),n=JSON.stringify(t);(0,a.useEffect)(()=>{let t=new AbortController,a=JSON.parse(n);return l(`/live/stream?channels=${encodeURIComponent(e)}`,t.signal,t=>{if("refresh"===t.type&&t.data.channel===e)for(let e of a)s.invalidateQueries({queryKey:e})}).catch(()=>void 0),()=>t.abort()},[e,s,n])}},64318:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var a=s(9917),r=s(2809);function n(...e){return(0,r.QP)((0,a.$)(e))}},89531:(e,t,s)=>{"use strict";s.d(t,{Wu:()=>d,ZB:()=>i,Zp:()=>l,aR:()=>o});var a=s(54568),r=s(7620),n=s(64318);let l=r.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,n.cn)("rounded-lg border border-border bg-card text-card-foreground",e),...t}));l.displayName="Card";let o=r.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-4",e),...t}));o.displayName="CardHeader";let i=r.forwardRef(({className:e,...t},s)=>(0,a.jsx)("h3",{ref:s,className:(0,n.cn)("text-sm font-semibold leading-none tracking-tight",e),...t}));i.displayName="CardTitle";let d=r.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,n.cn)("p-4 pt-0",e),...t}));d.displayName="CardContent"},91788:(e,t,s)=>{"use strict";s.r(t),s.d(t,{MemoryPanel:()=>g});var a=s(54568),r=s(7620),n=s(794),l=s(44968),o=s(86914),i=s(89531),d=s(28465),c=s(23623),m=s(64567),u=s(32715),f=s(21345);let x=["semantic","procedural","episodic","failure_lesson"];function p({open:e,onOpenChange:t,mode:s,defaultValues:n}){let{t:l}=(0,m.Bd)(),i=(0,o.Kg)(),c=(0,o.I8)(),[u,h]=(0,r.useState)(n?.category??"semantic"),[g,y]=(0,r.useState)(n?.content??""),[v,j]=(0,r.useState)(n?.scope??"");return(0,r.useEffect)(()=>{e&&(h(n?.category??"semantic"),y(n?.content??""),j(n?.scope??""))},[e,n]),(0,a.jsx)(f.lG,{open:e,onOpenChange:t,children:(0,a.jsxs)(f.Cf,{children:[(0,a.jsx)(f.c7,{children:(0,a.jsx)(f.L3,{children:"add"===s?l("memory.addMemory"):l("memory.editMemory")})}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:l("memory.categoryLabel")}),(0,a.jsx)("select",{className:"w-full mt-1 rounded-md border bg-background px-3 py-2 text-sm",value:u,onChange:e=>h(e.target.value),children:x.map(e=>{let t,s;return(0,a.jsx)("option",{value:e,children:(s=l(t=`memory.category.${e}`))===t?e:s},e)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:l("memory.content")}),(0,a.jsx)("textarea",{className:"w-full mt-1 rounded-md border bg-background px-3 py-2 text-sm min-h-[100px]",value:g,onChange:e=>y(e.target.value)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:l("memory.scope")}),(0,a.jsx)("input",{className:"w-full mt-1 rounded-md border bg-background px-3 py-2 text-sm",value:v,onChange:e=>j(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$,{variant:"outline",onClick:()=>t(!1),children:l("memory.cancel")}),(0,a.jsx)(d.$,{onClick:()=>{g.trim()&&("add"===s?i.mutate({category:u,content:g.trim(),scope:v.trim()||void 0}):n?.id&&c.mutate({id:n.id,updates:{content:g.trim()}}),t(!1))},disabled:!g.trim(),children:l("memory.save")})]})]})]})})}let h=["all","failure_lesson","semantic","procedural","episodic"];function g(){(0,u.v)("memory",[["memory"],["memory-candidates"]]);let{t:e}=(0,m.Bd)(),{data:t}=(0,o.PA)(),s=(0,o.qV)(),f=(0,o.Oq)(),x=(0,o.Ko)(),g=function(){let{t:e}=(0,m.Bd)();return t=>{let s=`memory.category.${t}`,a=e(s);return a===s?t:a}}(),[y,v]=(0,r.useState)(""),{data:j}=(0,o.$s)(y),[b,N]=(0,r.useState)(!1),[w,C]=(0,r.useState)(),[k,$]=(0,r.useState)("all"),S=t?.memories?.filter(e=>"approved"===e.status)??[],z=t?.memories?.filter(e=>"pending"===e.status)??[],R="all"===k?S:S.filter(e=>e.category===k),E="all"===k?z:z.filter(e=>e.category===k),M=(0,r.useMemo)(()=>{let e=new Map;for(let t of E){let s=e.get(t.category)??[];s.push(t),e.set(t.category,s)}return[...e.entries()].sort(([e],[t])=>"failure_lesson"===e?-1:"failure_lesson"===t?1:e.localeCompare(t))},[E]),_=y&&j?j:R;return t?(0,a.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold",children:e("memory.title")}),(0,a.jsxs)(d.$,{size:"sm",onClick:()=>{C(void 0),N(!0)},children:["+ ",e("memory.addMemory")]})]}),(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(c.p,{placeholder:e("memory.searchPlaceholder"),value:y,onChange:e=>v(e.target.value)})}),!y&&(0,a.jsx)("div",{className:"flex gap-2 flex-wrap",children:h.map(t=>(0,a.jsx)(d.$,{variant:k===t?"default":"outline",size:"sm",onClick:()=>$(t),children:"all"===t?e("memory.allCategories","All"):g(t)},t))}),!y&&E.length>0&&(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)(i.aR,{children:(0,a.jsxs)(i.ZB,{children:[e("memory.pendingApproval")," (",E.length,")"]})}),(0,a.jsx)(i.Wu,{children:(0,a.jsx)("div",{className:"space-y-4",children:M.map(([t,r])=>(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground uppercase mb-2",children:g(t)}),(0,a.jsx)("div",{className:"space-y-2",children:r.map(t=>(0,a.jsxs)("div",{className:"flex items-start justify-between p-2 rounded bg-secondary/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:t.content}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e("memory.confidence"),": ",t.confidence]})]}),(0,a.jsxs)("div",{className:"flex gap-1 ml-2",children:[(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>s.mutate(t.id),children:e("memory.approve")}),(0,a.jsx)(d.$,{size:"sm",variant:"ghost",onClick:()=>f.mutate(t.id),children:e("memory.reject")})]})]},t.id))})]},t))})})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)(i.aR,{children:(0,a.jsx)(i.ZB,{children:y?`${j?.length??0} results`:`${e("memory.approvedMemories")} (${R.length})`})}),(0,a.jsx)(i.Wu,{children:0===_.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg text-center",children:[(0,a.jsx)("p",{className:"text-muted-foreground text-sm font-medium",children:e("memory.noMemories")}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs mt-1",children:e("memory.noMemoriesHint")})]}):(0,a.jsx)("div",{className:"space-y-2",children:_.map(t=>(0,a.jsxs)("div",{className:"p-2 rounded bg-secondary/50 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsx)("span",{className:"flex-1",children:t.content}),(0,a.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:g(t.category)}),(0,a.jsx)(d.$,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0",onClick:()=>{C({id:t.id,category:t.category,content:t.content,scope:t.scope??""}),N(!0)},title:e("memory.editMemory"),children:(0,a.jsx)(n.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(d.$,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0 text-destructive",onClick:()=>{window.confirm(e("memory.deleteConfirm"))&&x.mutate(t.id)},title:e("memory.deleteMemory"),children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5"})})]})]}),t.originalText&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:[e("memory.original"),": ",t.originalText]})]},t.id))})})]}),(0,a.jsx)(p,{open:b,onOpenChange:N,mode:w?"edit":"add",defaultValues:w})]}):(0,a.jsx)("div",{className:"p-6 text-muted-foreground",children:e("memory.loading")})}}},e=>{e.O(0,[820,567,993,90,136,914,587,968,358],()=>e(e.s=27859)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{264:(e,s,t)=>{Promise.resolve().then(t.bind(t,91180))},638:(e,s,t)=>{"use strict";t.d(s,{C:()=>o});var r=t(19851);let a="devflow-project-root",n="devflow-active-project-root";function l(e){try{return localStorage.getItem(e)}catch{return null}}function i(e,s){try{null===s?localStorage.removeItem(e):localStorage.setItem(e,s)}catch{}}let o=(0,r.vt)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:l(a),activeProjectRoot:l(n),selectedRunId:null,selectNode:s=>e({selectedNodeId:s}),setDetailTab:s=>e({detailTab:s}),setSearchQuery:s=>e({searchQuery:s}),setProjectRoot:s=>{i(a,s),e({projectRoot:s})},setActiveProjectRoot:s=>{i(n,s),e({activeProjectRoot:s})},setSelectedRunId:s=>e({selectedRunId:s})}))},6026:(e,s,t)=>{"use strict";t.d(s,{E:()=>l});var r=t(54568);t(7620);var a=t(64318);let n=(0,t(91397).F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:s,...t}){return(0,r.jsx)("div",{className:(0,a.cn)(n({variant:s}),e),...t})}},64318:(e,s,t)=>{"use strict";t.d(s,{cn:()=>n});var r=t(9917),a=t(2809);function n(...e){return(0,a.QP)((0,r.$)(e))}},89531:(e,s,t)=>{"use strict";t.d(s,{Wu:()=>d,ZB:()=>o,Zp:()=>l,aR:()=>i});var r=t(54568),a=t(7620),n=t(64318);let l=a.forwardRef(({className:e,...s},t)=>(0,r.jsx)("div",{ref:t,className:(0,n.cn)("rounded-lg border border-border bg-card text-card-foreground",e),...s}));l.displayName="Card";let i=a.forwardRef(({className:e,...s},t)=>(0,r.jsx)("div",{ref:t,className:(0,n.cn)("flex flex-col space-y-1.5 p-4",e),...s}));i.displayName="CardHeader";let o=a.forwardRef(({className:e,...s},t)=>(0,r.jsx)("h3",{ref:t,className:(0,n.cn)("text-sm font-semibold leading-none tracking-tight",e),...s}));o.displayName="CardTitle";let d=a.forwardRef(({className:e,...s},t)=>(0,r.jsx)("div",{ref:t,className:(0,n.cn)("p-4 pt-0",e),...s}));d.displayName="CardContent"},91180:(e,s,t)=>{"use strict";t.d(s,{DashboardHome:()=>T});var r=t(54568),a=t(65587),n=t.n(a),l=t(14796),i=t(45894),o=t(30307),d=t(92402),c=t(63322),x=t(6026),m=t(89531),u=t(64318);function h({className:e,...s}){return(0,r.jsx)("div",{className:(0,u.cn)("animate-pulse rounded-md bg-muted",e),...s})}var p=t(48820),j=t(638),g=t(92561),f=t(7620),v=t(86914),N=t(28819),b=t(60527),w=t(93441),y=t(36645),k=t(57917),P=t(76990),R=t(92470),A=t(56242),C=t(61469),S=t(78516),Z=t(8490),E=t(64567);function W({readiness:e,hasProject:s}){let{t}=(0,E.Bd)(),a=e?.runtime==="ready"&&e.dashboard&&e.ownerVerified,n=t(a?"runtime.ready":"runtime.degraded");return(0,r.jsxs)("div",{className:`flex min-h-9 items-center justify-between gap-3 border-b px-1 py-2 text-sm ${a?"text-emerald-700 dark:text-emerald-400":"text-amber-700 dark:text-amber-400"}`,role:"status",children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[a?(0,r.jsx)(c.A,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}):(0,r.jsx)(l.A,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{children:n})]}),!s&&(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-muted-foreground",children:[(0,r.jsx)(i.A,{className:"h-4 w-4","aria-hidden":"true"}),t("runtime.projectScopeRequired")]}),(0,r.jsx)("span",{className:"sr-only",children:a?"ready":"degraded"})]})}function B(){let{t:e}=(0,E.Bd)(),{data:s}=(0,v.nS)(),{data:t}=(0,v.SU)(),a=(0,j.C)(e=>e.projectRoot),n=(0,j.C)(e=>e.setProjectRoot),l=(0,j.C)(e=>e.activeProjectRoot),i=(0,j.C)(e=>e.setActiveProjectRoot),[o,d]=(0,f.useState)(""),[c,x]=(0,f.useState)(""),[u,p]=(0,f.useState)(!1),g=(0,v.PS)(),B=(0,v.B7)(),I=(0,v.ll)();(0,f.useEffect)(()=>{s?.rootPath&&s.rootPath!==l&&(n(s.rootPath),i(s.rootPath))},[s,n,i,l]);let[T,_]=(0,f.useState)(!1);(0,f.useEffect)(()=>{T||s?.rootPath||!l||g.isPending||(_(!0),g.mutate(l))},[s?.rootPath,l,g.isPending,T]);let{data:D}=(0,v.YK)(),{data:F}=(0,v.jx)(),{data:L}=(0,v.mP)(),{data:H}=(0,v.te)(10,0),{data:K,isLoading:M}=(0,v.aW)(l),Q=D?.find(e=>e.rootPath===l),q=()=>{if(Q?.stack&&Q.stack.length>0)return Q.stack;if(K?.stack){let e=[...K.stack.languages,...K.stack.frameworks,...K.stack.buildTools,...K.stack.testTools];if(e.length>0)return e}return[]},U=()=>{o.trim()&&g.mutate(o.trim(),{onSuccess:e=>{n(e.rootPath),i(e.rootPath)}})},O=()=>{c.trim()&&g.mutate(c.trim(),{onSuccess:e=>{n(e.rootPath),i(e.rootPath),p(!1),x("")}})};return a?(0,r.jsxs)("div",{className:"p-6 space-y-6 overflow-y-auto h-full",children:[(0,r.jsx)(W,{readiness:t,hasProject:!!a}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold",children:e("overview.title")}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"hidden max-w-[40vw] truncate rounded bg-secondary px-2 py-1 font-mono text-xs text-muted-foreground sm:block",children:a}),(0,r.jsx)("button",{onClick:()=>l&&I.mutate(l),disabled:!l||I.isPending,className:"icon-button",title:e("onboarding.refresh"),"aria-label":e("onboarding.refresh"),children:(0,r.jsx)(b.A,{className:`h-4 w-4 ${I.isPending?"animate-spin":""}`})}),(0,r.jsx)("button",{onClick:()=>p(!u),className:"icon-button",title:e("overview.switchProject"),"aria-label":e("overview.switchProject"),children:(0,r.jsx)(w.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:()=>{B.mutate(void 0,{onSuccess:()=>{n(null),i(null)}})},className:"icon-button",title:e("overview.disconnectProject"),"aria-label":e("overview.disconnectProject"),children:(0,r.jsx)(y.A,{className:"h-4 w-4"})})]})]}),u&&(0,r.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg border bg-card",children:[(0,r.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),onKeyDown:e=>{"Enter"===e.key&&O(),"Escape"===e.key&&(p(!1),x(""))},placeholder:e("overview.switchProjectPlaceholder"),className:"flex-1 px-3 py-1.5 rounded-md border border-border bg-background text-sm"}),(0,r.jsx)("button",{onClick:O,disabled:g.isPending||!c.trim(),className:"px-3 py-1.5 rounded-md bg-primary text-primary-foreground text-sm disabled:opacity-50",children:g.isPending?e("overview.connecting"):e("overview.switchProjectConfirm")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,r.jsx)($,{icon:(0,r.jsx)(k.A,{className:"h-5 w-5"}),label:e("overview.project"),value:Q?.name?Q.name:K?.projectName?K.projectName:l?l.split("/").pop()??"Unknown Project":"Unknown Project"}),(0,r.jsx)($,{icon:(0,r.jsx)(P.A,{className:"h-5 w-5"}),label:e("overview.filesIndexed"),value:F?String(F.totalFiles):"--"}),(0,r.jsx)($,{icon:(0,r.jsx)(R.A,{className:"h-5 w-5"}),label:e("overview.workflows"),value:L?String(L.length):"--"}),(0,r.jsx)($,{icon:(0,r.jsx)(A.A,{className:"h-5 w-5"}),label:e("overview.agentRuns"),value:H?String(H.length):"--"})]}),q().length>0&&(0,r.jsxs)(m.Zp,{children:[(0,r.jsx)(m.aR,{children:(0,r.jsx)(m.ZB,{children:e("overview.techStack")})}),(0,r.jsx)(m.Wu,{children:(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:q().map(e=>(0,r.jsx)("span",{className:"px-2 py-1 rounded-md bg-secondary text-secondary-foreground text-xs",children:e},e))})})]}),M?(0,r.jsxs)(m.Zp,{children:[(0,r.jsx)(m.aR,{children:(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(C.A,{className:"h-4 w-4"}),e("onboarding.title")]})}),(0,r.jsx)(m.Wu,{children:(0,r.jsx)(h,{className:"h-32 w-full"})})]}):K?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(m.Zp,{children:[(0,r.jsx)(m.aR,{children:(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(C.A,{className:"h-4 w-4"}),e("overview.architectureLayers")]})}),(0,r.jsx)(m.Wu,{children:(0,r.jsx)("div",{className:"space-y-2",children:K.architectureLayers.map(s=>(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm font-medium",children:s.name}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground bg-secondary px-2 py-0.5 rounded",children:e("overview.filesCount",{count:s.files})})]},s.name))})})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,r.jsxs)(m.Zp,{children:[(0,r.jsx)(m.aR,{children:(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(S.A,{className:"h-4 w-4"}),e("overview.keyModules")]})}),(0,r.jsx)(m.Wu,{children:(0,r.jsx)("div",{className:"space-y-2",children:K.keyModules.slice(0,6).map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm font-mono text-primary",children:e.name}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:e.reason})]},e.name))})})]}),(0,r.jsxs)(m.Zp,{children:[(0,r.jsx)(m.aR,{children:(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(P.A,{className:"h-4 w-4"}),e("overview.keyFiles")]})}),(0,r.jsx)(m.Wu,{children:(0,r.jsx)("div",{className:"space-y-2",children:K.keyFiles.slice(0,6).map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm font-mono truncate",children:e.path}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:e.reason})]},e.path))})})]})]}),(0,r.jsxs)(m.Zp,{children:[(0,r.jsx)(m.aR,{children:(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(Z.A,{className:"h-4 w-4"}),e("overview.recommended")]})}),(0,r.jsx)(m.Wu,{children:(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase",children:e("overview.plugins")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:K.recommendedPlugins.map(e=>(0,r.jsx)("span",{className:"px-2 py-0.5 rounded bg-green-100 text-green-800 text-xs",children:e},e))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase",children:e("overview.workflows")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:K.recommendedWorkflows.map(e=>(0,r.jsx)("span",{className:"px-2 py-0.5 rounded bg-blue-100 text-blue-800 text-xs",children:e},e))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase",children:e("overview.queries")}),(0,r.jsx)("div",{className:"space-y-1",children:K.recommendedQueries.slice(0,3).map(e=>(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:['"',e,'"']},e))})]})]})})]})]}):(0,r.jsx)(m.Zp,{children:(0,r.jsx)(m.Wu,{className:"py-8 text-center text-muted-foreground",children:e("onboarding.empty")})}),(0,r.jsxs)(m.Zp,{children:[(0,r.jsx)(m.aR,{children:(0,r.jsx)(m.ZB,{children:e("overview.recentRuns")})}),(0,r.jsx)(m.Wu,{children:H&&H.length>0?(0,r.jsxs)("table",{className:"w-full text-sm",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"text-left text-muted-foreground",children:[(0,r.jsx)("th",{children:e("overview.label")}),(0,r.jsx)("th",{children:e("overview.status")}),(0,r.jsx)("th",{children:e("overview.toolCalls")}),(0,r.jsx)("th",{children:e("overview.duration")})]})}),(0,r.jsx)("tbody",{children:H.slice(0,5).map(e=>(0,r.jsxs)("tr",{className:"border-t border-border",children:[(0,r.jsx)("td",{className:"py-1",children:e.label||e.projectRoot}),(0,r.jsx)("td",{children:(0,r.jsx)("span",{className:`px-1.5 py-0.5 rounded text-xs ${"closed"===e.status?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700"}`,children:e.status})}),(0,r.jsxs)("td",{children:[e.totalToolCalls," (",e.mcpToolCalls," MCP)"]}),(0,r.jsx)("td",{children:e.durationMs>0?`${(e.durationMs/1e3).toFixed(1)}s`:"--"})]},e.id))})]}):(0,r.jsx)("p",{className:"text-muted-foreground text-sm",children:e("overview.noRuns")})})]})]}):(0,r.jsxs)("div",{className:"p-6 space-y-6 h-full",children:[(0,r.jsx)(W,{readiness:t,hasProject:!1}),(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsxs)(m.Zp,{className:"w-full max-w-md",children:[(0,r.jsx)(m.aR,{children:(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(N.A,{className:"h-5 w-5"}),e("overview.connectTitle")]})}),(0,r.jsxs)(m.Wu,{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("overview.connectDescription")}),(0,r.jsx)("input",{type:"text",value:o,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&U(),placeholder:e("overview.connectPlaceholder"),className:"w-full px-3 py-2 rounded-md border border-border bg-background text-sm"}),(0,r.jsx)("button",{onClick:U,disabled:g.isPending||!o.trim(),className:"w-full px-4 py-2 rounded-md bg-primary text-primary-foreground text-sm font-medium disabled:opacity-50",children:g.isPending?e("overview.connecting"):e("overview.connect")}),g.isError&&(0,r.jsx)("p",{className:"text-sm text-red-500",children:e("overview.connectError")})]})]})})]})}function $({icon:e,label:s,value:t}){return(0,r.jsx)(m.Zp,{children:(0,r.jsxs)(m.Wu,{className:"p-4 flex items-center gap-3",children:[(0,r.jsx)("div",{className:"text-primary",children:e}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:s}),(0,r.jsx)("div",{className:"font-bold text-lg",children:t})]})]})})}function I(e,s){return s("ready"===e||"completed"===e?"home.ready":"indexing"===e||"running"===e?"home.processing":"failed"===e?"home.failed":"home.unavailable")}function T(){let e,s=(0,j.C)(e=>e.activeProjectRoot??e.projectRoot),{t}=(0,E.Bd)(),a=(e=(0,j.C)(e=>e.activeProjectRoot??e.projectRoot),(0,p.I)({queryKey:["project",e,"dashboard-home"],queryFn:()=>g.H.home(e),enabled:!!e,staleTime:15e3}));if(!s)return(0,r.jsx)(B,{});if(a.isLoading)return(0,r.jsxs)("div",{className:"space-y-4 p-6",children:[(0,r.jsx)(h,{className:"h-10 w-64"}),(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-3",children:[(0,r.jsx)(h,{className:"h-36"}),(0,r.jsx)(h,{className:"h-36"}),(0,r.jsx)(h,{className:"h-36"})]})]});if(a.isError)return(0,r.jsx)("div",{className:"p-6",children:(0,r.jsx)(m.Zp,{className:"border-red-500/30",children:(0,r.jsxs)(m.Wu,{className:"flex items-center gap-3 p-5 text-sm text-red-300",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),"无法读取项目状态,请确认服务端正在运行。"]})})});let u=a.data;if(!u)return null;let f=[{label:t("home.index"),value:t("home.filesSymbols",{files:u.health.index.fileCount,symbols:u.health.index.symbolCount}),status:u.health.index.status},{label:t("home.knowledge"),value:t("home.sourcesSynced",{ready:u.health.knowledge.readySources,total:u.health.knowledge.totalSources}),status:u.health.knowledge.status},{label:t("home.memory"),value:t("home.memoryCounts",{approved:u.health.memory.approvedCount,pending:u.health.memory.pendingCount}),status:u.health.memory.pendingCount>0?"stale":"ready"}],v=u.nextAction?.kind==="build_context"?t("home.createContext"):u.nextAction?.kind==="open_run"?t("home.viewRun"):u.nextAction?.kind==="retry"?t("home.retryRun"):u.nextAction?.label,N=u.nextAction?.kind==="build_context"?t("home.createContextDescription"):u.nextAction?.description||t("home.nextStepHint");return(0,r.jsx)("main",{className:"h-full overflow-y-auto bg-background",children:(0,r.jsxs)("div",{className:"mx-auto max-w-6xl space-y-8 p-6 pb-12 lg:p-10",children:[(0,r.jsxs)("header",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border/70 pb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2 font-mono text-[11px] uppercase tracking-[0.22em] text-muted-foreground",children:t("home.eyebrow")}),(0,r.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:u.project.name}),(0,r.jsxs)("p",{className:"mt-2 flex items-center gap-2 font-mono text-xs text-muted-foreground",children:[(0,r.jsx)(i.A,{className:"h-3.5 w-3.5"}),u.project.rootPath]})]}),(0,r.jsx)(x.E,{variant:"outline",className:"rounded-full px-3 py-1 text-xs",children:u.nextAction?t("home.needsAction"):t("home.stable")})]}),(0,r.jsx)("section",{className:"grid gap-4 md:grid-cols-3",children:f.map(e=>(0,r.jsxs)(m.Zp,{className:"border-border/70 bg-card/70 shadow-none",children:[(0,r.jsx)(m.aR,{className:"pb-2",children:(0,r.jsxs)(m.ZB,{className:"flex items-center justify-between text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[(0,r.jsx)("span",{children:e.label}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5 normal-case tracking-normal text-foreground",children:[(0,r.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${"ready"===e.status?"bg-emerald-400":"indexing"===e.status?"bg-amber-400":"bg-muted-foreground"}`}),I(e.status,t)]})]})}),(0,r.jsx)(m.Wu,{children:(0,r.jsx)("p",{className:"text-lg font-medium tracking-tight",children:e.value})})]},e.label))}),(0,r.jsxs)("section",{className:"grid gap-6 lg:grid-cols-[1.3fr_0.7fr]",children:[(0,r.jsxs)(m.Zp,{className:"border-border/70 shadow-none",children:[(0,r.jsxs)(m.aR,{className:"flex-row items-center justify-between",children:[(0,r.jsx)(m.ZB,{children:t("home.recentRuns")}),(0,r.jsxs)(n(),{href:"/runs",className:"flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[t("home.viewAll")," ",(0,r.jsx)(o.A,{className:"h-3 w-3"})]})]}),(0,r.jsx)(m.Wu,{className:"space-y-1",children:0===u.recentRuns.length?(0,r.jsx)("p",{className:"py-8 text-sm text-muted-foreground",children:t("home.noRuns")}):u.recentRuns.map(e=>(0,r.jsxs)(n(),{href:`/runs/${e.id}`,className:"flex items-center justify-between rounded-md px-3 py-3 transition-colors hover:bg-secondary/60",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"truncate text-sm font-medium",children:e.label||e.id}),(0,r.jsx)("p",{className:"mt-1 font-mono text-[11px] text-muted-foreground",children:new Date(e.startedAt).toLocaleString()})]}),(0,r.jsxs)("span",{className:`ml-4 flex shrink-0 items-center gap-1.5 text-xs ${"failed"===e.status?"text-red-300":"running"===e.status?"text-amber-300":"text-emerald-300"}`,children:["failed"===e.status?(0,r.jsx)(d.A,{className:"h-3.5 w-3.5"}):(0,r.jsx)(c.A,{className:"h-3.5 w-3.5"}),I(e.status,t)]})]},e.id))})]}),(0,r.jsxs)(m.Zp,{className:"border-primary/30 bg-primary/[0.04] shadow-none",children:[(0,r.jsx)(m.aR,{children:(0,r.jsx)(m.ZB,{className:"text-base",children:t("home.nextStep")})}),(0,r.jsx)(m.Wu,{children:u.nextAction?(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm leading-6 text-muted-foreground",children:N}),(0,r.jsxs)(n(),{href:"open_run"===u.nextAction.kind||"retry"===u.nextAction.kind?`/runs/${String(u.nextAction.payload?.runId??"")}`:"/context",className:"mt-5 inline-flex items-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",children:[v,(0,r.jsx)(o.A,{className:"h-4 w-4"})]})]}):(0,r.jsxs)("div",{className:"flex items-start gap-3 text-sm text-muted-foreground",children:[(0,r.jsx)(c.A,{className:"mt-0.5 h-4 w-4 text-emerald-400"}),t("home.noAction")]})})]})]}),(0,r.jsx)("p",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground/60",children:t("home.statusUpdated",{time:new Date(u.generatedAt).toLocaleTimeString()})})]})})}},92561:(e,s,t)=>{"use strict";t.d(s,{H:()=>a});var r=t(97787);let a={home:e=>(0,r.E)("/dashboard/home",{projectRoot:e}),runs:(e,s=20,t=0)=>(0,r.E)(`/runs?limit=${s}&offset=${t}`,{projectRoot:e}),projects:()=>(0,r.E)("/projects")}},97787:(e,s,t)=>{"use strict";t.d(s,{E:()=>n});var r=t(98368);class a extends Error{status;details;constructor(e,s,t){super(s),this.status=e,this.details=t,this.name="ApiError"}}async function n(e,s={}){let{projectRoot:t,headers:l,...i}=s,o={"Content-Type":"application/json",...(0,r.PK)(),...l};t&&(o["x-devflow-project"]=t);let d=await fetch(`${(0,r.Ez)()}/api${e}`,{...i,headers:o,credentials:"same-origin"}),c=await d.text(),x=null;try{x=c?JSON.parse(c):null}catch{x=c}if(!d.ok){let e="object"==typeof x&&x&&"message"in x?String(x.message):`API ${d.status}`;throw new a(d.status,e,x)}return x&&"object"==typeof x&&"data"in x?x.data:x}}},e=>{e.O(0,[820,567,993,825,150,914,587,968,358],()=>e(e.s=264)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[424],{6407:(t,e,s)=>{"use strict";s.d(e,{$:()=>o,s:()=>n});var r=s(46676),i=s(19773),a=s(85153),n=class extends i.k{#t;#e;#s;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=(0,a.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#i({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let r="pending"===this.state.status,i=!this.#r.canStart();try{if(r)e();else{this.#i({type:"pending",variables:t,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#i({type:"pending",context:e,variables:t,isPaused:i})}let a=await this.#r.start();return await this.#s.config.onSuccess?.(a,t,this.state.context,this,s),await this.options.onSuccess?.(a,t,this.state.context,s),await this.#s.config.onSettled?.(a,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(a,null,t,this.state.context,s),this.#i({type:"success",data:a}),a}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#i({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#i(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),r.jG.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},8008:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(81007).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},19053:(t,e,s)=>{"use strict";s.d(e,{n:()=>l});var r=s(7620),i=s(6407),a=s(46676),n=s(18517),o=s(91961),u=class extends n.Q{#t;#a=void 0;#n;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.EN)(e.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#c(t)}getCurrentResult(){return this.#a}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#u(),this.#c()}mutate(t,e){return this.#o=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#u(){let t=this.#n?.state??(0,i.$)();this.#a={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#c(t){a.jG.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#a.variables,s=this.#a.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,r)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,r)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,r)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,r)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#a)})})}},c=s(68728);function l(t,e){let s=(0,c.jE)(e),[i]=r.useState(()=>new u(s,t));r.useEffect(()=>{i.setOptions(t)},[i,t]);let n=r.useSyncExternalStore(r.useCallback(t=>i.subscribe(a.jG.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=r.useCallback((t,e)=>{i.mutate(t,e).catch(o.lQ)},[i]);if(n.error&&(0,o.GU)(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:l,mutateAsync:n.mutate}}},27321:(t,e,s)=>{Promise.resolve().then(s.bind(s,88787))},56050:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(81007).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},76265:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(81007).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},88787:(t,e,s)=>{"use strict";s.d(e,{ReplayView:()=>j});var r=s(54568),i=s(65587),a=s.n(i),n=s(79748),o=s(7620),u=s(81007);let c=(0,u.A)("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);var l=s(8008);let d=(0,u.A)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var h=s(55769),m=s(76265);let p=(0,u.A)("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);function x({isPlaying:t,speed:e,onPlayPause:s,onStepForward:i,onStepBack:a,onJumpToStart:n,onJumpToEnd:o,onSpeedChange:u}){return(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 border-b border-border bg-secondary/30",children:[(0,r.jsx)("button",{onClick:n,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(c,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:a,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(l.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:s,className:"p-2 rounded-full bg-primary text-primary-foreground hover:opacity-90",children:t?(0,r.jsx)(d,{className:"h-4 w-4"}):(0,r.jsx)(h.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:i,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(m.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:o,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(p,{className:"h-4 w-4"})}),(0,r.jsx)("div",{className:"border-l border-border h-5 mx-2"}),[.5,1,2,4,8].map(t=>(0,r.jsxs)("button",{onClick:()=>u(t),className:`px-1.5 py-0.5 text-xs rounded ${e===t?"bg-primary text-primary-foreground":"hover:bg-accent text-muted-foreground"}`,children:[t,"x"]},t))]})}function f({events:t,currentIndex:e,onSeek:s}){if(0===t.length)return null;let i=t[0].timestamp,a=t[t.length-1].timestamp-i||1;return(0,r.jsx)("div",{className:"px-4 py-2 border-b border-border",children:(0,r.jsxs)("div",{className:"relative h-8 bg-secondary rounded cursor-pointer",onClick:e=>{let r=e.currentTarget.getBoundingClientRect();s(Math.round((e.clientX-r.left)/r.width*(t.length-1)))},children:[t.map((t,s)=>{let n=(t.timestamp-i)/a*100;return(0,r.jsx)("div",{className:`absolute top-1 w-2 h-6 rounded-sm ${s<=e?"bg-primary":"bg-border"}`,style:{left:`${n}%`},title:t.stepId},t.id)}),(0,r.jsx)("div",{className:"absolute top-0 h-full w-0.5 bg-foreground",style:{left:`${e/(t.length-1||1)*100}%`}})]})})}function y({events:t,currentIndex:e}){let s=t[0]?.timestamp??0;return(0,r.jsx)("div",{className:"space-y-0.5 font-mono text-xs",children:t.map((t,i)=>{let a=((t.timestamp-s)/1e3).toFixed(1),n=i===e;return(0,r.jsxs)("div",{className:`flex gap-2 py-1 px-2 rounded ${n?"bg-primary/10 text-primary font-medium":i<e?"text-muted-foreground":"text-muted-foreground/50"}`,children:[(0,r.jsxs)("span",{className:"w-16 text-right tabular-nums",children:["[",a,"s]"]}),(0,r.jsx)("span",{children:t.kind}),(0,r.jsx)("span",{className:"text-muted-foreground/50",children:t.data?.toolName||t.data?.filePath||t.data?.model||t.data?.command||""}),n&&(0,r.jsx)("span",{className:"ml-auto text-primary",children:"YOU ARE HERE"})]},t.id)})})}var v=s(56050);function b({events:t,runId:e,onBack:s}){let i=[...t].sort((t,e)=>t.timestamp-e.timestamp),[a,n]=(0,o.useState)(0),[u,c]=(0,o.useState)(!1),[l,d]=(0,o.useState)(1),h=(0,o.useRef)(null),m=i[a]??null,p=(0,o.useCallback)(()=>{n(t=>{let e=t+1;return e>=i.length?(c(!1),t):(h.current=setTimeout(()=>p(),Math.min((i[e].timestamp-i[t].timestamp)/l,2e3)),e)})},[i,l]);return(0,o.useEffect)(()=>(u?p():h.current&&clearTimeout(h.current),()=>{h.current&&clearTimeout(h.current)}),[u,p]),(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b border-border",children:[(0,r.jsx)("button",{onClick:s,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(v.A,{className:"h-4 w-4"})}),(0,r.jsx)("h2",{className:"text-lg font-bold",children:"Replay"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:e}),(0,r.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:["Event ",a+1,"/",i.length]})]}),(0,r.jsx)(x,{isPlaying:u,speed:l,onPlayPause:()=>c(t=>!t),onStepForward:()=>n(t=>Math.min(t+1,i.length-1)),onStepBack:()=>n(t=>Math.max(t-1,0)),onJumpToStart:()=>{c(!1),n(0)},onJumpToEnd:()=>{c(!1),n(i.length-1)},onSpeedChange:d}),(0,r.jsx)(f,{events:i,currentIndex:a,onSeek:t=>{c(!1),n(t)}}),(0,r.jsxs)("div",{className:"flex-1 overflow-hidden flex",children:[(0,r.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,r.jsx)(y,{events:i,currentIndex:a})}),m&&(0,r.jsxs)("div",{className:"w-80 border-l border-border overflow-y-auto p-4",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold mb-3",children:"Current Event"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Kind"}),(0,r.jsx)("div",{className:"text-sm font-medium",children:m.kind})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Step"}),(0,r.jsx)("div",{className:"text-sm font-mono text-xs",children:m.stepId})]}),null!=m.data.model&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Model"}),(0,r.jsx)("div",{className:"text-sm",children:m.data.model})]}),null!=m.data.prompt&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Prompt"}),(0,r.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-32 overflow-y-auto whitespace-pre-wrap",children:m.data.prompt})]}),null!=m.data.response&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Response"}),(0,r.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-32 overflow-y-auto whitespace-pre-wrap",children:m.data.response})]})]})]})]})]})}var g=s(86914);function j(){let t=(0,n.useRouter)(),e=(0,n.useSearchParams)().get("runId"),{data:s,isLoading:i}=(0,g.O)(e),{data:o}=(0,g.zb)(30,0);if(!e){let t=o??[];return(0,r.jsxs)("div",{className:"h-full overflow-y-auto p-6",children:[(0,r.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Replay"}),(0,r.jsxs)("div",{className:"divide-y divide-border border-y border-border",children:[t.map(t=>(0,r.jsxs)(a(),{href:`/replay?runId=${encodeURIComponent(t.id)}`,className:"flex items-center gap-4 px-2 py-3 text-sm hover:bg-accent",children:[(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:t.id}),(0,r.jsx)("span",{className:"text-muted-foreground",children:t.status}),(0,r.jsx)("span",{className:"text-muted-foreground",children:new Date(t.startedAt).toLocaleString()})]},t.id)),0===t.length?(0,r.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No runs available"}):null]})]})}if(i)return(0,r.jsx)("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading replay..."});let u=(s??[]).map(t=>({id:String(t.id??""),kind:String(t.kind??"tool_use"),stepId:String(t.stepId??"unknown"),timestamp:Number(t.timestamp??0),duration:"number"==typeof t.duration?t.duration:void 0,data:t.data&&"object"==typeof t.data?t.data:{}}));return(0,r.jsx)(b,{events:u,runId:e,onBack:()=>t.push("/replay")})}}},t=>{t.O(0,[820,240,914,587,968,358],()=>t(t.s=27321)),_N_E=t.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[424],{6407:(t,e,s)=>{"use strict";s.d(e,{$:()=>o,s:()=>n});var r=s(46676),i=s(19773),a=s(85153),n=class extends i.k{#t;#e;#s;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=(0,a.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#i({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let r="pending"===this.state.status,i=!this.#r.canStart();try{if(r)e();else{this.#i({type:"pending",variables:t,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#i({type:"pending",context:e,variables:t,isPaused:i})}let a=await this.#r.start();return await this.#s.config.onSuccess?.(a,t,this.state.context,this,s),await this.options.onSuccess?.(a,t,this.state.context,s),await this.#s.config.onSettled?.(a,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(a,null,t,this.state.context,s),this.#i({type:"success",data:a}),a}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#i({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#i(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),r.jG.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},8008:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(81007).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},19053:(t,e,s)=>{"use strict";s.d(e,{n:()=>l});var r=s(7620),i=s(6407),a=s(46676),n=s(18517),o=s(91961),u=class extends n.Q{#t;#a=void 0;#n;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.EN)(e.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#c(t)}getCurrentResult(){return this.#a}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#u(),this.#c()}mutate(t,e){return this.#o=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#u(){let t=this.#n?.state??(0,i.$)();this.#a={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#c(t){a.jG.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#a.variables,s=this.#a.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,r)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,r)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,r)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,r)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#a)})})}},c=s(68728);function l(t,e){let s=(0,c.jE)(e),[i]=r.useState(()=>new u(s,t));r.useEffect(()=>{i.setOptions(t)},[i,t]);let n=r.useSyncExternalStore(r.useCallback(t=>i.subscribe(a.jG.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=r.useCallback((t,e)=>{i.mutate(t,e).catch(o.lQ)},[i]);if(n.error&&(0,o.GU)(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:l,mutateAsync:n.mutate}}},27321:(t,e,s)=>{Promise.resolve().then(s.bind(s,88787))},55769:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(81007).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},56050:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(81007).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},76265:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(81007).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},79748:(t,e,s)=>{"use strict";var r=s(79796);s.o(r,"usePathname")&&s.d(e,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(e,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(e,{useSearchParams:function(){return r.useSearchParams}})},81007:(t,e,s)=>{"use strict";s.d(e,{A:()=>o});var r=s(7620);let i=(...t)=>t.filter((t,e,s)=>!!t&&s.indexOf(t)===e).join(" ");var a={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:t="currentColor",size:e=24,strokeWidth:s=2,absoluteStrokeWidth:n,className:o="",children:u,iconNode:c,...l},d)=>(0,r.createElement)("svg",{ref:d,...a,width:e,height:e,stroke:t,strokeWidth:n?24*Number(s)/Number(e):s,className:i("lucide",o),...l},[...c.map(([t,e])=>(0,r.createElement)(t,e)),...Array.isArray(u)?u:[u]])),o=(t,e)=>{let s=(0,r.forwardRef)(({className:s,...a},o)=>(0,r.createElement)(n,{ref:o,iconNode:e,className:i(`lucide-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,s),...a}));return s.displayName=`${t}`,s}},88787:(t,e,s)=>{"use strict";s.d(e,{ReplayView:()=>j});var r=s(54568),i=s(65587),a=s.n(i),n=s(79748),o=s(7620),u=s(81007);let c=(0,u.A)("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);var l=s(8008);let d=(0,u.A)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var h=s(55769),m=s(76265);let p=(0,u.A)("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);function x({isPlaying:t,speed:e,onPlayPause:s,onStepForward:i,onStepBack:a,onJumpToStart:n,onJumpToEnd:o,onSpeedChange:u}){return(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 border-b border-border bg-secondary/30",children:[(0,r.jsx)("button",{onClick:n,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(c,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:a,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(l.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:s,className:"p-2 rounded-full bg-primary text-primary-foreground hover:opacity-90",children:t?(0,r.jsx)(d,{className:"h-4 w-4"}):(0,r.jsx)(h.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:i,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(m.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:o,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(p,{className:"h-4 w-4"})}),(0,r.jsx)("div",{className:"border-l border-border h-5 mx-2"}),[.5,1,2,4,8].map(t=>(0,r.jsxs)("button",{onClick:()=>u(t),className:`px-1.5 py-0.5 text-xs rounded ${e===t?"bg-primary text-primary-foreground":"hover:bg-accent text-muted-foreground"}`,children:[t,"x"]},t))]})}function f({events:t,currentIndex:e,onSeek:s}){if(0===t.length)return null;let i=t[0].timestamp,a=t[t.length-1].timestamp-i||1;return(0,r.jsx)("div",{className:"px-4 py-2 border-b border-border",children:(0,r.jsxs)("div",{className:"relative h-8 bg-secondary rounded cursor-pointer",onClick:e=>{let r=e.currentTarget.getBoundingClientRect();s(Math.round((e.clientX-r.left)/r.width*(t.length-1)))},children:[t.map((t,s)=>{let n=(t.timestamp-i)/a*100;return(0,r.jsx)("div",{className:`absolute top-1 w-2 h-6 rounded-sm ${s<=e?"bg-primary":"bg-border"}`,style:{left:`${n}%`},title:t.stepId},t.id)}),(0,r.jsx)("div",{className:"absolute top-0 h-full w-0.5 bg-foreground",style:{left:`${e/(t.length-1||1)*100}%`}})]})})}function y({events:t,currentIndex:e}){let s=t[0]?.timestamp??0;return(0,r.jsx)("div",{className:"space-y-0.5 font-mono text-xs",children:t.map((t,i)=>{let a=((t.timestamp-s)/1e3).toFixed(1),n=i===e;return(0,r.jsxs)("div",{className:`flex gap-2 py-1 px-2 rounded ${n?"bg-primary/10 text-primary font-medium":i<e?"text-muted-foreground":"text-muted-foreground/50"}`,children:[(0,r.jsxs)("span",{className:"w-16 text-right tabular-nums",children:["[",a,"s]"]}),(0,r.jsx)("span",{children:t.kind}),(0,r.jsx)("span",{className:"text-muted-foreground/50",children:t.data?.toolName||t.data?.filePath||t.data?.model||t.data?.command||""}),n&&(0,r.jsx)("span",{className:"ml-auto text-primary",children:"YOU ARE HERE"})]},t.id)})})}var v=s(56050);function b({events:t,runId:e,onBack:s}){let i=[...t].sort((t,e)=>t.timestamp-e.timestamp),[a,n]=(0,o.useState)(0),[u,c]=(0,o.useState)(!1),[l,d]=(0,o.useState)(1),h=(0,o.useRef)(null),m=i[a]??null,p=(0,o.useCallback)(()=>{n(t=>{let e=t+1;return e>=i.length?(c(!1),t):(h.current=setTimeout(()=>p(),Math.min((i[e].timestamp-i[t].timestamp)/l,2e3)),e)})},[i,l]);return(0,o.useEffect)(()=>(u?p():h.current&&clearTimeout(h.current),()=>{h.current&&clearTimeout(h.current)}),[u,p]),(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b border-border",children:[(0,r.jsx)("button",{onClick:s,className:"p-1 rounded hover:bg-accent",children:(0,r.jsx)(v.A,{className:"h-4 w-4"})}),(0,r.jsx)("h2",{className:"text-lg font-bold",children:"Replay"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:e}),(0,r.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:["Event ",a+1,"/",i.length]})]}),(0,r.jsx)(x,{isPlaying:u,speed:l,onPlayPause:()=>c(t=>!t),onStepForward:()=>n(t=>Math.min(t+1,i.length-1)),onStepBack:()=>n(t=>Math.max(t-1,0)),onJumpToStart:()=>{c(!1),n(0)},onJumpToEnd:()=>{c(!1),n(i.length-1)},onSpeedChange:d}),(0,r.jsx)(f,{events:i,currentIndex:a,onSeek:t=>{c(!1),n(t)}}),(0,r.jsxs)("div",{className:"flex-1 overflow-hidden flex",children:[(0,r.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,r.jsx)(y,{events:i,currentIndex:a})}),m&&(0,r.jsxs)("div",{className:"w-80 border-l border-border overflow-y-auto p-4",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold mb-3",children:"Current Event"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Kind"}),(0,r.jsx)("div",{className:"text-sm font-medium",children:m.kind})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Step"}),(0,r.jsx)("div",{className:"text-sm font-mono text-xs",children:m.stepId})]}),null!=m.data.model&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Model"}),(0,r.jsx)("div",{className:"text-sm",children:m.data.model})]}),null!=m.data.prompt&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Prompt"}),(0,r.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-32 overflow-y-auto whitespace-pre-wrap",children:m.data.prompt})]}),null!=m.data.response&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Response"}),(0,r.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-32 overflow-y-auto whitespace-pre-wrap",children:m.data.response})]})]})]})]})]})}var g=s(86914);function j(){let t=(0,n.useRouter)(),e=(0,n.useSearchParams)().get("runId"),{data:s,isLoading:i}=(0,g.O)(e),{data:o}=(0,g.zb)(30,0);if(!e){let t=o??[];return(0,r.jsxs)("div",{className:"h-full overflow-y-auto p-6",children:[(0,r.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Replay"}),(0,r.jsxs)("div",{className:"divide-y divide-border border-y border-border",children:[t.map(t=>(0,r.jsxs)(a(),{href:`/replay?runId=${encodeURIComponent(t.id)}`,className:"flex items-center gap-4 px-2 py-3 text-sm hover:bg-accent",children:[(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:t.id}),(0,r.jsx)("span",{className:"text-muted-foreground",children:t.status}),(0,r.jsx)("span",{className:"text-muted-foreground",children:new Date(t.startedAt).toLocaleString()})]},t.id)),0===t.length?(0,r.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No runs available"}):null]})]})}if(i)return(0,r.jsx)("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading replay..."});let u=(s??[]).map(t=>({id:String(t.id??""),kind:String(t.kind??"tool_use"),stepId:String(t.stepId??"unknown"),timestamp:Number(t.timestamp??0),duration:"number"==typeof t.duration?t.duration:void 0,data:t.data&&"object"==typeof t.data?t.data:{}}));return(0,r.jsx)(b,{events:u,runId:e,onBack:()=>t.push("/replay")})}}},t=>{t.O(0,[820,825,914,587,968,358],()=>t(t.s=27321)),_N_E=t.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[293],{6026:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var s=r(54568);r(7620);var n=r(64318);let a=(0,r(91397).F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:t,...r}){return(0,s.jsx)("div",{className:(0,n.cn)(a({variant:t}),e),...r})}},8490:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(81007).A)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},14796:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(81007).A)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},33096:(e,t,r)=>{Promise.resolve().then(r.bind(r,59838))},56050:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(81007).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},59838:(e,t,r)=>{"use strict";r.d(t,{RunDetailRoute:()=>y});var s=r(54568),n=r(79748),a=r(7620),l=r(86914),d=r(64567);function o({steps:e,events:t}){let{t:r}=(0,d.Bd)();return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h3",{className:"text-xs font-semibold text-muted-foreground mb-2",children:r("events.steps")}),e.map(e=>{let n=t.filter(t=>t.stepId===e),a=n.reduce((e,t)=>e+(t.duration??0),0);return(0,s.jsxs)("div",{className:"text-xs py-1 px-2 rounded hover:bg-accent cursor-pointer",children:[(0,s.jsx)("div",{className:"font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:[n.length," ",r("events.eventCount")," \xb7 ",a,"ms"]})]},e)})]})}let i={llm_call:"text-blue-500",tool_use:"text-green-500",memory_read:"text-pink-500",memory_write:"text-pink-500",file_read:"text-gray-500",file_write:"text-yellow-500",bash_command:"text-purple-500",subagent:"text-orange-500",skill_invoke:"text-cyan-500",mcp_tool_call:"text-indigo-500",error:"text-red-500",user_input:"text-orange-500",step_start:"text-cyan-500",step_end:"text-cyan-500"},c={llm_call:"events.llmCall",tool_use:"events.toolUse",memory_read:"events.memoryRead",memory_write:"events.memoryWrite",file_read:"events.fileRead",file_write:"events.fileWrite",bash_command:"events.bashCommand",subagent:"events.subagent",skill_invoke:"events.skillInvoke",mcp_tool_call:"events.mcpToolCall",error:"events.error",user_input:"events.userInput",step_start:"events.stepStart",step_end:"events.stepEnd"};function u({events:e,onSelect:t,selectedId:r}){let{t:n}=(0,d.Bd)(),l=[...e].sort((e,t)=>e.timestamp-t.timestamp),[o,m]=(0,a.useState)(200);if(0===l.length)return(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:n("events.empty")});let x="",p=l.slice(-o);return(0,s.jsxs)("div",{className:"space-y-0",children:[p.map(e=>{let a=e.stepId!==x;x=e.stepId;let l=i[e.kind]??"text-muted-foreground",d=c[e.kind],o=d?n(d):e.kind,u=e.data?.toolName||e.data?.filePath||e.data?.model||e.data?.command||e.data?.memoryKey||"";return(0,s.jsxs)("div",{children:[a&&(0,s.jsx)("div",{className:"text-xs font-semibold text-muted-foreground pt-2 pb-1 border-t border-border mt-1",children:e.stepId}),(0,s.jsxs)("div",{onClick:()=>t(e),className:`flex items-center gap-2 py-1.5 px-2 rounded cursor-pointer text-xs hover:bg-accent ${r===e.id?"bg-accent":""} ${e.metadata?.blocked?"border-l-2 border-red-500 bg-red-50 dark:bg-red-950":""}`,children:[e.metadata?.blocked&&(0,s.jsx)("span",{className:"text-red-500 font-bold text-[10px] uppercase tracking-wider",children:"BLOCKED"}),(0,s.jsx)("span",{className:`w-16 ${l} font-medium`,children:o}),(0,s.jsx)("span",{className:"text-muted-foreground truncate flex-1",children:u}),e.duration?(0,s.jsxs)("span",{className:"text-muted-foreground",children:[e.duration,"ms"]}):null]})]},e.id)}),p.length<l.length&&(0,s.jsx)("button",{type:"button",onClick:()=>m(e=>Math.min(l.length,e+200)),className:"mt-2 w-full rounded border border-border px-3 py-2 text-xs text-muted-foreground hover:bg-accent",children:n("events.loadMore",{count:l.length-p.length})})]})}var m=r(89531);function x({event:e}){let[t,r]=(0,a.useState)(!1),n=e.input?JSON.stringify(e.input,null,2):"null",l=e.output?JSON.stringify(e.output,null,2):"null";return(0,s.jsxs)("div",{className:"space-y-4 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-lg",children:e.mcpToolName||e.toolName}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.toolType," \xb7 ",e.kind," \xb7 ",e.duration,"ms",e.blocked&&(0,s.jsx)("span",{className:"text-red-500 ml-2 font-bold",children:"BLOCKED"})]})]}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"text-xs border rounded px-2 py-1 hover:bg-accent",children:t?"Formatted":"Raw JSON"})]}),e.error&&(0,s.jsx)("div",{className:"p-3 bg-red-50 dark:bg-red-950 border border-red-300 rounded text-sm text-red-700",children:e.error}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,s.jsxs)(m.Zp,{className:"p-3",children:[(0,s.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase",children:"Input"}),(0,s.jsx)("pre",{className:`text-xs overflow-auto max-h-96 ${t?"":"max-h-40 overflow-hidden"}`,children:(0,s.jsx)("code",{children:t?n:n.slice(0,500)+(n.length>500?"\n... (truncated)":"")})})]}),(0,s.jsxs)(m.Zp,{className:"p-3",children:[(0,s.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase",children:"Output"}),null==e.output?(0,s.jsx)("p",{className:"text-xs text-yellow-600",children:"No output captured for this event"}):(0,s.jsx)("pre",{className:`text-xs overflow-auto max-h-96 ${t?"":"max-h-40 overflow-hidden"}`,children:(0,s.jsx)("code",{children:t?l:l.slice(0,500)+(l.length>500?"\n... (truncated)":"")})})]})]})]})}function p({event:e}){let{t}=(0,d.Bd)();if(!e)return(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:t("events.selectEvent")});if("tool_use"===e.kind&&(e.toolName||e.mcpToolName))return(0,s.jsx)(x,{event:e});let r=e.data??{};return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold",children:t("events.eventDetail")}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.kind")}),(0,s.jsx)("div",{className:"text-sm font-medium",children:e.kind})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.step")}),(0,s.jsx)("div",{className:"text-sm font-mono",children:e.stepId})]}),null!=e.duration&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.duration")}),(0,s.jsxs)("div",{className:"text-sm",children:[e.duration,"ms"]})]}),null!=r.inputTokens&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.tokens")}),(0,s.jsx)("div",{className:"text-sm",children:t("events.tokensInOut",{input:r.inputTokens,output:r.outputTokens})})]}),null!=r.prompt&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.prompt")}),(0,s.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:r.prompt})]}),null!=r.response&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.response")}),(0,s.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:r.response})]}),null!=r.stdout&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.stdout")}),(0,s.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:r.stdout})]}),null!=r.stderr&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.stderr")}),(0,s.jsx)("pre",{className:"text-xs bg-red-50 dark:bg-red-950 p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:r.stderr})]}),null!=r.errorMessage&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t("events.error")}),(0,s.jsx)("pre",{className:"text-xs bg-red-50 dark:bg-red-950 p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:r.errorMessage})]}),e.metadata?.truncated!=null&&(0,s.jsx)("div",{className:"text-xs text-yellow-500",children:t("events.truncated")})]})]})}var h=r(6026),f=r(8490),v=r(14796);let g={context_insufficient:[{action:"Supplement task context",priority:"high"},{action:"Inspect graph roots and related files",priority:"medium"}],knowledge_missing:[{action:"Sync the required knowledge source",priority:"high"},{action:"Add or broaden documentation scopes",priority:"medium"}],workflow_design_issue:[{action:"Correct the failing step contract",priority:"high"},{action:"Review workflow dependencies",priority:"medium"}],tool_error:[{action:"Inspect the tool error and connectivity",priority:"high"},{action:"Retry with a validated input",priority:"medium"}],agent_override:[{action:"Review the rejected change and user feedback",priority:"high"}],unknown:[{action:"Inspect the failed step evidence",priority:"high"}]};function j({failureCategory:e,failureReason:t,suggestedActions:r}){let{t:n}=(0,d.Bd)();return e?(0,s.jsxs)(m.Zp,{children:[(0,s.jsxs)(m.aR,{children:[(0,s.jsx)("div",{className:"flex items-center gap-2",children:(0,s.jsx)(h.E,{className:{context_insufficient:"bg-yellow-500",knowledge_missing:"bg-orange-500",workflow_design_issue:"bg-purple-500",tool_error:"bg-red-500",agent_override:"bg-gray-500",unknown:"bg-gray-500"}[e]??"bg-gray-500",children:n(`runDetail.category.${e}`)})}),(0,s.jsx)(m.ZB,{className:"text-sm",children:n("runDetail.failureReason")})]}),(0,s.jsxs)(m.Wu,{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:t}),r&&r.length>0&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(f.A,{className:"h-4 w-4"}),n("runDetail.suggestedActions")]}),(0,s.jsx)("ul",{className:"space-y-1",children:r.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)(v.A,{className:"h-3 w-3 text-muted-foreground"}),(0,s.jsx)("span",{children:e.action}),(0,s.jsx)(h.E,{variant:"outline",className:"text-xs",children:e.priority})]},t))})]})]})]}):null}var N=r(56050);function b({runId:e,onBack:t}){let r=(0,n.useRouter)(),{t:i}=(0,d.Bd)(),{data:c}=(0,l.Dr)(e),{data:m}=(0,l.wV)(e),[x,h]=(0,a.useState)(null),f=(c??[]).map(e=>{let t=e.eventId??e.id??"",r=(e.kind??e.toolType)||"tool_use",s={toolName:e.toolName??e.mcpToolName,...e.input??{}};return{id:t,stepId:e.executionId??t,kind:r,timestamp:e.timestamp??0,duration:e.duration,data:s,metadata:{isMcpTool:e.isMcpTool,mcpEnforced:e.mcpEnforced,mcpFallback:e.mcpFallback,blocked:e.blocked,blockReason:e.blockReason}}}),v=[...new Set(f.map(e=>e.stepId))],y=m??{},w=[...c??[]].reverse().find(e=>"string"==typeof e.failureCategory),k=w?.failureCategory;return(0,s.jsxs)("div",{className:"flex flex-col h-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b border-border",children:[(0,s.jsx)("button",{onClick:t??(()=>r.push("/runs")),className:"p-1 rounded hover:bg-accent",title:i("runs.title"),children:(0,s.jsx)(N.A,{className:"h-4 w-4"})}),(0,s.jsx)("h2",{className:"text-lg font-bold",children:i("runDetail.title","Session Detail")}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:e}),null!=y.totalToolCalls&&(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[String(y.totalToolCalls)," tools \xb7 ",String(y.mcpToolCalls)," MCP"]})]}),(0,s.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,s.jsx)("div",{className:"w-48 border-r border-border overflow-y-auto p-3",children:(0,s.jsx)(o,{steps:v,events:f})}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto p-3",children:(0,s.jsx)(u,{events:f,onSelect:e=>h(e),selectedId:x?.id})}),(0,s.jsxs)("div",{className:"w-80 border-l border-border overflow-y-auto p-3",children:[k&&(0,s.jsx)("div",{className:"mb-3",children:(0,s.jsx)(j,{failureCategory:k,failureReason:String(w?.error??"Workflow step failed"),suggestedActions:g[k]??g.unknown})}),(0,s.jsx)(p,{event:x})]})]})]})}function y(){let e=(0,n.usePathname)().split("/").filter(Boolean).at(-1)??"";return(0,s.jsx)(b,{runId:decodeURIComponent(e)})}},64318:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var s=r(9917),n=r(2809);function a(...e){return(0,n.QP)((0,s.$)(e))}},79748:(e,t,r)=>{"use strict";var s=r(79796);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},81007:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var s=r(7620);let n=(...e)=>e.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ");var a={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 l=(0,s.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:d="",children:o,iconNode:i,...c},u)=>(0,s.createElement)("svg",{ref:u,...a,width:t,height:t,stroke:e,strokeWidth:l?24*Number(r)/Number(t):r,className:n("lucide",d),...c},[...i.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(o)?o:[o]])),d=(e,t)=>{let r=(0,s.forwardRef)(({className:r,...a},d)=>(0,s.createElement)(l,{ref:d,iconNode:t,className:n(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...a}));return r.displayName=`${e}`,r}},89531:(e,t,r)=>{"use strict";r.d(t,{Wu:()=>i,ZB:()=>o,Zp:()=>l,aR:()=>d});var s=r(54568),n=r(7620),a=r(64318);let l=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("rounded-lg border border-border bg-card text-card-foreground",e),...t}));l.displayName="Card";let d=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("flex flex-col space-y-1.5 p-4",e),...t}));d.displayName="CardHeader";let o=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("h3",{ref:r,className:(0,a.cn)("text-sm font-semibold leading-none tracking-tight",e),...t}));o.displayName="CardTitle";let i=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("p-4 pt-0",e),...t}));i.displayName="CardContent"},91397:(e,t,r)=>{"use strict";r.d(t,{F:()=>l});var s=r(9917);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.$,l=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:d}=t,o=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],s=null==d?void 0:d[e];if(null===t)return null;let a=n(t)||n(s);return l[e][a]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return a(e,o,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...d,...i}[t]):({...d,...i})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},e=>{e.O(0,[820,567,993,914,587,968,358],()=>e(e.s=33096)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[529],{638:(e,t,r)=>{"use strict";r.d(t,{C:()=>l});var n=r(19851);let s="devflow-project-root",o="devflow-active-project-root";function a(e){try{return localStorage.getItem(e)}catch{return null}}function u(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}}let l=(0,n.vt)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:a(s),activeProjectRoot:a(o),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{u(s,t),e({projectRoot:t})},setActiveProjectRoot:t=>{u(o,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},3140:(e,t,r)=>{"use strict";e.exports=r(48558)},19851:(e,t,r)=>{"use strict";r.d(t,{vt:()=>c});var n=r(27650),s=r(7620),o=r(3140);let{useDebugValue:a}=s,{useSyncExternalStoreWithSelector:u}=o,l=!1,i=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?(0,n.y)(e):e,r=(e,r)=>(function(e,t=e=>e,r){r&&!l&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),l=!0);let n=u(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return a(n),n})(t,e,r);return Object.assign(r,t),r},c=e=>e?i(e):i},27650:(e,t,r)=>{"use strict";r.d(t,{y:()=>s});let n=e=>{let t,r=new Set,n=(e,n)=>{let s="function"==typeof e?e(t):e;if(!Object.is(s,t)){let e=t;t=(null!=n?n:"object"!=typeof s||null===s)?s:Object.assign({},t,s),r.forEach(r=>r(t,e))}},s=()=>t,o={setState:n,getState:s,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,s,o);return o},s=e=>e?n(e):n},48558:(e,t,r)=>{"use strict";var n=r(7620),s=r(16574),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=s.useSyncExternalStore,u=n.useRef,l=n.useEffect,i=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,s){var d=u(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=a(e,(d=i(function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==s&&f.hasValue){var t=f.value;if(s(t,e))return u=t}return u=e}if(t=u,o(a,e))return t;var r=n(e);return void 0!==s&&s(t,r)?(a=e,t):(a=e,u=r)}var a,u,l=!1,i=void 0===r?null:r;return[function(){return e(t())},null===i?void 0:function(){return e(i())}]},[t,r,n,s]))[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},64719:(e,t,r)=>{Promise.resolve().then(r.bind(r,67741))},67741:(e,t,r)=>{"use strict";r.d(t,{RunsView:()=>i});var n=r(54568),s=r(48820),o=r(638),a=r(97787),u=r(64567);let l={running:"text-yellow-500",completed:"text-green-500",failed:"text-red-400"};function i(){let{t:e}=(0,u.Bd)(),{data:t,isLoading:r}=function(e=20,t=0){let r=(0,o.C)(e=>e.activeProjectRoot??e.projectRoot);return(0,s.I)({queryKey:["project",r,"runs",{limit:e,offset:t}],queryFn:()=>((e,t=20,r=0)=>(0,a.E)(`/runs?limit=${t}&offset=${r}`,{projectRoot:e}))(r,e,t),enabled:!!r})}(50,0),i=t??[];return(0,n.jsxs)("div",{className:"p-6 space-y-4",children:[(0,n.jsx)("h2",{className:"text-2xl font-bold",children:e("runs.title")}),r?(0,n.jsx)("p",{className:"text-muted-foreground",children:e("runs.loading")}):0===i.length?(0,n.jsx)("p",{className:"text-muted-foreground",children:e("runs.empty")}):(0,n.jsx)("div",{className:"space-y-2",children:i.map(t=>(0,n.jsxs)("a",{href:`/runs/${encodeURIComponent(t.id)}`,className:"flex items-center gap-4 p-3 rounded bg-secondary hover:bg-accent cursor-pointer",children:[(0,n.jsx)("span",{className:"font-mono text-xs truncate max-w-[200px]",children:t.label||t.id}),(0,n.jsx)("span",{className:`px-1.5 py-0.5 rounded text-xs ${l[t.status]??"text-muted-foreground"}`,children:e(`runs.${t.status}`,{defaultValue:t.status})}),(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t.totalToolCalls??0," tools"]}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:t.durationMs&&t.durationMs>0?`${(t.durationMs/1e3).toFixed(1)}s`:"--"}),(0,n.jsx)("span",{className:"ml-auto text-xs text-muted-foreground",children:new Date(t.startedAt).toLocaleString()})]},t.id))})]})}},97787:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var n=r(98368);class s extends Error{status;details;constructor(e,t,r){super(t),this.status=e,this.details=r,this.name="ApiError"}}async function o(e,t={}){let{projectRoot:r,headers:a,...u}=t,l={"Content-Type":"application/json",...(0,n.PK)(),...a};r&&(l["x-devflow-project"]=r);let i=await fetch(`${(0,n.Ez)()}/api${e}`,{...u,headers:l,credentials:"same-origin"}),c=await i.text(),d=null;try{d=c?JSON.parse(c):null}catch{d=c}if(!i.ok){let e="object"==typeof d&&d&&"message"in d?String(d.message):`API ${i.status}`;throw new s(i.status,e,d)}return d&&"object"==typeof d&&"data"in d?d.data:d}},98368:(e,t,r)=>{"use strict";r.d(t,{Ez:()=>a,PK:()=>u});var n=r(84561);let s=n.env.NEXT_PUBLIC_DEVFLOW_API_KEY?.trim()??"",o=n.env.NEXT_PUBLIC_DEVFLOW_API_URL?.trim()??"";function a(){return o?o.replace(/\/$/,""):window.location.origin}function u(){let e=function(){if(s)return s;try{return localStorage.getItem("devflow-api-key")?.trim()||null}catch{return null}}();return e?{"x-api-key":e}:{}}}},e=>{e.O(0,[820,567,587,968,358],()=>e(e.s=64719)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404],{6407:(t,e,s)=>{"use strict";s.d(e,{$:()=>o,s:()=>n});var i=s(46676),r=s(19773),a=s(85153),n=class extends r.k{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,a.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:r})}let a=await this.#i.start();return await this.#s.config.onSuccess?.(a,t,this.state.context,this,s),await this.options.onSuccess?.(a,t,this.state.context,s),await this.#s.config.onSettled?.(a,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(a,null,t,this.state.context,s),this.#r({type:"success",data:a}),a}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#r({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},8008:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});let i=(0,s(81007).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},19053:(t,e,s)=>{"use strict";s.d(e,{n:()=>l});var i=s(7620),r=s(6407),a=s(46676),n=s(18517),o=s(91961),c=class extends n.Q{#t;#a=void 0;#n;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#c()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.EN)(e.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#c(),this.#u(t)}getCurrentResult(){return this.#a}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#c(),this.#u()}mutate(t,e){return this.#o=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#c(){let t=this.#n?.state??(0,r.$)();this.#a={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#u(t){a.jG.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#a.variables,s=this.#a.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#a)})})}},u=s(68728);function l(t,e){let s=(0,u.jE)(e),[r]=i.useState(()=>new c(s,t));i.useEffect(()=>{r.setOptions(t)},[r,t]);let n=i.useSyncExternalStore(i.useCallback(t=>r.subscribe(a.jG.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=i.useCallback((t,e)=>{r.mutate(t,e).catch(o.lQ)},[r]);if(n.error&&(0,o.GU)(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:l,mutateAsync:n.mutate}}},24769:(t,e,s)=>{Promise.resolve().then(s.bind(s,28731))},28731:(t,e,s)=>{"use strict";s.d(e,{TimelineView:()=>d});var i=s(54568),r=s(7620),a=s(86914);let n={cli:"#3b82f6",mcp:"#22c55e",dashboard:"#a855f7"};function o({runs:t,date:e}){let s=new Date(e+"T00:00:00Z").getTime(),r=Math.max(28*t.length+40,120),a=[0,4,8,12,16,20,24].map(t=>({hour:t,x:40+t/24*720,label:`${String(t).padStart(2,"0")}:00`}));return(0,i.jsx)("div",{className:"overflow-x-auto",children:(0,i.jsxs)("svg",{viewBox:`0 0 800 ${r}`,className:"w-full",children:[a.map(t=>(0,i.jsxs)("g",{children:[(0,i.jsx)("line",{x1:t.x,y1:0,x2:t.x,y2:r,stroke:"#e5e7eb",strokeWidth:.5}),(0,i.jsx)("text",{x:t.x,y:12,textAnchor:"middle",fontSize:"9",fill:"#9ca3af",children:t.label})]},t.hour)),t.map((t,e)=>{let r=40+(t.startedAt-s)/864e5*720,a=Math.max(40,40*(t.totalToolCalls||1)),o=40+28*e,c=n[t.source]??"#6b7280",u="completed"===t.status?.9:"failed"===t.status?.6:.4;return(0,i.jsxs)("g",{children:[(0,i.jsx)("rect",{x:r,y:o,width:a,height:20,rx:3,fill:c,opacity:u}),(0,i.jsx)("text",{x:r+a+4,y:o+13,fontSize:"10",fill:"#6b7280",children:new Date(t.startedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),a>60&&(0,i.jsxs)("text",{x:r+4,y:o+13,fontSize:"9",fill:"white",fontWeight:"500",children:[t.agent," \xb7 ",t.source]})]},t.id)})]})})}var c=s(8008),u=s(76265),l=s(64567),h=s(32715);function d(){(0,h.v)("timeline",[["telemetry-runs"],["telemetry-stats"]]);let{t}=(0,l.Bd)(),e=new Date().toISOString().slice(0,10),[s,n]=(0,r.useState)(e),{data:d}=(0,a.zb)(100,0),{data:m}=(0,a.C9)(1),p=new Date(s+"T00:00:00Z").getTime(),f=p+864e5,x=(d??[]).filter(t=>t.startedAt>=p&&t.startedAt<f).slice(0,100),v=t=>{let e=new Date(s+"T00:00:00Z");e.setDate(e.getDate()+t),n(e.toISOString().slice(0,10))};return(0,i.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold",children:t("timeline.title")}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("button",{onClick:()=>v(-1),className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(c.A,{className:"h-4 w-4"})}),(0,i.jsx)("span",{className:"text-sm font-medium",children:s}),(0,i.jsx)("button",{onClick:()=>v(1),className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(u.A,{className:"h-4 w-4"})})]})]}),(0,i.jsx)(o,{runs:x,date:s}),m&&(0,i.jsxs)("div",{className:"grid grid-cols-3 gap-3 text-sm",children:[(0,i.jsxs)("div",{className:"bg-secondary rounded-lg p-3",children:[(0,i.jsx)("div",{className:"text-muted-foreground text-xs",children:t("timeline.runs")}),(0,i.jsxs)("div",{className:"font-bold text-lg",children:[m.summary.completedRuns," ",t("timeline.completed")," / ",m.summary.failedRuns," ",t("timeline.failed")]})]}),(0,i.jsxs)("div",{className:"bg-secondary rounded-lg p-3",children:[(0,i.jsx)("div",{className:"text-muted-foreground text-xs",children:t("timeline.toolUses")}),(0,i.jsx)("div",{className:"font-bold text-lg",children:m.summary.totalToolUses})]}),(0,i.jsxs)("div",{className:"bg-secondary rounded-lg p-3",children:[(0,i.jsx)("div",{className:"text-muted-foreground text-xs",children:t("timeline.avgDuration")}),(0,i.jsxs)("div",{className:"font-bold text-lg",children:[(m.summary.avgRunDuration/1e3).toFixed(1),"s"]})]})]})]})}},32715:(t,e,s)=>{"use strict";s.d(e,{h:()=>o,v:()=>c});var i=s(7620),r=s(68728),a=s(98368);async function n(t,e,s){let i=await fetch(`${(0,a.Ez)()}/api${t}`,{headers:(0,a.PK)(),credentials:"same-origin",signal:e});if(!i.ok||!i.body)throw Error(`SSE ${i.status}`);let r=i.body.getReader(),n=new TextDecoder,o="";for(;!e.aborted;){let{value:t,done:e}=await r.read();if(e)break;let i=(o+=n.decode(t,{stream:!0})).split("\n\n");for(let t of(o=i.pop()??"",i)){let e="message",i=[];for(let s of t.split("\n"))s.startsWith("event:")&&(e=s.slice(6).trim()),s.startsWith("data:")&&i.push(s.slice(5).trim());if(0!==i.length)try{s({type:e,data:JSON.parse(i.join("\n"))})}catch{}}}}function o(t){let[e,s]=(0,i.useState)([]);return(0,i.useEffect)(()=>{if(!t)return;let e=new AbortController;return n(`/workflows/runs/${encodeURIComponent(t)}/stream`,e.signal,t=>s(e=>[...e,t])).catch(()=>void 0),()=>e.abort()},[t]),{events:e,clear:(0,i.useCallback)(()=>s([]),[])}}function c(t,e){let s=(0,r.jE)(),a=JSON.stringify(e);(0,i.useEffect)(()=>{let e=new AbortController,i=JSON.parse(a);return n(`/live/stream?channels=${encodeURIComponent(t)}`,e.signal,e=>{if("refresh"===e.type&&e.data.channel===t)for(let t of i)s.invalidateQueries({queryKey:t})}).catch(()=>void 0),()=>e.abort()},[t,s,a])}},76265:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});let i=(0,s(81007).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},81007:(t,e,s)=>{"use strict";s.d(e,{A:()=>o});var i=s(7620);let r=(...t)=>t.filter((t,e,s)=>!!t&&s.indexOf(t)===e).join(" ");var a={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,i.forwardRef)(({color:t="currentColor",size:e=24,strokeWidth:s=2,absoluteStrokeWidth:n,className:o="",children:c,iconNode:u,...l},h)=>(0,i.createElement)("svg",{ref:h,...a,width:e,height:e,stroke:t,strokeWidth:n?24*Number(s)/Number(e):s,className:r("lucide",o),...l},[...u.map(([t,e])=>(0,i.createElement)(t,e)),...Array.isArray(c)?c:[c]])),o=(t,e)=>{let s=(0,i.forwardRef)(({className:s,...a},o)=>(0,i.createElement)(n,{ref:o,iconNode:e,className:r(`lucide-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,s),...a}));return s.displayName=`${t}`,s}}},t=>{t.O(0,[820,567,914,587,968,358],()=>t(t.s=24769)),_N_E=t.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404],{6407:(t,e,s)=>{"use strict";s.d(e,{$:()=>o,s:()=>n});var i=s(46676),r=s(19773),a=s(85153),n=class extends r.k{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,a.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:r})}let a=await this.#i.start();return await this.#s.config.onSuccess?.(a,t,this.state.context,this,s),await this.options.onSuccess?.(a,t,this.state.context,s),await this.#s.config.onSettled?.(a,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(a,null,t,this.state.context,s),this.#r({type:"success",data:a}),a}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#r({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},8008:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});let i=(0,s(81007).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},19053:(t,e,s)=>{"use strict";s.d(e,{n:()=>l});var i=s(7620),r=s(6407),a=s(46676),n=s(18517),o=s(91961),u=class extends n.Q{#t;#a=void 0;#n;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.EN)(e.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#c(t)}getCurrentResult(){return this.#a}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#u(),this.#c()}mutate(t,e){return this.#o=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#u(){let t=this.#n?.state??(0,r.$)();this.#a={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#c(t){a.jG.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#a.variables,s=this.#a.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#a)})})}},c=s(68728);function l(t,e){let s=(0,c.jE)(e),[r]=i.useState(()=>new u(s,t));i.useEffect(()=>{r.setOptions(t)},[r,t]);let n=i.useSyncExternalStore(i.useCallback(t=>r.subscribe(a.jG.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=i.useCallback((t,e)=>{r.mutate(t,e).catch(o.lQ)},[r]);if(n.error&&(0,o.GU)(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:l,mutateAsync:n.mutate}}},24769:(t,e,s)=>{Promise.resolve().then(s.bind(s,28731))},28731:(t,e,s)=>{"use strict";s.d(e,{TimelineView:()=>d});var i=s(54568),r=s(7620),a=s(86914);let n={cli:"#3b82f6",mcp:"#22c55e",dashboard:"#a855f7"};function o({runs:t,date:e}){let s=new Date(e+"T00:00:00Z").getTime(),r=Math.max(28*t.length+40,120),a=[0,4,8,12,16,20,24].map(t=>({hour:t,x:40+t/24*720,label:`${String(t).padStart(2,"0")}:00`}));return(0,i.jsx)("div",{className:"overflow-x-auto",children:(0,i.jsxs)("svg",{viewBox:`0 0 800 ${r}`,className:"w-full",children:[a.map(t=>(0,i.jsxs)("g",{children:[(0,i.jsx)("line",{x1:t.x,y1:0,x2:t.x,y2:r,stroke:"#e5e7eb",strokeWidth:.5}),(0,i.jsx)("text",{x:t.x,y:12,textAnchor:"middle",fontSize:"9",fill:"#9ca3af",children:t.label})]},t.hour)),t.map((t,e)=>{let r=40+(t.startedAt-s)/864e5*720,a=Math.max(40,40*(t.totalToolCalls||1)),o=40+28*e,u=n[t.source]??"#6b7280",c="completed"===t.status?.9:"failed"===t.status?.6:.4;return(0,i.jsxs)("g",{children:[(0,i.jsx)("rect",{x:r,y:o,width:a,height:20,rx:3,fill:u,opacity:c}),(0,i.jsx)("text",{x:r+a+4,y:o+13,fontSize:"10",fill:"#6b7280",children:new Date(t.startedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),a>60&&(0,i.jsxs)("text",{x:r+4,y:o+13,fontSize:"9",fill:"white",fontWeight:"500",children:[t.agent," \xb7 ",t.source]})]},t.id)})]})})}var u=s(8008),c=s(76265),l=s(64567),h=s(32715);function d(){(0,h.v)("timeline",[["telemetry-runs"],["telemetry-stats"]]);let{t}=(0,l.Bd)(),e=new Date().toISOString().slice(0,10),[s,n]=(0,r.useState)(e),{data:d}=(0,a.zb)(100,0),{data:m}=(0,a.C9)(1),p=new Date(s+"T00:00:00Z").getTime(),f=p+864e5,x=(d??[]).filter(t=>t.startedAt>=p&&t.startedAt<f).slice(0,100),v=t=>{let e=new Date(s+"T00:00:00Z");e.setDate(e.getDate()+t),n(e.toISOString().slice(0,10))};return(0,i.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold",children:t("timeline.title")}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("button",{onClick:()=>v(-1),className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(u.A,{className:"h-4 w-4"})}),(0,i.jsx)("span",{className:"text-sm font-medium",children:s}),(0,i.jsx)("button",{onClick:()=>v(1),className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(c.A,{className:"h-4 w-4"})})]})]}),(0,i.jsx)(o,{runs:x,date:s}),m&&(0,i.jsxs)("div",{className:"grid grid-cols-3 gap-3 text-sm",children:[(0,i.jsxs)("div",{className:"bg-secondary rounded-lg p-3",children:[(0,i.jsx)("div",{className:"text-muted-foreground text-xs",children:t("timeline.runs")}),(0,i.jsxs)("div",{className:"font-bold text-lg",children:[m.summary.completedRuns," ",t("timeline.completed")," / ",m.summary.failedRuns," ",t("timeline.failed")]})]}),(0,i.jsxs)("div",{className:"bg-secondary rounded-lg p-3",children:[(0,i.jsx)("div",{className:"text-muted-foreground text-xs",children:t("timeline.toolUses")}),(0,i.jsx)("div",{className:"font-bold text-lg",children:m.summary.totalToolUses})]}),(0,i.jsxs)("div",{className:"bg-secondary rounded-lg p-3",children:[(0,i.jsx)("div",{className:"text-muted-foreground text-xs",children:t("timeline.avgDuration")}),(0,i.jsxs)("div",{className:"font-bold text-lg",children:[(m.summary.avgRunDuration/1e3).toFixed(1),"s"]})]})]})]})}},32715:(t,e,s)=>{"use strict";s.d(e,{h:()=>o,v:()=>u});var i=s(7620),r=s(68728),a=s(98368);async function n(t,e,s,i){let r=await fetch(`${(0,a.Ez)()}/api${t}`,{headers:{...(0,a.PK)(),...i?{"Last-Event-ID":String(i)}:{}},credentials:"same-origin",signal:e});if(!r.ok||!r.body)throw Error(`SSE ${r.status}`);let n=r.body.getReader(),o=new TextDecoder,u="";for(;!e.aborted;){let{value:t,done:e}=await n.read();if(e)break;let i=(u+=o.decode(t,{stream:!0})).split("\n\n");for(let t of(u=i.pop()??"",i)){let e="message",i=[];for(let s of t.split("\n"))s.startsWith("event:")&&(e=s.slice(6).trim()),s.startsWith("data:")&&i.push(s.slice(5).trim());if(0!==i.length)try{s({type:e,data:JSON.parse(i.join("\n"))})}catch{}}}}function o(t){let[e,s]=(0,i.useState)([]),r=(0,i.useRef)(0);return(0,i.useEffect)(()=>{if(!t)return;let e=new AbortController;return n(`/workflows/runs/${encodeURIComponent(t)}/stream`,e.signal,t=>{let e="number"==typeof t.data.sequence?t.data.sequence:void 0;e&&e<=r.current||(e&&(r.current=e),s(e=>[...e,t]))},r.current).catch(()=>void 0),()=>e.abort()},[t]),{events:e,clear:(0,i.useCallback)(()=>s([]),[])}}function u(t,e){let s=(0,r.jE)(),a=JSON.stringify(e);(0,i.useEffect)(()=>{let e=new AbortController,i=JSON.parse(a);return n(`/live/stream?channels=${encodeURIComponent(t)}`,e.signal,e=>{if("refresh"===e.type&&e.data.channel===t)for(let t of i)s.invalidateQueries({queryKey:t})}).catch(()=>void 0),()=>e.abort()},[t,s,a])}},76265:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});let i=(0,s(81007).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},81007:(t,e,s)=>{"use strict";s.d(e,{A:()=>o});var i=s(7620);let r=(...t)=>t.filter((t,e,s)=>!!t&&s.indexOf(t)===e).join(" ");var a={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,i.forwardRef)(({color:t="currentColor",size:e=24,strokeWidth:s=2,absoluteStrokeWidth:n,className:o="",children:u,iconNode:c,...l},h)=>(0,i.createElement)("svg",{ref:h,...a,width:e,height:e,stroke:t,strokeWidth:n?24*Number(s)/Number(e):s,className:r("lucide",o),...l},[...c.map(([t,e])=>(0,i.createElement)(t,e)),...Array.isArray(u)?u:[u]])),o=(t,e)=>{let s=(0,i.forwardRef)(({className:s,...a},o)=>(0,i.createElement)(n,{ref:o,iconNode:e,className:r(`lucide-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,s),...a}));return s.displayName=`${t}`,s}}},t=>{t.O(0,[820,567,914,587,968,358],()=>t(t.s=24769)),_N_E=t.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{6026:(e,t,s)=>{"use strict";s.d(t,{E:()=>l});var r=s(54568);s(7620);var a=s(64318);let n=(0,s(91397).F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)(n({variant:t}),e),...s})}},14474:(e,t,s)=>{Promise.resolve().then(s.bind(s,18723))},18723:(e,t,s)=>{"use strict";s.d(t,{ToolMetricsView:()=>c});var r=s(54568),a=s(7620),n=s(89531),l=s(6026),o=s(86914),d=s(32715);function c(){(0,d.v)("tool-metrics",[["tool-metrics-summary"]]);let[e,t]=(0,a.useState)(7),{data:s=[],isLoading:c}=(0,o.he)(e);return c?(0,r.jsx)("div",{className:"p-4 text-muted-foreground",children:"Loading tool metrics..."}):(0,r.jsxs)("div",{className:"p-6 space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Tool Metrics"}),(0,r.jsxs)("select",{value:e,onChange:e=>t(Number(e.target.value)),className:"border rounded px-2 py-1 text-sm bg-background",children:[(0,r.jsx)("option",{value:1,children:"Last 24h"}),(0,r.jsx)("option",{value:7,children:"Last 7 days"}),(0,r.jsx)("option",{value:30,children:"Last 30 days"})]})]}),0===s.length?(0,r.jsx)("p",{className:"text-muted-foreground text-sm",children:"No tool metrics yet. Start a Claude Code session to collect data."}):(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(e=>(0,r.jsxs)(n.Zp,{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"font-mono text-sm font-medium",children:e.toolName}),(0,r.jsxs)(l.E,{variant:e.callCount>10?"default":"secondary",children:[e.callCount," calls"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:"Success"}),(0,r.jsxs)("p",{className:"font-semibold",style:{color:e.successRate>=90?"#22c55e":e.successRate>=70?"#f59e0b":"#ef4444"},children:[e.successRate,"%"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:"Empty"}),(0,r.jsxs)("p",{className:"font-semibold",style:{color:e.emptyRate<=10?"#22c55e":e.emptyRate<=30?"#f59e0b":"#ef4444"},children:[e.emptyRate,"%"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:"Avg Results"}),(0,r.jsx)("p",{className:"font-semibold",children:e.avgResults})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:"Avg Latency"}),(0,r.jsxs)("p",{className:"font-semibold",children:[e.avgLatency,"ms"]})]})]})]},e.toolName))})]})}},32715:(e,t,s)=>{"use strict";s.d(t,{h:()=>o,v:()=>d});var r=s(7620),a=s(68728),n=s(98368);async function l(e,t,s,r){let a=await fetch(`${(0,n.Ez)()}/api${e}`,{headers:{...(0,n.PK)(),...r?{"Last-Event-ID":String(r)}:{}},credentials:"same-origin",signal:t});if(!a.ok||!a.body)throw Error(`SSE ${a.status}`);let l=a.body.getReader(),o=new TextDecoder,d="";for(;!t.aborted;){let{value:e,done:t}=await l.read();if(t)break;let r=(d+=o.decode(e,{stream:!0})).split("\n\n");for(let e of(d=r.pop()??"",r)){let t="message",r=[];for(let s of e.split("\n"))s.startsWith("event:")&&(t=s.slice(6).trim()),s.startsWith("data:")&&r.push(s.slice(5).trim());if(0!==r.length)try{s({type:t,data:JSON.parse(r.join("\n"))})}catch{}}}}function o(e){let[t,s]=(0,r.useState)([]),a=(0,r.useRef)(0);return(0,r.useEffect)(()=>{if(!e)return;let t=new AbortController;return l(`/workflows/runs/${encodeURIComponent(e)}/stream`,t.signal,e=>{let t="number"==typeof e.data.sequence?e.data.sequence:void 0;t&&t<=a.current||(t&&(a.current=t),s(t=>[...t,e]))},a.current).catch(()=>void 0),()=>t.abort()},[e]),{events:t,clear:(0,r.useCallback)(()=>s([]),[])}}function d(e,t){let s=(0,a.jE)(),n=JSON.stringify(t);(0,r.useEffect)(()=>{let t=new AbortController,r=JSON.parse(n);return l(`/live/stream?channels=${encodeURIComponent(e)}`,t.signal,t=>{if("refresh"===t.type&&t.data.channel===e)for(let e of r)s.invalidateQueries({queryKey:e})}).catch(()=>void 0),()=>t.abort()},[e,s,n])}},64318:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var r=s(9917),a=s(2809);function n(...e){return(0,a.QP)((0,r.$)(e))}},89531:(e,t,s)=>{"use strict";s.d(t,{Wu:()=>c,ZB:()=>d,Zp:()=>l,aR:()=>o});var r=s(54568),a=s(7620),n=s(64318);let l=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("rounded-lg border border-border bg-card text-card-foreground",e),...t}));l.displayName="Card";let o=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-4",e),...t}));o.displayName="CardHeader";let d=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("h3",{ref:s,className:(0,n.cn)("text-sm font-semibold leading-none tracking-tight",e),...t}));d.displayName="CardTitle";let c=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("p-4 pt-0",e),...t}));c.displayName="CardContent"},91397:(e,t,s)=>{"use strict";s.d(t,{F:()=>l});var r=s(9917);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=r.$,l=(e,t)=>s=>{var r;if((null==t?void 0:t.variants)==null)return n(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:l,defaultVariants:o}=t,d=Object.keys(l).map(e=>{let t=null==s?void 0:s[e],r=null==o?void 0:o[e];if(null===t)return null;let n=a(t)||a(r);return l[e][n]}),c=s&&Object.entries(s).reduce((e,t)=>{let[s,r]=t;return void 0===r||(e[s]=r),e},{});return n(e,d,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:s,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,s]=e;return Array.isArray(s)?s.includes({...o,...c}[t]):({...o,...c})[t]===s})?[...e,s,r]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}}},e=>{e.O(0,[820,993,914,587,968,358],()=>e(e.s=14474)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[143],{28465:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var s=r(54568),n=r(7620),a=r(64318);let l=(0,r(91397).F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),o=n.forwardRef(({className:e,variant:t,size:r,...n},o)=>(0,s.jsx)("button",{className:(0,a.cn)(l({variant:t,size:r,className:e})),ref:o,...n}));o.displayName="Button"},32715:(e,t,r)=>{"use strict";r.d(t,{h:()=>o,v:()=>i});var s=r(7620),n=r(68728),a=r(98368);async function l(e,t,r,s){let n=await fetch(`${(0,a.Ez)()}/api${e}`,{headers:{...(0,a.PK)(),...s?{"Last-Event-ID":String(s)}:{}},credentials:"same-origin",signal:t});if(!n.ok||!n.body)throw Error(`SSE ${n.status}`);let l=n.body.getReader(),o=new TextDecoder,i="";for(;!t.aborted;){let{value:e,done:t}=await l.read();if(t)break;let s=(i+=o.decode(e,{stream:!0})).split("\n\n");for(let e of(i=s.pop()??"",s)){let t="message",s=[];for(let r of e.split("\n"))r.startsWith("event:")&&(t=r.slice(6).trim()),r.startsWith("data:")&&s.push(r.slice(5).trim());if(0!==s.length)try{r({type:t,data:JSON.parse(s.join("\n"))})}catch{}}}}function o(e){let[t,r]=(0,s.useState)([]),n=(0,s.useRef)(0);return(0,s.useEffect)(()=>{if(!e)return;let t=new AbortController;return l(`/workflows/runs/${encodeURIComponent(e)}/stream`,t.signal,e=>{let t="number"==typeof e.data.sequence?e.data.sequence:void 0;t&&t<=n.current||(t&&(n.current=t),r(t=>[...t,e]))},n.current).catch(()=>void 0),()=>t.abort()},[e]),{events:t,clear:(0,s.useCallback)(()=>r([]),[])}}function i(e,t){let r=(0,n.jE)(),a=JSON.stringify(t);(0,s.useEffect)(()=>{let t=new AbortController,s=JSON.parse(a);return l(`/live/stream?channels=${encodeURIComponent(e)}`,t.signal,t=>{if("refresh"===t.type&&t.data.channel===e)for(let e of s)r.invalidateQueries({queryKey:e})}).catch(()=>void 0),()=>t.abort()},[e,r,a])}},39173:(e,t,r)=>{"use strict";r.d(t,{WorkflowRuns:()=>c});var s=r(54568),n=r(7620),a=r(86914),l=r(32715),o=r(28465),i=r(89531),d=r(64567);function c(){let{t:e}=(0,d.Bd)(),{data:t}=(0,a.mP)(),{data:r}=(0,a.b_)(),c=(0,a.UL)(),[u,f]=(0,n.useState)(null),{events:h,clear:m}=(0,l.h)(u);return(0,s.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold",children:e("workflows.title")}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)(i.aR,{children:(0,s.jsx)(i.ZB,{children:e("workflows.available")})}),(0,s.jsx)(i.Wu,{children:(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:(t??[]).map(t=>(0,s.jsxs)(o.$,{variant:"outline",size:"sm",onClick:()=>c.mutate({type:t.name},{onSuccess:e=>f(e.runId)}),children:[t.name," (",t.stepCount," ",e("workflows.steps"),")"]},t.name))})})]}),u&&h.length>0&&(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)(i.aR,{children:(0,s.jsxs)(i.ZB,{children:[e("workflows.stream"),": ",u]})}),(0,s.jsxs)(i.Wu,{children:[(0,s.jsx)("div",{className:"space-y-1 max-h-60 overflow-y-auto font-mono text-xs",children:h.map((e,t)=>(0,s.jsxs)("div",{className:"text-muted-foreground",children:["[",e.type,"] ",JSON.stringify(e.data)]},t))}),(0,s.jsx)(o.$,{variant:"ghost",size:"sm",onClick:()=>{f(null),m()},className:"mt-2",children:e("workflows.closeStream")})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)(i.aR,{children:(0,s.jsx)(i.ZB,{children:e("workflows.runHistory")})}),(0,s.jsx)(i.Wu,{children:r&&r.length>0?(0,s.jsxs)("table",{className:"w-full text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-muted-foreground",children:[(0,s.jsx)("th",{children:e("workflows.runId")}),(0,s.jsx)("th",{children:e("overview.status")}),(0,s.jsx)("th",{children:e("workflows.started")})]})}),(0,s.jsx)("tbody",{children:r.slice(0,10).map(e=>(0,s.jsxs)("tr",{className:"border-t border-border",children:[(0,s.jsx)("td",{className:"py-1 font-mono text-xs",children:e.runId}),(0,s.jsx)("td",{children:e.status}),(0,s.jsx)("td",{children:new Date(e.startedAt).toLocaleTimeString()})]},e.runId))})]}):(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e("workflows.noRuns")})})]})]})}},64318:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var s=r(9917),n=r(2809);function a(...e){return(0,n.QP)((0,s.$)(e))}},73145:(e,t,r)=>{Promise.resolve().then(r.bind(r,39173))},89531:(e,t,r)=>{"use strict";r.d(t,{Wu:()=>d,ZB:()=>i,Zp:()=>l,aR:()=>o});var s=r(54568),n=r(7620),a=r(64318);let l=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("rounded-lg border border-border bg-card text-card-foreground",e),...t}));l.displayName="Card";let o=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("flex flex-col space-y-1.5 p-4",e),...t}));o.displayName="CardHeader";let i=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("h3",{ref:r,className:(0,a.cn)("text-sm font-semibold leading-none tracking-tight",e),...t}));i.displayName="CardTitle";let d=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("p-4 pt-0",e),...t}));d.displayName="CardContent"},91397:(e,t,r)=>{"use strict";r.d(t,{F:()=>l});var s=r(9917);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.$,l=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:o}=t,i=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],s=null==o?void 0:o[e];if(null===t)return null;let a=n(t)||n(s);return l[e][a]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return a(e,i,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...d}[t]):({...o,...d})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},e=>{e.O(0,[820,567,993,914,587,968,358],()=>e(e.s=73145)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e,t,r,o,n,a,i,l,d,s={},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={id:e,loaded:!1,exports:{}},o=!0;try{s[e](r,r.exports,c),o=!1}finally{o&&delete u[e]}return r.loaded=!0,r.exports}c.m=s,e=[],c.O=(t,r,o,n)=>{if(r){n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[r,o,n];return}for(var i=1/0,a=0;a<e.length;a++){for(var[r,o,n]=e[a],l=!0,d=0;d<r.length;d++)(!1&n||i>=n)&&Object.keys(c.O).every(e=>c.O[e](r[d]))?r.splice(d--,1):(l=!1,n<i&&(i=n));if(l){e.splice(a--,1);var s=o();void 0!==s&&(t=s)}}return t},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);c.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var i=2&o&&e;"object"==typeof i&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(t=>a[t]=()=>e[t]);return a.default=()=>e,c.d(n,a),n},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce((t,r)=>(c.f[r](e,t),t),[])),c.u=e=>736===e?"static/chunks/736.a061e521ba738792.js":707===e?"static/chunks/707.559b5bb6b367b0d8.js":407===e?"static/chunks/407.105cf348816ce79d.js":"static/chunks/"+(383===e?"6b3bb038":e)+"-"+({73:"0fe34a8ce87c82ea",90:"63c7687fddbb45ce",136:"c55134e877048a37",383:"e03941413841e57b",820:"9606b69ff6f7f9b9",914:"8a8dbb0d7c5f49dd",993:"01834e67bc353d44"})[e]+".js",c.miniCssF=e=>"static/css/e07f2bf4fa519943.css",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},c.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var a,i,l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var s=l[d];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")=="_N_E:"+r){a=s;break}}a||(i=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack","_N_E:"+r),a.src=c.tu(e)),o[e]=[t];var u=(t,r)=>{a.onerror=a.onload=null,clearTimeout(f);var n=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(e=>e(r)),t)return t(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),i&&document.head.appendChild(a)},c.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),c.tu=e=>c.tt().createScriptURL(e),c.p="/_next/",a={68:0},c.f.miniCss=(e,t)=>{if(a[e])t.push(a[e]);else 0!==a[e]&&({159:1})[e]&&t.push(a[e]=new Promise((t,r)=>{var o=c.miniCssF(e),n=c.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var n=r[o],a=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(a===e||a===t))return n}for(var i=document.getElementsByTagName("style"),o=0;o<i.length;o++){var n=i[o],a=n.getAttribute("data-href");if(a===e||a===t)return n}})(o,n))return t();((e,t,r,o)=>{var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.onerror=n.onload=a=>{if(n.onerror=n.onload=null,"load"===a.type)r();else{var i=a&&("load"===a.type?"missing":a.type),l=a&&a.target&&a.target.href||t,d=Error("Loading CSS chunk "+e+" failed.\n("+l+")");d.code="CSS_CHUNK_LOAD_FAILED",d.type=i,d.request=l,n.parentNode.removeChild(n),o(d)}},n.href=t;if("function"==typeof _N_E_STYLE_LOAD){var a=n.href,i=n.onload,l=n.onerror;_N_E_STYLE_LOAD(0===a.indexOf(window.location.origin)?new URL(a).pathname:a).then(function(){i&&i.call(n,{type:"load"})},function(){l&&l.call(n,{})})}else document.head.appendChild(n)})(e,n,t,r)}).then(()=>{a[e]=0},t=>{throw delete a[e],t}))},i={68:0,306:0,159:0},c.f.j=(e,t)=>{var r=c.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(159|306|68)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=c.p+c.u(e),a=Error();c.l(n,t=>{if(c.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},c.O.j=e=>0===i[e],l=(e,t)=>{var r,o,[n,a,l]=t,d=0;if(n.some(e=>0!==i[e])){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(l)var s=l(c)}for(e&&e(t);d<n.length;d++)o=n[d],c.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return c.O(s)},(d=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(l.bind(null,0)),d.push=l.bind(null,d.push.bind(d)),c.nc=void 0})();
@@ -0,0 +1,3 @@
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
+ ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
3
+ */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:240 10% 3.9%;--foreground:0 0% 98%;--card:240 10% 3.9%;--card-foreground:0 0% 98%;--primary:217 91% 60%;--primary-foreground:0 0% 98%;--secondary:240 3.7% 15.9%;--secondary-foreground:0 0% 98%;--muted:240 3.7% 15.9%;--muted-foreground:240 5% 64.9%;--accent:240 3.7% 15.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:240 3.7% 15.9%;--input:240 3.7% 15.9%;--ring:217 91% 60%;--radius:0.5rem}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.icon-button{display:inline-flex;height:2rem;width:2rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:calc(var(--radius) - 2px);color:hsl(var(--muted-foreground));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.icon-button:hover{background-color:hsl(var(--secondary));color:hsl(var(--foreground))}.icon-button:disabled{pointer-events:none;opacity:.4}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2,.top-\[50\%\]{top:50%}.z-50{z-index:50}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.max-h-\[420px\]{max-height:420px}.min-h-0{min-height:0}.min-h-14{min-height:3.5rem}.min-h-24{min-height:6rem}.min-h-36{min-height:9rem}.min-h-9{min-height:2.25rem}.min-h-\[100px\]{min-height:100px}.w-0\.5{width:.125rem}.w-1\.5{width:.375rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[340px\]{width:340px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[680px\]{min-width:680px}.min-w-\[760px\]{min-width:760px}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-44{max-width:11rem}.max-w-56{max-width:14rem}.max-w-6xl{max-width:72rem}.max-w-\[140px\]{max-width:140px}.max-w-\[200px\]{max-width:200px}.max-w-\[40vw\]{max-width:40vw}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.translate-x-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%}.transform,.translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[140px_minmax\(0\2c 1fr\)\]{grid-template-columns:140px minmax(0,1fr)}.grid-cols-\[24px_minmax\(120px\2c 220px\)_1fr\]{grid-template-columns:24px minmax(120px,220px) 1fr}.grid-cols-\[auto_minmax\(0\2c 1fr\)_auto\]{grid-template-columns:auto minmax(0,1fr) auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-y{border-top-width:1px}.border-b,.border-y{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-500\/40{border-color:rgb(245 158 11/.4)}.border-border{border-color:hsl(var(--border))}.border-border\/70{border-color:hsl(var(--border)/.7)}.border-destructive\/30{border-color:hsl(var(--destructive)/.3)}.border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-primary\/30{border-color:hsl(var(--primary)/.3)}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-red-500\/30{border-color:rgb(239 68 68/.3)}.border-transparent{border-color:transparent}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.bg-amber-500\/10{background-color:rgb(245 158 11/.1)}.bg-background{background-color:hsl(var(--background))}.bg-background\/70{background-color:hsl(var(--background)/.7)}.bg-black\/80{background-color:rgb(0 0 0/.8)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-500\/10{background-color:rgb(59 130 246/.1)}.bg-blue-500\/20{background-color:rgb(59 130 246/.2)}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-card\/70{background-color:hsl(var(--card)/.7)}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/5{background-color:hsl(var(--destructive)/.05)}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-500\/10{background-color:rgb(16 185 129/.1)}.bg-foreground{background-color:hsl(var(--foreground))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-500\/20{background-color:rgb(34 197 94/.2)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-muted\/30{background-color:hsl(var(--muted)/.3)}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-muted\/95{background-color:hsl(var(--muted)/.95)}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary)/.1)}.bg-primary\/20{background-color:hsl(var(--primary)/.2)}.bg-primary\/\[0\.04\]{background-color:hsl(var(--primary)/.04)}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-500\/10{background-color:rgb(239 68 68/.1)}.bg-red-500\/20{background-color:rgb(239 68 68/.2)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/30{background-color:hsl(var(--secondary)/.3)}.bg-secondary\/50{background-color:hsl(var(--secondary)/.5)}.bg-transparent{background-color:transparent}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-yellow-500\/20{background-color:rgb(234 179 8/.2)}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.tracking-\[0\.16em\]{letter-spacing:.16em}.tracking-\[0\.22em\]{letter-spacing:.22em}.tracking-normal{letter-spacing:0}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-foreground{color:hsl(var(--foreground))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/50{color:hsl(var(--muted-foreground)/.5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground)/.6)}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.underline-offset-4{text-underline-offset:4px}.accent-emerald-600{accent-color:#059669}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgb(0 0 0/0.1),0 8px 10px -6px rgb(0 0 0/0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px)}.backdrop-blur,.backdrop-blur-sm{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-200{animation-duration:.2s}.running{animation-play-state:running}.file\:border-0::file-selector-button{border-width:0}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted)/.3)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-secondary\/60:hover{background-color:hsl(var(--secondary)/.6)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}@media (min-width:640px){.sm\:block{display:block}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:mb-2{margin-bottom:.5rem}.md\:mt-auto{margin-top:auto}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:h-auto{height:auto}.md\:w-\[220px\]{width:220px}.md\:min-w-0{min-width:0}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:overflow-y-auto{overflow-y:auto}.md\:border-b-0{border-bottom-width:0}.md\:border-l-0{border-left-width:0}.md\:border-r{border-right-width:1px}.md\:border-t{border-top-width:1px}.md\:border-border{border-color:hsl(var(--border))}.md\:p-3{padding:.75rem}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:pl-0{padding-left:0}.md\:pt-2{padding-top:.5rem}.md\:pt-3{padding-top:.75rem}.first\:md\:border-0:first-child{border-width:0}.first\:md\:pt-0:first-child{padding-top:0}}@media (min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1\.3fr_0\.7fr\]{grid-template-columns:1.3fr .7fr}.lg\:p-10{padding:2.5rem}}@media (min-width:1280px){.xl\:block{display:block}}@media (prefers-color-scheme:dark){.dark\:bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.dark\:bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.dark\:bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.dark\:text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.dark\:text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.dark\:text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.dark\:text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}}