profclaw 0.0.1-beta.2 → 2.0.0

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 (156) hide show
  1. package/CHANGELOG.md +21 -38
  2. package/CONTRIBUTING.md +3 -5
  3. package/README.md +128 -63
  4. package/dist/chat/execution/tools/index.d.ts +1 -1
  5. package/dist/chat/execution/tools/index.js +41 -2
  6. package/dist/chat/providers/slack/index.d.ts +2 -2
  7. package/dist/cli/commands/models.js +39 -26
  8. package/dist/cli/commands/onboard.js +64 -79
  9. package/dist/cli/commands/setup.js +293 -90
  10. package/dist/cli/index.js +0 -6
  11. package/dist/cli/providers.d.ts +15 -0
  12. package/dist/cli/providers.js +41 -0
  13. package/dist/core/deployment.js +2 -0
  14. package/dist/providers/ai-sdk.js +26 -6
  15. package/dist/routes/channels.d.ts +12 -0
  16. package/dist/routes/channels.js +166 -0
  17. package/dist/server/route-loader.js +1 -0
  18. package/dist/server.js +115 -109
  19. package/package.json +1 -1
  20. package/skills/git-workflow/SKILL.md +3 -3
  21. package/ui/dist/assets/{ActivityView-DIPQSJ_d.js → ActivityView-BeshZXmE.js} +1 -1
  22. package/ui/dist/assets/{AgentList-CqyaYrcq.js → AgentList-QVHeldPi.js} +1 -1
  23. package/ui/dist/assets/{AnalyticsDashboard-C-mjuGHT.js → AnalyticsDashboard-C9R97dXE.js} +1 -1
  24. package/ui/dist/assets/{AreaChart-CfYWmbtr.js → AreaChart-B73gaiVQ.js} +1 -1
  25. package/ui/dist/assets/{CartesianChart-BaQ3It0c.js → CartesianChart-CXYL2R-A.js} +1 -1
  26. package/ui/dist/assets/{ChatView-DxxQy6pl.js → ChatView-qjZErlrp.js} +1 -1
  27. package/ui/dist/assets/{CostsDashboard-CDBBcGkg.js → CostsDashboard-O4DCLy1i.js} +1 -1
  28. package/ui/dist/assets/{EstimateSelect-CDjf5qKl.js → EstimateSelect-1hQf4Osk.js} +1 -1
  29. package/ui/dist/assets/{FloatingChatbot-CZHjvJIe.js → FloatingChatbot-BZBzrJxd.js} +1 -1
  30. package/ui/dist/assets/{InviteCodeManagement-DTm-IPTm.js → InviteCodeManagement-LEoGqYeA.js} +1 -1
  31. package/ui/dist/assets/{ProjectDetail-DlYUcOss.js → ProjectDetail--gPfvATB.js} +1 -1
  32. package/ui/dist/assets/{ProjectIcon-BMRpnM04.js → ProjectIcon-Chd_ofsw.js} +1 -1
  33. package/ui/dist/assets/{ProjectList-D85TN0i0.js → ProjectList-BvUfVB6c.js} +1 -1
  34. package/ui/dist/assets/{Settings-CgPqzUvj.js → Settings-1kaf7VHE.js} +1 -1
  35. package/ui/dist/assets/{StatusIndicator-yig0uZEA.js → StatusIndicator-pRfkNcdV.js} +1 -1
  36. package/ui/dist/assets/{SummaryDetail-CwLAfHgJ.js → SummaryDetail-DV3AmONk.js} +1 -1
  37. package/ui/dist/assets/{SummaryList-BvS5Idnu.js → SummaryList-B6kXiTxL.js} +1 -1
  38. package/ui/dist/assets/{TaskDetail-zarC1fOt.js → TaskDetail-CV6CzbOS.js} +1 -1
  39. package/ui/dist/assets/{TaskList-CyJq3ANE.js → TaskList-DL7brQKd.js} +1 -1
  40. package/ui/dist/assets/{TicketBoard-BlWr3-iH.js → TicketBoard-CrkkFj7C.js} +1 -1
  41. package/ui/dist/assets/{TicketDetail-DmqWKj2W.js → TicketDetail-hnnYclpD.js} +1 -1
  42. package/ui/dist/assets/{TicketList-Scj4pMWa.js → TicketList-CsDAyQCL.js} +1 -1
  43. package/ui/dist/assets/{UserManagement-BH7uG7dw.js → UserManagement-BGFQyTSr.js} +1 -1
  44. package/ui/dist/assets/{ViewSwitcher-3HzZUdWn.js → ViewSwitcher-CnL0OqA8.js} +1 -1
  45. package/ui/dist/assets/{alert-dialog-DWPb2IfQ.js → alert-dialog-SKM6Gjz4.js} +1 -1
  46. package/ui/dist/assets/{archive-CGck7gxR.js → archive-BsLa7brF.js} +1 -1
  47. package/ui/dist/assets/{badge-DEmc3Z_l.js → badge-CVHH1a-v.js} +1 -1
  48. package/ui/dist/assets/{brain-CfFdLVqb.js → brain-6o_RHVpe.js} +1 -1
  49. package/ui/dist/assets/{bug-DqSGPUUE.js → bug-CmZI7jqM.js} +1 -1
  50. package/ui/dist/assets/{calendar-BuZ4zbPW.js → calendar-Bf0t2B82.js} +1 -1
  51. package/ui/dist/assets/{chevron-up-DcJ4LL_N.js → chevron-up-CoUsOvZj.js} +1 -1
  52. package/ui/dist/assets/{circle-x-C78PNZjF.js → circle-x-Dgw11LgT.js} +1 -1
  53. package/ui/dist/assets/{constants-DhDjZe4P.js → constants-Q5Zivl-a.js} +1 -1
  54. package/ui/dist/assets/{cpu-Ck6AoG8c.js → cpu-DiPMQICV.js} +1 -1
  55. package/ui/dist/assets/{database-CA2w8Lvt.js → database-BwTfupDi.js} +1 -1
  56. package/ui/dist/assets/{dialog-BOdGWhgE.js → dialog-BUqN9Psj.js} +1 -1
  57. package/ui/dist/assets/{ellipsis-FhHKRbfl.js → ellipsis-UJx4Xnf6.js} +1 -1
  58. package/ui/dist/assets/{ellipsis-vertical-CO0UqE4-.js → ellipsis-vertical-DoULYEKn.js} +1 -1
  59. package/ui/dist/assets/{file-code-ChnhYYj1.js → file-code-B2UrJLwi.js} +1 -1
  60. package/ui/dist/assets/{folder-open-CHwA1-ve.js → folder-open-BJi577JH.js} +1 -1
  61. package/ui/dist/assets/{funnel-ByEjRFNB.js → funnel-PkaD_HSR.js} +1 -1
  62. package/ui/dist/assets/{git-branch-GTOPQgU4.js → git-branch-C_K30am0.js} +1 -1
  63. package/ui/dist/assets/{git-commit-horizontal-F5M84Kut.js → git-commit-horizontal-IT6ecxWQ.js} +1 -1
  64. package/ui/dist/assets/{globe-CQWfr7hT.js → globe-f-jjCa_g.js} +1 -1
  65. package/ui/dist/assets/{hash-nKC9gtLg.js → hash-DNEv8Elo.js} +1 -1
  66. package/ui/dist/assets/{history-DfFSA9xJ.js → history-BQSBo_1Q.js} +1 -1
  67. package/ui/dist/assets/{index-DHGvP9mp.js → index-BUmnwPQr.js} +1 -1
  68. package/ui/dist/assets/{index-Z4-RtZcs.js → index-BfF5G4Cw.js} +1 -1
  69. package/ui/dist/assets/{index-DeI8lKRR.js → index-C8N375c2.js} +1 -1
  70. package/ui/dist/assets/index-CuxnqVVz.css +1 -0
  71. package/ui/dist/assets/{index-Ca3vk7Gq.js → index-CzMM3QOk.js} +1 -1
  72. package/ui/dist/assets/{index--JkIxVXb.js → index-lJlNPFVJ.js} +3 -3
  73. package/ui/dist/assets/{index-a4Fxq0Hb.js → index-nS3EErDg.js} +1 -1
  74. package/ui/dist/assets/{layers-DFeLExSa.js → layers-jFqVrWMD.js} +1 -1
  75. package/ui/dist/assets/{layout-dashboard-WmgjMhWF.js → layout-dashboard-CcKt1hXw.js} +1 -1
  76. package/ui/dist/assets/{lightbulb-Bo8hEr7B.js → lightbulb-Jhp7FvbU.js} +1 -1
  77. package/ui/dist/assets/{link-2-YqrpQXBH.js → link-2-DdO7ostF.js} +1 -1
  78. package/ui/dist/assets/{markdown-renderer-Croje6Xe.js → markdown-renderer-n1ToC4XQ.js} +1 -1
  79. package/ui/dist/assets/{message-square-CD0H5hot.js → message-square-CBgH65X7.js} +1 -1
  80. package/ui/dist/assets/{pencil-DpFnj5dn.js → pencil-CYXCEPQh.js} +1 -1
  81. package/ui/dist/assets/{play-DVgea_jT.js → play-d1ONaH0-.js} +1 -1
  82. package/ui/dist/assets/{popover-JXecfWG5.js → popover-CrmZgoWu.js} +1 -1
  83. package/ui/dist/assets/{progress-C1ghf1Fu.js → progress-uv4SPkL5.js} +1 -1
  84. package/ui/dist/assets/{rocket-BFxPYGx9.js → rocket-DhvUetsk.js} +1 -1
  85. package/ui/dist/assets/{select-MADP8m6Q.js → select-CeQ8AHGy.js} +1 -1
  86. package/ui/dist/assets/{send-eYnW_7n-.js → send-P0r5D7td.js} +1 -1
  87. package/ui/dist/assets/{server-CPMaysH8.js → server-CVHTZB72.js} +1 -1
  88. package/ui/dist/assets/{settings-2-scXUOuE_.js → settings-2-ocj5uHGx.js} +1 -1
  89. package/ui/dist/assets/{sheet-r6NSOxi-.js → sheet-DuQExSho.js} +1 -1
  90. package/ui/dist/assets/{shield-check-PEr7nmVw.js → shield-check-DfVdE34l.js} +1 -1
  91. package/ui/dist/assets/{shield-off-CLtXio62.js → shield-off-8l0J6R-8.js} +1 -1
  92. package/ui/dist/assets/{skeleton-C9oEzNlU.js → skeleton-TFiFJ3nB.js} +1 -1
  93. package/ui/dist/assets/{smartphone-DusFfY0U.js → smartphone-77_g3SQn.js} +1 -1
  94. package/ui/dist/assets/{square-e1yxB2eR.js → square-Ckzsr3Rn.js} +1 -1
  95. package/ui/dist/assets/{switch-tNs0n-kz.js → switch-CAePkd6k.js} +1 -1
  96. package/ui/dist/assets/{table-CXxtLicg.js → table-ZjAZ7hkt.js} +1 -1
  97. package/ui/dist/assets/{tag-tAwMmQ9G.js → tag-C35mgoEv.js} +1 -1
  98. package/ui/dist/assets/{textarea-BjiEeIWh.js → textarea-DsVPnSgR.js} +1 -1
  99. package/ui/dist/assets/{timer-Vel1N3RP.js → timer-DHJBS2w1.js} +1 -1
  100. package/ui/dist/assets/{tooltip-ZMwtfr1J.js → tooltip-BYmQ331W.js} +1 -1
  101. package/ui/dist/assets/{trash-2-eM-CNwsZ.js → trash-2-keO5tKPE.js} +1 -1
  102. package/ui/dist/assets/{trending-up-BGafmjRo.js → trending-up-BBv8KbrY.js} +1 -1
  103. package/ui/dist/assets/{wand-sparkles-DPvcd9Pi.js → wand-sparkles-BusQ52ZK.js} +1 -1
  104. package/ui/dist/assets/{wrench-B8s3zYVV.js → wrench-02YaOSiK.js} +1 -1
  105. package/ui/dist/index.html +2 -2
  106. package/dist/chat/auto-reply.d.ts +0 -90
  107. package/dist/chat/auto-reply.js +0 -272
  108. package/dist/chat/execution/pty.d.ts +0 -92
  109. package/dist/chat/execution/pty.js +0 -285
  110. package/dist/chat/execution/tools/glinr-ops.d.ts +0 -202
  111. package/dist/chat/execution/tools/glinr-ops.js +0 -694
  112. package/dist/cli/commands/browser.d.ts +0 -3
  113. package/dist/cli/commands/browser.js +0 -138
  114. package/dist/cli/commands/canvas.d.ts +0 -3
  115. package/dist/cli/commands/canvas.js +0 -155
  116. package/dist/cli/commands/nodes.d.ts +0 -3
  117. package/dist/cli/commands/nodes.js +0 -193
  118. package/dist/diagnostics/exporters.d.ts +0 -21
  119. package/dist/diagnostics/exporters.js +0 -138
  120. package/dist/diagnostics/index.d.ts +0 -10
  121. package/dist/diagnostics/index.js +0 -9
  122. package/dist/diagnostics/middleware.d.ts +0 -12
  123. package/dist/diagnostics/middleware.js +0 -58
  124. package/dist/diagnostics/tracer.d.ts +0 -133
  125. package/dist/diagnostics/tracer.js +0 -257
  126. package/dist/discovery/index.d.ts +0 -8
  127. package/dist/discovery/index.js +0 -7
  128. package/dist/discovery/mdns.d.ts +0 -40
  129. package/dist/discovery/mdns.js +0 -249
  130. package/dist/plugins/registry.d.ts +0 -122
  131. package/dist/plugins/registry.js +0 -352
  132. package/dist/plugins/sandbox.d.ts +0 -77
  133. package/dist/plugins/sandbox.js +0 -287
  134. package/dist/plugins/search/brave.d.ts +0 -9
  135. package/dist/plugins/search/brave.js +0 -157
  136. package/dist/plugins/search/duckduckgo.d.ts +0 -9
  137. package/dist/plugins/search/duckduckgo.js +0 -171
  138. package/dist/plugins/search/index.d.ts +0 -13
  139. package/dist/plugins/search/index.js +0 -23
  140. package/dist/plugins/search/searxng.d.ts +0 -9
  141. package/dist/plugins/search/searxng.js +0 -170
  142. package/dist/plugins/search/serper.d.ts +0 -9
  143. package/dist/plugins/search/serper.js +0 -135
  144. package/dist/plugins/search/tavily.d.ts +0 -9
  145. package/dist/plugins/search/tavily.js +0 -146
  146. package/dist/providers/adapters/anthropic.d.ts +0 -26
  147. package/dist/providers/adapters/anthropic.js +0 -306
  148. package/dist/providers/adapters/base.d.ts +0 -53
  149. package/dist/providers/adapters/base.js +0 -99
  150. package/dist/providers/adapters/ollama.d.ts +0 -30
  151. package/dist/providers/adapters/ollama.js +0 -292
  152. package/dist/utils/ai-cache.d.ts +0 -72
  153. package/dist/utils/ai-cache.js +0 -204
  154. package/dist/utils/file-lock.d.ts +0 -85
  155. package/dist/utils/file-lock.js +0 -204
  156. package/ui/dist/assets/index-WclMPci1.css +0 -1
