@overlordai/server 1.0.150 → 1.0.152

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 (148) hide show
  1. package/database/migrations/015-automation-template-taxonomy.sql +99 -0
  2. package/dist/adapters/lark/lark.controller.js +1 -1
  3. package/dist/adapters/lark/lark.controller.js.map +1 -1
  4. package/dist/adapters/slack/slack.controller.d.ts.map +1 -1
  5. package/dist/adapters/slack/slack.controller.js +4 -1
  6. package/dist/adapters/slack/slack.controller.js.map +1 -1
  7. package/dist/automation/automation-template.service.d.ts +4 -1
  8. package/dist/automation/automation-template.service.d.ts.map +1 -1
  9. package/dist/automation/automation-template.service.js +9 -2
  10. package/dist/automation/automation-template.service.js.map +1 -1
  11. package/dist/automation/builtin-templates.d.ts +14 -0
  12. package/dist/automation/builtin-templates.d.ts.map +1 -0
  13. package/dist/automation/builtin-templates.js +327 -0
  14. package/dist/automation/builtin-templates.js.map +1 -0
  15. package/dist/database/repositories/automation.repository.d.ts +12 -0
  16. package/dist/database/repositories/automation.repository.d.ts.map +1 -1
  17. package/dist/database/repositories/automation.repository.js +63 -2
  18. package/dist/database/repositories/automation.repository.js.map +1 -1
  19. package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
  20. package/dist/dispatcher/dispatcher.service.js +6 -1
  21. package/dist/dispatcher/dispatcher.service.js.map +1 -1
  22. package/dist/dispatcher/dispatcher.types.d.ts +2 -0
  23. package/dist/dispatcher/dispatcher.types.d.ts.map +1 -1
  24. package/dist/notifier/notification-consumer.d.ts +1 -8
  25. package/dist/notifier/notification-consumer.d.ts.map +1 -1
  26. package/dist/notifier/notification-consumer.js +4 -58
  27. package/dist/notifier/notification-consumer.js.map +1 -1
  28. package/dist/notifier/template.service.d.ts.map +1 -1
  29. package/dist/notifier/template.service.js +14 -7
  30. package/dist/notifier/template.service.js.map +1 -1
  31. package/dist/web/automation.controller.js +1 -1
  32. package/dist/web/automation.controller.js.map +1 -1
  33. package/package.json +4 -4
  34. package/public/assets/{AccessTokensPage-Cxf8lX2l.js → AccessTokensPage-DOQYcLSs.js} +1 -1
  35. package/public/assets/{AdminPage-CYbg2MAm.js → AdminPage-vaAs4nmP.js} +1 -1
  36. package/public/assets/{AgentCliPage-B927spLk.js → AgentCliPage-BXGIfvSo.js} +1 -1
  37. package/public/assets/{ApiReferencePage-Dg2PEPIj.js → ApiReferencePage-ChGlKtFZ.js} +1 -1
  38. package/public/assets/{ArchitecturePage-DpdvWol1.js → ArchitecturePage-BDo0Sz0V.js} +1 -1
  39. package/public/assets/{AuditLogPage-DC0cHKgp.js → AuditLogPage-CDonhWBh.js} +1 -1
  40. package/public/assets/AutomationCreatePage-C1_2qnf5.js +1 -0
  41. package/public/assets/{AutomationDetailPage-Dzkc_ZgE.js → AutomationDetailPage-BruGQNkV.js} +1 -1
  42. package/public/assets/{AutomationEditPage-HuEyfsd4.js → AutomationEditPage-BVlx-7AI.js} +1 -1
  43. package/public/assets/AutomationListPage-BprhRKdu.js +26 -0
  44. package/public/assets/{AutomationRunDetailPage-DpbJ8WGA.js → AutomationRunDetailPage-BWRONm49.js} +2 -2
  45. package/public/assets/{BindPlatformPage-BsEqhv2c.js → BindPlatformPage-B-jO83qZ.js} +1 -1
  46. package/public/assets/BotIntegrationPage-CfWOXPnJ.js +1 -0
  47. package/public/assets/{BotManage-ClYWS35N.js → BotManage-Dt4gvWW6.js} +1 -1
  48. package/public/assets/{BotSetupPage-i-AQ7pd6.js → BotSetupPage-BAtr0Wem.js} +1 -1
  49. package/public/assets/ChangelogPage-CbYmEPo0.js +1 -0
  50. package/public/assets/{CliReferencePage-DE7sjttz.js → CliReferencePage-DzBrPSnn.js} +1 -1
  51. package/public/assets/ConfirmStageDialog-CJ8pWink.js +6 -0
  52. package/public/assets/{DeploymentPage-DSE4lkjS.js → DeploymentPage-DngrSHQT.js} +1 -1
  53. package/public/assets/{DevWorkflowPage-BANLgjo2.js → DevWorkflowPage-BQfJaZyg.js} +1 -1
  54. package/public/assets/{DeveloperManage-D1SXqVFy.js → DeveloperManage-whlVH116.js} +1 -1
  55. package/public/assets/{DeveloperSetupPage-C_2BhtWg.js → DeveloperSetupPage-LrbpgJ2C.js} +1 -1
  56. package/public/assets/DocsIndexPage-vE4yr9Si.js +26 -0
  57. package/public/assets/{DocsLayout-DF24edES.js → DocsLayout-ByGEAOqk.js} +1 -1
  58. package/public/assets/{DocsPrimitives-m1oUERel.js → DocsPrimitives-DCBNKtsW.js} +1 -1
  59. package/public/assets/{EditProjectPage-DBMoGsR8.js → EditProjectPage-CjJMof0e.js} +2 -2
  60. package/public/assets/{EmptyState-tRn0r3m4.js → EmptyState-BfgwLg0u.js} +1 -1
  61. package/public/assets/{EnvVariablesPage-C6aJgjAB.js → EnvVariablesPage-D5h_sa-J.js} +1 -1
  62. package/public/assets/{HomePage-Bk-TkaC8.js → HomePage-BfETjlYe.js} +1 -1
  63. package/public/assets/{InfoRow-DNGAuZW7.js → InfoRow-CIwHf1Un.js} +1 -1
  64. package/public/assets/{InstallationPage-D8L9Higi.js → InstallationPage-2uTV3WlY.js} +1 -1
  65. package/public/assets/{LandingPage-DWUNOSPY.js → LandingPage-DMFC0PF_.js} +1 -1
  66. package/public/assets/{LocalDevelopmentPage-EmrG2Khk.js → LocalDevelopmentPage-9g3s63GP.js} +1 -1
  67. package/public/assets/{LoginPage-DGikIseW.js → LoginPage-CXwygPZl.js} +1 -1
  68. package/public/assets/{MetricBar-DJJX8LMi.js → MetricBar-BWuqiydF.js} +1 -1
  69. package/public/assets/{NotFoundPage-C8KIi602.js → NotFoundPage-Cs7ae_Mz.js} +1 -1
  70. package/public/assets/{OnboardingGuide-hzsHrV8w.js → OnboardingGuide-uCrXzgnL.js} +1 -1
  71. package/public/assets/{PermissionsPage-CViv0974.js → PermissionsPage-CVrdX2r2.js} +1 -1
  72. package/public/assets/{PipelineConfigPage-DAL7k_Mn.js → PipelineConfigPage-BxkXW1la.js} +1 -1
  73. package/public/assets/{PipelineEditorPage-c8vBg5bb.js → PipelineEditorPage-DiyMvTIg.js} +2 -2
  74. package/public/assets/{PlanPage-to7JvocS.js → PlanPage-B-NSg434.js} +1 -1
  75. package/public/assets/{ProfilePage-FkoPFABx.js → ProfilePage-CRMCbMyc.js} +1 -1
  76. package/public/assets/{ProjectDetailPage-CLcnGmQC.js → ProjectDetailPage-Bx1DUkpw.js} +3 -3
  77. package/public/assets/{ProjectListPage-xapZ35at.js → ProjectListPage-D1LzmIVf.js} +2 -2
  78. package/public/assets/PtyTerminal-CxBKQBbF.js +38 -0
  79. package/public/assets/{QuickAuth-tYYBxSU8.js → QuickAuth-BMY6Nw6u.js} +1 -1
  80. package/public/assets/{RemoveMemberConfirmDialog-KoNueMWe.js → RemoveMemberConfirmDialog-Da3XlOxO.js} +1 -1
  81. package/public/assets/{ReviewAggregatePage-BTN2bkEA.js → ReviewAggregatePage-mnnW-Nli.js} +2 -2
  82. package/public/assets/{ReviewPage-DKVAeNjP.js → ReviewPage-_pd3mJC1.js} +1 -1
  83. package/public/assets/{Select-ucU6_0EP.js → Select-CaAVBHmI.js} +1 -1
  84. package/public/assets/{SettingsPage-Dv6y5QEu.js → SettingsPage-CsDJ7FS9.js} +1 -1
  85. package/public/assets/{Skeleton-BAYr4eiz.js → Skeleton-CNV0Dyd8.js} +1 -1
  86. package/public/assets/{SkillPage-B3Iw74cZ.js → SkillPage-CQyxaNa5.js} +1 -1
  87. package/public/assets/TaskDetailPage-Dn7Vl2tI.js +21 -0
  88. package/public/assets/{TaskGuidePage-BBFKjc9w.js → TaskGuidePage-Ch465zVv.js} +1 -1
  89. package/public/assets/{TaskListPage-DUUYPpEt.js → TaskListPage-DbQbJMDj.js} +1 -1
  90. package/public/assets/{TaskStatusBadge-BD3WJQkl.js → TaskStatusBadge-Dzloj2eJ.js} +1 -1
  91. package/public/assets/TerminalHomePage-C2bwGFkH.js +6 -0
  92. package/public/assets/TokenManage-mToToJ_g.js +1 -0
  93. package/public/assets/{Tooltip-DfB8CAIs.js → Tooltip-DzkVglKi.js} +1 -1
  94. package/public/assets/{TotpSetupPage-DwXxvB-k.js → TotpSetupPage-Dk00_OYo.js} +1 -1
  95. package/public/assets/{WorkerDetailPage-aLNOgmfW.js → WorkerDetailPage-C8_zfmSR.js} +1 -1
  96. package/public/assets/{WorkerListPage-CrJESAH0.js → WorkerListPage-kKUioe-i.js} +2 -2
  97. package/public/assets/{WorkerOperationsPage-rHLL8hJa.js → WorkerOperationsPage-CBzwbV8I.js} +1 -1
  98. package/public/assets/{WorkerSetupGuidePage-Ckrfo8-b.js → WorkerSetupGuidePage-DvaP5u6N.js} +1 -1
  99. package/public/assets/{WorkerSetupPage-Cwf4AXe9.js → WorkerSetupPage-BD-EAPKM.js} +1 -1
  100. package/public/assets/{agent-type-options-Vn2Ar3HP.js → agent-type-options-BiwwFXJv.js} +1 -1
  101. package/public/assets/{arrow-left-C08vc7G2.js → arrow-left-BnN4eZhK.js} +1 -1
  102. package/public/assets/{arrow-right-CiCC0owG.js → arrow-right-BDaYPEVr.js} +1 -1
  103. package/public/assets/{bot-BpRqYalx.js → bot-jsWsZ197.js} +1 -1
  104. package/public/assets/{chevron-down-54sz-rQX.js → chevron-down-DyqUpmgf.js} +1 -1
  105. package/public/assets/{chevron-left-D9iQafYD.js → chevron-left-D5fJVFiB.js} +1 -1
  106. package/public/assets/{chevron-right-Ccp2bQ3u.js → chevron-right-Bz-j2WmS.js} +1 -1
  107. package/public/assets/{chevron-up-Cm7Jc-Tg.js → chevron-up-DEXIEMJO.js} +1 -1
  108. package/public/assets/{circle-alert-DKHl7f_Q.js → circle-alert-DE06tNOV.js} +1 -1
  109. package/public/assets/{clock-B6V-4VR5.js → clock-DyV22whY.js} +1 -1
  110. package/public/assets/{copy-B-4Hfvcn.js → copy-Dtpgo9EK.js} +1 -1
  111. package/public/assets/{download-3Syugo5K.js → download-DVCPTZuD.js} +1 -1
  112. package/public/assets/{external-link-B4tgsST2.js → external-link-Bbo-dc9z.js} +1 -1
  113. package/public/assets/{git-fork-BhXdgj_k.js → git-fork-A1WGp9ha.js} +1 -1
  114. package/public/assets/index-Du11Fv9c.css +1 -0
  115. package/public/assets/{index-D3EF0BU0.js → index-PZwTchr_.js} +32 -27
  116. package/public/assets/{key-BTztJw3V.js → key-BDx4jfUG.js} +1 -1
  117. package/public/assets/{loader-circle-CPOjAAu7.js → loader-circle-nKG9e8iK.js} +1 -1
  118. package/public/assets/{pencil-eGjyAgrM.js → pencil-Dgj4md4-.js} +1 -1
  119. package/public/assets/{play-BjFnzBVa.js → play-DFj8BMl8.js} +1 -1
  120. package/public/assets/{plus-BwhhTyaX.js → plus-CCF-PMRF.js} +1 -1
  121. package/public/assets/{rotate-ccw-CesPJxB6.js → rotate-ccw-CyltG4Qx.js} +1 -1
  122. package/public/assets/{scroll-text-BcO-tu0h.js → scroll-text-IFQgBRlh.js} +1 -1
  123. package/public/assets/{settings-Cpf4Aw4Z.js → settings-CYtYYzCu.js} +1 -1
  124. package/public/assets/{skip-forward-tHDn4amf.js → skip-forward-Ck7tY58a.js} +1 -1
  125. package/public/assets/{status-colors-BNBcbZVQ.js → status-colors-DDycfcf7.js} +1 -1
  126. package/public/assets/{task-constants-v3cKX5sS.js → task-constants-CSVY_jfk.js} +1 -1
  127. package/public/assets/{task.store-B1f8yuTU.js → task.store-BTXbcXgO.js} +1 -1
  128. package/public/assets/{timer-D4gHmYOk.js → timer-CXsWiTNP.js} +1 -1
  129. package/public/assets/{trash-2-B0gTlwTA.js → trash-2-DXJqRCdo.js} +1 -1
  130. package/public/assets/{useFetch-DqA_6ili.js → useFetch-6R6P2rOm.js} +1 -1
  131. package/public/assets/{users-BDhUOLR9.js → users-BZPY-p6E.js} +1 -1
  132. package/public/assets/{wifi-CpsnZ0me.js → wifi-Bgq95lS8.js} +1 -1
  133. package/public/assets/{workflow-D6VrmpVC.js → workflow-RqNfx4vc.js} +1 -1
  134. package/public/assets/{zap-ChFVfVhi.js → zap-BIwamY7L.js} +1 -1
  135. package/public/index.html +2 -2
  136. package/public/sw.js +1 -1
  137. package/public/assets/AutomationCreatePage-BvFaaM3C.js +0 -1
  138. package/public/assets/AutomationListPage-Ds8g44m8.js +0 -16
  139. package/public/assets/BotIntegrationPage-ClfrH4Nq.js +0 -1
  140. package/public/assets/ChangelogPage-C-xth3KP.js +0 -1
  141. package/public/assets/ConfirmStageDialog-DvTvViy4.js +0 -7
  142. package/public/assets/DocsIndexPage-Ch2Rj0KS.js +0 -26
  143. package/public/assets/PtyTerminal-CvlgzMDa.js +0 -38
  144. package/public/assets/TaskDetailPage-Dm9O3GpZ.js +0 -21
  145. package/public/assets/TerminalHomePage-By_ngoYD.js +0 -6
  146. package/public/assets/TokenManage-BK36rX8P.js +0 -1
  147. package/public/assets/file-text-BfrzBouS.js +0 -6
  148. package/public/assets/index-CdJk2QGi.css +0 -1
@@ -1,7 +1,7 @@
1
- import{c as R,a as $,j as e,s as q,A as K,f as B,u as H,i as J,r as x,Z as k,w as V,l as D,_ as Z,h as v}from"./index-D3EF0BU0.js";import{U as P,A as z,R as G}from"./RemoveMemberConfirmDialog-KoNueMWe.js";import{T as Q}from"./Tooltip-DfB8CAIs.js";import{c as _}from"./date-RFA7-ZGs.js";import{t as T}from"./status-colors-BNBcbZVQ.js";import{I as o}from"./InfoRow-DNGAuZW7.js";import{u as X}from"./useFetch-DqA_6ili.js";import{P as Y}from"./pencil-eGjyAgrM.js";import{T as ee}from"./trash-2-B0gTlwTA.js";import{A as te}from"./arrow-left-C08vc7G2.js";import{P as re}from"./plus-BwhhTyaX.js";import"./Select-ucU6_0EP.js";import"./chevron-down-54sz-rQX.js";/**
1
+ import{c as R,a as $,j as e,s as q,A as K,f as B,u as H,i as J,r as x,Y as k,w as V,l as D,Z as Y,h as v}from"./index-PZwTchr_.js";import{U as P,A as Z,R as z}from"./RemoveMemberConfirmDialog-Da3XlOxO.js";import{T as G}from"./Tooltip-DzkVglKi.js";import{c as _}from"./date-RFA7-ZGs.js";import{t as T}from"./status-colors-DDycfcf7.js";import{I as o}from"./InfoRow-CIwHf1Un.js";import{u as Q}from"./useFetch-6R6P2rOm.js";import{P as X}from"./pencil-Dgj4md4-.js";import{T as ee}from"./trash-2-DXJqRCdo.js";import{A as te}from"./arrow-left-BnN4eZhK.js";import{P as re}from"./plus-CCF-PMRF.js";import"./Select-CaAVBHmI.js";import"./chevron-down-DyqUpmgf.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const se=R("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);function ae({isOpen:n,onClose:a,onConfirm:r,projectName:m,loading:p}){const{t:j}=$();return e.jsx(q,{isOpen:n,onClose:a,onConfirm:r,title:`> ${j("projects.delete_project")}`,message:j("projects.delete_project_confirm",{name:m}),confirmLabel:j("projects.delete_project"),confirmVariant:"danger",isLoading:p})}function ue(){const{key:n}=K(),a=B(),{t:r}=$(),m=H(t=>t.user),p=J(),[j,N]=x.useState(!1),[L,C]=x.useState(!1),[S,A]=x.useState(!1),[d,u]=x.useState(null),[W,I]=x.useState(!1),{data:l,loading:F,error:M,refetch:y}=X(async()=>{if(!n)throw new Error("Missing project key");const[t,w,f]=await Promise.all([v.get(`web/projects/${n}`).json(),v.get(`web/projects/${n}/members`).json().catch(()=>[]),v.get("web/tasks",{searchParams:{projectKey:n,limit:"20"}}).json().then(U=>U.data).catch(()=>[])]);let h=null;if(t.pipeline)try{h=JSON.parse(t.pipeline)}catch{}return{project:t,members:w,tasks:f,pipelineConfig:h}},[n]),s=(l==null?void 0:l.project)??null,b=(l==null?void 0:l.members)??[],g=(l==null?void 0:l.tasks)??[],i=(l==null?void 0:l.pipelineConfig)??null,c=p||b.some(t=>t.developerId===(m==null?void 0:m.id)&&t.role===k.MAINTAINER);V(x.useMemo(()=>s?e.jsxs(e.Fragment,{children:[c&&e.jsxs("button",{onClick:()=>a(`/projects/${s.key}/edit`),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] bg-transparent px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[e.jsx(Y,{className:"h-3 w-3"}),r("common.edit")]}),p&&e.jsxs("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--destructive)] bg-transparent px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)] hover:text-white",children:[e.jsx(ee,{className:"h-3 w-3"}),r("common.delete")]})]}):null,[s,c,p,a,r]));async function O(){if(s){C(!0);try{await v.delete(`admin/projects/${s.key}`),a("/projects")}catch{}finally{C(!1),N(!1)}}}async function E(){if(!(!s||!d)){I(!0);try{await v.delete(`web/projects/${s.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await y()}catch{}finally{I(!1),u(null)}}}return F?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):M?e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--destructive)]",children:M}),e.jsx("button",{onClick:()=>y(),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("common.retry")})]}):s?e.jsxs("div",{className:"mx-auto max-w-6xl",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("button",{onClick:()=>a("/projects"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(te,{className:"h-4 w-4"})}),e.jsxs("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",children:[s.key," — ",s.name]})]}),e.jsxs("div",{className:"px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 hidden md:block text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>a("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:s.key})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_340px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.project_info")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.key"),value:s.key}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.name"),value:s.name}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.repo_url"),value:s.repoUrl,href:s.repoUrl}),s.sshUrl&&e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.ssh_url"),value:s.sshUrl}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.git_platform"),value:s.gitPlatform}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.default_branch"),value:s.defaultBranch}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.agent_type"),value:s.agentType}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.max_turns"),value:String(s.maxTurns)}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.allowed_tools"),value:s.allowedTools??"all"}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.default_project"),value:s.isDefault?"yes":"no"})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),c&&e.jsxs("button",{onClick:()=>A(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(re,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),b.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-2 md:hidden",children:b.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] p-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"block text-[11px] mt-0.5",style:{color:t.role===k.MAINTAINER?"var(--warning)":"var(--text-muted)"},children:t.role})]}),c&&e.jsx("button",{onClick:()=>u(t),className:"shrink-0 text-[var(--destructive)] hover:underline ml-2","aria-label":r("projects.remove_member"),children:e.jsx(P,{className:"h-3.5 w-3.5"})})]},t.developerId))}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.name")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.role")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.added_at")}),c&&e.jsx("th",{className:"pb-2 text-right text-xs font-medium text-[var(--text-muted)]",children:r("common.actions")})]})}),e.jsx("tbody",{children:b.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:t.role===k.MAINTAINER?"var(--warning)":"var(--text-secondary)"},children:t.role}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:_(t.createdAt)}),c&&e.jsx("td",{className:"py-2.5 text-right",children:e.jsx("button",{onClick:()=>u(t),className:"text-[var(--destructive)] hover:underline","aria-label":r("projects.remove_member"),children:e.jsx(P,{className:"h-3.5 w-3.5"})})})]},t.developerId))})]})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.recent_tasks")}),g.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_tasks_for_project")})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-2 md:hidden",children:g.map(t=>e.jsxs("div",{className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors active:bg-[var(--bg-input)]",onClick:()=>a(`/tasks/${t.id}`),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight line-clamp-2",title:t.description,children:["#",t.id," ",D(t)]}),e.jsx("span",{className:"shrink-0 text-[11px]",style:{color:T[t.status]},children:t.status})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(t.createdAt)})]},t.id))}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.id")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.description")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.status")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.created")})]})}),e.jsx("tbody",{children:g.map(t=>e.jsxs("tr",{className:"cursor-pointer border-b border-[var(--border-row)] last:border-b-0 hover:bg-[var(--bg-input)]",onClick:()=>a(`/tasks/${t.id}`),children:[e.jsxs("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:["#",t.id]}),e.jsx("td",{className:"max-w-xs truncate py-2.5 text-sm text-[var(--text-primary)]",children:e.jsx(Q,{content:t.description,children:D(t)})}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:T[t.status]},children:t.status}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:_(t.createdAt)})]},t.id))})]})})]})]})]}),e.jsx("div",{children:e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsx("h2",{className:"mb-4 text-[13px] font-medium text-[var(--accent)]",children:r("projects.pipeline")}),e.jsx("div",{className:"mb-3 h-px bg-[var(--border)]"}),i!=null&&i.stages&&i.stages.length>0?e.jsx("div",{className:"flex flex-col items-center",children:i.stages.map((t,w)=>{var f,h;return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-input)] px-3 py-2.5 cursor-pointer hover:bg-[var(--bg-secondary)]",style:{borderLeft:"3px solid var(--accent)"},onClick:()=>a(`/projects/${s.key}/pipeline`),children:[e.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--text-primary)]",children:t.label??t.name}),t.prompt&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)] truncate",children:["// ",t.prompt.split(`
7
- `)[0].slice(0,40)]})]}),e.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.requireConfirm&&e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:r("projects.confirm_label")})})]}),((f=t.onFailure)==null?void 0:f.goto)&&e.jsxs("div",{className:"flex items-center justify-center gap-1.5 py-1",children:[e.jsx(Z,{className:"h-3 w-3 text-[var(--warning)]"}),e.jsxs("span",{className:"text-[11px] text-[var(--warning)]",children:["onFailure.goto: ",t.onFailure.goto,", maxLoops: ",t.onFailure.maxLoops]})]}),w<i.stages.length-1&&!((h=t.onFailure)!=null&&h.goto)&&e.jsx("div",{className:"flex justify-center py-1",children:e.jsx(se,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"})})]},t.name)})}):e.jsx("div",{className:"py-6 text-center text-xs text-[var(--text-muted)]",children:r("projects.no_pipeline_configured")}),c&&e.jsx("button",{onClick:()=>a(`/projects/${s.key}/pipeline`),className:"mt-3 flex w-full items-center justify-center gap-1.5 py-2 text-xs text-[var(--accent)] hover:text-[var(--accent)]",children:r("projects.add_stage")})]})})]}),e.jsx(ae,{isOpen:j,onClose:()=>N(!1),onConfirm:O,projectName:s.name,loading:L}),e.jsx(z,{isOpen:S,onClose:()=>A(!1),projectKey:s.key,existingMemberIds:b.map(t=>t.developerId),onAdded:y}),e.jsx(G,{isOpen:!!d,onClose:()=>u(null),onConfirm:E,memberName:d?d.developerName??`#${d.developerId}`:"",loading:W})]})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>a("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}export{ue as default};
6
+ */const se=R("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);function ae({isOpen:n,onClose:a,onConfirm:r,projectName:m,loading:p}){const{t:j}=$();return e.jsx(q,{isOpen:n,onClose:a,onConfirm:r,title:`> ${j("projects.delete_project")}`,message:j("projects.delete_project_confirm",{name:m}),confirmLabel:j("projects.delete_project"),confirmVariant:"danger",isLoading:p})}function ue(){const{key:n}=K(),a=B(),{t:r}=$(),m=H(t=>t.user),p=J(),[j,N]=x.useState(!1),[L,C]=x.useState(!1),[S,A]=x.useState(!1),[d,u]=x.useState(null),[W,I]=x.useState(!1),{data:l,loading:F,error:M,refetch:y}=Q(async()=>{if(!n)throw new Error("Missing project key");const[t,w,f]=await Promise.all([v.get(`web/projects/${n}`).json(),v.get(`web/projects/${n}/members`).json().catch(()=>[]),v.get("web/tasks",{searchParams:{projectKey:n,limit:"20"}}).json().then(U=>U.data).catch(()=>[])]);let h=null;if(t.pipeline)try{h=JSON.parse(t.pipeline)}catch{}return{project:t,members:w,tasks:f,pipelineConfig:h}},[n]),s=(l==null?void 0:l.project)??null,b=(l==null?void 0:l.members)??[],g=(l==null?void 0:l.tasks)??[],i=(l==null?void 0:l.pipelineConfig)??null,c=p||b.some(t=>t.developerId===(m==null?void 0:m.id)&&t.role===k.MAINTAINER);V(x.useMemo(()=>s?e.jsxs(e.Fragment,{children:[c&&e.jsxs("button",{onClick:()=>a(`/projects/${s.key}/edit`),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] bg-transparent px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[e.jsx(X,{className:"h-3 w-3"}),r("common.edit")]}),p&&e.jsxs("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--destructive)] bg-transparent px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)] hover:text-white",children:[e.jsx(ee,{className:"h-3 w-3"}),r("common.delete")]})]}):null,[s,c,p,a,r]));async function O(){if(s){C(!0);try{await v.delete(`admin/projects/${s.key}`),a("/projects")}catch{}finally{C(!1),N(!1)}}}async function E(){if(!(!s||!d)){I(!0);try{await v.delete(`web/projects/${s.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await y()}catch{}finally{I(!1),u(null)}}}return F?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):M?e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--destructive)]",children:M}),e.jsx("button",{onClick:()=>y(),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("common.retry")})]}):s?e.jsxs("div",{className:"mx-auto max-w-6xl",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("button",{onClick:()=>a("/projects"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(te,{className:"h-4 w-4"})}),e.jsxs("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",children:[s.key," — ",s.name]})]}),e.jsxs("div",{className:"px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 hidden md:block text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>a("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:s.key})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_340px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.project_info")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.key"),value:s.key}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.name"),value:s.name}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.repo_url"),value:s.repoUrl,href:s.repoUrl}),s.sshUrl&&e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.ssh_url"),value:s.sshUrl}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.git_platform"),value:s.gitPlatform}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.default_branch"),value:s.defaultBranch}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.agent_type"),value:s.agentType}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.max_turns"),value:String(s.maxTurns)}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.allowed_tools"),value:s.allowedTools??"all"}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:r("projects.default_project"),value:s.isDefault?"yes":"no"})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),c&&e.jsxs("button",{onClick:()=>A(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(re,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),b.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-2 md:hidden",children:b.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] p-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"block text-[11px] mt-0.5",style:{color:t.role===k.MAINTAINER?"var(--warning)":"var(--text-muted)"},children:t.role})]}),c&&e.jsx("button",{onClick:()=>u(t),className:"shrink-0 text-[var(--destructive)] hover:underline ml-2","aria-label":r("projects.remove_member"),children:e.jsx(P,{className:"h-3.5 w-3.5"})})]},t.developerId))}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.name")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.role")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.added_at")}),c&&e.jsx("th",{className:"pb-2 text-right text-xs font-medium text-[var(--text-muted)]",children:r("common.actions")})]})}),e.jsx("tbody",{children:b.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:t.role===k.MAINTAINER?"var(--warning)":"var(--text-secondary)"},children:t.role}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:_(t.createdAt)}),c&&e.jsx("td",{className:"py-2.5 text-right",children:e.jsx("button",{onClick:()=>u(t),className:"text-[var(--destructive)] hover:underline","aria-label":r("projects.remove_member"),children:e.jsx(P,{className:"h-3.5 w-3.5"})})})]},t.developerId))})]})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.recent_tasks")}),g.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_tasks_for_project")})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-2 md:hidden",children:g.map(t=>e.jsxs("div",{className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors active:bg-[var(--bg-input)]",onClick:()=>a(`/tasks/${t.id}`),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight line-clamp-2",title:t.description,children:["#",t.id," ",D(t)]}),e.jsx("span",{className:"shrink-0 text-[11px]",style:{color:T[t.status]},children:t.status})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(t.createdAt)})]},t.id))}),e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.id")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.description")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.status")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:r("projects.created")})]})}),e.jsx("tbody",{children:g.map(t=>e.jsxs("tr",{className:"cursor-pointer border-b border-[var(--border-row)] last:border-b-0 hover:bg-[var(--bg-input)]",onClick:()=>a(`/tasks/${t.id}`),children:[e.jsxs("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:["#",t.id]}),e.jsx("td",{className:"max-w-xs truncate py-2.5 text-sm text-[var(--text-primary)]",children:e.jsx(G,{content:t.description,children:D(t)})}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:T[t.status]},children:t.status}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:_(t.createdAt)})]},t.id))})]})})]})]})]}),e.jsx("div",{children:e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-5",children:[e.jsx("h2",{className:"mb-4 text-[13px] font-medium text-[var(--accent)]",children:r("projects.pipeline")}),e.jsx("div",{className:"mb-3 h-px bg-[var(--border)]"}),i!=null&&i.stages&&i.stages.length>0?e.jsx("div",{className:"flex flex-col items-center",children:i.stages.map((t,w)=>{var f,h;return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-input)] px-3 py-2.5 cursor-pointer hover:bg-[var(--bg-secondary)]",style:{borderLeft:"3px solid var(--accent)"},onClick:()=>a(`/projects/${s.key}/pipeline`),children:[e.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--text-primary)]",children:t.label??t.name}),t.prompt&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)] truncate",children:["// ",t.prompt.split(`
7
+ `)[0].slice(0,40)]})]}),e.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.requireConfirm&&e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:r("projects.confirm_label")})})]}),((f=t.onFailure)==null?void 0:f.goto)&&e.jsxs("div",{className:"flex items-center justify-center gap-1.5 py-1",children:[e.jsx(Y,{className:"h-3 w-3 text-[var(--warning)]"}),e.jsxs("span",{className:"text-[11px] text-[var(--warning)]",children:["onFailure.goto: ",t.onFailure.goto,", maxLoops: ",t.onFailure.maxLoops]})]}),w<i.stages.length-1&&!((h=t.onFailure)!=null&&h.goto)&&e.jsx("div",{className:"flex justify-center py-1",children:e.jsx(se,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"})})]},t.name)})}):e.jsx("div",{className:"py-6 text-center text-xs text-[var(--text-muted)]",children:r("projects.no_pipeline_configured")}),c&&e.jsx("button",{onClick:()=>a(`/projects/${s.key}/pipeline`),className:"mt-3 flex w-full items-center justify-center gap-1.5 py-2 text-xs text-[var(--accent)] hover:text-[var(--accent)]",children:r("projects.add_stage")})]})})]}),e.jsx(ae,{isOpen:j,onClose:()=>N(!1),onConfirm:O,projectName:s.name,loading:L}),e.jsx(Z,{isOpen:S,onClose:()=>A(!1),projectKey:s.key,existingMemberIds:b.map(t=>t.developerId),onAdded:y}),e.jsx(z,{isOpen:!!d,onClose:()=>u(null),onConfirm:E,memberName:d?d.developerName??`#${d.developerId}`:"",loading:W})]})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>a("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}export{ue as default};
@@ -1,6 +1,6 @@
1
- import{c as I,a as P,v as R,r as o,G as x,Q as z,j as e,h as E,f as H,w as M}from"./index-D3EF0BU0.js";import{S as U}from"./Select-ucU6_0EP.js";import{a as D}from"./agent-type-options-Vn2Ar3HP.js";import{E as J}from"./EmptyState-tRn0r3m4.js";import{T as O}from"./Skeleton-BAYr4eiz.js";import{t as q}from"./date-RFA7-ZGs.js";import{u as W}from"./useFetch-DqA_6ili.js";import{P as $}from"./plus-BwhhTyaX.js";import{A as K}from"./arrow-left-C08vc7G2.js";import"./chevron-down-54sz-rQX.js";/**
1
+ import{c as I,a as P,v as R,r as o,G as x,O as z,j as e,h as E,f as H,w as M}from"./index-PZwTchr_.js";import{S as U}from"./Select-CaAVBHmI.js";import{a as D}from"./agent-type-options-BiwwFXJv.js";import{E as J}from"./EmptyState-BfgwLg0u.js";import{T as O}from"./Skeleton-CNV0Dyd8.js";import{t as q}from"./date-RFA7-ZGs.js";import{u as W}from"./useFetch-6R6P2rOm.js";import{P as $}from"./plus-CCF-PMRF.js";import{A as K}from"./arrow-left-BnN4eZhK.js";import"./chevron-down-DyqUpmgf.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Q=I("FolderOpen",[["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"}]]),m={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},i={display:"block",color:"var(--text-secondary)",fontSize:"0.7rem",marginBottom:"0.25rem",fontFamily:"'JetBrains Mono', monospace"};function V({isOpen:l,onClose:a,onCreated:j}){const{t}=P();R(l);const d=D(r=>r),[c,u]=o.useState(""),[s,b]=o.useState(""),[n,g]=o.useState(""),[y,f]=o.useState(""),[C,_]=o.useState("main"),[k,N]=o.useState(x.GITHUB),[S,B]=o.useState(z.CLAUDE),[p,T]=o.useState(!1),[w,v]=o.useState("");o.useEffect(()=>{l&&F()},[l]);function F(){u(""),b(""),g(""),f(""),_("main"),N(x.GITHUB),B(z.CLAUDE),v("")}function A(){F(),a()}async function L(r){r.preventDefault(),v(""),T(!0);try{const h=await E.post("admin/projects",{json:{name:c,key:s,repoUrl:n,sshUrl:y||void 0,defaultBranch:C,gitPlatform:k,agentType:S}}).json();j(h),A()}catch(h){const G=h instanceof Error?h.message:t("projects.failed_to_create_project");v(G)}finally{T(!1)}}return l?e.jsx("div",{style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))",padding:"1rem"},children:e.jsxs("div",{onClick:r=>r.stopPropagation(),style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem",fontFamily:"'JetBrains Mono', monospace"},children:[e.jsxs("div",{style:{marginBottom:"1.25rem"},children:[e.jsxs("div",{style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600},children:["> ",t("projects.create_project")]}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.7rem",marginTop:"0.25rem"},children:t("projects.add_project_desc")})]}),w&&e.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.7rem"},children:w}),e.jsxs("form",{onSubmit:L,style:{display:"flex",flexDirection:"column",gap:"0.875rem"},children:[e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.project_name")}),e.jsx("input",{type:"text",value:c,onChange:r=>u(r.target.value),placeholder:t("projects.project_name_placeholder"),required:!0,autoFocus:!0,style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.project_key")}),e.jsx("input",{type:"text",value:s,onChange:r=>b(r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),placeholder:t("projects.project_key_placeholder"),required:!0,style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:t("projects.project_key_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.repo_url")}),e.jsx("input",{type:"text",value:n,onChange:r=>g(r.target.value),placeholder:t("projects.repo_url_placeholder"),required:!0,style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.ssh_url")}),e.jsx("input",{type:"text",value:y,onChange:r=>f(r.target.value),placeholder:t("projects.ssh_url_placeholder"),style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:t("projects.ssh_url_hint")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.default_branch")}),e.jsx("input",{type:"text",value:C,onChange:r=>_(r.target.value),placeholder:t("projects.main"),style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.git_platform")}),e.jsx(U,{value:k,onChange:r=>N(r),options:[{value:x.GITHUB,label:t("projects.github")},{value:x.GITLAB,label:t("projects.gitlab")},{value:x.GITEA,label:t("projects.gitea")}]})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.agent_type")}),e.jsx(U,{value:S,onChange:r=>B(r),options:d})]})]}),e.jsxs("div",{style:{display:"flex",gap:"0.75rem",marginTop:"0.5rem"},children:[e.jsx("button",{type:"button",onClick:A,disabled:p,style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",children:t("common.cancel")}),e.jsx("button",{type:"submit",disabled:p||!c||!s||!n,style:{flex:1,padding:"0.5rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:p||!c||!s||!n?"not-allowed":"pointer",opacity:p||!c||!s||!n?.7:1},children:t(p?"common.creating":"common.create")})]})]})]})}):null}function le(){const l=H(),{t:a}=P(),[j,t]=o.useState(!1),{data:d,loading:c,refetch:u}=W(()=>E.get("web/projects").json(),[]);return M(o.useMemo(()=>e.jsxs("button",{onClick:()=>t(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx($,{className:"h-3.5 w-3.5"}),a("projects.create_project")]}),[a])),e.jsxs("div",{className:"mx-auto max-w-5xl",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("button",{onClick:()=>l("/dashboard"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(K,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",children:a("projects.title")})]}),e.jsxs("div",{className:"px-4 md:px-6 py-8",children:[c?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(O,{rows:4})}):!d||d.length===0?e.jsx(J,{icon:Q,title:a("projects.no_projects_yet"),description:a("projects.create_first_project"),actionLabel:a("projects.create_project"),onAction:()=>t(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-2 md:hidden",children:d.map(s=>e.jsxs("div",{onClick:()=>l(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 transition-colors active:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[s.taskCount??0," tasks"]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key))}),e.jsxs("div",{className:"hidden md:block rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"grid grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-2.5 text-xs font-medium text-[var(--text-muted)]",children:[e.jsx("span",{children:"#"}),e.jsx("span",{children:a("projects.key")}),e.jsx("span",{children:a("projects.name")}),e.jsx("span",{children:a("projects.members")}),e.jsx("span",{children:a("projects.tasks_count")}),e.jsx("span",{children:a("projects.last_activity")})]}),d.map((s,b)=>e.jsxs("div",{onClick:()=>l(`/projects/${s.key}`),className:"grid cursor-pointer grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors items-center",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:b+1}),e.jsx("span",{className:"truncate text-xs text-[var(--accent)]",children:s.key}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsxs("span",{className:"block truncate text-[11px] text-[var(--text-muted)]",children:[s.agentType," · ",s.repoUrl.replace(/^https?:\/\//,"").split("/").slice(-2).join("/")]})]}),e.jsx("div",{className:"flex items-center",children:e.jsxs("div",{className:"flex -space-x-1.5",children:[(s.members??[]).map(n=>e.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--accent)]/20 text-[11px] font-bold text-[var(--accent)]",title:n.name,children:n.name.charAt(0).toUpperCase()},n.id)),(s.memberCount??0)>5&&e.jsxs("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--bg-input)] text-[11px] text-[var(--text-muted)]",children:["+",s.memberCount-5]})]})}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.taskCount??0}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:q(s.lastActivity??null)})]},s.key))]})]}),e.jsx(V,{isOpen:j,onClose:()=>t(!1),onCreated:u})]})]})}export{le as default};
6
+ */const V=I("FolderOpen",[["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"}]]),m={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},i={display:"block",color:"var(--text-secondary)",fontSize:"0.7rem",marginBottom:"0.25rem",fontFamily:"'JetBrains Mono', monospace"};function Q({isOpen:l,onClose:a,onCreated:j}){const{t}=P();R(l);const d=D(r=>r),[c,u]=o.useState(""),[s,b]=o.useState(""),[n,g]=o.useState(""),[y,f]=o.useState(""),[C,_]=o.useState("main"),[k,N]=o.useState(x.GITHUB),[S,B]=o.useState(z.CLAUDE),[p,T]=o.useState(!1),[w,v]=o.useState("");o.useEffect(()=>{l&&F()},[l]);function F(){u(""),b(""),g(""),f(""),_("main"),N(x.GITHUB),B(z.CLAUDE),v("")}function A(){F(),a()}async function L(r){r.preventDefault(),v(""),T(!0);try{const h=await E.post("admin/projects",{json:{name:c,key:s,repoUrl:n,sshUrl:y||void 0,defaultBranch:C,gitPlatform:k,agentType:S}}).json();j(h),A()}catch(h){const G=h instanceof Error?h.message:t("projects.failed_to_create_project");v(G)}finally{T(!1)}}return l?e.jsx("div",{style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))",padding:"1rem"},children:e.jsxs("div",{onClick:r=>r.stopPropagation(),style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem",fontFamily:"'JetBrains Mono', monospace"},children:[e.jsxs("div",{style:{marginBottom:"1.25rem"},children:[e.jsxs("div",{style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600},children:["> ",t("projects.create_project")]}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.7rem",marginTop:"0.25rem"},children:t("projects.add_project_desc")})]}),w&&e.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.7rem"},children:w}),e.jsxs("form",{onSubmit:L,style:{display:"flex",flexDirection:"column",gap:"0.875rem"},children:[e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.project_name")}),e.jsx("input",{type:"text",value:c,onChange:r=>u(r.target.value),placeholder:t("projects.project_name_placeholder"),required:!0,autoFocus:!0,style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.project_key")}),e.jsx("input",{type:"text",value:s,onChange:r=>b(r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),placeholder:t("projects.project_key_placeholder"),required:!0,style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:t("projects.project_key_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.repo_url")}),e.jsx("input",{type:"text",value:n,onChange:r=>g(r.target.value),placeholder:t("projects.repo_url_placeholder"),required:!0,style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.ssh_url")}),e.jsx("input",{type:"text",value:y,onChange:r=>f(r.target.value),placeholder:t("projects.ssh_url_placeholder"),style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:t("projects.ssh_url_hint")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.default_branch")}),e.jsx("input",{type:"text",value:C,onChange:r=>_(r.target.value),placeholder:t("projects.main"),style:m,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.git_platform")}),e.jsx(U,{value:k,onChange:r=>N(r),options:[{value:x.GITHUB,label:t("projects.github")},{value:x.GITLAB,label:t("projects.gitlab")},{value:x.GITEA,label:t("projects.gitea")}]})]}),e.jsxs("div",{children:[e.jsx("label",{style:i,children:t("projects.agent_type")}),e.jsx(U,{value:S,onChange:r=>B(r),options:d})]})]}),e.jsxs("div",{style:{display:"flex",gap:"0.75rem",marginTop:"0.5rem"},children:[e.jsx("button",{type:"button",onClick:A,disabled:p,style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",children:t("common.cancel")}),e.jsx("button",{type:"submit",disabled:p||!c||!s||!n,style:{flex:1,padding:"0.5rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:p||!c||!s||!n?"not-allowed":"pointer",opacity:p||!c||!s||!n?.7:1},children:t(p?"common.creating":"common.create")})]})]})]})}):null}function le(){const l=H(),{t:a}=P(),[j,t]=o.useState(!1),{data:d,loading:c,refetch:u}=W(()=>E.get("web/projects").json(),[]);return M(o.useMemo(()=>e.jsxs("button",{onClick:()=>t(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx($,{className:"h-3.5 w-3.5"}),a("projects.create_project")]}),[a])),e.jsxs("div",{className:"mx-auto max-w-5xl",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("button",{onClick:()=>l("/dashboard"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(K,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",children:a("projects.title")})]}),e.jsxs("div",{className:"px-4 md:px-6 py-8",children:[c?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(O,{rows:4})}):!d||d.length===0?e.jsx(J,{icon:V,title:a("projects.no_projects_yet"),description:a("projects.create_first_project"),actionLabel:a("projects.create_project"),onAction:()=>t(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-2 md:hidden",children:d.map(s=>e.jsxs("div",{onClick:()=>l(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 transition-colors active:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[s.taskCount??0," tasks"]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key))}),e.jsxs("div",{className:"hidden md:block rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"grid grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-2.5 text-xs font-medium text-[var(--text-muted)]",children:[e.jsx("span",{children:"#"}),e.jsx("span",{children:a("projects.key")}),e.jsx("span",{children:a("projects.name")}),e.jsx("span",{children:a("projects.members")}),e.jsx("span",{children:a("projects.tasks_count")}),e.jsx("span",{children:a("projects.last_activity")})]}),d.map((s,b)=>e.jsxs("div",{onClick:()=>l(`/projects/${s.key}`),className:"grid cursor-pointer grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors items-center",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:b+1}),e.jsx("span",{className:"truncate text-xs text-[var(--accent)]",children:s.key}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsxs("span",{className:"block truncate text-[11px] text-[var(--text-muted)]",children:[s.agentType," · ",s.repoUrl.replace(/^https?:\/\//,"").split("/").slice(-2).join("/")]})]}),e.jsx("div",{className:"flex items-center",children:e.jsxs("div",{className:"flex -space-x-1.5",children:[(s.members??[]).map(n=>e.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--accent)]/20 text-[11px] font-bold text-[var(--accent)]",title:n.name,children:n.name.charAt(0).toUpperCase()},n.id)),(s.memberCount??0)>5&&e.jsxs("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--bg-input)] text-[11px] text-[var(--text-muted)]",children:["+",s.memberCount-5]})]})}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.taskCount??0}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:q(s.lastActivity??null)})]},s.key))]})]}),e.jsx(Q,{isOpen:j,onClose:()=>t(!1),onCreated:u})]})]})}export{le as default};