@@ -1,2 +1,2 @@
1
- import{n as _,r as l,u as X,o as w,t as a,j as e,U,ad as G,k as r,R as V,i as N,w as W,L as T,bJ as Y,C as R,D as Z,x as ee,y as se,bo as te,aw as v,z as m,_ as ae,ai as E,O as F,Q as P}from"./index--JkIxVXb.js";import{A as re,a as le,b as ne,c as de,d as ie,e as oe,f as ce,g as me}from"./alert-dialog-DWPb2IfQ.js";import{C as M}from"./circle-x-C78PNZjF.js";import{E as xe}from"./ellipsis-FhHKRbfl.js";import{S as ue}from"./shield-off-CLtXio62.js";import{T as he}from"./trash-2-eM-CNwsZ.js";const x="http://localhost:3000";function ve(){const u=_(),[h,L]=l.useState(""),[n,Q]=l.useState(null),[$,p]=l.useState(!1),[d,b]=l.useState(null),[y,C]=l.useState(null),[i,j]=l.useState(null),{data:o,isLoading:g,error:k,refetch:q}=X({queryKey:["admin","users"],queryFn:async()=>{const s=await fetch(`${x}/api/users/admin/list`,{credentials:"include"});if(!s.ok)throw s.status===403?new Error("Admin access required"):new Error("Failed to fetch users");return s.json()}}),S=w({mutationFn:async({userId:s,updates:t})=>{const c=await fetch(`${x}/api/users/admin/${s}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)});if(!c.ok)throw new Error("Failed to update user");return c.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin","users"]}),a.success("User updated")},onError:()=>a.error("Failed to update user")}),f=w({mutationFn:async s=>{const t=await fetch(`${x}/api/users/admin/${s}/reset-password`,{method:"POST",credentials:"include"});if(!t.ok)throw new Error("Failed to reset password");return t.json()},onSuccess:s=>{b({password:s.temporaryPassword,codes:s.recoveryCodes}),u.invalidateQueries({queryKey:["admin","users"]}),a.success("Password reset successfully")},onError:()=>a.error("Failed to reset password")}),I=w({mutationFn:async s=>{const t=await fetch(`${x}/api/users/admin/${s}`,{method:"DELETE",credentials:"include"});if(!t.ok){const c=await t.json().catch(()=>({error:"Failed to delete user"}));throw new Error(c.error||"Failed to delete user")}return t.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin","users"]}),a.success("User deleted")},onError:s=>a.error(s.message)}),A=(s,t)=>{navigator.clipboard.writeText(s),C(t),setTimeout(()=>C(null),2e3),a.success(`${t} copied`)},D=o?.users?.filter(s=>s.name.toLowerCase().includes(h.toLowerCase())||s.email.toLowerCase().includes(h.toLowerCase()))||[],z=s=>{const t=s.role==="admin"?"user":"admin";S.mutate({userId:s.id,updates:{role:t}})},K=s=>{const t=s.status==="active"?"suspended":"active";S.mutate({userId:s.id,updates:{status:t}})},O=s=>{Q(s),p(!0),b(null)},B=()=>{n&&f.mutate(n.id)},H=s=>{j(s)},J=()=>{i&&(I.mutate(i.id),j(null))};return k?e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx(U,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Access Denied"}),e.jsx("p",{className:"text-muted-foreground",children:k.message})]})}):e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-3",children:[e.jsx(G,{className:"h-6 w-6"}),"User Management"]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage user accounts, roles, and permissions"})]}),e.jsxs(r,{variant:"outline",onClick:()=>q(),disabled:g,className:"rounded-xl",children:[e.jsx(V,{className:N("h-4 w-4 mr-2",g&&"animate-spin")}),"Refresh"]})]}),e.jsxs("div",{className:"relative max-w-md",children:[e.jsx(W,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:"Search users...",value:h,onChange:s=>L(s.target.value),className:"w-full pl-10 pr-4 py-2 field-lg"})]}),e.jsx("div",{className:"rounded-2xl glass shadow-lg overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/5 bg-muted/30",children:[e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"User"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Role"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Status"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Created"}),e.jsx("th",{className:"text-right p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Actions"})]})}),e.jsx("tbody",{children:g?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-8 text-center",children:e.jsx(T,{className:"h-6 w-6 animate-spin mx-auto text-muted-foreground"})})}):D.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-8 text-center text-muted-foreground",children:"No users found"})}):D.map(s=>e.jsxs("tr",{className:"border-b border-white/5 last:border-0 hover:bg-muted/20 transition-colors",children:[e.jsx("td",{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[s.avatarUrl?e.jsx("img",{src:s.avatarUrl,alt:s.name,className:"h-10 w-10 rounded-full ring-1 ring-white/10"}):e.jsx("div",{className:"h-10 w-10 rounded-full bg-gradient-to-br from-primary to-primary/60 ring-1 ring-white/10 flex items-center justify-center text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:s.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.email})]})]})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:N("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold",s.role==="admin"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"),children:[s.role==="admin"&&e.jsx(Y,{className:"h-3 w-3"}),s.role]})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:N("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold",s.status==="active"?"bg-green-500/10 text-green-500":"bg-amber-500/10 text-amber-500"),children:[s.status==="active"?e.jsx(R,{className:"h-3 w-3"}):e.jsx(M,{className:"h-3 w-3"}),s.status]})}),e.jsx("td",{className:"p-4 text-sm text-muted-foreground",children:new Date(s.createdAt).toLocaleDateString()}),e.jsx("td",{className:"p-4",children:e.jsx("div",{className:"flex items-center justify-end gap-2",children:e.jsxs(Z,{children:[e.jsx(ee,{asChild:!0,children:e.jsx(r,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 rounded-lg",children:e.jsx(xe,{className:"h-4 w-4"})})}),e.jsxs(se,{align:"end",className:"w-48",children:[e.jsx(te,{children:"Actions"}),e.jsx(v,{}),e.jsx(m,{onClick:()=>z(s),children:s.role==="admin"?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),"Remove Admin"]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"h-4 w-4 mr-2"}),"Make Admin"]})}),e.jsx(m,{onClick:()=>K(s),children:s.status==="active"?e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"h-4 w-4 mr-2"}),"Suspend User"]}):e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-4 w-4 mr-2"}),"Activate User"]})}),e.jsx(v,{}),e.jsxs(m,{onClick:()=>O(s),children:[e.jsx(E,{className:"h-4 w-4 mr-2"}),"Reset Password"]}),e.jsx(v,{}),e.jsxs(m,{onClick:()=>H(s),className:"text-destructive focus:text-destructive",children:[e.jsx(he,{className:"h-4 w-4 mr-2"}),"Delete User"]})]})]})})})]},s.id))})]})})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Users"}),e.jsx("p",{className:"text-2xl font-bold",children:o?.total||0})]}),e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Admins"}),e.jsx("p",{className:"text-2xl font-bold text-red-500",children:o?.users?.filter(s=>s.role==="admin").length||0})]}),e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Active"}),e.jsx("p",{className:"text-2xl font-bold text-green-500",children:o?.users?.filter(s=>s.status==="active").length||0})]})]}),e.jsx(re,{open:!!i,onOpenChange:s=>!s&&j(null),children:e.jsxs(le,{children:[e.jsxs(ne,{children:[e.jsx(de,{children:"Delete User"}),e.jsxs(ie,{children:["Are you sure you want to delete ",e.jsx("strong",{children:i?.name}),"? This action cannot be undone and will remove all associated data."]})]}),e.jsxs(oe,{children:[e.jsx(ce,{className:"rounded-xl",children:"Cancel"}),e.jsx(me,{onClick:J,className:"rounded-xl bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete User"})]})]})}),$&&n&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:e.jsxs("div",{className:"glass-heavy rounded-2xl shadow-2xl w-full max-w-md mx-4 p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-full bg-amber-500/10 flex items-center justify-center",children:e.jsx(E,{className:"h-6 w-6 text-amber-500"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Reset Password"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:n.name})]})]}),d?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-muted/30",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Temporary Password"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 font-mono text-sm",children:d.password}),e.jsx(r,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0",onClick:()=>A(d.password,"Password"),children:y==="Password"?e.jsx(F,{className:"h-4 w-4 text-green-500"}):e.jsx(P,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-muted/30",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Recovery Codes"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:d.codes.map((s,t)=>e.jsx("code",{className:"text-xs font-mono bg-background px-2 py-1 rounded",children:s},t))}),e.jsxs(r,{size:"sm",variant:"outline",className:"w-full mt-3 rounded-xl",onClick:()=>A(d.codes.join(`
1
+ import{n as _,r as l,u as X,o as w,t as a,j as e,U,ad as G,k as r,R as V,i as N,w as W,L as T,bJ as Y,C as R,D as Z,x as ee,y as se,bo as te,aw as v,z as m,_ as ae,ai as E,O as F,Q as P}from"./index-lJlNPFVJ.js";import{A as re,a as le,b as ne,c as de,d as ie,e as oe,f as ce,g as me}from"./alert-dialog-SKM6Gjz4.js";import{C as M}from"./circle-x-Dgw11LgT.js";import{E as xe}from"./ellipsis-UJx4Xnf6.js";import{S as ue}from"./shield-off-8l0J6R-8.js";import{T as he}from"./trash-2-keO5tKPE.js";const x="http://localhost:3000";function ve(){const u=_(),[h,L]=l.useState(""),[n,Q]=l.useState(null),[$,p]=l.useState(!1),[d,b]=l.useState(null),[y,C]=l.useState(null),[i,j]=l.useState(null),{data:o,isLoading:g,error:k,refetch:q}=X({queryKey:["admin","users"],queryFn:async()=>{const s=await fetch(`${x}/api/users/admin/list`,{credentials:"include"});if(!s.ok)throw s.status===403?new Error("Admin access required"):new Error("Failed to fetch users");return s.json()}}),S=w({mutationFn:async({userId:s,updates:t})=>{const c=await fetch(`${x}/api/users/admin/${s}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)});if(!c.ok)throw new Error("Failed to update user");return c.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin","users"]}),a.success("User updated")},onError:()=>a.error("Failed to update user")}),f=w({mutationFn:async s=>{const t=await fetch(`${x}/api/users/admin/${s}/reset-password`,{method:"POST",credentials:"include"});if(!t.ok)throw new Error("Failed to reset password");return t.json()},onSuccess:s=>{b({password:s.temporaryPassword,codes:s.recoveryCodes}),u.invalidateQueries({queryKey:["admin","users"]}),a.success("Password reset successfully")},onError:()=>a.error("Failed to reset password")}),I=w({mutationFn:async s=>{const t=await fetch(`${x}/api/users/admin/${s}`,{method:"DELETE",credentials:"include"});if(!t.ok){const c=await t.json().catch(()=>({error:"Failed to delete user"}));throw new Error(c.error||"Failed to delete user")}return t.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin","users"]}),a.success("User deleted")},onError:s=>a.error(s.message)}),A=(s,t)=>{navigator.clipboard.writeText(s),C(t),setTimeout(()=>C(null),2e3),a.success(`${t} copied`)},D=o?.users?.filter(s=>s.name.toLowerCase().includes(h.toLowerCase())||s.email.toLowerCase().includes(h.toLowerCase()))||[],z=s=>{const t=s.role==="admin"?"user":"admin";S.mutate({userId:s.id,updates:{role:t}})},K=s=>{const t=s.status==="active"?"suspended":"active";S.mutate({userId:s.id,updates:{status:t}})},O=s=>{Q(s),p(!0),b(null)},B=()=>{n&&f.mutate(n.id)},H=s=>{j(s)},J=()=>{i&&(I.mutate(i.id),j(null))};return k?e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx(U,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Access Denied"}),e.jsx("p",{className:"text-muted-foreground",children:k.message})]})}):e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-3",children:[e.jsx(G,{className:"h-6 w-6"}),"User Management"]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage user accounts, roles, and permissions"})]}),e.jsxs(r,{variant:"outline",onClick:()=>q(),disabled:g,className:"rounded-xl",children:[e.jsx(V,{className:N("h-4 w-4 mr-2",g&&"animate-spin")}),"Refresh"]})]}),e.jsxs("div",{className:"relative max-w-md",children:[e.jsx(W,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:"Search users...",value:h,onChange:s=>L(s.target.value),className:"w-full pl-10 pr-4 py-2 field-lg"})]}),e.jsx("div",{className:"rounded-2xl glass shadow-lg overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/5 bg-muted/30",children:[e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"User"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Role"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Status"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Created"}),e.jsx("th",{className:"text-right p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Actions"})]})}),e.jsx("tbody",{children:g?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-8 text-center",children:e.jsx(T,{className:"h-6 w-6 animate-spin mx-auto text-muted-foreground"})})}):D.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-8 text-center text-muted-foreground",children:"No users found"})}):D.map(s=>e.jsxs("tr",{className:"border-b border-white/5 last:border-0 hover:bg-muted/20 transition-colors",children:[e.jsx("td",{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[s.avatarUrl?e.jsx("img",{src:s.avatarUrl,alt:s.name,className:"h-10 w-10 rounded-full ring-1 ring-white/10"}):e.jsx("div",{className:"h-10 w-10 rounded-full bg-gradient-to-br from-primary to-primary/60 ring-1 ring-white/10 flex items-center justify-center text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:s.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.email})]})]})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:N("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold",s.role==="admin"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"),children:[s.role==="admin"&&e.jsx(Y,{className:"h-3 w-3"}),s.role]})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:N("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold",s.status==="active"?"bg-green-500/10 text-green-500":"bg-amber-500/10 text-amber-500"),children:[s.status==="active"?e.jsx(R,{className:"h-3 w-3"}):e.jsx(M,{className:"h-3 w-3"}),s.status]})}),e.jsx("td",{className:"p-4 text-sm text-muted-foreground",children:new Date(s.createdAt).toLocaleDateString()}),e.jsx("td",{className:"p-4",children:e.jsx("div",{className:"flex items-center justify-end gap-2",children:e.jsxs(Z,{children:[e.jsx(ee,{asChild:!0,children:e.jsx(r,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 rounded-lg",children:e.jsx(xe,{className:"h-4 w-4"})})}),e.jsxs(se,{align:"end",className:"w-48",children:[e.jsx(te,{children:"Actions"}),e.jsx(v,{}),e.jsx(m,{onClick:()=>z(s),children:s.role==="admin"?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),"Remove Admin"]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"h-4 w-4 mr-2"}),"Make Admin"]})}),e.jsx(m,{onClick:()=>K(s),children:s.status==="active"?e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"h-4 w-4 mr-2"}),"Suspend User"]}):e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-4 w-4 mr-2"}),"Activate User"]})}),e.jsx(v,{}),e.jsxs(m,{onClick:()=>O(s),children:[e.jsx(E,{className:"h-4 w-4 mr-2"}),"Reset Password"]}),e.jsx(v,{}),e.jsxs(m,{onClick:()=>H(s),className:"text-destructive focus:text-destructive",children:[e.jsx(he,{className:"h-4 w-4 mr-2"}),"Delete User"]})]})]})})})]},s.id))})]})})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Users"}),e.jsx("p",{className:"text-2xl font-bold",children:o?.total||0})]}),e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Admins"}),e.jsx("p",{className:"text-2xl font-bold text-red-500",children:o?.users?.filter(s=>s.role==="admin").length||0})]}),e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Active"}),e.jsx("p",{className:"text-2xl font-bold text-green-500",children:o?.users?.filter(s=>s.status==="active").length||0})]})]}),e.jsx(re,{open:!!i,onOpenChange:s=>!s&&j(null),children:e.jsxs(le,{children:[e.jsxs(ne,{children:[e.jsx(de,{children:"Delete User"}),e.jsxs(ie,{children:["Are you sure you want to delete ",e.jsx("strong",{children:i?.name}),"? This action cannot be undone and will remove all associated data."]})]}),e.jsxs(oe,{children:[e.jsx(ce,{className:"rounded-xl",children:"Cancel"}),e.jsx(me,{onClick:J,className:"rounded-xl bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete User"})]})]})}),$&&n&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:e.jsxs("div",{className:"glass-heavy rounded-2xl shadow-2xl w-full max-w-md mx-4 p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-full bg-amber-500/10 flex items-center justify-center",children:e.jsx(E,{className:"h-6 w-6 text-amber-500"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Reset Password"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:n.name})]})]}),d?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-muted/30",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Temporary Password"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 font-mono text-sm",children:d.password}),e.jsx(r,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0",onClick:()=>A(d.password,"Password"),children:y==="Password"?e.jsx(F,{className:"h-4 w-4 text-green-500"}):e.jsx(P,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-muted/30",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Recovery Codes"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:d.codes.map((s,t)=>e.jsx("code",{className:"text-xs font-mono bg-background px-2 py-1 rounded",children:s},t))}),e.jsxs(r,{size:"sm",variant:"outline",className:"w-full mt-3 rounded-xl",onClick:()=>A(d.codes.join(`
2
2
  `),"Codes"),children:[y==="Codes"?e.jsx(F,{className:"h-4 w-4 mr-2 text-green-500"}):e.jsx(P,{className:"h-4 w-4 mr-2"}),"Copy All Codes"]})]}),e.jsxs("p",{className:"text-xs text-amber-500 flex items-start gap-2",children:[e.jsx(U,{className:"h-4 w-4 flex-shrink-0 mt-0.5"}),"Share these credentials securely. The user must change their password on next login."]}),e.jsx(r,{className:"w-full rounded-xl",onClick:()=>p(!1),children:"Done"})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This will generate a new temporary password and recovery codes for"," ",e.jsx("strong",{children:n.email}),". All existing sessions will be revoked."]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(r,{variant:"outline",className:"flex-1 rounded-xl",onClick:()=>p(!1),children:"Cancel"}),e.jsx(r,{className:"flex-1 rounded-xl",onClick:B,disabled:f.isPending,children:f.isPending?e.jsx(T,{className:"h-4 w-4 animate-spin"}):"Reset Password"})]})]})]})})]})}export{ve as UserManagement};
@@ -1 +1 @@
1
- import{c as se,r as a,n as xe,u as E,o as B,t as n,m,j as e,k as l,P as X,p as c,I as J,L as f,i as V,C as ue,S as he,X as ge,O}from"./index--JkIxVXb.js";import{T as pe}from"./textarea-BjiEeIWh.js";import{B as q}from"./badge-DEmc3Z_l.js";import{D as je,a as Ne,b as fe,c as be,d as ve,e as ye,f as we}from"./dialog-BOdGWhgE.js";import{S as b,a as v,b as y,c as w,d as x}from"./select-MADP8m6Q.js";import{a as ke}from"./EstimateSelect-CDjf5qKl.js";import{B as Ce}from"./brain-CfFdLVqb.js";import{W as Z}from"./wand-sparkles-DPvcd9Pi.js";import{F as Se}from"./folder-open-CHwA1-ve.js";import{L as _e}from"./link-2-YqrpQXBH.js";import{L as te,C as ze}from"./layers-DFeLExSa.js";import{a as ae,B as Ie}from"./bug-DqSGPUUE.js";import{H as Ae}from"./hash-nKC9gtLg.js";import{L as ee}from"./lightbulb-Bo8hEr7B.js";const Te=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Le=se("kanban",Te);const Pe=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Fe=se("list",Pe),Me=[{value:"task",label:"Task",icon:ue},{value:"bug",label:"Bug",icon:Ie},{value:"feature",label:"Feature",icon:he},{value:"epic",label:"Epic",icon:te},{value:"story",label:"Story",icon:ae},{value:"subtask",label:"Subtask",icon:ze}],De=[{value:"urgent",label:"Urgent",color:"text-red-500"},{value:"high",label:"High",color:"text-orange-500"},{value:"medium",label:"Medium",color:"text-yellow-500"},{value:"low",label:"Low",color:"text-blue-500"},{value:"none",label:"None",color:"text-gray-500"}];function Xe({defaultProjectId:u,defaultParentId:h}={}){const[K,R]=a.useState(!1),[i,k]=a.useState(""),[g,C]=a.useState(""),[S,_]=a.useState("task"),[$,z]=a.useState("medium"),[H,p]=a.useState(""),[I,W]=a.useState(null),[j,Q]=a.useState(u),[U,A]=a.useState(h),[T,L]=a.useState(null),[t,Y]=a.useState(null),[ie,P]=a.useState(!1),re=xe(),{data:ne}=E({queryKey:["ai-status"],queryFn:()=>m.tickets.ai.status(),staleTime:6e4}),{data:le}=E({queryKey:["projects"],queryFn:()=>m.projects.list({limit:50})}),{data:ce}=E({queryKey:["tickets","parents",j],queryFn:()=>m.tickets.list({projectId:j||void 0,type:["epic","story"],limit:50}),enabled:K}),oe=le?.projects||[],N=ce?.tickets||[],o=ne?.available??!1,d=B({mutationFn:()=>m.tickets.ai.categorize(i,g||void 0),onSuccess:s=>{s.categorization?(L(s.categorization),_(s.categorization.type),z(s.categorization.priority),s.categorization.labels.length>0&&p(s.categorization.labels.join(", ")),n.success(`AI categorized with ${Math.round(s.categorization.confidence*100)}% confidence`)):n.error("AI could not categorize this ticket")},onError:()=>{n.error("AI categorization failed")}}),F=B({mutationFn:()=>m.tickets.ai.suggest(i,g||void 0,S),onSuccess:s=>{s.suggestions?(Y(s.suggestions),P(!0)):n.error("AI could not generate suggestions")},onError:()=>{n.error("AI suggestion failed")}});a.useEffect(()=>{if(o&&i.length>=10&&!T&&!d.isPending){const s=setTimeout(()=>{d.mutate()},1e3);return()=>clearTimeout(s)}},[i,o]);const M=(s,r)=>{s==="title"&&typeof r=="string"?k(r):s==="description"&&typeof r=="string"?C(r):s==="suggestedLabels"&&Array.isArray(r)&&p(r.join(", ")),n.success(`Applied AI suggestion for ${s}`)},D=B({mutationFn:s=>m.tickets.create(s),onSuccess:s=>{re.invalidateQueries({queryKey:["tickets"]}),n.success(`Ticket PROFCLAW-${s.ticket.sequence} created`),G()},onError:s=>{n.error(`Failed to create ticket: ${s.message}`)}}),G=()=>{R(!1),k(""),C(""),_("task"),z("medium"),p(""),W(null),Q(u),A(h),L(null),Y(null),P(!1)},de=s=>{if(s.preventDefault(),!i.trim()){n.error("Title is required");return}const r=H.split(",").map(me=>me.trim()).filter(Boolean);D.mutate({title:i.trim(),description:g.trim()||void 0,type:S,priority:$,labels:r.length>0?r:void 0,estimate:I??void 0,estimateUnit:I!==null?"points":void 0,projectId:j||void 0,parentId:U||void 0,createdBy:"human"})};return e.jsxs(je,{open:K,onOpenChange:R,children:[e.jsx(Ne,{asChild:!0,children:e.jsxs(l,{className:"gap-2 rounded-xl",children:[e.jsx(X,{className:"h-4 w-4"}),"Create Ticket"]})}),e.jsx(fe,{className:"glass-heavy rounded-[20px] border-white/10 sm:max-w-[500px]",children:e.jsxs("form",{onSubmit:de,children:[e.jsxs(be,{children:[e.jsxs(ve,{className:"flex items-center gap-2",children:["Create Ticket",o&&e.jsxs(q,{variant:"outline",className:"text-xs font-normal gap-1 border-primary/30 text-primary",children:[e.jsx(Ce,{className:"h-3 w-3"}),"AI Assist"]})]}),e.jsxs(ye,{children:["Create a new ticket for your project. ",o?"AI will help categorize and suggest improvements.":"AI agents can pick this up and work on it."]})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{htmlFor:"title",children:"Title *"}),e.jsx(J,{id:"title",placeholder:"Brief description of the ticket...",value:i,onChange:s=>{k(s.target.value),L(null)},className:"bg-white/5 border-white/10 rounded-xl",autoFocus:!0}),o&&i.length>=10&&e.jsx("div",{className:"flex items-center gap-2 text-xs",children:d.isPending?e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(f,{className:"h-3 w-3 animate-spin"}),"AI analyzing..."]}):T?e.jsxs("span",{className:"flex items-center gap-1 text-green-400",children:[e.jsx(Z,{className:"h-3 w-3"}),"AI categorized (",Math.round(T.confidence*100),"% confidence)"]}):null})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{htmlFor:"description",children:"Description"}),e.jsx(pe,{id:"description",placeholder:"Detailed description, acceptance criteria, etc...",value:g,onChange:s=>C(s.target.value),className:"bg-white/5 border-white/10 rounded-xl min-h-[100px] resize-none"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(Se,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Project"]}),e.jsxs(b,{value:j||"__none__",onValueChange:s=>{Q(s==="__none__"?void 0:s),A(void 0)},children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{placeholder:"Select project..."})}),e.jsxs(w,{className:"glass-heavy rounded-xl border-white/10",children:[e.jsx(x,{value:"__none__",children:e.jsx("span",{className:"text-muted-foreground",children:"No project"})}),oe.map(s=>e.jsx(x,{value:s.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{children:s.icon}),e.jsx("span",{className:"truncate",children:s.name}),e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:s.key})]})},s.id))]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(_e,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Parent (Epic/Story)"]}),e.jsxs(b,{value:U||"__none__",onValueChange:s=>A(s==="__none__"?void 0:s),disabled:N.length===0,children:[e.jsx(v,{className:V("bg-white/5 border-white/10 rounded-xl",N.length===0&&"opacity-50"),children:e.jsx(y,{placeholder:N.length===0?"No epics/stories":"Select parent..."})}),e.jsxs(w,{className:"glass-heavy rounded-xl border-white/10 max-h-[200px]",children:[e.jsx(x,{value:"__none__",children:e.jsx("span",{className:"text-muted-foreground",children:"No parent"})}),N.map(s=>e.jsx(x,{value:s.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[s.type==="epic"?e.jsx(te,{className:"h-3.5 w-3.5 text-amber-400"}):e.jsx(ae,{className:"h-3.5 w-3.5 text-cyan-400"}),e.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:[s.projectKey||"PROFCLAW","-",s.sequence]}),e.jsx("span",{className:"truncate max-w-[140px]",children:s.title})]})},s.id))]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{children:"Type"}),e.jsxs(b,{value:S,onValueChange:s=>_(s),children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{})}),e.jsx(w,{className:"glass-heavy rounded-xl border-white/10",children:Me.map(s=>e.jsx(x,{value:s.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(s.icon,{className:"h-4 w-4"}),s.label]})},s.value))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{children:"Priority"}),e.jsxs(b,{value:$,onValueChange:s=>z(s),children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{})}),e.jsx(w,{className:"glass-heavy rounded-xl border-white/10",children:De.map(s=>e.jsx(x,{value:s.value,children:e.jsx("span",{className:`flex items-center gap-2 ${s.color}`,children:s.label})},s.value))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"col-span-2 grid gap-2",children:[e.jsx(c,{htmlFor:"labels",children:"Labels"}),e.jsx(J,{id:"labels",placeholder:"Comma-separated labels (e.g., frontend, auth)",value:H,onChange:s=>p(s.target.value),className:"bg-white/5 border-white/10 rounded-xl"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(Ae,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Estimate"]}),e.jsx(ke,{value:I,onChange:W,placeholder:"Points"})]})]}),o&&i.length>=5&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(l,{type:"button",variant:"outline",size:"sm",onClick:()=>d.mutate(),disabled:d.isPending,className:"flex-1 gap-1 rounded-xl border-white/10 text-xs",children:[d.isPending?e.jsx(f,{className:"h-3 w-3 animate-spin"}):e.jsx(Z,{className:"h-3 w-3"}),"Re-categorize"]}),e.jsxs(l,{type:"button",variant:"outline",size:"sm",onClick:()=>F.mutate(),disabled:F.isPending,className:"flex-1 gap-1 rounded-xl border-white/10 text-xs",children:[F.isPending?e.jsx(f,{className:"h-3 w-3 animate-spin"}):e.jsx(ee,{className:"h-3 w-3"}),"Get AI Suggestions"]})]}),ie&&t&&e.jsxs("div",{className:"rounded-xl bg-primary/5 border border-primary/20 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-1 text-sm font-medium text-primary",children:[e.jsx(ee,{className:"h-4 w-4"}),"AI Suggestions"]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>P(!1),className:"h-6 w-6 p-0 rounded-lg",children:e.jsx(ge,{className:"h-3 w-3"})})]}),t.title&&t.title!==i&&e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Improved title:"}),e.jsx("p",{className:"text-sm truncate",children:t.title})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("title",t.title),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(O,{className:"h-3 w-3"})})]}),t.description&&e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Suggested description:"}),e.jsx("p",{className:"text-sm line-clamp-2",children:t.description})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("description",t.description),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(O,{className:"h-3 w-3"})})]}),t.acceptanceCriteria&&t.acceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Acceptance criteria:"}),e.jsx("ul",{className:"text-xs space-y-0.5 text-muted-foreground",children:t.acceptanceCriteria.slice(0,3).map((s,r)=>e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"text-primary",children:"-"}),s]},r))})]}),t.suggestedLabels&&t.suggestedLabels.length>0&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Suggested labels:"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.suggestedLabels.map(s=>e.jsx(q,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:s},s))})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("suggestedLabels",t.suggestedLabels),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(O,{className:"h-3 w-3"})})]}),t.estimatedEffort&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Estimated effort:"}),e.jsx(q,{variant:"outline",className:"text-[10px] capitalize",children:t.estimatedEffort})]})]})]}),e.jsxs(we,{children:[e.jsx(l,{type:"button",variant:"ghost",onClick:G,className:"rounded-xl",children:"Cancel"}),e.jsx(l,{type:"submit",disabled:!i.trim()||D.isPending,className:"gap-2 rounded-xl",children:D.isPending?e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"h-4 w-4"}),"Create Ticket"]})})]})]})})]})}function Je({view:u,onChange:h}){return e.jsxs("div",{className:"flex items-center gap-1 p-1 rounded-xl bg-[var(--muted)]/30 border border-[var(--border)]",children:[e.jsxs("button",{onClick:()=>h("list"),className:V("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-all",u==="list"?"bg-[var(--background)] text-[var(--foreground)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"),children:[e.jsx(Fe,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"List"})]}),e.jsxs("button",{onClick:()=>h("board"),className:V("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-all",u==="board"?"bg-[var(--background)] text-[var(--foreground)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"),children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Board"})]})]})}export{Xe as C,Je as V};
1
+ import{c as se,r as a,n as xe,u as E,o as B,t as n,m,j as e,k as l,P as X,p as c,I as J,L as f,i as V,C as ue,S as he,X as ge,O}from"./index-lJlNPFVJ.js";import{T as pe}from"./textarea-DsVPnSgR.js";import{B as q}from"./badge-CVHH1a-v.js";import{D as je,a as Ne,b as fe,c as be,d as ve,e as ye,f as we}from"./dialog-BUqN9Psj.js";import{S as b,a as v,b as y,c as w,d as x}from"./select-CeQ8AHGy.js";import{a as ke}from"./EstimateSelect-1hQf4Osk.js";import{B as Ce}from"./brain-6o_RHVpe.js";import{W as Z}from"./wand-sparkles-BusQ52ZK.js";import{F as Se}from"./folder-open-BJi577JH.js";import{L as _e}from"./link-2-DdO7ostF.js";import{L as te,C as ze}from"./layers-jFqVrWMD.js";import{a as ae,B as Ie}from"./bug-CmZI7jqM.js";import{H as Ae}from"./hash-DNEv8Elo.js";import{L as ee}from"./lightbulb-Jhp7FvbU.js";const Te=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Le=se("kanban",Te);const Pe=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Fe=se("list",Pe),Me=[{value:"task",label:"Task",icon:ue},{value:"bug",label:"Bug",icon:Ie},{value:"feature",label:"Feature",icon:he},{value:"epic",label:"Epic",icon:te},{value:"story",label:"Story",icon:ae},{value:"subtask",label:"Subtask",icon:ze}],De=[{value:"urgent",label:"Urgent",color:"text-red-500"},{value:"high",label:"High",color:"text-orange-500"},{value:"medium",label:"Medium",color:"text-yellow-500"},{value:"low",label:"Low",color:"text-blue-500"},{value:"none",label:"None",color:"text-gray-500"}];function Xe({defaultProjectId:u,defaultParentId:h}={}){const[K,R]=a.useState(!1),[i,k]=a.useState(""),[g,C]=a.useState(""),[S,_]=a.useState("task"),[$,z]=a.useState("medium"),[H,p]=a.useState(""),[I,W]=a.useState(null),[j,Q]=a.useState(u),[U,A]=a.useState(h),[T,L]=a.useState(null),[t,Y]=a.useState(null),[ie,P]=a.useState(!1),re=xe(),{data:ne}=E({queryKey:["ai-status"],queryFn:()=>m.tickets.ai.status(),staleTime:6e4}),{data:le}=E({queryKey:["projects"],queryFn:()=>m.projects.list({limit:50})}),{data:ce}=E({queryKey:["tickets","parents",j],queryFn:()=>m.tickets.list({projectId:j||void 0,type:["epic","story"],limit:50}),enabled:K}),oe=le?.projects||[],N=ce?.tickets||[],o=ne?.available??!1,d=B({mutationFn:()=>m.tickets.ai.categorize(i,g||void 0),onSuccess:s=>{s.categorization?(L(s.categorization),_(s.categorization.type),z(s.categorization.priority),s.categorization.labels.length>0&&p(s.categorization.labels.join(", ")),n.success(`AI categorized with ${Math.round(s.categorization.confidence*100)}% confidence`)):n.error("AI could not categorize this ticket")},onError:()=>{n.error("AI categorization failed")}}),F=B({mutationFn:()=>m.tickets.ai.suggest(i,g||void 0,S),onSuccess:s=>{s.suggestions?(Y(s.suggestions),P(!0)):n.error("AI could not generate suggestions")},onError:()=>{n.error("AI suggestion failed")}});a.useEffect(()=>{if(o&&i.length>=10&&!T&&!d.isPending){const s=setTimeout(()=>{d.mutate()},1e3);return()=>clearTimeout(s)}},[i,o]);const M=(s,r)=>{s==="title"&&typeof r=="string"?k(r):s==="description"&&typeof r=="string"?C(r):s==="suggestedLabels"&&Array.isArray(r)&&p(r.join(", ")),n.success(`Applied AI suggestion for ${s}`)},D=B({mutationFn:s=>m.tickets.create(s),onSuccess:s=>{re.invalidateQueries({queryKey:["tickets"]}),n.success(`Ticket PROFCLAW-${s.ticket.sequence} created`),G()},onError:s=>{n.error(`Failed to create ticket: ${s.message}`)}}),G=()=>{R(!1),k(""),C(""),_("task"),z("medium"),p(""),W(null),Q(u),A(h),L(null),Y(null),P(!1)},de=s=>{if(s.preventDefault(),!i.trim()){n.error("Title is required");return}const r=H.split(",").map(me=>me.trim()).filter(Boolean);D.mutate({title:i.trim(),description:g.trim()||void 0,type:S,priority:$,labels:r.length>0?r:void 0,estimate:I??void 0,estimateUnit:I!==null?"points":void 0,projectId:j||void 0,parentId:U||void 0,createdBy:"human"})};return e.jsxs(je,{open:K,onOpenChange:R,children:[e.jsx(Ne,{asChild:!0,children:e.jsxs(l,{className:"gap-2 rounded-xl",children:[e.jsx(X,{className:"h-4 w-4"}),"Create Ticket"]})}),e.jsx(fe,{className:"glass-heavy rounded-[20px] border-white/10 sm:max-w-[500px]",children:e.jsxs("form",{onSubmit:de,children:[e.jsxs(be,{children:[e.jsxs(ve,{className:"flex items-center gap-2",children:["Create Ticket",o&&e.jsxs(q,{variant:"outline",className:"text-xs font-normal gap-1 border-primary/30 text-primary",children:[e.jsx(Ce,{className:"h-3 w-3"}),"AI Assist"]})]}),e.jsxs(ye,{children:["Create a new ticket for your project. ",o?"AI will help categorize and suggest improvements.":"AI agents can pick this up and work on it."]})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{htmlFor:"title",children:"Title *"}),e.jsx(J,{id:"title",placeholder:"Brief description of the ticket...",value:i,onChange:s=>{k(s.target.value),L(null)},className:"bg-white/5 border-white/10 rounded-xl",autoFocus:!0}),o&&i.length>=10&&e.jsx("div",{className:"flex items-center gap-2 text-xs",children:d.isPending?e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(f,{className:"h-3 w-3 animate-spin"}),"AI analyzing..."]}):T?e.jsxs("span",{className:"flex items-center gap-1 text-green-400",children:[e.jsx(Z,{className:"h-3 w-3"}),"AI categorized (",Math.round(T.confidence*100),"% confidence)"]}):null})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{htmlFor:"description",children:"Description"}),e.jsx(pe,{id:"description",placeholder:"Detailed description, acceptance criteria, etc...",value:g,onChange:s=>C(s.target.value),className:"bg-white/5 border-white/10 rounded-xl min-h-[100px] resize-none"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(Se,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Project"]}),e.jsxs(b,{value:j||"__none__",onValueChange:s=>{Q(s==="__none__"?void 0:s),A(void 0)},children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{placeholder:"Select project..."})}),e.jsxs(w,{className:"glass-heavy rounded-xl border-white/10",children:[e.jsx(x,{value:"__none__",children:e.jsx("span",{className:"text-muted-foreground",children:"No project"})}),oe.map(s=>e.jsx(x,{value:s.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{children:s.icon}),e.jsx("span",{className:"truncate",children:s.name}),e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:s.key})]})},s.id))]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(_e,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Parent (Epic/Story)"]}),e.jsxs(b,{value:U||"__none__",onValueChange:s=>A(s==="__none__"?void 0:s),disabled:N.length===0,children:[e.jsx(v,{className:V("bg-white/5 border-white/10 rounded-xl",N.length===0&&"opacity-50"),children:e.jsx(y,{placeholder:N.length===0?"No epics/stories":"Select parent..."})}),e.jsxs(w,{className:"glass-heavy rounded-xl border-white/10 max-h-[200px]",children:[e.jsx(x,{value:"__none__",children:e.jsx("span",{className:"text-muted-foreground",children:"No parent"})}),N.map(s=>e.jsx(x,{value:s.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[s.type==="epic"?e.jsx(te,{className:"h-3.5 w-3.5 text-amber-400"}):e.jsx(ae,{className:"h-3.5 w-3.5 text-cyan-400"}),e.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:[s.projectKey||"PROFCLAW","-",s.sequence]}),e.jsx("span",{className:"truncate max-w-[140px]",children:s.title})]})},s.id))]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{children:"Type"}),e.jsxs(b,{value:S,onValueChange:s=>_(s),children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{})}),e.jsx(w,{className:"glass-heavy rounded-xl border-white/10",children:Me.map(s=>e.jsx(x,{value:s.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(s.icon,{className:"h-4 w-4"}),s.label]})},s.value))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{children:"Priority"}),e.jsxs(b,{value:$,onValueChange:s=>z(s),children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{})}),e.jsx(w,{className:"glass-heavy rounded-xl border-white/10",children:De.map(s=>e.jsx(x,{value:s.value,children:e.jsx("span",{className:`flex items-center gap-2 ${s.color}`,children:s.label})},s.value))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"col-span-2 grid gap-2",children:[e.jsx(c,{htmlFor:"labels",children:"Labels"}),e.jsx(J,{id:"labels",placeholder:"Comma-separated labels (e.g., frontend, auth)",value:H,onChange:s=>p(s.target.value),className:"bg-white/5 border-white/10 rounded-xl"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(Ae,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Estimate"]}),e.jsx(ke,{value:I,onChange:W,placeholder:"Points"})]})]}),o&&i.length>=5&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(l,{type:"button",variant:"outline",size:"sm",onClick:()=>d.mutate(),disabled:d.isPending,className:"flex-1 gap-1 rounded-xl border-white/10 text-xs",children:[d.isPending?e.jsx(f,{className:"h-3 w-3 animate-spin"}):e.jsx(Z,{className:"h-3 w-3"}),"Re-categorize"]}),e.jsxs(l,{type:"button",variant:"outline",size:"sm",onClick:()=>F.mutate(),disabled:F.isPending,className:"flex-1 gap-1 rounded-xl border-white/10 text-xs",children:[F.isPending?e.jsx(f,{className:"h-3 w-3 animate-spin"}):e.jsx(ee,{className:"h-3 w-3"}),"Get AI Suggestions"]})]}),ie&&t&&e.jsxs("div",{className:"rounded-xl bg-primary/5 border border-primary/20 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-1 text-sm font-medium text-primary",children:[e.jsx(ee,{className:"h-4 w-4"}),"AI Suggestions"]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>P(!1),className:"h-6 w-6 p-0 rounded-lg",children:e.jsx(ge,{className:"h-3 w-3"})})]}),t.title&&t.title!==i&&e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Improved title:"}),e.jsx("p",{className:"text-sm truncate",children:t.title})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("title",t.title),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(O,{className:"h-3 w-3"})})]}),t.description&&e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Suggested description:"}),e.jsx("p",{className:"text-sm line-clamp-2",children:t.description})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("description",t.description),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(O,{className:"h-3 w-3"})})]}),t.acceptanceCriteria&&t.acceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Acceptance criteria:"}),e.jsx("ul",{className:"text-xs space-y-0.5 text-muted-foreground",children:t.acceptanceCriteria.slice(0,3).map((s,r)=>e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"text-primary",children:"-"}),s]},r))})]}),t.suggestedLabels&&t.suggestedLabels.length>0&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Suggested labels:"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.suggestedLabels.map(s=>e.jsx(q,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:s},s))})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("suggestedLabels",t.suggestedLabels),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(O,{className:"h-3 w-3"})})]}),t.estimatedEffort&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Estimated effort:"}),e.jsx(q,{variant:"outline",className:"text-[10px] capitalize",children:t.estimatedEffort})]})]})]}),e.jsxs(we,{children:[e.jsx(l,{type:"button",variant:"ghost",onClick:G,className:"rounded-xl",children:"Cancel"}),e.jsx(l,{type:"submit",disabled:!i.trim()||D.isPending,className:"gap-2 rounded-xl",children:D.isPending?e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"h-4 w-4"}),"Create Ticket"]})})]})]})})]})}function Je({view:u,onChange:h}){return e.jsxs("div",{className:"flex items-center gap-1 p-1 rounded-xl bg-[var(--muted)]/30 border border-[var(--border)]",children:[e.jsxs("button",{onClick:()=>h("list"),className:V("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-all",u==="list"?"bg-[var(--background)] text-[var(--foreground)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"),children:[e.jsx(Fe,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"List"})]}),e.jsxs("button",{onClick:()=>h("board"),className:V("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-all",u==="board"?"bg-[var(--background)] text-[var(--foreground)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"),children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Board"})]})]})}export{Xe as C,Je as V};
@@ -1,4 +1,4 @@
1
- import{j as o,by as L,bK as m,bD as G,r as s,at as u,bL as H,bz as B,ar as V,bB as W,bC as Y,bA as A,bE as k,bl as q,bF as K,av as J,i as n,bM as D}from"./index--JkIxVXb.js";var v="AlertDialog",[Q]=J(v,[m]),i=m(),x=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(L,{...r,...t,modal:!0})};x.displayName=v;var U="AlertDialogTrigger",N=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(K,{...l,...r,ref:a})});N.displayName=U;var X="AlertDialogPortal",y=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(G,{...r,...t})};y.displayName=X;var Z="AlertDialogOverlay",b=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(k,{...l,...r,ref:a})});b.displayName=Z;var c="AlertDialogContent",[ee,ae]=Q(c),te=q("AlertDialogContent"),R=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,children:r,...l}=e,g=i(t),p=s.useRef(null),z=u(a,p),f=s.useRef(null);return o.jsx(H,{contentName:c,titleName:_,docsSlug:"alert-dialog",children:o.jsx(ee,{scope:t,cancelRef:f,children:o.jsxs(B,{role:"alertdialog",...g,...l,ref:z,onOpenAutoFocus:V(l.onOpenAutoFocus,d=>{d.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[o.jsx(te,{children:r}),o.jsx(re,{contentRef:p})]})})})});R.displayName=c;var _="AlertDialogTitle",j=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(W,{...l,...r,ref:a})});j.displayName=_;var h="AlertDialogDescription",C=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(Y,{...l,...r,ref:a})});C.displayName=h;var oe="AlertDialogAction",E=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(A,{...l,...r,ref:a})});E.displayName=oe;var w="AlertDialogCancel",P=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,{cancelRef:l}=ae(w,t),g=i(t),p=u(a,l);return o.jsx(A,{...g,...r,ref:p})});P.displayName=w;var re=({contentRef:e})=>{const a=`\`${c}\` requires a description for the component to be accessible for screen reader users.
1
+ import{j as o,by as L,bK as m,bD as G,r as s,at as u,bL as H,bz as B,ar as V,bB as W,bC as Y,bA as A,bE as k,bl as q,bF as K,av as J,i as n,bM as D}from"./index-lJlNPFVJ.js";var v="AlertDialog",[Q]=J(v,[m]),i=m(),x=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(L,{...r,...t,modal:!0})};x.displayName=v;var U="AlertDialogTrigger",N=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(K,{...l,...r,ref:a})});N.displayName=U;var X="AlertDialogPortal",y=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(G,{...r,...t})};y.displayName=X;var Z="AlertDialogOverlay",b=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(k,{...l,...r,ref:a})});b.displayName=Z;var c="AlertDialogContent",[ee,ae]=Q(c),te=q("AlertDialogContent"),R=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,children:r,...l}=e,g=i(t),p=s.useRef(null),z=u(a,p),f=s.useRef(null);return o.jsx(H,{contentName:c,titleName:_,docsSlug:"alert-dialog",children:o.jsx(ee,{scope:t,cancelRef:f,children:o.jsxs(B,{role:"alertdialog",...g,...l,ref:z,onOpenAutoFocus:V(l.onOpenAutoFocus,d=>{d.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[o.jsx(te,{children:r}),o.jsx(re,{contentRef:p})]})})})});R.displayName=c;var _="AlertDialogTitle",j=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(W,{...l,...r,ref:a})});j.displayName=_;var h="AlertDialogDescription",C=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(Y,{...l,...r,ref:a})});C.displayName=h;var oe="AlertDialogAction",E=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(A,{...l,...r,ref:a})});E.displayName=oe;var w="AlertDialogCancel",P=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,{cancelRef:l}=ae(w,t),g=i(t),p=u(a,l);return o.jsx(A,{...g,...r,ref:p})});P.displayName=w;var re=({contentRef:e})=>{const a=`\`${c}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${c}\` by passing a \`${h}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{c as e}from"./index--JkIxVXb.js";const c=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],a=e("archive",c);export{a as A};
1
+ import{c as e}from"./index-lJlNPFVJ.js";const c=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],a=e("archive",c);export{a as A};
@@ -1 +1 @@
1
- import{j as n,i as o,bI as s}from"./index--JkIxVXb.js";const a=s("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-sm hover:brightness-110",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-sm",outline:"border-border text-foreground hover:bg-muted/50",success:"border-transparent bg-success/10 text-success border border-success/20",warning:"border-transparent bg-warning/10 text-warning border border-warning/20",info:"border-transparent bg-info/10 text-info border border-info/20"}},defaultVariants:{variant:"default"}});function i({className:r,variant:e,...t}){return n.jsx("div",{className:o(a({variant:e}),r),...t})}export{i as B};
1
+ import{j as n,i as o,bI as s}from"./index-lJlNPFVJ.js";const a=s("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-sm hover:brightness-110",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-sm",outline:"border-border text-foreground hover:bg-muted/50",success:"border-transparent bg-success/10 text-success border border-success/20",warning:"border-transparent bg-warning/10 text-warning border border-warning/20",info:"border-transparent bg-info/10 text-info border border-info/20"}},defaultVariants:{variant:"default"}});function i({className:r,variant:e,...t}){return n.jsx("div",{className:o(a({variant:e}),r),...t})}export{i as B};
@@ -1 +1 @@
1
- import{c as a}from"./index--JkIxVXb.js";const e=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],t=a("brain",e);export{t as B};
1
+ import{c as a}from"./index-lJlNPFVJ.js";const e=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],t=a("brain",e);export{t as B};
@@ -1 +1 @@
1
- import{c as a}from"./index--JkIxVXb.js";const t=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],p=a("book-open",t);const e=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],d=a("bug",e);export{d as B,p as a};
1
+ import{c as a}from"./index-lJlNPFVJ.js";const t=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],p=a("book-open",t);const e=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],d=a("bug",e);export{d as B,p as a};
@@ -1 +1 @@
1
- import{c as e}from"./index--JkIxVXb.js";const t=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],a=e("calendar",t);export{a as C};
1
+ import{c as e}from"./index-lJlNPFVJ.js";const t=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],a=e("calendar",t);export{a as C};
@@ -1 +1 @@
1
- import{c as o}from"./index--JkIxVXb.js";const c=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],n=o("chevron-up",c);export{n as C};
1
+ import{c as o}from"./index-lJlNPFVJ.js";const c=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],n=o("chevron-up",c);export{n as C};
@@ -1 +1 @@
1
- import{c}from"./index--JkIxVXb.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],o=c("circle-x",e);export{o as C};
1
+ import{c}from"./index-lJlNPFVJ.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],o=c("circle-x",e);export{o as C};
@@ -1 +1 @@
1
- import{c as e,an as s,aK as i,S as l,ai as r,_ as c,aB as p,aC as n,aE as d,aF as u,aL as m,aM as g,aN as y,aH as h,aG as k,aO as b,aP as L,aQ as v,aR as M,aS as A,aT as f,aU as I,aV as x,aI as w,aD as U,aW as S,aJ as _,aX as C,aY as P,aZ as G,a_ as z,a$ as N,b0 as T,b1 as V,b2 as B,b3 as R,b4 as q,b5 as D,b6 as E,b7 as O,b8 as H}from"./index--JkIxVXb.js";import{S as F}from"./settings-2-scXUOuE_.js";import{T as K}from"./tag-tAwMmQ9G.js";import{S as W}from"./smartphone-DusFfY0U.js";import{B as $}from"./brain-CfFdLVqb.js";import{W as Q}from"./wrench-B8s3zYVV.js";import{D as j}from"./database-CA2w8Lvt.js";import{G as X}from"./globe-CQWfr7hT.js";import{C as Z}from"./cpu-Ck6AoG8c.js";const J=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Ie=e("code-xml",J);const Y=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],ee=e("message-circle",Y);const oe=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],ae=e("mic",oe);const te=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],se=e("monitor-smartphone",te);const ie=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],le=e("plug",ie);const re=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],ce=e("puzzle",re);const pe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],xe=e("shield-alert",pe);const ne=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],de=e("store",ne);const ue=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],we=e("test-tube",ue);const me=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Ue=e("volume-2",me),Se=[{id:"general",label:"General",icon:F,description:"Appearance and preferences"},{id:"account",label:"Account",icon:s,description:"Profile and recovery codes"},{id:"notifications",label:"Notifications",icon:i,description:"Alert preferences"},{id:"ai-providers",label:"AI Providers",icon:l,description:"Configure AI models"},{id:"labels",label:"Labels",icon:K,description:"Manage project labels"},{id:"integrations",label:"Integrations",icon:r,description:"API keys and services"},{id:"messaging",label:"Messaging",icon:ee,description:"Telegram, Discord, WhatsApp"},{id:"devices",label:"Devices",icon:W,description:"Manage paired devices"},{id:"memory",label:"Memory",icon:$,description:"Semantic memory system"},{id:"skills",label:"Skills",icon:ce,description:"Modular AI capabilities"},{id:"tools",label:"Tools",icon:Q,description:"AI tool configuration"},{id:"security",label:"Security",icon:c,description:"Tool execution security"},{id:"plugins",label:"Plugins & MCP",icon:le,description:"Extensions and MCP"},{id:"marketplace",label:"Marketplace",icon:de,description:"Browse and install plugins & skills"},{id:"storage",label:"Storage",icon:j,description:"Data and backup"},{id:"voice",label:"Voice",icon:ae,description:"Speech recognition and synthesis"},{id:"pwa",label:"App & Notifications",icon:se,description:"Install app, push notifications"},{id:"tunnels",label:"Tunnels",icon:X,description:"Remote access via Tailscale or Cloudflare"},{id:"system",label:"System",icon:Z,description:"Advanced settings"}],_e=[{type:"anthropic",name:"Anthropic",description:"Claude Opus, Sonnet, Haiku",Logo:p,setupUrl:"https://console.anthropic.com/settings/keys",placeholder:"sk-ant-...",category:"cloud",models:[]},{type:"openai",name:"OpenAI",description:"GPT-4.5, o1, o3-mini",Logo:n,setupUrl:"https://platform.openai.com/api-keys",placeholder:"sk-...",category:"cloud",models:[]},{type:"google",name:"Google AI",description:"Gemini 2.5 Pro, Flash",Logo:d,setupUrl:"https://makersuite.google.com/app/apikey",placeholder:"AIza...",category:"cloud",models:[]},{type:"xai",name:"xAI (Grok)",description:"Grok 2, Grok 3 models",Logo:u,setupUrl:"https://console.x.ai/",placeholder:"xai-...",category:"cloud",models:[]},{type:"mistral",name:"Mistral AI",description:"Mistral Large, Medium, Codestral",Logo:m,setupUrl:"https://console.mistral.ai/api-keys/",placeholder:"your-key...",category:"cloud",models:[]},{type:"cohere",name:"Cohere",description:"Command R, R+",Logo:g,setupUrl:"https://dashboard.cohere.com/api-keys",placeholder:"your-key...",category:"cloud",models:[]},{type:"perplexity",name:"Perplexity",description:"Sonar models with search",Logo:y,setupUrl:"https://www.perplexity.ai/settings/api",placeholder:"pplx-...",category:"cloud",models:[]},{type:"deepseek",name:"DeepSeek",description:"DeepSeek Chat, Coder, R1",Logo:h,setupUrl:"https://platform.deepseek.com/api_keys",placeholder:"sk-...",category:"cloud",models:[]},{type:"groq",name:"Groq",description:"Ultra-fast Llama & Mixtral",Logo:k,setupUrl:"https://console.groq.com/keys",placeholder:"gsk_...",category:"cloud",models:[]},{type:"together",name:"Together AI",description:"Fast open-source models",Logo:b,setupUrl:"https://api.together.xyz/settings/api-keys",placeholder:"your-key...",category:"cloud",models:[]},{type:"cerebras",name:"Cerebras",description:"Fastest Llama inference",Logo:L,setupUrl:"https://cloud.cerebras.ai/",placeholder:"csk-...",category:"cloud",models:[]},{type:"fireworks",name:"Fireworks",description:"Fast serverless inference",Logo:v,setupUrl:"https://fireworks.ai/account/api-keys",placeholder:"fw-...",category:"cloud",models:[]},{type:"replicate",name:"Replicate",description:"Hosted open-source models (Llama, Mixtral)",Logo:M,setupUrl:"https://replicate.com/account/api-tokens",placeholder:"r8_...",category:"cloud",models:[],status:"beta"},{type:"github-models",name:"GitHub Models",description:"GPT-4o, Phi-4, Llama via GitHub",Logo:A,setupUrl:"https://github.com/marketplace/models",placeholder:"ghp_...",category:"cloud",models:[],status:"beta"},{type:"zhipu",name:"Zhipu AI",description:"GLM-5, GLM-4.7, GLM-4 series",Logo:f,setupUrl:"https://open.bigmodel.cn/usercenter/apikeys",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"moonshot",name:"Moonshot (Kimi)",description:"Long-context Kimi models (1M tokens)",Logo:I,setupUrl:"https://platform.moonshot.cn/console/api-keys",placeholder:"sk-...",category:"cloud",models:[],status:"beta"},{type:"qwen",name:"Qwen (Alibaba)",description:"Qwen-Max, Qwen-Plus, Qwen-Turbo",Logo:x,setupUrl:"https://dashscope.console.aliyun.com/apiKey",placeholder:"sk-...",category:"cloud",models:[],status:"beta"},{type:"openrouter",name:"OpenRouter",description:"300+ models via one API",Logo:w,setupUrl:"https://openrouter.ai/keys",placeholder:"sk-or-...",category:"cloud",models:[]},{type:"azure",name:"Azure OpenAI",description:"Enterprise GPT-4 via Azure / Foundry",Logo:U,setupUrl:"https://portal.azure.com/",placeholder:"your-key...",category:"enterprise",models:[],requiresBaseUrl:!0},{type:"bedrock",name:"AWS Bedrock",description:"Claude, Llama, Mistral via AWS",Logo:S,setupUrl:"https://console.aws.amazon.com/bedrock/",placeholder:"AKIA...",category:"enterprise",models:[],status:"stable"},{type:"ollama",name:"Ollama (Local)",description:"Run models locally - free",Logo:_,setupUrl:"https://ollama.ai/download",placeholder:"http://localhost:11434",category:"local",models:[],requiresBaseUrl:!0},{type:"copilot",name:"GitHub Copilot",description:"Use your Copilot subscription (experimental)",Logo:C,setupUrl:"https://github.com/ericc-ch/copilot-api",placeholder:"http://localhost:4141",category:"local",models:[],requiresBaseUrl:!0,status:"experimental"},{type:"volcengine",name:"Volcengine Doubao",description:"Bytedance Doubao Pro/Lite models",Logo:P,setupUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"byteplus",name:"BytePlus",description:"International Bytedance AI models",Logo:G,setupUrl:"https://console.byteplus.com/",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"qianfan",name:"Baidu Qianfan",description:"ERNIE Bot 4.0, ERNIE Speed",Logo:z,setupUrl:"https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"modelstudio",name:"ModelStudio",description:"Alibaba DashScope compatible mode",Logo:N,setupUrl:"https://dashscope.console.aliyun.com/apiKey",placeholder:"sk-...",category:"cloud",models:[],status:"experimental"},{type:"minimax",name:"Minimax",description:"abab6.5, abab5.5 models (245k context)",Logo:T,setupUrl:"https://www.minimaxi.com/user-center/basic-information/interface-key",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"xiaomi",name:"Xiaomi MiLM",description:"Xiaomi AI language models",Logo:V,setupUrl:"https://ai.xiaomi.com/",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"huggingface",name:"HuggingFace",description:"Llama, Mistral, and 1000s of open models",Logo:B,setupUrl:"https://huggingface.co/settings/tokens",placeholder:"hf_...",category:"cloud",models:[],status:"beta"},{type:"nvidia-nim",name:"NVIDIA NIM",description:"Llama 3.1 405B, Mixtral via NVIDIA",Logo:R,setupUrl:"https://build.nvidia.com/explore/discover",placeholder:"nvapi-...",category:"cloud",models:[],status:"beta"},{type:"venice",name:"Venice AI",description:"Privacy-preserving AI inference",Logo:q,setupUrl:"https://venice.ai/settings/api",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"kilocode",name:"Kilocode",description:"AI-powered code assistance",Logo:D,setupUrl:"https://kilocode.ai/",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"vercel-ai",name:"Vercel AI Gateway",description:"Unified gateway for multiple AI providers",Logo:E,setupUrl:"https://vercel.com/docs/ai/gateway",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"cloudflare-ai",name:"Cloudflare AI Gateway",description:"Route AI calls via Cloudflare Workers AI",Logo:O,setupUrl:"https://dash.cloudflare.com/?to=/:account/ai/ai-gateway",placeholder:"your-token...",category:"cloud",models:[],requiresBaseUrl:!0,status:"beta"},{type:"watsonx",name:"IBM Watsonx",description:"Granite enterprise AI models",Logo:H,setupUrl:"https://dataplatform.cloud.ibm.com/wx/home",placeholder:"your-key...",category:"enterprise",models:[],status:"stable"}],Ce=[{value:"2024-10-21",label:"2024-10-21 (Recommended - Stable)"},{value:"2024-12-01-preview",label:"2024-12-01-preview (For o1/o1-mini)"},{value:"2025-01-01-preview",label:"2025-01-01-preview (Latest Preview)"},{value:"2024-08-01-preview",label:"2024-08-01-preview"},{value:"2024-02-15-preview",label:"2024-02-15-preview (Legacy)"}];function Pe(o){if(!o)return{valid:!0};try{if(!new URL(o).protocol.startsWith("https"))return{valid:!1,message:"Must use HTTPS"};const a=o.includes("openai.azure.com"),t=o.includes("cognitive.microsoft.com")||o.includes("cognitiveservices.azure.com");return a||t?{valid:!0}:{valid:!1,message:"Must be an Azure endpoint (e.g., https://your-resource.openai.azure.com or https://eastus.api.cognitive.microsoft.com)"}}catch{return{valid:!1,message:"Invalid URL format"}}}const Ge="http://localhost:3000";export{Ce as A,Ie as C,ae as M,ce as P,xe as S,we as T,Ue as V,_e as a,Ge as b,le as c,de as d,Se as e,ee as f,Pe as v};
1
+ import{c as e,an as s,aK as i,S as l,ai as r,_ as c,aB as p,aC as n,aE as d,aF as u,aL as m,aM as g,aN as y,aH as h,aG as k,aO as b,aP as L,aQ as v,aR as M,aS as A,aT as f,aU as I,aV as x,aI as w,aD as U,aW as S,aJ as _,aX as C,aY as P,aZ as G,a_ as z,a$ as N,b0 as T,b1 as V,b2 as B,b3 as R,b4 as q,b5 as D,b6 as E,b7 as O,b8 as H}from"./index-lJlNPFVJ.js";import{S as F}from"./settings-2-ocj5uHGx.js";import{T as K}from"./tag-C35mgoEv.js";import{S as W}from"./smartphone-77_g3SQn.js";import{B as $}from"./brain-6o_RHVpe.js";import{W as Q}from"./wrench-02YaOSiK.js";import{D as j}from"./database-BwTfupDi.js";import{G as X}from"./globe-f-jjCa_g.js";import{C as Z}from"./cpu-DiPMQICV.js";const J=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Ie=e("code-xml",J);const Y=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],ee=e("message-circle",Y);const oe=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],ae=e("mic",oe);const te=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],se=e("monitor-smartphone",te);const ie=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],le=e("plug",ie);const re=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],ce=e("puzzle",re);const pe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],xe=e("shield-alert",pe);const ne=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],de=e("store",ne);const ue=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],we=e("test-tube",ue);const me=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Ue=e("volume-2",me),Se=[{id:"general",label:"General",icon:F,description:"Appearance and preferences"},{id:"account",label:"Account",icon:s,description:"Profile and recovery codes"},{id:"notifications",label:"Notifications",icon:i,description:"Alert preferences"},{id:"ai-providers",label:"AI Providers",icon:l,description:"Configure AI models"},{id:"labels",label:"Labels",icon:K,description:"Manage project labels"},{id:"integrations",label:"Integrations",icon:r,description:"API keys and services"},{id:"messaging",label:"Messaging",icon:ee,description:"Telegram, Discord, WhatsApp"},{id:"devices",label:"Devices",icon:W,description:"Manage paired devices"},{id:"memory",label:"Memory",icon:$,description:"Semantic memory system"},{id:"skills",label:"Skills",icon:ce,description:"Modular AI capabilities"},{id:"tools",label:"Tools",icon:Q,description:"AI tool configuration"},{id:"security",label:"Security",icon:c,description:"Tool execution security"},{id:"plugins",label:"Plugins & MCP",icon:le,description:"Extensions and MCP"},{id:"marketplace",label:"Marketplace",icon:de,description:"Browse and install plugins & skills"},{id:"storage",label:"Storage",icon:j,description:"Data and backup"},{id:"voice",label:"Voice",icon:ae,description:"Speech recognition and synthesis"},{id:"pwa",label:"App & Notifications",icon:se,description:"Install app, push notifications"},{id:"tunnels",label:"Tunnels",icon:X,description:"Remote access via Tailscale or Cloudflare"},{id:"system",label:"System",icon:Z,description:"Advanced settings"}],_e=[{type:"anthropic",name:"Anthropic",description:"Claude Opus, Sonnet, Haiku",Logo:p,setupUrl:"https://console.anthropic.com/settings/keys",placeholder:"sk-ant-...",category:"cloud",models:[]},{type:"openai",name:"OpenAI",description:"GPT-4.5, o1, o3-mini",Logo:n,setupUrl:"https://platform.openai.com/api-keys",placeholder:"sk-...",category:"cloud",models:[]},{type:"google",name:"Google AI",description:"Gemini 2.5 Pro, Flash",Logo:d,setupUrl:"https://makersuite.google.com/app/apikey",placeholder:"AIza...",category:"cloud",models:[]},{type:"xai",name:"xAI (Grok)",description:"Grok 2, Grok 3 models",Logo:u,setupUrl:"https://console.x.ai/",placeholder:"xai-...",category:"cloud",models:[]},{type:"mistral",name:"Mistral AI",description:"Mistral Large, Medium, Codestral",Logo:m,setupUrl:"https://console.mistral.ai/api-keys/",placeholder:"your-key...",category:"cloud",models:[]},{type:"cohere",name:"Cohere",description:"Command R, R+",Logo:g,setupUrl:"https://dashboard.cohere.com/api-keys",placeholder:"your-key...",category:"cloud",models:[]},{type:"perplexity",name:"Perplexity",description:"Sonar models with search",Logo:y,setupUrl:"https://www.perplexity.ai/settings/api",placeholder:"pplx-...",category:"cloud",models:[]},{type:"deepseek",name:"DeepSeek",description:"DeepSeek Chat, Coder, R1",Logo:h,setupUrl:"https://platform.deepseek.com/api_keys",placeholder:"sk-...",category:"cloud",models:[]},{type:"groq",name:"Groq",description:"Ultra-fast Llama & Mixtral",Logo:k,setupUrl:"https://console.groq.com/keys",placeholder:"gsk_...",category:"cloud",models:[]},{type:"together",name:"Together AI",description:"Fast open-source models",Logo:b,setupUrl:"https://api.together.xyz/settings/api-keys",placeholder:"your-key...",category:"cloud",models:[]},{type:"cerebras",name:"Cerebras",description:"Fastest Llama inference",Logo:L,setupUrl:"https://cloud.cerebras.ai/",placeholder:"csk-...",category:"cloud",models:[]},{type:"fireworks",name:"Fireworks",description:"Fast serverless inference",Logo:v,setupUrl:"https://fireworks.ai/account/api-keys",placeholder:"fw-...",category:"cloud",models:[]},{type:"replicate",name:"Replicate",description:"Hosted open-source models (Llama, Mixtral)",Logo:M,setupUrl:"https://replicate.com/account/api-tokens",placeholder:"r8_...",category:"cloud",models:[],status:"beta"},{type:"github-models",name:"GitHub Models",description:"GPT-4o, Phi-4, Llama via GitHub",Logo:A,setupUrl:"https://github.com/marketplace/models",placeholder:"ghp_...",category:"cloud",models:[],status:"beta"},{type:"zhipu",name:"Zhipu AI",description:"GLM-5, GLM-4.7, GLM-4 series",Logo:f,setupUrl:"https://open.bigmodel.cn/usercenter/apikeys",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"moonshot",name:"Moonshot (Kimi)",description:"Long-context Kimi models (1M tokens)",Logo:I,setupUrl:"https://platform.moonshot.cn/console/api-keys",placeholder:"sk-...",category:"cloud",models:[],status:"beta"},{type:"qwen",name:"Qwen (Alibaba)",description:"Qwen-Max, Qwen-Plus, Qwen-Turbo",Logo:x,setupUrl:"https://dashscope.console.aliyun.com/apiKey",placeholder:"sk-...",category:"cloud",models:[],status:"beta"},{type:"openrouter",name:"OpenRouter",description:"300+ models via one API",Logo:w,setupUrl:"https://openrouter.ai/keys",placeholder:"sk-or-...",category:"cloud",models:[]},{type:"azure",name:"Azure OpenAI",description:"Enterprise GPT-4 via Azure / Foundry",Logo:U,setupUrl:"https://portal.azure.com/",placeholder:"your-key...",category:"enterprise",models:[],requiresBaseUrl:!0},{type:"bedrock",name:"AWS Bedrock",description:"Claude, Llama, Mistral via AWS",Logo:S,setupUrl:"https://console.aws.amazon.com/bedrock/",placeholder:"AKIA...",category:"enterprise",models:[],status:"stable"},{type:"ollama",name:"Ollama (Local)",description:"Run models locally - free",Logo:_,setupUrl:"https://ollama.ai/download",placeholder:"http://localhost:11434",category:"local",models:[],requiresBaseUrl:!0},{type:"copilot",name:"GitHub Copilot",description:"Use your Copilot subscription (experimental)",Logo:C,setupUrl:"https://github.com/ericc-ch/copilot-api",placeholder:"http://localhost:4141",category:"local",models:[],requiresBaseUrl:!0,status:"experimental"},{type:"volcengine",name:"Volcengine Doubao",description:"Bytedance Doubao Pro/Lite models",Logo:P,setupUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"byteplus",name:"BytePlus",description:"International Bytedance AI models",Logo:G,setupUrl:"https://console.byteplus.com/",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"qianfan",name:"Baidu Qianfan",description:"ERNIE Bot 4.0, ERNIE Speed",Logo:z,setupUrl:"https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"modelstudio",name:"ModelStudio",description:"Alibaba DashScope compatible mode",Logo:N,setupUrl:"https://dashscope.console.aliyun.com/apiKey",placeholder:"sk-...",category:"cloud",models:[],status:"experimental"},{type:"minimax",name:"Minimax",description:"abab6.5, abab5.5 models (245k context)",Logo:T,setupUrl:"https://www.minimaxi.com/user-center/basic-information/interface-key",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"xiaomi",name:"Xiaomi MiLM",description:"Xiaomi AI language models",Logo:V,setupUrl:"https://ai.xiaomi.com/",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"huggingface",name:"HuggingFace",description:"Llama, Mistral, and 1000s of open models",Logo:B,setupUrl:"https://huggingface.co/settings/tokens",placeholder:"hf_...",category:"cloud",models:[],status:"beta"},{type:"nvidia-nim",name:"NVIDIA NIM",description:"Llama 3.1 405B, Mixtral via NVIDIA",Logo:R,setupUrl:"https://build.nvidia.com/explore/discover",placeholder:"nvapi-...",category:"cloud",models:[],status:"beta"},{type:"venice",name:"Venice AI",description:"Privacy-preserving AI inference",Logo:q,setupUrl:"https://venice.ai/settings/api",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"kilocode",name:"Kilocode",description:"AI-powered code assistance",Logo:D,setupUrl:"https://kilocode.ai/",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"vercel-ai",name:"Vercel AI Gateway",description:"Unified gateway for multiple AI providers",Logo:E,setupUrl:"https://vercel.com/docs/ai/gateway",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"cloudflare-ai",name:"Cloudflare AI Gateway",description:"Route AI calls via Cloudflare Workers AI",Logo:O,setupUrl:"https://dash.cloudflare.com/?to=/:account/ai/ai-gateway",placeholder:"your-token...",category:"cloud",models:[],requiresBaseUrl:!0,status:"beta"},{type:"watsonx",name:"IBM Watsonx",description:"Granite enterprise AI models",Logo:H,setupUrl:"https://dataplatform.cloud.ibm.com/wx/home",placeholder:"your-key...",category:"enterprise",models:[],status:"stable"}],Ce=[{value:"2024-10-21",label:"2024-10-21 (Recommended - Stable)"},{value:"2024-12-01-preview",label:"2024-12-01-preview (For o1/o1-mini)"},{value:"2025-01-01-preview",label:"2025-01-01-preview (Latest Preview)"},{value:"2024-08-01-preview",label:"2024-08-01-preview"},{value:"2024-02-15-preview",label:"2024-02-15-preview (Legacy)"}];function Pe(o){if(!o)return{valid:!0};try{if(!new URL(o).protocol.startsWith("https"))return{valid:!1,message:"Must use HTTPS"};const a=o.includes("openai.azure.com"),t=o.includes("cognitive.microsoft.com")||o.includes("cognitiveservices.azure.com");return a||t?{valid:!0}:{valid:!1,message:"Must be an Azure endpoint (e.g., https://your-resource.openai.azure.com or https://eastus.api.cognitive.microsoft.com)"}}catch{return{valid:!1,message:"Invalid URL format"}}}const Ge="http://localhost:3000";export{Ce as A,Ie as C,ae as M,ce as P,xe as S,we as T,Ue as V,_e as a,Ge as b,le as c,de as d,Se as e,ee as f,Pe as v};
@@ -1 +1 @@
1
- import{c as h}from"./index--JkIxVXb.js";const t=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],d=h("cpu",t);export{d as C};
1
+ import{c as h}from"./index-lJlNPFVJ.js";const t=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],d=h("cpu",t);export{d as C};
@@ -1 +1 @@
1
- import{c as e}from"./index--JkIxVXb.js";const a=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],s=e("database",a);export{s as D};
1
+ import{c as e}from"./index-lJlNPFVJ.js";const a=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],s=e("database",a);export{s as D};
@@ -1 +1 @@
1
- import{by as f,bF as p,r as l,j as t,bD as g,bz as i,bA as x,X as u,i as o,bB as d,bC as n,bE as r}from"./index--JkIxVXb.js";const w=f,R=p,y=g,c=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=r.displayName;const N=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(y,{children:[t.jsx(c,{}),t.jsxs(i,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-2xl modal-glass 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-2xl",a),...s,children:[e,t.jsxs(x,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-[var(--background)] transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-[var(--accent)] data-[state=open]:text-[var(--muted-foreground)]",children:[t.jsx(u,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));N.displayName=i.displayName;const b=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});b.displayName="DialogHeader";const D=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});D.displayName="DialogFooter";const j=l.forwardRef(({className:a,...e},s)=>t.jsx(d,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));j.displayName=d.displayName;const v=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("text-sm text-[var(--muted-foreground)]",a),...e}));v.displayName=n.displayName;export{w as D,R as a,N as b,b as c,j as d,v as e,D as f};
1
+ import{by as f,bF as p,r as l,j as t,bD as g,bz as i,bA as x,X as u,i as o,bB as d,bC as n,bE as r}from"./index-lJlNPFVJ.js";const w=f,R=p,y=g,c=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=r.displayName;const N=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(y,{children:[t.jsx(c,{}),t.jsxs(i,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-2xl modal-glass 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-2xl",a),...s,children:[e,t.jsxs(x,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-[var(--background)] transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-[var(--accent)] data-[state=open]:text-[var(--muted-foreground)]",children:[t.jsx(u,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));N.displayName=i.displayName;const b=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});b.displayName="DialogHeader";const D=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});D.displayName="DialogFooter";const j=l.forwardRef(({className:a,...e},s)=>t.jsx(d,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));j.displayName=d.displayName;const v=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("text-sm text-[var(--muted-foreground)]",a),...e}));v.displayName=n.displayName;export{w as D,R as a,N as b,b as c,j as d,v as e,D as f};
@@ -1 +1 @@
1
- import{c}from"./index--JkIxVXb.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],r=c("ellipsis",e);export{r as E};
1
+ import{c}from"./index-lJlNPFVJ.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],r=c("ellipsis",e);export{r as E};
@@ -1 +1 @@
1
- import{c}from"./index--JkIxVXb.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],r=c("ellipsis-vertical",e);export{r as E};
1
+ import{c}from"./index-lJlNPFVJ.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],r=c("ellipsis-vertical",e);export{r as E};
@@ -1 +1 @@
1
- import{c as e}from"./index--JkIxVXb.js";const a=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],t=e("file-code",a);export{t as F};
1
+ import{c as e}from"./index-lJlNPFVJ.js";const a=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],t=e("file-code",a);export{t as F};
@@ -1 +1 @@
1
- import{c as a}from"./index--JkIxVXb.js";const o=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],c=a("folder-open",o);export{c as F};
1
+ import{c as a}from"./index-lJlNPFVJ.js";const o=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],c=a("folder-open",o);export{c as F};
@@ -1 +1 @@
1
- import{c}from"./index--JkIxVXb.js";const e=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],o=c("funnel",e);export{o as F};
1
+ import{c}from"./index-lJlNPFVJ.js";const e=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],o=c("funnel",e);export{o as F};
@@ -1 +1 @@
1
- import{c}from"./index--JkIxVXb.js";const e=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],y=c("git-branch",e);export{y as G};
1
+ import{c}from"./index-lJlNPFVJ.js";const e=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],y=c("git-branch",e);export{y as G};
@@ -1 +1 @@
1
- import{c as o}from"./index--JkIxVXb.js";const c=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],t=o("git-commit-horizontal",c);export{t as G};
1
+ import{c as o}from"./index-lJlNPFVJ.js";const c=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],t=o("git-commit-horizontal",c);export{t as G};
@@ -1 +1 @@
1
- import{c}from"./index--JkIxVXb.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],a=c("globe",e);export{a as G};
1
+ import{c}from"./index-lJlNPFVJ.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],a=c("globe",e);export{a as G};
@@ -1 +1 @@
1
- import{c as e}from"./index--JkIxVXb.js";const y=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],o=e("hash",y);export{o as H};
1
+ import{c as e}from"./index-lJlNPFVJ.js";const y=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],o=e("hash",y);export{o as H};
@@ -1 +1 @@
1
- import{c as o}from"./index--JkIxVXb.js";const t=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],a=o("history",t);export{a as H};
1
+ import{c as o}from"./index-lJlNPFVJ.js";const t=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],a=o("history",t);export{a as H};
@@ -1 +1 @@
1
- import{c as Q,u as A,n as w,o as b,m as f,r as p,j as e,b as i,f as c,k as j,H as k,ak as y,i as C,U as L,g as D,a5 as I,R as v,t as h}from"./index--JkIxVXb.js";import{B as q}from"./badge-DEmc3Z_l.js";import{S as z}from"./skeleton-C9oEzNlU.js";import{C as B}from"./circle-x-C78PNZjF.js";import{C as K}from"./chevron-up-DcJ4LL_N.js";import{T as M}from"./trash-2-eM-CNwsZ.js";const E=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],U=Q("skull",E);function _(){return A({queryKey:["dlq"],queryFn:()=>f.dlq.list(),refetchInterval:1e4})}function H(){const t=w();return b({mutationFn:n=>f.dlq.retry(n),onSuccess:()=>{t.invalidateQueries({queryKey:["dlq"]}),t.invalidateQueries({queryKey:["tasks"]})}})}function X(){const t=w();return b({mutationFn:n=>f.dlq.remove(n),onSuccess:()=>{t.invalidateQueries({queryKey:["dlq"]})}})}function G({task:t,onRetry:n,onRemove:u,isRetrying:o,isRemoving:x}){const[l,m]=p.useState(!1);return e.jsx(i,{className:"glass rounded-[20px] overflow-hidden border-red-500/10 group hover-lift transition-liquid",children:e.jsx(c,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-red-500/10 flex items-center justify-center flex-shrink-0",children:e.jsx(B,{className:"h-4 w-4 text-red-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-bold truncate",children:t.title}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(D,{className:"h-3 w-3"}),new Date(t.failedAt).toLocaleString()]}),e.jsxs(q,{variant:"secondary",className:"text-[9px] px-1.5 py-0",children:[t.attempts," ",t.attempts===1?"attempt":"attempts"]})]})]})]}),e.jsx("button",{onClick:()=>m(!l),className:"w-full text-left",children:e.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[l?e.jsx(K,{className:"h-3 w-3"}):e.jsx(I,{className:"h-3 w-3"}),e.jsx("span",{className:C("transition-all",l?"":"truncate"),children:t.error})]})}),l&&e.jsx("div",{className:"mt-3 p-3 rounded-xl bg-red-500/5 border border-red-500/10",children:e.jsx("pre",{className:"text-[10px] text-red-300 whitespace-pre-wrap font-mono overflow-x-auto",children:t.error})})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsxs(j,{variant:"outline",size:"sm",className:"h-8 rounded-xl text-[11px] font-bold border-green-500/20 text-green-400 hover:bg-green-500/10",onClick:n,disabled:o,children:[o?e.jsx(v,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):e.jsx(k,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry"]}),e.jsxs(j,{variant:"outline",size:"sm",className:"h-8 rounded-xl text-[11px] font-bold border-red-500/20 text-red-400 hover:bg-red-500/10",onClick:u,disabled:x,children:[x?e.jsx(v,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):e.jsx(M,{className:"h-3.5 w-3.5 mr-1.5"}),"Remove"]})]})]})})})}function Z(){const{data:t,isLoading:n,error:u}=_(),o=H(),x=X(),[l,m]=p.useState(new Set),[R,g]=p.useState(new Set),N=async s=>{m(r=>new Set(r).add(s));try{await o.mutateAsync(s),h.success("Task queued for retry")}catch{h.error("Failed to retry task")}finally{m(r=>{const d=new Set(r);return d.delete(s),d})}},S=async s=>{g(r=>new Set(r).add(s));try{await x.mutateAsync(s),h.success("Task removed from DLQ")}catch{h.error("Failed to remove task")}finally{g(r=>{const d=new Set(r);return d.delete(s),d})}},T=async()=>{if(t?.tasks)for(const s of t.tasks)await N(s.id)};if(n)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Loading dead letter queue..."})]}),e.jsx("div",{className:"space-y-4",children:[1,2,3].map(s=>e.jsx(z,{className:"h-24 rounded-[20px] skeleton-glass"},s))})]});if(u)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Dead Letter Queue"})]}),e.jsx(i,{className:"glass rounded-[28px] border-red-500/10",children:e.jsx(c,{className:"p-8 text-center",children:e.jsx("p",{className:"text-red-400",children:"Failed to load dead letter queue"})})})]});const F=t?.tasks??[],a=t?.count??0;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Tasks that failed processing and need attention."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[a>0&&e.jsxs(j,{variant:"outline",size:"sm",className:"rounded-xl text-[11px] font-bold",onClick:T,children:[e.jsx(k,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry All (",a,")"]}),e.jsx("div",{className:C("flex items-center gap-2 px-4 py-2 rounded-full glass border-white/10",a>0?"border-red-500/20":"border-green-500/20"),children:a>0?e.jsxs(e.Fragment,{children:[e.jsx(U,{className:"h-4 w-4 text-red-400"}),e.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-widest text-red-400",children:[a," Failed"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4 text-green-400"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-green-400",children:"All Clear"})]})})]})]}),a>0&&e.jsx(i,{className:"glass rounded-[24px] border-yellow-500/10 overflow-hidden",children:e.jsx(c,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-2xl bg-gradient-to-br from-yellow-500 to-orange-600 flex items-center justify-center shadow-lg shadow-yellow-500/20",children:e.jsx(L,{className:"h-6 w-6 text-white"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold",children:"Attention Required"}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[a," ",a===1?"task has":"tasks have"," failed and been moved to the dead letter queue. Review the errors and retry or remove them."]})]})]})})}),a===0?e.jsx(i,{className:"glass rounded-[28px] border-white/5",children:e.jsx(c,{className:"p-12",children:e.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"h-20 w-20 rounded-full glass-heavy flex items-center justify-center mb-6 border border-green-500/20",children:e.jsx(y,{className:"h-10 w-10 text-green-400"})}),e.jsx("h3",{className:"text-xl font-bold mb-2",children:"No Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground max-w-md",children:"All tasks are processing normally. Failed tasks will appear here if any agent encounters an error during execution."})]})})}):e.jsx("div",{className:"space-y-3",children:F.map(s=>e.jsx(G,{task:s,onRetry:()=>N(s.id),onRemove:()=>S(s.id),isRetrying:l.has(s.id),isRemoving:R.has(s.id)},s.id))}),e.jsx(i,{className:"glass rounded-[24px] border-white/5",children:e.jsx(c,{className:"p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl glass-heavy flex items-center justify-center flex-shrink-0",children:e.jsx(q,{variant:"secondary",className:"text-[10px] px-2 py-0.5",children:"?"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-bold",children:"About the Dead Letter Queue"}),e.jsxs("ul",{className:"text-[12px] text-muted-foreground space-y-1.5 list-disc list-inside",children:[e.jsx("li",{children:"Tasks are moved here after failing multiple retry attempts"}),e.jsxs("li",{children:[e.jsx("strong",{children:"Retry"})," puts the task back in the main queue for another attempt"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Remove"})," permanently deletes the task from the queue"]}),e.jsx("li",{children:"Check the error message to understand why the task failed"})]})]})]})})})]})}export{Z as DLQDashboard,_ as useDLQTasks,X as useRemoveDLQTask,H as useRetryDLQTask};
1
+ import{c as Q,u as A,n as w,o as b,m as f,r as p,j as e,b as i,f as c,k as j,H as k,ak as y,i as C,U as L,g as D,a5 as I,R as v,t as h}from"./index-lJlNPFVJ.js";import{B as q}from"./badge-CVHH1a-v.js";import{S as z}from"./skeleton-TFiFJ3nB.js";import{C as B}from"./circle-x-Dgw11LgT.js";import{C as K}from"./chevron-up-CoUsOvZj.js";import{T as M}from"./trash-2-keO5tKPE.js";const E=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],U=Q("skull",E);function _(){return A({queryKey:["dlq"],queryFn:()=>f.dlq.list(),refetchInterval:1e4})}function H(){const t=w();return b({mutationFn:n=>f.dlq.retry(n),onSuccess:()=>{t.invalidateQueries({queryKey:["dlq"]}),t.invalidateQueries({queryKey:["tasks"]})}})}function X(){const t=w();return b({mutationFn:n=>f.dlq.remove(n),onSuccess:()=>{t.invalidateQueries({queryKey:["dlq"]})}})}function G({task:t,onRetry:n,onRemove:u,isRetrying:o,isRemoving:x}){const[l,m]=p.useState(!1);return e.jsx(i,{className:"glass rounded-[20px] overflow-hidden border-red-500/10 group hover-lift transition-liquid",children:e.jsx(c,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-red-500/10 flex items-center justify-center flex-shrink-0",children:e.jsx(B,{className:"h-4 w-4 text-red-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-bold truncate",children:t.title}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(D,{className:"h-3 w-3"}),new Date(t.failedAt).toLocaleString()]}),e.jsxs(q,{variant:"secondary",className:"text-[9px] px-1.5 py-0",children:[t.attempts," ",t.attempts===1?"attempt":"attempts"]})]})]})]}),e.jsx("button",{onClick:()=>m(!l),className:"w-full text-left",children:e.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[l?e.jsx(K,{className:"h-3 w-3"}):e.jsx(I,{className:"h-3 w-3"}),e.jsx("span",{className:C("transition-all",l?"":"truncate"),children:t.error})]})}),l&&e.jsx("div",{className:"mt-3 p-3 rounded-xl bg-red-500/5 border border-red-500/10",children:e.jsx("pre",{className:"text-[10px] text-red-300 whitespace-pre-wrap font-mono overflow-x-auto",children:t.error})})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsxs(j,{variant:"outline",size:"sm",className:"h-8 rounded-xl text-[11px] font-bold border-green-500/20 text-green-400 hover:bg-green-500/10",onClick:n,disabled:o,children:[o?e.jsx(v,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):e.jsx(k,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry"]}),e.jsxs(j,{variant:"outline",size:"sm",className:"h-8 rounded-xl text-[11px] font-bold border-red-500/20 text-red-400 hover:bg-red-500/10",onClick:u,disabled:x,children:[x?e.jsx(v,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):e.jsx(M,{className:"h-3.5 w-3.5 mr-1.5"}),"Remove"]})]})]})})})}function Z(){const{data:t,isLoading:n,error:u}=_(),o=H(),x=X(),[l,m]=p.useState(new Set),[R,g]=p.useState(new Set),N=async s=>{m(r=>new Set(r).add(s));try{await o.mutateAsync(s),h.success("Task queued for retry")}catch{h.error("Failed to retry task")}finally{m(r=>{const d=new Set(r);return d.delete(s),d})}},S=async s=>{g(r=>new Set(r).add(s));try{await x.mutateAsync(s),h.success("Task removed from DLQ")}catch{h.error("Failed to remove task")}finally{g(r=>{const d=new Set(r);return d.delete(s),d})}},T=async()=>{if(t?.tasks)for(const s of t.tasks)await N(s.id)};if(n)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Loading dead letter queue..."})]}),e.jsx("div",{className:"space-y-4",children:[1,2,3].map(s=>e.jsx(z,{className:"h-24 rounded-[20px] skeleton-glass"},s))})]});if(u)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Dead Letter Queue"})]}),e.jsx(i,{className:"glass rounded-[28px] border-red-500/10",children:e.jsx(c,{className:"p-8 text-center",children:e.jsx("p",{className:"text-red-400",children:"Failed to load dead letter queue"})})})]});const F=t?.tasks??[],a=t?.count??0;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Tasks that failed processing and need attention."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[a>0&&e.jsxs(j,{variant:"outline",size:"sm",className:"rounded-xl text-[11px] font-bold",onClick:T,children:[e.jsx(k,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry All (",a,")"]}),e.jsx("div",{className:C("flex items-center gap-2 px-4 py-2 rounded-full glass border-white/10",a>0?"border-red-500/20":"border-green-500/20"),children:a>0?e.jsxs(e.Fragment,{children:[e.jsx(U,{className:"h-4 w-4 text-red-400"}),e.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-widest text-red-400",children:[a," Failed"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4 text-green-400"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-green-400",children:"All Clear"})]})})]})]}),a>0&&e.jsx(i,{className:"glass rounded-[24px] border-yellow-500/10 overflow-hidden",children:e.jsx(c,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-2xl bg-gradient-to-br from-yellow-500 to-orange-600 flex items-center justify-center shadow-lg shadow-yellow-500/20",children:e.jsx(L,{className:"h-6 w-6 text-white"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold",children:"Attention Required"}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[a," ",a===1?"task has":"tasks have"," failed and been moved to the dead letter queue. Review the errors and retry or remove them."]})]})]})})}),a===0?e.jsx(i,{className:"glass rounded-[28px] border-white/5",children:e.jsx(c,{className:"p-12",children:e.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"h-20 w-20 rounded-full glass-heavy flex items-center justify-center mb-6 border border-green-500/20",children:e.jsx(y,{className:"h-10 w-10 text-green-400"})}),e.jsx("h3",{className:"text-xl font-bold mb-2",children:"No Failed Tasks"}),e.jsx("p",{className:"text-muted-foreground max-w-md",children:"All tasks are processing normally. Failed tasks will appear here if any agent encounters an error during execution."})]})})}):e.jsx("div",{className:"space-y-3",children:F.map(s=>e.jsx(G,{task:s,onRetry:()=>N(s.id),onRemove:()=>S(s.id),isRetrying:l.has(s.id),isRemoving:R.has(s.id)},s.id))}),e.jsx(i,{className:"glass rounded-[24px] border-white/5",children:e.jsx(c,{className:"p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl glass-heavy flex items-center justify-center flex-shrink-0",children:e.jsx(q,{variant:"secondary",className:"text-[10px] px-2 py-0.5",children:"?"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-bold",children:"About the Dead Letter Queue"}),e.jsxs("ul",{className:"text-[12px] text-muted-foreground space-y-1.5 list-disc list-inside",children:[e.jsx("li",{children:"Tasks are moved here after failing multiple retry attempts"}),e.jsxs("li",{children:[e.jsx("strong",{children:"Retry"})," puts the task back in the main queue for another attempt"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Remove"})," permanently deletes the task from the queue"]}),e.jsx("li",{children:"Check the error message to understand why the task failed"})]})]})]})})})]})}export{Z as DLQDashboard,_ as useDLQTasks,X as useRemoveDLQTask,H as useRetryDLQTask};
@@ -1 +1 @@
1
- import{n as O,r as m,u as v,o as Z,m as u,j as e,M as X,g as _,b as r,d as n,e as c,f as d,Z as J,ak as S,am as N,p as y,I as Y,k as ee}from"./index--JkIxVXb.js";import{B as l}from"./badge-DEmc3Z_l.js";import{T as se}from"./textarea-BjiEeIWh.js";import{S as M,a as q,b as A,c as D,d as w}from"./select-MADP8m6Q.js";import{P as te}from"./progress-C1ghf1Fu.js";import{C as R}from"./circle-x-C78PNZjF.js";import{S as ae}from"./server-CPMaysH8.js";import{T as le}from"./trending-up-BGafmjRo.js";import"./chevron-up-DcJ4LL_N.js";function he(){const k=O(),[o,L]=m.useState(""),[C,F]=m.useState(""),[h,E]=m.useState("__auto__"),[j,P]=m.useState("__auto__"),[a,$]=m.useState(null),{data:K,isLoading:B}=v({queryKey:["gateway","agents"],queryFn:()=>u.gateway.agents(),refetchInterval:3e4}),{data:I,isLoading:W}=v({queryKey:["gateway","workflows"],queryFn:()=>u.gateway.workflows()}),{data:Q}=v({queryKey:["gateway","config"],queryFn:()=>u.gateway.config()}),{data:U,isLoading:z}=v({queryKey:["gateway","status"],queryFn:()=>u.gateway.status(),refetchInterval:5e3}),b=Z({mutationFn:s=>u.gateway.execute(s),onSuccess:s=>{$(s),k.invalidateQueries({queryKey:["tasks"]}),k.invalidateQueries({queryKey:["stats"]})}}),G=()=>{if(!o.trim())return;const s={task:{title:o,prompt:C||o,source:"gateway-ui",priority:3},workflow:h&&h!=="__auto__"?h:void 0,preferredAgent:j&&j!=="__auto__"?j:void 0,autonomous:!0};b.mutate(s)},x=K?.agents||[],g=I?.workflows||[],V=Q?.config,t=U,H=s=>{const i=Math.floor(s/1e3),f=Math.floor(i/60),p=Math.floor(f/60),T=Math.floor(p/24);return T>0?`${T}d ${p%24}h`:p>0?`${p}h ${f%60}m`:f>0?`${f}m ${i%60}s`:`${i}s`};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Gateway"}),e.jsx("p",{className:"text-muted-foreground",children:"Execute tasks through the unified routing system"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[z?e.jsx(l,{variant:"secondary",children:"Checking..."}):t?.status.online?e.jsxs(l,{variant:"default",className:"gap-1",children:[e.jsx(X,{className:"h-3 w-3"}),"Online"]}):e.jsxs(l,{variant:"destructive",className:"gap-1",children:[e.jsx(R,{className:"h-3 w-3"}),"Offline"]}),t&&e.jsxs(l,{variant:"outline",className:"gap-1",children:[e.jsx(_,{className:"h-3 w-3"}),H(t.status.uptime)]})]})]}),t&&e.jsxs(r,{className:"shadow-elevated",children:[e.jsx(n,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(c,{className:"flex items-center gap-2",children:[e.jsx(ae,{className:"h-5 w-5"}),"Gateway Status"]}),e.jsxs(l,{variant:t.status.activeRequests>0?"default":"secondary",children:[t.status.activeRequests," active request",t.status.activeRequests!==1?"s":""]})]})}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Capacity Utilization"}),e.jsxs("span",{className:"font-medium",children:[t.status.utilizationPercent,"%"]})]}),e.jsx(te,{value:t.status.utilizationPercent,className:"h-2"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.status.activeRequests," / ",t.status.maxConcurrent," concurrent slots used"]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(J,{className:"h-3 w-3"}),"Total Tasks"]}),e.jsx("div",{className:"text-xl font-bold",children:t.metrics.totalTasks})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(S,{className:"h-3 w-3"}),"Success Rate"]}),e.jsxs("div",{className:"text-xl font-bold",children:[t.metrics.successRate,"%"]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(_,{className:"h-3 w-3"}),"Avg Duration"]}),e.jsx("div",{className:"text-xl font-bold",children:t.metrics.averageDurationMs>6e4?`${Math.round(t.metrics.averageDurationMs/6e4)}m`:`${Math.round(t.metrics.averageDurationMs/1e3)}s`})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(le,{className:"h-3 w-3"}),"Total Load"]}),e.jsx("div",{className:"text-xl font-bold",children:t.agents.totalLoad})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"font-medium",children:"Connected Agents"}),e.jsxs("span",{className:"text-muted-foreground",children:[t.agents.healthy,"/",t.agents.total," healthy"]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.agents.list.map(s=>e.jsxs(l,{variant:s.healthy?"outline":"destructive",className:"gap-1",children:[s.healthy?e.jsx(S,{className:"h-3 w-3 text-green-500"}):e.jsx(R,{className:"h-3 w-3"}),s.name,s.load>0&&e.jsxs("span",{className:"text-xs opacity-70",children:["(",s.load,")"]}),s.latencyMs!==void 0&&e.jsxs("span",{className:"text-xs opacity-70",children:[s.latencyMs,"ms"]})]},s.type)),t.agents.list.length===0&&e.jsx("span",{className:"text-sm text-muted-foreground",children:"No agents connected"})]})]})]})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsxs(r,{children:[e.jsx(n,{className:"pb-2",children:e.jsx(c,{className:"text-sm font-medium",children:"Available Agents"})}),e.jsxs(d,{children:[e.jsx("div",{className:"text-2xl font-bold",children:x.length}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.filter(s=>s.health.healthy).length," healthy"]})]})]}),e.jsxs(r,{children:[e.jsx(n,{className:"pb-2",children:e.jsx(c,{className:"text-sm font-medium",children:"Workflows"})}),e.jsxs(d,{children:[e.jsx("div",{className:"text-2xl font-bold",children:g.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Available templates"})]})]}),e.jsxs(r,{children:[e.jsx(n,{className:"pb-2",children:e.jsx(c,{className:"text-sm font-medium",children:"Config"})}),e.jsxs(d,{children:[e.jsx("div",{className:"text-2xl font-bold",children:V?.enableScoring?"Smart":"Basic"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Routing mode"})]})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Execute Task"}),e.jsx(N,{children:"Route a task through the gateway for intelligent agent selection"})]}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{htmlFor:"title",children:"Task Title"}),e.jsx(Y,{id:"title",placeholder:"Fix authentication bug",value:o,onChange:s=>L(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{htmlFor:"prompt",children:"Task Prompt (optional)"}),e.jsx(se,{id:"prompt",placeholder:"Detailed description of the task...",value:C,onChange:s=>F(s.target.value),rows:3})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{children:"Workflow"}),e.jsxs(M,{value:h,onValueChange:E,children:[e.jsx(q,{children:e.jsx(A,{placeholder:"Auto-detect"})}),e.jsxs(D,{children:[e.jsx(w,{value:"__auto__",children:"Auto-detect"}),g.map(s=>e.jsx(w,{value:s.type,children:s.name},s.type))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{children:"Preferred Agent"}),e.jsxs(M,{value:j,onValueChange:P,children:[e.jsx(q,{children:e.jsx(A,{placeholder:"Auto-select"})}),e.jsxs(D,{children:[e.jsx(w,{value:"__auto__",children:"Auto-select"}),x.map(s=>e.jsxs(w,{value:s.type,disabled:!s.health.healthy,children:[s.name," ",!s.health.healthy&&"(unhealthy)"]},s.type))]})]})]})]}),e.jsx(ee,{onClick:G,disabled:!o.trim()||b.isPending,className:"w-full",children:b.isPending?"Executing...":"Execute Task"})]})]}),e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Execution Result"}),e.jsx(N,{children:a?"Last execution result":"Execute a task to see results"})]}),e.jsx(d,{children:a?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l,{variant:a.success?"default":"destructive",children:a.success?"Success":"Failed"}),a.agent&&e.jsx(l,{variant:"outline",children:a.agent}),a.workflow&&e.jsx(l,{variant:"secondary",children:a.workflow})]}),a.routing&&e.jsxs("div",{className:"rounded-lg bg-muted p-3 space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"Routing Decision"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:a.routing.reason}),a.routing.scores.length>0&&e.jsxs("div",{className:"mt-2 space-y-1",children:[e.jsx("div",{className:"text-xs font-medium",children:"Scores:"}),a.routing.scores.map(s=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{children:s.agent}),e.jsx("span",{className:"font-mono",children:s.score.toFixed(1)})]},s.agent))]})]}),a.metrics&&e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Total"}),e.jsxs("div",{className:"font-mono text-sm",children:[(a.metrics.totalDuration/1e3).toFixed(2),"s"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Routing"}),e.jsxs("div",{className:"font-mono text-sm",children:[a.metrics.routingDuration,"ms"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Execution"}),e.jsxs("div",{className:"font-mono text-sm",children:[(a.metrics.executionDuration/1e3).toFixed(2),"s"]})]})]}),a.error&&e.jsx("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:a.error})]}):e.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No execution yet"})})]})]}),e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Available Agents"}),e.jsx(N,{children:"Agents registered with the gateway for task execution"})]}),e.jsx(d,{children:B?e.jsx("div",{className:"text-muted-foreground",children:"Loading agents..."}):x.length===0?e.jsx("div",{className:"text-muted-foreground",children:"No agents available"}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:x.map(s=>e.jsxs("div",{className:"rounded-lg bg-card/50 shadow-sm p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsx(l,{variant:s.health.healthy?"default":"destructive",children:s.health.healthy?"Healthy":"Unhealthy"})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s.description}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[s.capabilities.slice(0,4).map(i=>e.jsx(l,{variant:"outline",className:"text-xs",children:i},i)),s.capabilities.length>4&&e.jsxs(l,{variant:"outline",className:"text-xs",children:["+",s.capabilities.length-4]})]}),s.health.latencyMs!==void 0&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Latency: ",s.health.latencyMs,"ms"]})]},s.type))})})]}),e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Workflow Templates"}),e.jsx(N,{children:"Pre-defined workflows for common task types"})]}),e.jsx(d,{children:W?e.jsx("div",{className:"text-muted-foreground",children:"Loading workflows..."}):g.length===0?e.jsx("div",{className:"text-muted-foreground",children:"No workflows available"}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:g.map(s=>e.jsxs("div",{className:"rounded-lg bg-card/50 shadow-sm p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsxs(l,{variant:"secondary",children:[s.steps," steps"]})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s.description}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.requiredCapabilities.map(i=>e.jsx(l,{variant:"outline",className:"text-xs",children:i},i))}),s.defaultTimeoutMs&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Timeout: ",Math.round(s.defaultTimeoutMs/1e3/60),"min"]})]},s.type))})})]})]})}export{he as GatewayDashboard};
1
+ import{n as O,r as m,u as v,o as Z,m as u,j as e,M as X,g as _,b as r,d as n,e as c,f as d,Z as J,ak as S,am as N,p as y,I as Y,k as ee}from"./index-lJlNPFVJ.js";import{B as l}from"./badge-CVHH1a-v.js";import{T as se}from"./textarea-DsVPnSgR.js";import{S as M,a as q,b as A,c as D,d as w}from"./select-CeQ8AHGy.js";import{P as te}from"./progress-uv4SPkL5.js";import{C as R}from"./circle-x-Dgw11LgT.js";import{S as ae}from"./server-CVHTZB72.js";import{T as le}from"./trending-up-BBv8KbrY.js";import"./chevron-up-CoUsOvZj.js";function he(){const k=O(),[o,L]=m.useState(""),[C,F]=m.useState(""),[h,E]=m.useState("__auto__"),[j,P]=m.useState("__auto__"),[a,$]=m.useState(null),{data:K,isLoading:B}=v({queryKey:["gateway","agents"],queryFn:()=>u.gateway.agents(),refetchInterval:3e4}),{data:I,isLoading:W}=v({queryKey:["gateway","workflows"],queryFn:()=>u.gateway.workflows()}),{data:Q}=v({queryKey:["gateway","config"],queryFn:()=>u.gateway.config()}),{data:U,isLoading:z}=v({queryKey:["gateway","status"],queryFn:()=>u.gateway.status(),refetchInterval:5e3}),b=Z({mutationFn:s=>u.gateway.execute(s),onSuccess:s=>{$(s),k.invalidateQueries({queryKey:["tasks"]}),k.invalidateQueries({queryKey:["stats"]})}}),G=()=>{if(!o.trim())return;const s={task:{title:o,prompt:C||o,source:"gateway-ui",priority:3},workflow:h&&h!=="__auto__"?h:void 0,preferredAgent:j&&j!=="__auto__"?j:void 0,autonomous:!0};b.mutate(s)},x=K?.agents||[],g=I?.workflows||[],V=Q?.config,t=U,H=s=>{const i=Math.floor(s/1e3),f=Math.floor(i/60),p=Math.floor(f/60),T=Math.floor(p/24);return T>0?`${T}d ${p%24}h`:p>0?`${p}h ${f%60}m`:f>0?`${f}m ${i%60}s`:`${i}s`};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Gateway"}),e.jsx("p",{className:"text-muted-foreground",children:"Execute tasks through the unified routing system"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[z?e.jsx(l,{variant:"secondary",children:"Checking..."}):t?.status.online?e.jsxs(l,{variant:"default",className:"gap-1",children:[e.jsx(X,{className:"h-3 w-3"}),"Online"]}):e.jsxs(l,{variant:"destructive",className:"gap-1",children:[e.jsx(R,{className:"h-3 w-3"}),"Offline"]}),t&&e.jsxs(l,{variant:"outline",className:"gap-1",children:[e.jsx(_,{className:"h-3 w-3"}),H(t.status.uptime)]})]})]}),t&&e.jsxs(r,{className:"shadow-elevated",children:[e.jsx(n,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(c,{className:"flex items-center gap-2",children:[e.jsx(ae,{className:"h-5 w-5"}),"Gateway Status"]}),e.jsxs(l,{variant:t.status.activeRequests>0?"default":"secondary",children:[t.status.activeRequests," active request",t.status.activeRequests!==1?"s":""]})]})}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Capacity Utilization"}),e.jsxs("span",{className:"font-medium",children:[t.status.utilizationPercent,"%"]})]}),e.jsx(te,{value:t.status.utilizationPercent,className:"h-2"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.status.activeRequests," / ",t.status.maxConcurrent," concurrent slots used"]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(J,{className:"h-3 w-3"}),"Total Tasks"]}),e.jsx("div",{className:"text-xl font-bold",children:t.metrics.totalTasks})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(S,{className:"h-3 w-3"}),"Success Rate"]}),e.jsxs("div",{className:"text-xl font-bold",children:[t.metrics.successRate,"%"]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(_,{className:"h-3 w-3"}),"Avg Duration"]}),e.jsx("div",{className:"text-xl font-bold",children:t.metrics.averageDurationMs>6e4?`${Math.round(t.metrics.averageDurationMs/6e4)}m`:`${Math.round(t.metrics.averageDurationMs/1e3)}s`})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground text-xs mb-1",children:[e.jsx(le,{className:"h-3 w-3"}),"Total Load"]}),e.jsx("div",{className:"text-xl font-bold",children:t.agents.totalLoad})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"font-medium",children:"Connected Agents"}),e.jsxs("span",{className:"text-muted-foreground",children:[t.agents.healthy,"/",t.agents.total," healthy"]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.agents.list.map(s=>e.jsxs(l,{variant:s.healthy?"outline":"destructive",className:"gap-1",children:[s.healthy?e.jsx(S,{className:"h-3 w-3 text-green-500"}):e.jsx(R,{className:"h-3 w-3"}),s.name,s.load>0&&e.jsxs("span",{className:"text-xs opacity-70",children:["(",s.load,")"]}),s.latencyMs!==void 0&&e.jsxs("span",{className:"text-xs opacity-70",children:[s.latencyMs,"ms"]})]},s.type)),t.agents.list.length===0&&e.jsx("span",{className:"text-sm text-muted-foreground",children:"No agents connected"})]})]})]})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsxs(r,{children:[e.jsx(n,{className:"pb-2",children:e.jsx(c,{className:"text-sm font-medium",children:"Available Agents"})}),e.jsxs(d,{children:[e.jsx("div",{className:"text-2xl font-bold",children:x.length}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.filter(s=>s.health.healthy).length," healthy"]})]})]}),e.jsxs(r,{children:[e.jsx(n,{className:"pb-2",children:e.jsx(c,{className:"text-sm font-medium",children:"Workflows"})}),e.jsxs(d,{children:[e.jsx("div",{className:"text-2xl font-bold",children:g.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Available templates"})]})]}),e.jsxs(r,{children:[e.jsx(n,{className:"pb-2",children:e.jsx(c,{className:"text-sm font-medium",children:"Config"})}),e.jsxs(d,{children:[e.jsx("div",{className:"text-2xl font-bold",children:V?.enableScoring?"Smart":"Basic"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Routing mode"})]})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Execute Task"}),e.jsx(N,{children:"Route a task through the gateway for intelligent agent selection"})]}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{htmlFor:"title",children:"Task Title"}),e.jsx(Y,{id:"title",placeholder:"Fix authentication bug",value:o,onChange:s=>L(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{htmlFor:"prompt",children:"Task Prompt (optional)"}),e.jsx(se,{id:"prompt",placeholder:"Detailed description of the task...",value:C,onChange:s=>F(s.target.value),rows:3})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{children:"Workflow"}),e.jsxs(M,{value:h,onValueChange:E,children:[e.jsx(q,{children:e.jsx(A,{placeholder:"Auto-detect"})}),e.jsxs(D,{children:[e.jsx(w,{value:"__auto__",children:"Auto-detect"}),g.map(s=>e.jsx(w,{value:s.type,children:s.name},s.type))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(y,{children:"Preferred Agent"}),e.jsxs(M,{value:j,onValueChange:P,children:[e.jsx(q,{children:e.jsx(A,{placeholder:"Auto-select"})}),e.jsxs(D,{children:[e.jsx(w,{value:"__auto__",children:"Auto-select"}),x.map(s=>e.jsxs(w,{value:s.type,disabled:!s.health.healthy,children:[s.name," ",!s.health.healthy&&"(unhealthy)"]},s.type))]})]})]})]}),e.jsx(ee,{onClick:G,disabled:!o.trim()||b.isPending,className:"w-full",children:b.isPending?"Executing...":"Execute Task"})]})]}),e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Execution Result"}),e.jsx(N,{children:a?"Last execution result":"Execute a task to see results"})]}),e.jsx(d,{children:a?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l,{variant:a.success?"default":"destructive",children:a.success?"Success":"Failed"}),a.agent&&e.jsx(l,{variant:"outline",children:a.agent}),a.workflow&&e.jsx(l,{variant:"secondary",children:a.workflow})]}),a.routing&&e.jsxs("div",{className:"rounded-lg bg-muted p-3 space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"Routing Decision"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:a.routing.reason}),a.routing.scores.length>0&&e.jsxs("div",{className:"mt-2 space-y-1",children:[e.jsx("div",{className:"text-xs font-medium",children:"Scores:"}),a.routing.scores.map(s=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{children:s.agent}),e.jsx("span",{className:"font-mono",children:s.score.toFixed(1)})]},s.agent))]})]}),a.metrics&&e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Total"}),e.jsxs("div",{className:"font-mono text-sm",children:[(a.metrics.totalDuration/1e3).toFixed(2),"s"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Routing"}),e.jsxs("div",{className:"font-mono text-sm",children:[a.metrics.routingDuration,"ms"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Execution"}),e.jsxs("div",{className:"font-mono text-sm",children:[(a.metrics.executionDuration/1e3).toFixed(2),"s"]})]})]}),a.error&&e.jsx("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:a.error})]}):e.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No execution yet"})})]})]}),e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Available Agents"}),e.jsx(N,{children:"Agents registered with the gateway for task execution"})]}),e.jsx(d,{children:B?e.jsx("div",{className:"text-muted-foreground",children:"Loading agents..."}):x.length===0?e.jsx("div",{className:"text-muted-foreground",children:"No agents available"}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:x.map(s=>e.jsxs("div",{className:"rounded-lg bg-card/50 shadow-sm p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsx(l,{variant:s.health.healthy?"default":"destructive",children:s.health.healthy?"Healthy":"Unhealthy"})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s.description}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[s.capabilities.slice(0,4).map(i=>e.jsx(l,{variant:"outline",className:"text-xs",children:i},i)),s.capabilities.length>4&&e.jsxs(l,{variant:"outline",className:"text-xs",children:["+",s.capabilities.length-4]})]}),s.health.latencyMs!==void 0&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Latency: ",s.health.latencyMs,"ms"]})]},s.type))})})]}),e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(c,{children:"Workflow Templates"}),e.jsx(N,{children:"Pre-defined workflows for common task types"})]}),e.jsx(d,{children:W?e.jsx("div",{className:"text-muted-foreground",children:"Loading workflows..."}):g.length===0?e.jsx("div",{className:"text-muted-foreground",children:"No workflows available"}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:g.map(s=>e.jsxs("div",{className:"rounded-lg bg-card/50 shadow-sm p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsxs(l,{variant:"secondary",children:[s.steps," steps"]})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s.description}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.requiredCapabilities.map(i=>e.jsx(l,{variant:"outline",className:"text-xs",children:i},i))}),s.defaultTimeoutMs&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Timeout: ",Math.round(s.defaultTimeoutMs/1e3/60),"min"]})]},s.type))})})]})]})}export{he as GatewayDashboard};