@overlordai/server 1.0.141 → 1.0.143

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 (155) hide show
  1. package/database/migrations/012-schema-index-fixes.sql +1 -0
  2. package/database/migrations/013-review-status.sql +8 -0
  3. package/dist/adapters/command-parser.utils.d.ts +26 -1
  4. package/dist/adapters/command-parser.utils.d.ts.map +1 -1
  5. package/dist/adapters/command-parser.utils.js +112 -26
  6. package/dist/adapters/command-parser.utils.js.map +1 -1
  7. package/dist/adapters/help-text.d.ts.map +1 -1
  8. package/dist/adapters/help-text.js +5 -1
  9. package/dist/adapters/help-text.js.map +1 -1
  10. package/dist/adapters/lark/lark-message.parser.d.ts.map +1 -1
  11. package/dist/adapters/lark/lark-message.parser.js +3 -1
  12. package/dist/adapters/lark/lark-message.parser.js.map +1 -1
  13. package/dist/adapters/lark/lark.adapter.d.ts.map +1 -1
  14. package/dist/adapters/lark/lark.adapter.js +46 -9
  15. package/dist/adapters/lark/lark.adapter.js.map +1 -1
  16. package/dist/adapters/nlu-fallback.utils.d.ts +27 -0
  17. package/dist/adapters/nlu-fallback.utils.d.ts.map +1 -0
  18. package/dist/adapters/nlu-fallback.utils.js +57 -0
  19. package/dist/adapters/nlu-fallback.utils.js.map +1 -0
  20. package/dist/adapters/nlu.service.d.ts.map +1 -1
  21. package/dist/adapters/nlu.service.js +22 -6
  22. package/dist/adapters/nlu.service.js.map +1 -1
  23. package/dist/adapters/slack/slack-message.parser.d.ts.map +1 -1
  24. package/dist/adapters/slack/slack-message.parser.js +3 -1
  25. package/dist/adapters/slack/slack-message.parser.js.map +1 -1
  26. package/dist/adapters/slack/slack.adapter.d.ts.map +1 -1
  27. package/dist/adapters/slack/slack.adapter.js +31 -6
  28. package/dist/adapters/slack/slack.adapter.js.map +1 -1
  29. package/dist/database/repositories/project-member.repository.js +4 -4
  30. package/dist/database/repositories/project-member.repository.js.map +1 -1
  31. package/dist/database/repositories/project.repository.d.ts.map +1 -1
  32. package/dist/database/repositories/project.repository.js +9 -7
  33. package/dist/database/repositories/project.repository.js.map +1 -1
  34. package/dist/database/repositories/task.repository.d.ts +18 -0
  35. package/dist/database/repositories/task.repository.d.ts.map +1 -1
  36. package/dist/database/repositories/task.repository.js +104 -58
  37. package/dist/database/repositories/task.repository.js.map +1 -1
  38. package/dist/dispatcher/dispatcher.service.d.ts +24 -1
  39. package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
  40. package/dist/dispatcher/dispatcher.service.js +124 -113
  41. package/dist/dispatcher/dispatcher.service.js.map +1 -1
  42. package/dist/notifier/notification-consumer.d.ts.map +1 -1
  43. package/dist/notifier/notification-consumer.js +14 -9
  44. package/dist/notifier/notification-consumer.js.map +1 -1
  45. package/dist/web/frame-handlers/review-report.handler.d.ts.map +1 -1
  46. package/dist/web/frame-handlers/review-report.handler.js +15 -0
  47. package/dist/web/frame-handlers/review-report.handler.js.map +1 -1
  48. package/dist/web/task.controller.d.ts +11 -1
  49. package/dist/web/task.controller.d.ts.map +1 -1
  50. package/dist/web/task.controller.js +51 -6
  51. package/dist/web/task.controller.js.map +1 -1
  52. package/package.json +4 -4
  53. package/public/assets/{AccessTokensPage-wTxicSeE.js → AccessTokensPage-BSxprw7x.js} +1 -1
  54. package/public/assets/{AdminPage-CBovEOm4.js → AdminPage-CxHMuTgJ.js} +1 -1
  55. package/public/assets/{AgentCliPage-DfqlFdFN.js → AgentCliPage-DxZUrhjz.js} +1 -1
  56. package/public/assets/{ApiReferencePage-7TUHB8sC.js → ApiReferencePage-Cc_-lPFn.js} +1 -1
  57. package/public/assets/{ArchitecturePage-CycvJ1HW.js → ArchitecturePage-CpXl4jb3.js} +1 -1
  58. package/public/assets/{AuditLogPage-CqqCDd8o.js → AuditLogPage-CvG7Kmpn.js} +1 -1
  59. package/public/assets/{BindPlatformPage-BV5wNIi2.js → BindPlatformPage-DQEP-N9z.js} +1 -1
  60. package/public/assets/{BotIntegrationPage-B2bQytks.js → BotIntegrationPage-DP1ipK65.js} +1 -1
  61. package/public/assets/{BotManage-BBBrqdT_.js → BotManage-B1lkaWlW.js} +1 -1
  62. package/public/assets/{BotSetupPage-DdDPniAd.js → BotSetupPage-kJHd4z6w.js} +1 -1
  63. package/public/assets/{ChangelogPage-D5YE3BFH.js → ChangelogPage-QheUxtEJ.js} +1 -1
  64. package/public/assets/{CliReferencePage-yJgtPpFn.js → CliReferencePage-Dy78S9h1.js} +1 -1
  65. package/public/assets/{ConfirmStageDialog-BOGr-qSN.js → ConfirmStageDialog-rt45LR8Q.js} +4 -4
  66. package/public/assets/{DeploymentPage-C0CXq8yl.js → DeploymentPage-CaIslw2W.js} +1 -1
  67. package/public/assets/{DevWorkflowPage-I4Io3nYz.js → DevWorkflowPage-DjmFkvCo.js} +1 -1
  68. package/public/assets/{DeveloperManage-Cy0LRyHh.js → DeveloperManage-Ab6SdQEz.js} +1 -1
  69. package/public/assets/{DeveloperSetupPage-DzGCH2XG.js → DeveloperSetupPage-D3RvWqx0.js} +1 -1
  70. package/public/assets/{DocsIndexPage-PIEcc9gX.js → DocsIndexPage-BHnvOEn8.js} +1 -1
  71. package/public/assets/{DocsLayout-ChIliA9A.js → DocsLayout-BdWlFJ_G.js} +1 -1
  72. package/public/assets/{DocsPrimitives-BMgSDhur.js → DocsPrimitives-BRoBpWHe.js} +1 -1
  73. package/public/assets/{EditProjectPage-D0rfXGZR.js → EditProjectPage-CepF7mnT.js} +2 -2
  74. package/public/assets/{EmptyState-Di2nOiOt.js → EmptyState-BIXXLer_.js} +1 -1
  75. package/public/assets/{EnvVariablesPage-EmfRwttc.js → EnvVariablesPage-DxRT4ql6.js} +1 -1
  76. package/public/assets/HomePage-CkiXfp2H.js +1 -0
  77. package/public/assets/{InfoRow-5vQ-_wWv.js → InfoRow-DXCzjoGj.js} +1 -1
  78. package/public/assets/{InstallationPage-CUbe1AD-.js → InstallationPage-CF8j4Y-C.js} +1 -1
  79. package/public/assets/{LandingPage-DSHGbkXw.js → LandingPage-CaYr_-RD.js} +1 -1
  80. package/public/assets/{LocalDevelopmentPage-fialPCnX.js → LocalDevelopmentPage-HIFhYvHJ.js} +1 -1
  81. package/public/assets/{LoginPage-C4oz9yjV.js → LoginPage-D17Mq8Qe.js} +1 -1
  82. package/public/assets/{MetricBar-ByQYVWVi.js → MetricBar-DDJWywkw.js} +1 -1
  83. package/public/assets/{NotFoundPage-BeayCSH7.js → NotFoundPage-BTlUFX7F.js} +1 -1
  84. package/public/assets/{OnboardingGuide-CqcX04SL.js → OnboardingGuide-CTJYul4_.js} +1 -1
  85. package/public/assets/{PermissionsPage-Bb2CYzMf.js → PermissionsPage-Dj27JR_m.js} +1 -1
  86. package/public/assets/PipelineConfigPage-BTy8cOFI.js +22 -0
  87. package/public/assets/{PipelineEditorPage-FkckQpQX.js → PipelineEditorPage-CuSW0B-0.js} +2 -2
  88. package/public/assets/PlanPage-CMQs2Hiz.js +1 -0
  89. package/public/assets/{ProfilePage-CT_kk3a8.js → ProfilePage-BRxrQCQd.js} +1 -1
  90. package/public/assets/ProjectDetailPage-CRHNrgPt.js +7 -0
  91. package/public/assets/{ProjectListPage-C2uStUVE.js → ProjectListPage-QM4505IY.js} +2 -2
  92. package/public/assets/{PtyTerminal-BYXg_ahq.js → PtyTerminal-BxD1WFmu.js} +1 -1
  93. package/public/assets/{QuickAuth-CohuPihd.js → QuickAuth-Dx-LoUjm.js} +1 -1
  94. package/public/assets/{RemoveMemberConfirmDialog-DLq9g7Td.js → RemoveMemberConfirmDialog-pg5SnIU8.js} +1 -1
  95. package/public/assets/{ReviewAggregatePage-dWQb52Df.js → ReviewAggregatePage-DHUyVVeT.js} +2 -2
  96. package/public/assets/ReviewPage-DzNkeQXP.js +1 -0
  97. package/public/assets/{Select-BAl7H-Y0.js → Select-DYnPuPlP.js} +1 -1
  98. package/public/assets/{SettingsPage-qCfF6rzU.js → SettingsPage-YpqaOT8x.js} +1 -1
  99. package/public/assets/{Skeleton-DA5o8Wqi.js → Skeleton-tFvClhRo.js} +1 -1
  100. package/public/assets/{SkillPage-C6p0dXbu.js → SkillPage-BQto2TJm.js} +1 -1
  101. package/public/assets/TaskDetailPage-BAnCb9zv.js +21 -0
  102. package/public/assets/{TaskGuidePage-COT0chCI.js → TaskGuidePage-Bs-Unzck.js} +1 -1
  103. package/public/assets/TaskListPage-CL98Ev5l.js +1 -0
  104. package/public/assets/{TaskStatusBadge-BdNFkrjU.js → TaskStatusBadge-BUczBM5S.js} +1 -1
  105. package/public/assets/TerminalHomePage-CgZYHN7Y.js +6 -0
  106. package/public/assets/{TokenManage-JLFD8xAN.js → TokenManage-BU8KbNvZ.js} +1 -1
  107. package/public/assets/{Tooltip-Bl8LCgWr.js → Tooltip-BTMAbLUj.js} +1 -1
  108. package/public/assets/{TotpSetupPage-BGE6pDdn.js → TotpSetupPage-B9IghCSA.js} +1 -1
  109. package/public/assets/WorkerDetailPage-D0Vz2Z_J.js +1 -0
  110. package/public/assets/{WorkerListPage-e4P55nJc.js → WorkerListPage-B4aOYXSX.js} +2 -2
  111. package/public/assets/{WorkerOperationsPage-ioBw_i1j.js → WorkerOperationsPage-Du5dUuwe.js} +1 -1
  112. package/public/assets/{WorkerSetupGuidePage-CRicnVVm.js → WorkerSetupGuidePage-Chgd3lOw.js} +1 -1
  113. package/public/assets/{WorkerSetupPage-DXOlNqUZ.js → WorkerSetupPage-DOy5dzpL.js} +1 -1
  114. package/public/assets/{agent-type-options-BVIYXf2V.js → agent-type-options-DYVQzNPE.js} +1 -1
  115. package/public/assets/{arrow-left-CTo0KHGY.js → arrow-left-BmJhqQxJ.js} +1 -1
  116. package/public/assets/{arrow-right-C9oQyTKw.js → arrow-right-za11FMwb.js} +1 -1
  117. package/public/assets/{bot-B301pflD.js → bot-BREu_dZH.js} +1 -1
  118. package/public/assets/{chevron-down-B0Leook1.js → chevron-down-pInOI1Sz.js} +1 -1
  119. package/public/assets/{chevron-left-59qctCaF.js → chevron-left-9sE-mZhp.js} +1 -1
  120. package/public/assets/{chevron-right-XfJqITCa.js → chevron-right-BTVDsZF2.js} +1 -1
  121. package/public/assets/{chevron-up-BW2PVBfH.js → chevron-up-7pQBLB6e.js} +1 -1
  122. package/public/assets/{copy-DEWCNXDf.js → copy-Ciibu4ij.js} +1 -1
  123. package/public/assets/{download-7d5kMwpH.js → download-C5M-xVQE.js} +1 -1
  124. package/public/assets/{external-link-DjBNV7ga.js → external-link-DXCE8f-2.js} +1 -1
  125. package/public/assets/{file-text-DHEz_RFq.js → file-text-FxjQforC.js} +1 -1
  126. package/public/assets/{git-fork-cRLOBM6a.js → git-fork-BnUjRz81.js} +1 -1
  127. package/public/assets/{index-eKvCyU64.js → index-CTVNJXL0.js} +5 -5
  128. package/public/assets/{key-D5BbAzTj.js → key-DORG2Bvk.js} +1 -1
  129. package/public/assets/{loader-circle-B_f_h4fq.js → loader-circle-Ce741dwH.js} +1 -1
  130. package/public/assets/{pencil-CTTWvWuS.js → pencil-C4ejRMe1.js} +1 -1
  131. package/public/assets/{play-Cqf1Kvc7.js → play-w6NUT3Ge.js} +1 -1
  132. package/public/assets/{plus-DwBKB0x6.js → plus-CgnoWo2P.js} +1 -1
  133. package/public/assets/{rotate-ccw-CZR8KOZn.js → rotate-ccw-DE82XdM1.js} +1 -1
  134. package/public/assets/{scroll-text-BeQeZkLb.js → scroll-text-DAbRTvTk.js} +1 -1
  135. package/public/assets/{settings-CsdOqob5.js → settings-B6CvfGJs.js} +1 -1
  136. package/public/assets/{skip-forward-BqiRx2ZQ.js → skip-forward-kX5fzSWO.js} +1 -1
  137. package/public/assets/{status-colors-yfNzOmz-.js → status-colors-DTc6Ynln.js} +1 -1
  138. package/public/assets/{task-constants-BWLt-ivk.js → task-constants-DFxPkPUs.js} +1 -1
  139. package/public/assets/{task.store-BDZwafPm.js → task.store-VJg4-Qif.js} +1 -1
  140. package/public/assets/{trash-2-CXPG2vQr.js → trash-2-BTUlSSX7.js} +1 -1
  141. package/public/assets/{useFetch-CVFGit7a.js → useFetch-DLQT-fqN.js} +1 -1
  142. package/public/assets/{users-DmefWRaM.js → users-B6ZPxGEF.js} +1 -1
  143. package/public/assets/{wifi-BJIfMBKB.js → wifi-RZmzDeRm.js} +1 -1
  144. package/public/assets/{workflow-CuZasRLA.js → workflow-C1oJzdp3.js} +1 -1
  145. package/public/index.html +1 -1
  146. package/public/sw.js +1 -1
  147. package/public/assets/HomePage-CeOmNhkc.js +0 -1
  148. package/public/assets/PipelineConfigPage-DwY__0Ag.js +0 -22
  149. package/public/assets/PlanPage-BOzGJd2h.js +0 -1
  150. package/public/assets/ProjectDetailPage-B-t7L84T.js +0 -7
  151. package/public/assets/ReviewPage-DtdWSBgK.js +0 -1
  152. package/public/assets/TaskDetailPage-D4sGfico.js +0 -21
  153. package/public/assets/TaskListPage-Bvq5ow7r.js +0 -1
  154. package/public/assets/TerminalHomePage-XJ5daAJC.js +0 -6
  155. package/public/assets/WorkerDetailPage-Dd-IbO6r.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-eKvCyU64.js";/**
1
+ import{c as e}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-eKvCyU64.js";/**
1
+ import{c as e}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-eKvCyU64.js";/**
1
+ import{c as a}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-eKvCyU64.js";/**
1
+ import{c as o}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-eKvCyU64.js";/**
1
+ import{c as e}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-eKvCyU64.js";/**
1
+ import{c as t}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-eKvCyU64.js";/**
1
+ import{c as a}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-eKvCyU64.js";/**
1
+ import{c as a}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-eKvCyU64.js";/**
1
+ import{c as o}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{W as r,p as e,a7 as s,a8 as u,a3 as a}from"./index-eKvCyU64.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--info)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const o={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return o[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,o as w};
1
+ import{W as r,o as e,a6 as s,a7 as u,a2 as a}from"./index-CTVNJXL0.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--info)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const o={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return o[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,o as w};
@@ -1 +1 @@
1
- import{p as a,Q as t}from"./index-eKvCyU64.js";import{a as l}from"./agent-type-options-BVIYXf2V.js";const r=[a.COMPLETED,a.FAILED,a.CANCELLED],E=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],o=l(e=>e);[...o];function c(e){return(e??t.CLAUDE).toLowerCase()}export{r as T,E as a,c as g};
1
+ import{o as a,O as t}from"./index-CTVNJXL0.js";import{a as l}from"./agent-type-options-DYVQzNPE.js";const r=[a.COMPLETED,a.FAILED,a.CANCELLED],E=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],o=l(e=>e);[...o];function c(e){return(e??t.CLAUDE).toLowerCase()}export{r as T,E as a,c as g};
@@ -1 +1 @@
1
- import{o as i,h as c}from"./index-eKvCyU64.js";const k=i((a,o)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0,fetchTasks:async s=>{const t=o()._fetchTasksAbort;t&&t.abort();const e=new AbortController,n=o()._fetchTasksRequestId+1;a({loading:!0,error:null,_fetchTasksAbort:e,_fetchTasksRequestId:n});try{const r={};s!=null&&s.status&&(r.status=s.status),s!=null&&s.projectKey&&(r.projectKey=s.projectKey),s!=null&&s.developerId&&(r.developerId=s.developerId),s!=null&&s.cursor&&(r.cursor=s.cursor),s!=null&&s.limit&&(r.limit=String(s.limit));const l=await c.get("web/tasks",{searchParams:r,signal:e.signal}).json();if(o()._fetchTasksRequestId!==n)return;a({tasks:l.data,nextCursor:l.nextCursor??null,_fetchTasksAbort:null})}catch(r){if(r instanceof DOMException&&r.name==="AbortError")return;o()._fetchTasksRequestId===n&&a({error:r instanceof Error?r.message:"Failed to fetch tasks"})}finally{o()._fetchTasksRequestId===n&&a({loading:!1,_fetchTasksAbort:null})}},fetchTask:async s=>{a({loading:!0,error:null});try{const t=await c.get(`web/tasks/${s}`).json();a({currentTask:t})}catch(t){a({error:t instanceof Error?t.message:"Failed to fetch task"})}finally{a({loading:!1})}},createTask:async s=>{a({error:null});try{const t=await c.post("web/tasks",{json:s}).json();return a(e=>({tasks:[t,...e.tasks]})),t}catch(t){throw a({error:t instanceof Error?t.message:"Failed to create task"}),t}},cancelTask:async s=>{a({error:null});try{await c.post(`web/tasks/${s}/cancel`);const{currentTask:t}=o();(t==null?void 0:t.id)===s&&await o().fetchTask(s)}catch(t){throw a({error:t instanceof Error?t.message:"Failed to cancel task"}),t}},reset:()=>{a({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0})}}));export{k as u};
1
+ import{n as i,h as c}from"./index-CTVNJXL0.js";const k=i((a,o)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0,fetchTasks:async s=>{const t=o()._fetchTasksAbort;t&&t.abort();const e=new AbortController,n=o()._fetchTasksRequestId+1;a({loading:!0,error:null,_fetchTasksAbort:e,_fetchTasksRequestId:n});try{const r={};s!=null&&s.status&&(r.status=s.status),s!=null&&s.projectKey&&(r.projectKey=s.projectKey),s!=null&&s.developerId&&(r.developerId=s.developerId),s!=null&&s.cursor&&(r.cursor=s.cursor),s!=null&&s.limit&&(r.limit=String(s.limit));const l=await c.get("web/tasks",{searchParams:r,signal:e.signal}).json();if(o()._fetchTasksRequestId!==n)return;a({tasks:l.data,nextCursor:l.nextCursor??null,_fetchTasksAbort:null})}catch(r){if(r instanceof DOMException&&r.name==="AbortError")return;o()._fetchTasksRequestId===n&&a({error:r instanceof Error?r.message:"Failed to fetch tasks"})}finally{o()._fetchTasksRequestId===n&&a({loading:!1,_fetchTasksAbort:null})}},fetchTask:async s=>{a({loading:!0,error:null});try{const t=await c.get(`web/tasks/${s}`).json();a({currentTask:t})}catch(t){a({error:t instanceof Error?t.message:"Failed to fetch task"})}finally{a({loading:!1})}},createTask:async s=>{a({error:null});try{const t=await c.post("web/tasks",{json:s}).json();return a(e=>({tasks:[t,...e.tasks]})),t}catch(t){throw a({error:t instanceof Error?t.message:"Failed to create task"}),t}},cancelTask:async s=>{a({error:null});try{await c.post(`web/tasks/${s}/cancel`);const{currentTask:t}=o();(t==null?void 0:t.id)===s&&await o().fetchTask(s)}catch(t){throw a({error:t instanceof Error?t.message:"Failed to cancel task"}),t}},reset:()=>{a({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0})}}));export{k as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-eKvCyU64.js";/**
1
+ import{c as e}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as e}from"./index-eKvCyU64.js";function p(s,l){const[i,d]=e.useState(null),[R,a]=e.useState(!0),[m,o]=e.useState(null),f=e.useRef(s);f.current=s;const r=e.useRef(0),t=e.useRef(!0),u=e.useCallback(async()=>{const c=++r.current;a(!0),o(null);try{const n=await f.current();t.current&&c===r.current&&d(n)}catch(n){if(t.current&&c===r.current){const E=n instanceof Error?n.message:"An unexpected error occurred";o(E)}}finally{t.current&&c===r.current&&a(!1)}},l);return e.useEffect(()=>{u()},[u]),e.useEffect(()=>()=>{t.current=!1,r.current+=1},[]),{data:i,loading:R,error:m,refetch:u}}export{p as u};
1
+ import{r as e}from"./index-CTVNJXL0.js";function p(s,l){const[i,d]=e.useState(null),[R,a]=e.useState(!0),[m,o]=e.useState(null),f=e.useRef(s);f.current=s;const r=e.useRef(0),t=e.useRef(!0),u=e.useCallback(async()=>{const c=++r.current;a(!0),o(null);try{const n=await f.current();t.current&&c===r.current&&d(n)}catch(n){if(t.current&&c===r.current){const E=n instanceof Error?n.message:"An unexpected error occurred";o(E)}}finally{t.current&&c===r.current&&a(!1)}},l);return e.useEffect(()=>{u()},[u]),e.useEffect(()=>()=>{t.current=!1,r.current+=1},[]),{data:i,loading:R,error:m,refetch:u}}export{p as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-eKvCyU64.js";/**
1
+ import{c as e}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-eKvCyU64.js";/**
1
+ import{c as e}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-eKvCyU64.js";/**
1
+ import{c}from"./index-CTVNJXL0.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/public/index.html CHANGED
@@ -28,7 +28,7 @@
28
28
  href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap"
29
29
  rel="stylesheet"
30
30
  />
31
- <script type="module" crossorigin src="/assets/index-eKvCyU64.js"></script>
31
+ <script type="module" crossorigin src="/assets/index-CTVNJXL0.js"></script>
32
32
  <link rel="stylesheet" crossorigin href="/assets/index-kJfGgL_V.css">
33
33
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
34
34
  <body>
package/public/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let s,e={};const l=(l,i)=>(l=new URL(l+".js",i).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(i,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const o=s=>l(s,r),u={module:{uri:r},exports:a,require:o};e[r]=Promise.all(i.map(s=>u[s]||o(s))).then(s=>(n(...s),a))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"6f5582d5c22f0dbc62cf78a4371e278c"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-CuZasRLA.js",revision:null},{url:"assets/wifi-BJIfMBKB.js",revision:null},{url:"assets/users-DmefWRaM.js",revision:null},{url:"assets/useFetch-CVFGit7a.js",revision:null},{url:"assets/trash-2-CXPG2vQr.js",revision:null},{url:"assets/task.store-BDZwafPm.js",revision:null},{url:"assets/task-constants-BWLt-ivk.js",revision:null},{url:"assets/status-colors-yfNzOmz-.js",revision:null},{url:"assets/skip-forward-BqiRx2ZQ.js",revision:null},{url:"assets/settings-CsdOqob5.js",revision:null},{url:"assets/scroll-text-BeQeZkLb.js",revision:null},{url:"assets/rotate-ccw-CZR8KOZn.js",revision:null},{url:"assets/plus-DwBKB0x6.js",revision:null},{url:"assets/play-Cqf1Kvc7.js",revision:null},{url:"assets/pencil-CTTWvWuS.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-B_f_h4fq.js",revision:null},{url:"assets/key-D5BbAzTj.js",revision:null},{url:"assets/index-kJfGgL_V.css",revision:null},{url:"assets/index-eKvCyU64.js",revision:null},{url:"assets/git-fork-cRLOBM6a.js",revision:null},{url:"assets/file-text-DHEz_RFq.js",revision:null},{url:"assets/external-link-DjBNV7ga.js",revision:null},{url:"assets/download-7d5kMwpH.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-DEWCNXDf.js",revision:null},{url:"assets/chevron-up-BW2PVBfH.js",revision:null},{url:"assets/chevron-right-XfJqITCa.js",revision:null},{url:"assets/chevron-left-59qctCaF.js",revision:null},{url:"assets/chevron-down-B0Leook1.js",revision:null},{url:"assets/bot-B301pflD.js",revision:null},{url:"assets/arrow-right-C9oQyTKw.js",revision:null},{url:"assets/arrow-left-CTo0KHGY.js",revision:null},{url:"assets/agent-type-options-BVIYXf2V.js",revision:null},{url:"assets/WorkerSetupPage-DXOlNqUZ.js",revision:null},{url:"assets/WorkerSetupGuidePage-CRicnVVm.js",revision:null},{url:"assets/WorkerOperationsPage-ioBw_i1j.js",revision:null},{url:"assets/WorkerListPage-e4P55nJc.js",revision:null},{url:"assets/WorkerDetailPage-Dd-IbO6r.js",revision:null},{url:"assets/TotpSetupPage-BGE6pDdn.js",revision:null},{url:"assets/Tooltip-Bl8LCgWr.js",revision:null},{url:"assets/TokenManage-JLFD8xAN.js",revision:null},{url:"assets/TerminalHomePage-XJ5daAJC.js",revision:null},{url:"assets/TaskStatusBadge-BdNFkrjU.js",revision:null},{url:"assets/TaskListPage-Bvq5ow7r.js",revision:null},{url:"assets/TaskGuidePage-COT0chCI.js",revision:null},{url:"assets/TaskDetailPage-D4sGfico.js",revision:null},{url:"assets/SkillPage-C6p0dXbu.js",revision:null},{url:"assets/Skeleton-DA5o8Wqi.js",revision:null},{url:"assets/SettingsPage-qCfF6rzU.js",revision:null},{url:"assets/Select-BAl7H-Y0.js",revision:null},{url:"assets/ReviewPage-DtdWSBgK.js",revision:null},{url:"assets/ReviewAggregatePage-dWQb52Df.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-DLq9g7Td.js",revision:null},{url:"assets/QuickAuth-CohuPihd.js",revision:null},{url:"assets/PtyTerminal-BYXg_ahq.js",revision:null},{url:"assets/PtyTerminal-6GBZ9nXN.css",revision:null},{url:"assets/ProjectListPage-C2uStUVE.js",revision:null},{url:"assets/ProjectDetailPage-B-t7L84T.js",revision:null},{url:"assets/ProfilePage-CT_kk3a8.js",revision:null},{url:"assets/PlanPage-BOzGJd2h.js",revision:null},{url:"assets/PipelineEditorPage-FkckQpQX.js",revision:null},{url:"assets/PipelineConfigPage-DwY__0Ag.js",revision:null},{url:"assets/PermissionsPage-Bb2CYzMf.js",revision:null},{url:"assets/OnboardingGuide-CqcX04SL.js",revision:null},{url:"assets/NotFoundPage-BeayCSH7.js",revision:null},{url:"assets/MetricBar-ByQYVWVi.js",revision:null},{url:"assets/LoginPage-C4oz9yjV.js",revision:null},{url:"assets/LocalDevelopmentPage-fialPCnX.js",revision:null},{url:"assets/LandingPage-DSHGbkXw.js",revision:null},{url:"assets/InstallationPage-CUbe1AD-.js",revision:null},{url:"assets/InfoRow-5vQ-_wWv.js",revision:null},{url:"assets/HomePage-CeOmNhkc.js",revision:null},{url:"assets/EnvVariablesPage-EmfRwttc.js",revision:null},{url:"assets/EmptyState-Di2nOiOt.js",revision:null},{url:"assets/EditProjectPage-D0rfXGZR.js",revision:null},{url:"assets/DocsPrimitives-BMgSDhur.js",revision:null},{url:"assets/DocsLayout-ChIliA9A.js",revision:null},{url:"assets/DocsIndexPage-PIEcc9gX.js",revision:null},{url:"assets/DeveloperSetupPage-DzGCH2XG.js",revision:null},{url:"assets/DeveloperManage-Cy0LRyHh.js",revision:null},{url:"assets/DevWorkflowPage-I4Io3nYz.js",revision:null},{url:"assets/DeploymentPage-C0CXq8yl.js",revision:null},{url:"assets/ConfirmStageDialog-BOGr-qSN.js",revision:null},{url:"assets/CliReferencePage-yJgtPpFn.js",revision:null},{url:"assets/ChangelogPage-D5YE3BFH.js",revision:null},{url:"assets/BotSetupPage-DdDPniAd.js",revision:null},{url:"assets/BotManage-BBBrqdT_.js",revision:null},{url:"assets/BotIntegrationPage-B2bQytks.js",revision:null},{url:"assets/BindPlatformPage-BV5wNIi2.js",revision:null},{url:"assets/AuditLogPage-CqqCDd8o.js",revision:null},{url:"assets/ArchitecturePage-CycvJ1HW.js",revision:null},{url:"assets/ApiReferencePage-7TUHB8sC.js",revision:null},{url:"assets/AgentCliPage-DfqlFdFN.js",revision:null},{url:"assets/AdminPage-CBovEOm4.js",revision:null},{url:"assets/AccessTokensPage-wTxicSeE.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"e3100788a89f54481dbd663d57df57a6"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
1
+ if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),o={module:{uri:r},exports:u,require:a};e[r]=Promise.all(n.map(s=>o[s]||a(s))).then(s=>(i(...s),u))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"a2945cb1ab26d147e46733493634c9f0"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-C1oJzdp3.js",revision:null},{url:"assets/wifi-RZmzDeRm.js",revision:null},{url:"assets/users-B6ZPxGEF.js",revision:null},{url:"assets/useFetch-DLQT-fqN.js",revision:null},{url:"assets/trash-2-BTUlSSX7.js",revision:null},{url:"assets/task.store-VJg4-Qif.js",revision:null},{url:"assets/task-constants-DFxPkPUs.js",revision:null},{url:"assets/status-colors-DTc6Ynln.js",revision:null},{url:"assets/skip-forward-kX5fzSWO.js",revision:null},{url:"assets/settings-B6CvfGJs.js",revision:null},{url:"assets/scroll-text-DAbRTvTk.js",revision:null},{url:"assets/rotate-ccw-DE82XdM1.js",revision:null},{url:"assets/plus-CgnoWo2P.js",revision:null},{url:"assets/play-w6NUT3Ge.js",revision:null},{url:"assets/pencil-C4ejRMe1.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-Ce741dwH.js",revision:null},{url:"assets/key-DORG2Bvk.js",revision:null},{url:"assets/index-kJfGgL_V.css",revision:null},{url:"assets/index-CTVNJXL0.js",revision:null},{url:"assets/git-fork-BnUjRz81.js",revision:null},{url:"assets/file-text-FxjQforC.js",revision:null},{url:"assets/external-link-DXCE8f-2.js",revision:null},{url:"assets/download-C5M-xVQE.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-Ciibu4ij.js",revision:null},{url:"assets/chevron-up-7pQBLB6e.js",revision:null},{url:"assets/chevron-right-BTVDsZF2.js",revision:null},{url:"assets/chevron-left-9sE-mZhp.js",revision:null},{url:"assets/chevron-down-pInOI1Sz.js",revision:null},{url:"assets/bot-BREu_dZH.js",revision:null},{url:"assets/arrow-right-za11FMwb.js",revision:null},{url:"assets/arrow-left-BmJhqQxJ.js",revision:null},{url:"assets/agent-type-options-DYVQzNPE.js",revision:null},{url:"assets/WorkerSetupPage-DOy5dzpL.js",revision:null},{url:"assets/WorkerSetupGuidePage-Chgd3lOw.js",revision:null},{url:"assets/WorkerOperationsPage-Du5dUuwe.js",revision:null},{url:"assets/WorkerListPage-B4aOYXSX.js",revision:null},{url:"assets/WorkerDetailPage-D0Vz2Z_J.js",revision:null},{url:"assets/TotpSetupPage-B9IghCSA.js",revision:null},{url:"assets/Tooltip-BTMAbLUj.js",revision:null},{url:"assets/TokenManage-BU8KbNvZ.js",revision:null},{url:"assets/TerminalHomePage-CgZYHN7Y.js",revision:null},{url:"assets/TaskStatusBadge-BUczBM5S.js",revision:null},{url:"assets/TaskListPage-CL98Ev5l.js",revision:null},{url:"assets/TaskGuidePage-Bs-Unzck.js",revision:null},{url:"assets/TaskDetailPage-BAnCb9zv.js",revision:null},{url:"assets/SkillPage-BQto2TJm.js",revision:null},{url:"assets/Skeleton-tFvClhRo.js",revision:null},{url:"assets/SettingsPage-YpqaOT8x.js",revision:null},{url:"assets/Select-DYnPuPlP.js",revision:null},{url:"assets/ReviewPage-DzNkeQXP.js",revision:null},{url:"assets/ReviewAggregatePage-DHUyVVeT.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-pg5SnIU8.js",revision:null},{url:"assets/QuickAuth-Dx-LoUjm.js",revision:null},{url:"assets/PtyTerminal-BxD1WFmu.js",revision:null},{url:"assets/PtyTerminal-6GBZ9nXN.css",revision:null},{url:"assets/ProjectListPage-QM4505IY.js",revision:null},{url:"assets/ProjectDetailPage-CRHNrgPt.js",revision:null},{url:"assets/ProfilePage-BRxrQCQd.js",revision:null},{url:"assets/PlanPage-CMQs2Hiz.js",revision:null},{url:"assets/PipelineEditorPage-CuSW0B-0.js",revision:null},{url:"assets/PipelineConfigPage-BTy8cOFI.js",revision:null},{url:"assets/PermissionsPage-Dj27JR_m.js",revision:null},{url:"assets/OnboardingGuide-CTJYul4_.js",revision:null},{url:"assets/NotFoundPage-BTlUFX7F.js",revision:null},{url:"assets/MetricBar-DDJWywkw.js",revision:null},{url:"assets/LoginPage-D17Mq8Qe.js",revision:null},{url:"assets/LocalDevelopmentPage-HIFhYvHJ.js",revision:null},{url:"assets/LandingPage-CaYr_-RD.js",revision:null},{url:"assets/InstallationPage-CF8j4Y-C.js",revision:null},{url:"assets/InfoRow-DXCzjoGj.js",revision:null},{url:"assets/HomePage-CkiXfp2H.js",revision:null},{url:"assets/EnvVariablesPage-DxRT4ql6.js",revision:null},{url:"assets/EmptyState-BIXXLer_.js",revision:null},{url:"assets/EditProjectPage-CepF7mnT.js",revision:null},{url:"assets/DocsPrimitives-BRoBpWHe.js",revision:null},{url:"assets/DocsLayout-BdWlFJ_G.js",revision:null},{url:"assets/DocsIndexPage-BHnvOEn8.js",revision:null},{url:"assets/DeveloperSetupPage-D3RvWqx0.js",revision:null},{url:"assets/DeveloperManage-Ab6SdQEz.js",revision:null},{url:"assets/DevWorkflowPage-DjmFkvCo.js",revision:null},{url:"assets/DeploymentPage-CaIslw2W.js",revision:null},{url:"assets/ConfirmStageDialog-rt45LR8Q.js",revision:null},{url:"assets/CliReferencePage-Dy78S9h1.js",revision:null},{url:"assets/ChangelogPage-QheUxtEJ.js",revision:null},{url:"assets/BotSetupPage-kJHd4z6w.js",revision:null},{url:"assets/BotManage-B1lkaWlW.js",revision:null},{url:"assets/BotIntegrationPage-DP1ipK65.js",revision:null},{url:"assets/BindPlatformPage-DQEP-N9z.js",revision:null},{url:"assets/AuditLogPage-CvG7Kmpn.js",revision:null},{url:"assets/ArchitecturePage-CpXl4jb3.js",revision:null},{url:"assets/ApiReferencePage-Cc_-lPFn.js",revision:null},{url:"assets/AgentCliPage-DxZUrhjz.js",revision:null},{url:"assets/AdminPage-CxHMuTgJ.js",revision:null},{url:"assets/AccessTokensPage-BSxprw7x.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"e3100788a89f54481dbd663d57df57a6"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
@@ -1 +0,0 @@
1
- import{f as z,a as K,i as H,k as D,r as $,j as e,L as p,l as I,m as B,n as G,W as w,h}from"./index-eKvCyU64.js";import{T as R}from"./TaskStatusBadge-BdNFkrjU.js";import{T as g}from"./Skeleton-DA5o8Wqi.js";import{O as V}from"./OnboardingGuide-CqcX04SL.js";import{f as _}from"./date-RFA7-ZGs.js";import{g as Y}from"./status-colors-yfNzOmz-.js";import{u as b}from"./useFetch-CVFGit7a.js";import{T as q}from"./Tooltip-Bl8LCgWr.js";import{A as v}from"./arrow-right-C9oQyTKw.js";import"./chevron-right-XfJqITCa.js";const J=3e5,Q=[{type:"fraction",numerator:"active_tasks",denominator:"queued_tasks",labelKey:"dashboard.tasks_active_queued"},{type:"simple",key:"online_workers",labelKey:"dashboard.online_workers"},{type:"simple",key:"completed_today",labelKey:"dashboard.completed_all_today"},{type:"simple",key:"completed_by_user_today",labelKey:"dashboard.completed_by_you_today"}],U=["sun","mon","tue","wed","thu","fri","sat"];function X(){const n=new Date;return Array.from({length:7},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(6-i));const o=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:U[r.getDay()],date:`${o}/${l}`}})}function Z({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),o=X(),l=a.reduce((t,c)=>t+c,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:o.map(({label:t,date:c},j)=>{const x=a[j]??0,m=n[j]??0,f=r(x===1?"dashboard.task_total":"dashboard.tasks_total"),N=u>0?Math.max(x/u*100,4):4;return e.jsxs(q,{content:`${t} ${c} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t})]},t)})})]})}function ie(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),o=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:c}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,o]),{data:j,loading:x}=b(()=>h.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[l,r]),{data:m,loading:f}=b(()=>h.get("web/workers").json(),[l,o]),{data:N,loading:E}=b(()=>h.get("web/projects").json(),[l]),{data:O,loading:M}=b(()=>h.get("web/dashboard/recent-activity").json(),[]);$.useEffect(()=>{const s=setInterval(()=>{u(d=>d+1)},J);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_7d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case w.ONLINE:return a("dashboard.online");case w.DRAINING:return a("dashboard.idle");case w.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:Q.map(s=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[a(s.labelKey),":"]}),c?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:s.type==="fraction"?e.jsxs("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:[(t==null?void 0:t[s.numerator])??0,e.jsx("span",{className:"text-base md:text-lg font-normal text-[var(--text-muted)]",children:"/"}),(t==null?void 0:t[s.denominator])??0]}):e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(t==null?void 0:t[s.key])??0})})]},s.labelKey))}),e.jsx(V,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(Z,{dailyRates:S,dailyCounts:T,overallRate:W}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:T.reduce((s,d)=>s+d,0)}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_tasks")}),e.jsxs(p,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:x?e.jsx(g,{rows:4}):L.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:L.map(s=>e.jsxs("div",{onClick:()=>n(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",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:B(s),children:["#",s.id," ",I(s)]}),e.jsx("span",{className:"shrink-0",children:e.jsx(R,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:e.jsx(q,{content:G(s),children:I(s,40)})}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(R,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:_(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"flex md:hidden items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:f?e.jsx(g,{rows:3}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:y.map(s=>e.jsxs("div",{onClick:()=>n(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"min-w-0 flex-1 flex flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"truncate text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",a("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:Y(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),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:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),k=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${k?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>k&&n(`/tasks/${k}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{ie as default};
@@ -1,22 +0,0 @@
1
- import{j as e}from"./index-eKvCyU64.js";import{a}from"./DocsPrimitives-BMgSDhur.js";import"./copy-DEWCNXDf.js";const c=`[
2
- {
3
- "name": "develop",
4
- "command": "/develop {description}",
5
- "timeout": 1800
6
- },
7
- {
8
- "name": "test",
9
- "command": "/run-tests",
10
- "timeout": 600
11
- },
12
- {
13
- "name": "review",
14
- "command": "/review-and-commit",
15
- "timeout": 900,
16
- "confirm": true
17
- }
18
- ]`,i=`{
19
- "name": "deploy-target",
20
- "command": "/deploy {choice}",
21
- "choices": ["staging", "production", "both"]
22
- }`,r=[{name:"implement",label:"Implement",description:"implement the feature or fix based on task description, following project conventions"},{name:"test",label:"Test",description:"write comprehensive tests, run $TEST_COMMAND to confirm tests pass"},{name:"verify",label:"Verify",description:"run full test suite to ensure no regressions",onFailure:"→ implement (max 3 loops)"},{name:"review",label:"Review",description:"review git diff for quality, security, performance issues (P1-P5 severity)",gate:"no P1-P3 severity issues",onFailure:"→ implement (max 3 loops)"},{name:"simplify",label:"Simplify",description:"simplify code — remove unnecessary abstractions, reduce duplication, improve readability. run $TEST_COMMAND to ensure all tests still pass",gate:"all tests pass after simplification",onFailure:"→ simplify (max 3 loops)"},{name:"submit",label:"Submit MR",description:"commit all changes and create a merge request (GitHub / GitLab)"}];function o(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// pipeline configuration"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"each project in overlord can define a skill pipeline — a sequence of stages that the ai agent executes for every task. pipelines drive the entire task lifecycle, from initial development through testing and code review."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> how pipelines work"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"a pipeline consists of multiple stages. each stage corresponds to a skill command that overlord injects into the agent's pty terminal. the pipeline runner:"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsx("p",{children:"1. injects the skill command for the current stage into the pty"}),e.jsx("p",{children:"2. monitors agent output for completion markers"}),e.jsx("p",{children:"3. automatically advances to the next stage"}),e.jsx("p",{children:"4. handles errors, retries, and manual intervention"})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> pipeline definition"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"pipelines are configured per-project in json format via the admin dashboard or api:"}),e.jsx(a,{code:c})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> stage options"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"each stage supports the following options:"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"field"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"type"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"name"})}),e.jsx("td",{className:"py-2 pr-4",children:"string"}),e.jsx("td",{className:"py-2",children:"stage identifier (displayed in dashboard)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"command"})}),e.jsx("td",{className:"py-2 pr-4",children:"string"}),e.jsx("td",{className:"py-2",children:"command to inject into the agent pty"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"timeout"})}),e.jsx("td",{className:"py-2 pr-4",children:"number"}),e.jsx("td",{className:"py-2",children:"max seconds before the stage is marked failed"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"confirm"})}),e.jsx("td",{className:"py-2 pr-4",children:"boolean"}),e.jsx("td",{className:"py-2",children:"pause and wait for human confirmation before executing"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"choices"})}),e.jsx("td",{className:"py-2 pr-4",children:"string[]"}),e.jsx("td",{className:"py-2",children:"present a list of options for the user to choose from"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"input"})}),e.jsx("td",{className:"py-2 pr-4",children:"boolean"}),e.jsx("td",{className:"py-2",children:"pause and wait for free-text input from the user"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> confirmation stages"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:'when a stage has "confirm": true, the pipeline pauses and sends a notification through all connected channels (web dashboard, bot, cli). the task enters SUSPENDED status until a user confirms.'}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"confirmation can be done via:"}),e.jsxs("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:[e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"web dashboard"})," — click the confirm button on the task detail page"]}),e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"bot"})," — @bot confirm #42"]}),e.jsxs("p",{children:["- ",e.jsx("span",{className:"text-[var(--accent)]",children:"cli"})," — ov task confirm 42 --stage 2"]})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> choice stages"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:'stages with "choices" present the user with a list of options. the selected choice is interpolated into the command template:'}),e.jsx(a,{code:i})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> template variables"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"stage commands support template variables:"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"variable"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"{description}"})}),e.jsx("td",{className:"py-2",children:"task description"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"{branch}"})}),e.jsx("td",{className:"py-2",children:"git branch name"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"{project}"})}),e.jsx("td",{className:"py-2",children:"project key"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"{choice}"})}),e.jsx("td",{className:"py-2",children:"user's choice (for choice stages)"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:"{input}"})}),e.jsx("td",{className:"py-2",children:"user's input (for input stages)"})]})]})]})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> default pipeline"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"if no pipeline is configured, overlord uses a built-in 6-stage default pipeline that covers the full development lifecycle:"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"#"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"stage"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"description"}),e.jsx("th",{className:"py-2 pr-4 text-left text-[var(--text-muted)]",children:"gate"}),e.jsx("th",{className:"py-2 text-left text-[var(--text-muted)]",children:"on failure"})]})}),e.jsx("tbody",{className:"text-[var(--text-secondary)]",children:r.map((s,t)=>e.jsxs("tr",{className:t<r.length-1?"border-b border-[var(--border)]":"",children:[e.jsx("td",{className:"py-2 pr-4",children:t+1}),e.jsx("td",{className:"py-2 pr-4",children:e.jsx("code",{className:"text-[var(--accent)]",children:s.name})}),e.jsx("td",{className:"py-2 pr-4",children:s.description}),e.jsx("td",{className:"py-2 pr-4",children:s.gate??"—"}),e.jsx("td",{className:"py-2",children:s.onFailure??"—"})]},s.name))})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the default pipeline includes a preamble that instructs the agent to follow the project's code style, CLAUDE.md, and AGENTS.md guidelines. it supports runtime variable substitution: ",e.jsx("code",{className:"text-[var(--accent)]",children:"$BRANCH"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"$TEST_COMMAND"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"$REVIEWERS"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"$GIT_PLATFORM"}),", etc."]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"projects can override this by defining a custom pipeline in the project settings."})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--accent)]",children:"> plan and review task pipelines"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"plan and review tasks run their own dedicated pipelines, separate from the develop pipeline defined above."}),e.jsxs("div",{className:"space-y-3 text-xs text-[var(--text-secondary)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[var(--accent)]",children:"plan pipeline"}),e.jsxs("p",{className:"mt-1 text-[var(--text-muted)]",children:["runs a single interactive stage that reads the project codebase, facilitates a requirements discussion in the terminal, and writes a spec document to ",e.jsx("code",{className:"text-[var(--accent)]",children:"docs/specs/YYYY-MM-DD-<slug>.md"}),". the task suspends for user input during the discussion phase."]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[var(--accent)]",children:"review pipeline"}),e.jsx("p",{className:"mt-1 text-[var(--text-muted)]",children:"each review agent runs its own isolated pipeline: checkout the source task's branch, analyze the diff, and produce a structured report with severity-tagged findings. multiple review tasks for the same source task run in parallel across different workers."})]})]}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["note: the ",e.jsx("code",{className:"text-[var(--accent)]",children:"review"})," stage in the default develop pipeline above is a self-review step performed by the same agent before submitting — it is distinct from the cross-model review triggered by ",e.jsx("code",{className:"text-[var(--accent)]",children:"@bot review #id"}),"."]})]})]})]})}export{o as default};
@@ -1 +0,0 @@
1
- import{f as Q,a as H,k as J,r,h as v,p as s,t as I,w as V,j as t,O as Z,l as z,G as W}from"./index-eKvCyU64.js";import{E as X}from"./EmptyState-Di2nOiOt.js";import{T as Y}from"./Skeleton-DA5o8Wqi.js";import{f as ee}from"./date-RFA7-ZGs.js";import{S as te}from"./Select-BAl7H-Y0.js";import{P as re}from"./plus-DwBKB0x6.js";import{E as se}from"./external-link-DjBNV7ga.js";import{C as ae}from"./chevron-left-59qctCaF.js";import{C as oe}from"./chevron-right-XfJqITCa.js";import"./chevron-down-B0Leook1.js";const ne=[s.QUEUED,s.ASSIGNED,s.RUNNING,s.SUSPENDED],ce=20;function ie(n,o){if(!n)return null;const f=n.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),c=o.split("/").map(encodeURIComponent).join("/");return n.gitPlatform===W.GITLAB?`${f}/-/tree/${c}/docs/specs`:`${f}/tree/${c}/docs/specs`}function le(n){switch(n){case s.RUNNING:return"bg-[var(--accent)]";case s.QUEUED:return"bg-[var(--warning)]";case s.ASSIGNED:return"bg-[var(--info)]";case s.SUSPENDED:return"bg-[var(--warning)]";case s.COMPLETED:return"bg-[var(--accent)]";case s.FAILED:return"bg-[var(--destructive)]";case s.CANCELLED:return"bg-[#525252]";default:return"bg-[#525252]"}}function je(){const n=Q(),{t:o}=H(),f=J(e=>e.taskSeq),[c,M]=r.useState("in_progress"),[j,w]=r.useState([]),[k,D]=r.useState(!0),[x,G]=r.useState(void 0),[g,y]=r.useState(void 0),[N,E]=r.useState([]),[h,P]=r.useState({}),[i,O]=r.useState([]),[p,T]=r.useState(""),[u,L]=r.useState(""),[S,U]=r.useState(!1),R=r.useMemo(()=>{const e={};for(const a of i)e[a.key]=a;return e},[i]);r.useEffect(()=>{let e=!1;return v.get("web/projects").json().then(a=>{e||O(a)}).catch(()=>{}),()=>{e=!0}},[]),r.useEffect(()=>{i.length>0&&!p&&T(i[0].key)},[i]);const _=r.useCallback(async e=>{D(!0);try{const a=new URLSearchParams({taskMode:"plan",limit:String(ce)});c==="in_progress"?a.set("status",ne.join(",")):a.set("status",s.COMPLETED+","+s.FAILED+","+s.CANCELLED),e&&a.set("cursor",e);const m=await v.get(`web/tasks?${a}`).json(),b=m.data??[];w(b),G(m.nextCursor);const l=b.filter(d=>d.status===s.COMPLETED).map(d=>d.id);if(l.length>0){const d={};await Promise.all(l.map(async C=>{try{const F=await v.get(`web/tasks?${new URLSearchParams({sourceTaskId:String(C),limit:"100"})}`).json();d[C]=(F.data??[]).length}catch{d[C]=0}})),P(d)}else P({})}catch{w([])}finally{D(!1)}},[c]);r.useEffect(()=>{_(g)},[_,g,f]),r.useEffect(()=>{y(void 0),E([])},[c]);const B=r.useCallback(()=>{x&&(E(e=>[...e,g??""]),y(x))},[x,g]),K=r.useCallback(()=>{E(e=>{if(e.length===0)return e;const a=e.at(-1)||void 0;return y(a),e.slice(0,-1)})},[]),q=N.length+1,A=r.useCallback(async()=>{if(!p||!u.trim()){I.error("project and description are required.");return}U(!0);try{const e=await v.post("web/tasks",{json:{projectKey:p,description:u.trim(),taskMode:"plan"}}).json();L(""),n(`/tasks/${e.task.id}`)}catch(e){const a=e instanceof Error?e.message:String(e);I.error(a)}finally{U(!1)}},[p,u,n]),$=r.useMemo(()=>i.map(e=>({value:e.key,label:e.name})),[i]);return V(null),t.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[t.jsx("h1",{className:"sr-only",children:o("plan.title")}),t.jsxs("div",{className:"mb-6 flex flex-col gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:flex-row md:items-center md:gap-3",children:[t.jsx(te,{value:p,onChange:T,options:$.length>0?$:[{value:"",label:"loading..."}],className:"md:w-44 shrink-0"}),t.jsx("input",{type:"text",placeholder:o("plan.description_placeholder"),value:u,onChange:e=>L(e.target.value),onKeyDown:e=>{e.key==="Enter"&&!S&&A()},className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),t.jsxs("button",{onClick:A,disabled:S||!p||!u.trim(),className:"flex shrink-0 items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-mono text-black transition-opacity hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:[t.jsx(re,{className:"h-3.5 w-3.5"}),o(S?"common.creating":"plan.create")]})]}),t.jsx("div",{className:"mb-4 flex items-center gap-1 overflow-x-auto pb-1 no-scrollbar",children:["in_progress","completed"].map(e=>t.jsx("button",{onClick:()=>M(e),className:`shrink-0 rounded-[4px] px-3 py-2 h-8 text-xs transition-colors ${c===e?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:o(e==="in_progress"?"review.in_progress":"tasks.tab_completed")},e))}),t.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[k&&j.length===0&&t.jsx("div",{className:"p-4",children:t.jsx(Y,{rows:4})}),!k&&j.length===0&&t.jsx(X,{icon:Z,title:o("plan.no_plans"),description:o("plan.description_placeholder")}),j.map(e=>t.jsxs("div",{onClick:()=>n(`/tasks/${e.id}`),className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",children:[t.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${le(e.status)}`}),t.jsxs("span",{className:"flex-1 truncate text-xs text-[var(--text-primary)]",children:["#",e.id," ",z(e)]}),e.status===s.COMPLETED&&h[e.id]!=null&&h[e.id]>0&&t.jsxs("span",{className:"shrink-0 rounded-[4px] px-2 py-0.5 text-[10px] font-bold",style:{color:"#3b82f6",backgroundColor:"rgba(59,130,246,0.12)"},title:`${h[e.id]} downstream task(s)`,children:[h[e.id]," tasks"]}),e.status===s.COMPLETED&&(()=>{const a=R[e.projectKey];if(!a)return null;let m="main";if(e.configSnapshot)try{const l=JSON.parse(e.configSnapshot);l.defaultBranch&&(m=l.defaultBranch)}catch{}const b=ie(a,m);return b?t.jsxs("a",{href:b,target:"_blank",rel:"noopener noreferrer",onClick:l=>l.stopPropagation(),className:"shrink-0 flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[10px] text-[var(--text-muted)] hover:text-[var(--info)] hover:border-[var(--info)] transition-colors",title:o("plan.view_spec"),children:[t.jsx(se,{className:"h-2.5 w-2.5"}),o("plan.view_spec")]}):null})(),t.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:e.projectKey}),t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:e.status.toLowerCase()}),t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:ee(e.createdAt)})]},e.id))]}),(N.length>0||x)&&t.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// page ",q]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:K,disabled:N.length===0,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[t.jsx(ae,{className:"h-3.5 w-3.5"}),o("tasks.prev")]}),t.jsxs("button",{onClick:B,disabled:!x,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[o("common.next"),t.jsx(oe,{className:"h-3.5 w-3.5"})]})]})]})]})}export{je as default};
@@ -1,7 +0,0 @@
1
- import{c as q,a as L,j as e,v as K,A as B,f as H,u as J,i as V,r as x,Z as k,w as Z,l as D,n as P,_ as z,h}from"./index-eKvCyU64.js";import{U as T,A as G,R as Q}from"./RemoveMemberConfirmDialog-DLq9g7Td.js";import{T as X}from"./Tooltip-Bl8LCgWr.js";import{c as _}from"./date-RFA7-ZGs.js";import{t as $}from"./status-colors-yfNzOmz-.js";import{I as o}from"./InfoRow-5vQ-_wWv.js";import{u as Y}from"./useFetch-CVFGit7a.js";import{P as ee}from"./pencil-CTTWvWuS.js";import{T as te}from"./trash-2-CXPG2vQr.js";import{A as re}from"./arrow-left-CTo0KHGY.js";import{P as se}from"./plus-DwBKB0x6.js";import"./Select-BAl7H-Y0.js";import"./chevron-down-B0Leook1.js";/**
2
- * @license lucide-react v0.469.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const ae=q("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);function le({isOpen:n,onClose:a,onConfirm:r,projectName:m,loading:p}){const{t:j}=L();return e.jsx(K,{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 fe(){const{key:n}=B(),a=H(),{t:r}=L(),m=J(t=>t.user),p=V(),[j,N]=x.useState(!1),[S,C]=x.useState(!1),[W,A]=x.useState(!1),[d,u]=x.useState(null),[F,I]=x.useState(!1),{data:l,loading:O,error:M,refetch:g}=Y(async()=>{if(!n)throw new Error("Missing project key");const[t,w,f]=await Promise.all([h.get(`web/projects/${n}`).json(),h.get(`web/projects/${n}/members`).json().catch(()=>[]),h.get("web/tasks",{searchParams:{projectKey:n,limit:"20"}}).json().then(R=>R.data).catch(()=>[])]);let v=null;if(t.pipeline)try{v=JSON.parse(t.pipeline)}catch{}return{project:t,members:w,tasks:f,pipelineConfig:v}},[n]),s=(l==null?void 0:l.project)??null,b=(l==null?void 0:l.members)??[],y=(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);Z(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(ee,{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(te,{className:"h-3 w-3"}),r("common.delete")]})]}):null,[s,c,p,a,r]));async function E(){if(s){C(!0);try{await h.delete(`admin/projects/${s.key}`),a("/projects")}catch{}finally{C(!1),N(!1)}}}async function U(){if(!(!s||!d)){I(!0);try{await h.delete(`web/projects/${s.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await g()}catch{}finally{I(!1),u(null)}}}return O?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:()=>g(),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(re,{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(se,{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(T,{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(T,{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")}),y.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:y.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:P(t),children:["#",t.id," ",D(t)]}),e.jsx("span",{className:"shrink-0 text-[11px]",style:{color:$[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:y.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(X,{content:P(t),children:D(t)})}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:$[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,v;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&&!((v=t.onFailure)!=null&&v.goto)&&e.jsx("div",{className:"flex justify-center py-1",children:e.jsx(ae,{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(le,{isOpen:j,onClose:()=>N(!1),onConfirm:E,projectName:s.name,loading:S}),e.jsx(G,{isOpen:W,onClose:()=>A(!1),projectKey:s.key,existingMemberIds:b.map(t=>t.developerId),onAdded:g}),e.jsx(Q,{isOpen:!!d,onClose:()=>u(null),onConfirm:U,memberName:d?d.developerName??`#${d.developerId}`:"",loading:F})]})]}):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{fe as default};
@@ -1 +0,0 @@
1
- import{a as h,k as C,r as d,w as D,j as e,f as y,h as g,p as c,E as N,l as L,Q as A,X as I,t as w}from"./index-eKvCyU64.js";import{E as k}from"./EmptyState-Di2nOiOt.js";import{T as E}from"./Skeleton-DA5o8Wqi.js";import{f as S}from"./date-RFA7-ZGs.js";import{a as P}from"./agent-type-options-BVIYXf2V.js";import{g as R}from"./task-constants-BWLt-ivk.js";import{P as T}from"./play-Cqf1Kvc7.js";function $(t){switch(t){case c.RUNNING:return"bg-[var(--accent)]";case c.QUEUED:return"bg-[var(--warning)]";case c.ASSIGNED:return"bg-[var(--info)]";case c.SUSPENDED:return"bg-[var(--warning)]";case c.COMPLETED:return"bg-[var(--accent)]";case c.FAILED:return"bg-[var(--destructive)]";case c.CANCELLED:return"bg-[#525252]";default:return"bg-[#525252]"}}const U=P(R);function _({taskId:t,onClose:n,onLaunched:s}){const{t:a}=h(),[o,i]=d.useState([A.CLAUDE]),[u,m]=d.useState(""),[r,p]=d.useState(!1);function x(l){i(v=>v.includes(l)?v.filter(b=>b!==l):[...v,l])}async function f(){if(o.length===0){w.error("select at least one review agent.");return}p(!0);try{await g.post(`web/tasks/${t}/review`,{json:{agentTypes:o,description:u.trim()||void 0}}),w.success("review launched"),s(),n()}catch(l){const v=l instanceof Error?l.message:String(l);w.error(v)}finally{p(!1)}}return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 font-mono",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("review.launch")}),e.jsx("button",{onClick:n,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(I,{className:"h-4 w-4"})})]}),e.jsxs("p",{className:"mb-3 text-[11px] text-[var(--text-muted)]",children:["task #",t," — ",a("review.select_agents")]}),e.jsx("div",{className:"mb-4 flex flex-col gap-2",children:U.map(l=>e.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 text-xs hover:bg-[var(--bg-input)] transition-colors",children:[e.jsx("input",{type:"checkbox",checked:o.includes(l.value),onChange:()=>x(l.value),className:"h-3.5 w-3.5 accent-[var(--accent)]"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:l.label})]},l.value))}),e.jsx("textarea",{value:u,onChange:l=>m(l.target.value),placeholder:a("review.description_placeholder"),rows:3,className:"mb-4 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:f,disabled:r||o.length===0,className:"flex flex-1 items-center justify-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(T,{className:"h-3 w-3"}),a(r?"common.processing":"review.launch")]}),e.jsx("button",{onClick:n,className:"rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")})]})]})})}function M({onRefresh:t}){const{t:n}=h(),s=y(),[a,o]=d.useState([]),[i,u]=d.useState(!0),[m,r]=d.useState(null),p=d.useCallback(async()=>{u(!0);try{const[x,f]=await Promise.all([g.get(`web/tasks?${new URLSearchParams({status:c.COMPLETED,taskMode:"develop",limit:"500"})}`).json(),g.get(`web/tasks?${new URLSearchParams({taskMode:"review",limit:"500"})}`).json()]),l=new Set((f.data??[]).filter(b=>b.sourceTaskId!=null).map(b=>b.sourceTaskId)),v=(x.data??[]).filter(b=>!l.has(b.id));o(v)}catch{o([])}finally{u(!1)}},[]);return d.useEffect(()=>{p()},[p]),i?e.jsx("div",{className:"p-4",children:e.jsx(E,{rows:4})}):a.length===0?e.jsx(k,{icon:N,title:n("review.no_reviews"),description:n("review.pending")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:a.map(x=>e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-[var(--accent)]"}),e.jsxs("span",{className:"flex-1 cursor-pointer truncate text-xs text-[var(--text-primary)] hover:text-[var(--accent)] transition-colors",onClick:()=>s(`/tasks/${x.id}`),children:["#",x.id," ",L(x)]}),e.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:x.projectKey}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:S(x.createdAt)}),e.jsxs("button",{onClick:()=>r(x.id),className:"shrink-0 flex items-center gap-1.5 rounded-[4px] px-3 py-1.5 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(T,{className:"h-3 w-3"}),n("review.launch")]})]},x.id))}),m!==null&&e.jsx(_,{taskId:m,onClose:()=>r(null),onLaunched:()=>{t(),p()}})]})}function G(t){const n=new Map;for(const s of t){const a=s.sourceTaskId??s.id;n.has(a)||n.set(a,[]),n.get(a).push(s)}return Array.from(n.entries()).map(([s,a])=>({sourceTaskId:s,tasks:a}))}function O({group:t,onClick:n}){h();const s=t.tasks[0],a=t.tasks.every(i=>i.status===c.COMPLETED||i.status===c.FAILED||i.status===c.CANCELLED),o=s==null?void 0:s.sourceCommitSha;return e.jsxs("div",{onClick:n,className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",children:[e.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${a?"bg-[var(--accent)]":"bg-[var(--warning)]"}`}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsxs("span",{className:"truncate text-xs text-[var(--text-primary)]",children:["source #",t.sourceTaskId]}),o&&e.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-[var(--accent)]",children:["@",o.slice(0,7)]})]}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[t.tasks.length," ",t.tasks.length===1?"agent":"agents"," · ",t.tasks.map(i=>(i.agentType??"claude").toLowerCase()).join(", ")]})]}),s&&e.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:s.projectKey}),s&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:S(s.createdAt)}),e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:t.tasks.map(i=>e.jsx("span",{className:`h-2 w-2 rounded-full ${$(i.status)}`,title:i.status.toLowerCase()},i.id))})]})}function j({mode:t}){const{t:n}=h(),s=y(),[a,o]=d.useState([]),[i,u]=d.useState(!0),m=d.useCallback(async()=>{u(!0);try{const r=new URLSearchParams({taskMode:"review",limit:"100"});t==="in_progress"?r.set("status",[c.QUEUED,c.ASSIGNED,c.RUNNING,c.SUSPENDED].join(",")):r.set("status",[c.COMPLETED,c.FAILED,c.CANCELLED].join(","));const p=await g.get(`web/tasks?${r}`).json();o(G(p.data??[]))}catch{o([])}finally{u(!1)}},[t]);return d.useEffect(()=>{m()},[m]),i?e.jsx("div",{className:"p-4",children:e.jsx(E,{rows:4})}):a.length===0?e.jsx(k,{icon:N,title:n("review.no_reviews")}):e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:a.map(r=>e.jsx(O,{group:r,onClick:()=>s(`/review/${r.sourceTaskId}`)},r.sourceTaskId))})}function X(){const{t}=h(),n=C(r=>r.taskSeq),[s,a]=d.useState("pending"),[o,i]=d.useState(0);D(null);const u=d.useCallback(()=>i(r=>r+1),[]),m=[{key:"pending",label:t("review.pending")},{key:"in_progress",label:t("review.in_progress")},{key:"history",label:t("review.history")}];return e.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("h1",{className:"sr-only",children:t("review.title")}),e.jsx("div",{className:"mb-4 flex items-center gap-1 overflow-x-auto pb-1 no-scrollbar",children:m.map(r=>e.jsx("button",{onClick:()=>a(r.key),className:`shrink-0 rounded-[4px] px-3 py-2 h-8 text-xs transition-colors ${s===r.key?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:r.label},r.key))}),s==="pending"&&e.jsx(M,{onRefresh:u},`pending-${o}-${n}`),s==="in_progress"&&e.jsx(j,{mode:"in_progress"},`inprogress-${o}-${n}`),s==="history"&&e.jsx(j,{mode:"history"},`history-${o}-${n}`)]})}export{X as default};
@@ -1,21 +0,0 @@
1
- import{c as oe,a as xe,r as n,z as A,h as f,j as e,H as zt,t as W,v as Ee,A as Wt,f as Xt,B as Ht,q as Vt,s as Jt,k as dt,p as y,R as Qt,L as ie,l as mt,m as Yt,X as Se,n as Zt,x as es,U as ts,b as ss,G as _t,F as as}from"./index-eKvCyU64.js";import{u as rs}from"./task.store-BDZwafPm.js";import{u as ns,g as ls,a as pt,M as cs,H as is}from"./ConfirmStageDialog-BOGr-qSN.js";import{P as ut}from"./PtyTerminal-BYXg_ahq.js";import{S as ht}from"./Select-BAl7H-Y0.js";import{b as os,f as Y,c as xs}from"./date-RFA7-ZGs.js";import{a as Ct}from"./status-colors-yfNzOmz-.js";import{a as ft}from"./agent-type-options-BVIYXf2V.js";import{T as ds,g as Z}from"./task-constants-BWLt-ivk.js";import{T as ms}from"./Tooltip-Bl8LCgWr.js";import{A as ps}from"./arrow-left-CTo0KHGY.js";import{R as St}from"./rotate-ccw-CZR8KOZn.js";import{G as us}from"./git-fork-cRLOBM6a.js";import{P as vt}from"./play-Cqf1Kvc7.js";import{E as gt}from"./external-link-DjBNV7ga.js";import{L as Tt}from"./loader-circle-B_f_h4fq.js";import{S as hs}from"./skip-forward-BqiRx2ZQ.js";import{F as bt}from"./file-text-DHEz_RFq.js";import"./chevron-down-B0Leook1.js";/**
2
- * @license lucide-react v0.469.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const fs=oe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
7
- * @license lucide-react v0.469.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const vs=oe("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
12
- * @license lucide-react v0.469.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const gs=oe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
17
- * @license lucide-react v0.469.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const bs=oe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function js(l,c){const a=new Date(l).getTime()-Date.now();if(a<=0)return c("tasks.tunnel_expired");const r=Math.floor(a/36e5),t=Math.floor(a%36e5/6e4);return r>0?c("tasks.tunnel_expires_hm",{h:r,m:t}):c("tasks.tunnel_expires_m",{m:t})}function jt(l){switch(l){case"CONNECTED":return"var(--accent)";case"STARTING":return"var(--warning)";case"EXPIRED":return"var(--text-muted)";default:return"var(--text-muted)"}}function Nt(l,c){switch(l){case"IDLE":case"CLOSED":return c("tasks.tunnel_idle");case"STARTING":return c("tasks.tunnel_starting");case"CONNECTED":return c("tasks.tunnel_connected");case"EXPIRED":return c("tasks.tunnel_expired");case"CLOSING":return c("tasks.tunnel_closing");default:return String(l).toLowerCase()}}function Ns({taskId:l,taskFinished:c,compact:a}){const{t:r}=xe(),[t,x]=n.useState(A.IDLE),[m,_]=n.useState(null),[h,P]=n.useState(null),[R,ee]=n.useState(""),[d,C]=n.useState(!1),[de,O]=n.useState(!1),F=n.useRef(null),$=n.useCallback(async()=>{try{const v=await f.get(`web/workspace-tunnel/${l}/status`).json();x(v.status),_(v.tunnelUrl??null),P(v.expiresAt??null),(v.status==="EXPIRED"||v.status==="IDLE"||v.status==="CLOSED")&&S()}catch{}},[l]);function me(){S(),F.current=setInterval($,5e3)}function S(){F.current&&(clearInterval(F.current),F.current=null)}n.useEffect(()=>{c&&(t===A.STARTING||t===A.CONNECTED)&&(x(A.IDLE),_(null),S())},[c,t]),n.useEffect(()=>{if(t!=="CONNECTED"||!h)return;const v=()=>{const T=js(h,r);ee(T),T===r("tasks.tunnel_expired")&&(x(A.EXPIRED),_(null),S())};v();const D=setInterval(v,3e4);return()=>clearInterval(D)},[t,h]),n.useEffect(()=>()=>S(),[]),n.useEffect(()=>{c||$()},[$,c]);async function X(){C(!0);try{await f.post(`web/workspace-tunnel/${l}/start`),x(A.STARTING),me()}catch(v){let D=r("tasks.tunnel_start_failed");try{if(v instanceof zt){const T=await v.response.json();T!=null&&T.error&&(D=T.error,/code.*not found|ENOENT.*code|spawn code/i.test(D)&&(D+=". "+r("tasks.tunnel_install_code_hint")))}}catch{}W.error(D)}finally{C(!1)}}async function M(){C(!0);try{await f.post(`web/workspace-tunnel/${l}/stop`),x(A.IDLE),_(null),S()}catch{}finally{C(!1)}}async function U(){m&&(await navigator.clipboard.writeText(m),O(!0),setTimeout(()=>O(!1),2e3))}return a?e.jsxs("div",{className:"flex items-center gap-2 font-mono lowercase text-xs",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"ide_tunnel:"}),e.jsx("span",{style:{color:jt(t)},children:Nt(t,r)}),(t==="IDLE"||t==="CLOSED"||t==="EXPIRED")&&e.jsx("button",{onClick:X,disabled:d,className:"rounded-[4px] px-2 py-1 text-[var(--info)] disabled:opacity-50",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:r(d?"tasks.tunnel_starting":"tasks.tunnel_start")}),t==="CONNECTED"&&m&&e.jsx("a",{href:m.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] px-2 py-1 text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:r("tasks.tunnel_open_in_cursor")})]}):e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 font-mono lowercase",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("tasks.tunnel_header")}),e.jsxs("span",{className:"text-xs",style:{color:jt(t)},children:["● ",Nt(t,r)]})]}),t==="CONNECTED"&&h&&e.jsxs("p",{className:"mb-2 text-xs text-[var(--text-muted)]",children:["// ",R]}),t==="CONNECTED"&&m&&e.jsxs("div",{className:"mb-3 flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"flex-1 truncate text-xs text-[var(--text-primary)]",children:m}),e.jsxs("button",{onClick:U,className:"shrink-0 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors","aria-label":r("tasks.tunnel_copy_url"),children:["[",r("common.copy"),"]"]})]}),de&&e.jsx("p",{className:"mb-2 text-xs text-[var(--accent)]",children:r("tasks.tunnel_copied")}),t==="STARTING"&&e.jsx("p",{className:"mb-3 text-xs text-[var(--text-muted)]",children:r("tasks.tunnel_waiting")}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(t==="IDLE"||t==="CLOSED")&&e.jsx("button",{onClick:X,disabled:d,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:r(d?"tasks.tunnel_starting_button":"tasks.tunnel_start_button")}),t==="STARTING"&&e.jsx("button",{onClick:M,disabled:d,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",children:r(d?"tasks.tunnel_stopping":"tasks.tunnel_cancel")}),t==="CONNECTED"&&m&&e.jsxs(e.Fragment,{children:[e.jsx("a",{href:m.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:r("tasks.tunnel_open_cursor")}),e.jsx("a",{href:m.replace(/^https?:/,"vscode:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("tasks.tunnel_open_vscode")}),e.jsx("button",{onClick:M,disabled:d,className:"rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors disabled:opacity-50",children:r(d?"tasks.tunnel_stopping":"tasks.tunnel_stop")})]}),t==="EXPIRED"&&e.jsx("button",{onClick:X,disabled:d,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:r(d?"tasks.tunnel_starting_button":"tasks.tunnel_restart")})]})]})}function ys({isOpen:l,onClose:c,onConfirm:a,taskId:r,isLoading:t}){const{t:x}=xe();return e.jsx(Ee,{isOpen:l,onClose:c,onConfirm:a,title:x("tasks.cancel_task_title"),message:x("tasks.cancel_task_message",{id:String(r)}),confirmLabel:x("tasks.cancel_task_confirm_label"),confirmVariant:"danger",isLoading:t})}function ks({isOpen:l,onClose:c,onConfirm:a,taskId:r,mrUrl:t,isLoading:x,reuseWorkspace:m,onReuseWorkspaceChange:_}){const{t:h}=xe(),P=t?h("tasks.retry_message_with_mr",{id:String(r),url:t}):h("tasks.retry_message_without_mr",{id:String(r)});return e.jsx(Ee,{isOpen:l,onClose:c,onConfirm:a,title:h("tasks.retry_title"),message:P,confirmLabel:h("tasks.retry_confirm_label"),confirmVariant:"accent",isLoading:x,children:e.jsxs("label",{className:"flex items-center gap-2 mt-3 text-[var(--text-muted)] text-xs cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:m,onChange:R=>_(R.target.checked),className:"w-3.5 h-3.5 cursor-pointer accent-[var(--accent)]"}),h("tasks.reuse_workspace_label")]})})}const _e=["implement","test","verify","review","simplify","submit"];function Te(l){if(typeof l=="string")try{return Te(JSON.parse(l))}catch{return null}if(!l||typeof l!="object")return null;const c=l.stages;if(!Array.isArray(c)||c.length===0)return null;const a=c.map(r=>r&&typeof r=="object"?r.name:null).filter(r=>typeof r=="string"&&r.length>0);return a.length===c.length?a:null}function ws(l){if(!l.configSnapshot)return _e;try{const c=JSON.parse(l.configSnapshot);return Te(c.pipeline)??Te(c)??_e}catch{return _e}}function _s(l){switch(l){case"stage_change":return"text-[var(--accent)]";case"info":return"text-[var(--text-secondary)]";case"warning":return"text-[var(--warning)]";case"error":return"text-[var(--destructive)]";case"system":return"text-[var(--info)]";default:return"text-[var(--text-muted)]"}}function Ce({status:l,agentType:c}){const a=Ct(l),r=Z(c);return e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-[4px] px-2 py-0.5 text-xs",style:{color:a},children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-[3px]",style:{backgroundColor:a}}),l.toLowerCase()," / ",r]})}function yt({stages:l,runningBg:c="bg-[#1a1a1a]",py:a="py-1.5"}){return e.jsx(e.Fragment,{children:l.map(r=>{const t=r.status==="completed",x=r.status==="running",m=r.status==="failed";return e.jsxs("div",{className:`flex items-center gap-2 rounded-[4px] px-2 ${a} ${x?c:""}`,children:[t&&e.jsx(as,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),x&&e.jsx(Tt,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),m&&e.jsx(Se,{className:"h-3.5 w-3.5 shrink-0 text-[var(--destructive)]"}),r.status==="pending"&&e.jsx(fs,{className:"h-3.5 w-3.5 shrink-0 text-[#525252]"}),e.jsx("span",{className:"text-xs",style:{color:t?"var(--accent)":x?"#e5e5e5":m?"var(--destructive)":"#525252",fontWeight:x?500:400},children:x?`> ${r.name}`:r.name})]},r.name)})})}function kt({task:l,ptyStatus:c,displayAgentType:a,t:r,gap:t="gap-2 md:gap-3"}){return e.jsxs("div",{className:`flex items-center ${t}`,children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:r("tasks.pty_terminal")}),e.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] ${c==="connected"?"text-[var(--accent)]":c==="connecting"?"text-[var(--warning)]":"text-[var(--text-muted)]"}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${c==="connected"?"bg-[var(--accent)]":c==="connecting"?"bg-[var(--warning)]":"bg-[#525252]"}`}),r(`tasks.${c}`)]}),e.jsx("span",{className:"text-[11px]",style:{color:Ct(l.status)},children:l.status.toLowerCase()}),l.currentStage&&e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--accent)]",children:[r("tasks.stage"),": ",l.currentStage]}),e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--text-muted)]",children:["agent: ",a]}),l.workerName&&e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--text-muted)]",children:["worker: ",l.workerName]})]})}function wt({isFinished:l,takeoverState:c,ptyRef:a,t:r}){return e.jsxs(e.Fragment,{children:[!l&&c==="auto"&&e.jsxs("button",{onClick:()=>{var t;return(t=a.current)==null?void 0:t.requestTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:[e.jsx(is,{className:"h-3 w-3"}),r("tasks.take_over")]}),!l&&c==="manual"&&e.jsxs("button",{onClick:()=>{var t;return(t=a.current)==null?void 0:t.releaseTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(St,{className:"h-3 w-3"}),r("tasks.restore_auto")]})]})}function Cs(l){const c=ws(l),a=l.currentStage?c.indexOf(l.currentStage):-1;return c.map((r,t)=>{let x="pending";return l.status===y.COMPLETED?x="completed":l.status===y.FAILED&&t<=a?x=t===a?"failed":"completed":a>=0&&(t<a?x="completed":t===a&&(x="running")),{name:r,status:x}})}function z(l,c){if(!l||!c)return null;const a=l.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),r=c.split("/").map(encodeURIComponent).join("/");return l.gitPlatform===_t.GITLAB?`${a}/-/tree/${r}`:`${a}/tree/${r}`}function Ss(l,c){if(!l)return null;const a=l.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),r=c.split("/").map(encodeURIComponent).join("/");return l.gitPlatform===_t.GITLAB?`${a}/-/tree/${r}/docs/specs`:`${a}/tree/${r}/docs/specs`}function Xs(){var it,ot,xt;const{id:l}=Wt(),c=Xt(),{t:a}=xe(),r=rs(s=>s.cancelTask),[t,x]=n.useState(null),[m,_]=n.useState(null),[h,P]=n.useState([]),[R,ee]=n.useState(!0),[d,C]=n.useState(null),[de,O]=n.useState(!1),[F,$]=n.useState(!1),[me,S]=n.useState(!1),[X,M]=n.useState(!1),[U,v]=n.useState(["claude"]),[D,T]=n.useState(""),[Le,De]=n.useState(!1),[Ie,Re]=n.useState(!1),[Et,$e]=n.useState(!1),[Lt,Me]=n.useState(!1),[Dt,Ae]=n.useState(!1),[Pe,Oe]=n.useState(""),[Fe,Ue]=n.useState(""),[qe,Be]=n.useState("append"),[Ge,pe]=n.useState(!1),[Ke,It]=Ht(),[N,ue]=n.useState("terminal"),[ze,We]=n.useState([]),[te,Xe]=n.useState(0),[H,q]=n.useState(0),[V,He]=n.useState(""),[se,Rt]=n.useState(""),[$t,he]=n.useState(!1),[Mt,Ve]=n.useState(!1),[B,fe]=n.useState(null),[Je,ve]=n.useState("disconnected"),[ge,be]=n.useState("auto"),J=n.useRef(null),Qe=n.useRef(null),At=ns(),[Ye,Ze]=n.useState([]),o=Number(l),g=t?ds.includes(t.status):!1;Vt(t?Jt(t,100):null);const E=n.useCallback(async()=>{try{const s=await f.get(`web/tasks/${o}`).json();x(s)}catch{}},[o]),ae=n.useCallback(async()=>{try{const s=await f.get(`web/tasks/${o}/logs`).json();P(s.lines)}catch{}},[o]),G=n.useCallback(async()=>{try{const s=await f.get(`web/tasks/${o}/pending-confirm`).json();C(s.confirm)}catch{C(null)}},[o]),et=n.useCallback(async()=>{he(!0);try{const s=new URLSearchParams;s.set("limit","50"),s.set("offset",String(H*50)),V&&s.set("type",V),se&&s.set("search",se);const i=await f.get(`web/tasks/${o}/events?${s}`).json();We(i.events),Xe(i.total)}catch{}finally{he(!1)}},[o,H,V,se]);n.useEffect(()=>{N==="logs"&&et()},[N,et]),n.useEffect(()=>{N==="pipeline"&&!g&&f.get(`web/workspaces/${o}`).json().then(fe).catch(()=>fe(null))},[N,o,g]);const K=dt(s=>s.lastEvent),tt=dt(s=>s.eventSeq);n.useEffect(()=>{ee(!0),x(null),_(null),P([]),C(null),fe(null),We([]),Xe(0),q(0),he(!1),Promise.all([E(),ae(),G()]).finally(()=>ee(!1))},[E,ae,G]),n.useEffect(()=>{t!=null&&t.projectKey&&f.get(`web/projects/${t.projectKey}`).json().then(_).catch(()=>_(null))},[t==null?void 0:t.projectKey]),n.useEffect(()=>{if(!t)return;let s=!1;return(async()=>{try{const i=[],p=[];let u=t.sourceTaskId??null,L=0;for(;u!=null&&L<2;){const w=await f.get(`web/tasks/${u}`).json();p.unshift({id:w.id,taskMode:w.taskMode??"develop"}),u=w.sourceTaskId??null,L++}i.push(...p),i.push({id:t.id,taskMode:t.taskMode??"develop"});const I=await f.get(`web/tasks?${new URLSearchParams({sourceTaskId:String(t.id),limit:"20"})}`).json();for(const w of I.data??[])i.push({id:w.id,taskMode:w.taskMode??"develop"});s||Ze(i)}catch{s||Ze([])}})(),()=>{s=!0}},[t==null?void 0:t.id,t==null?void 0:t.sourceTaskId,t==null?void 0:t.taskMode]),n.useEffect(()=>{!K||tt===0||(K.event==="task_status_changed"&&K.taskId===o||K.event==="task_created"&&K.taskId===o)&&(E(),G())},[tt,K,o,E,G]),n.useEffect(()=>{if(g)return;const i=setInterval(()=>{document.visibilityState!=="hidden"&&Promise.all([E(),ae(),G()])},15e3);return()=>clearInterval(i)},[g,E,ae,G]);const st=n.useCallback(()=>C(null),[]),re=n.useCallback(()=>{C(null),E()},[E]),Pt=(t==null?void 0:t.status)===y.FAILED||(t==null?void 0:t.status)===y.CANCELLED,je=(t==null?void 0:t.status)===y.COMPLETED||(t==null?void 0:t.status)===y.FAILED||(t==null?void 0:t.status)===y.CANCELLED,Ot=(t==null?void 0:t.status)===y.COMPLETED&&(!(t!=null&&t.taskMode)||(t==null?void 0:t.taskMode)==="develop");n.useEffect(()=>{Ke.get("action")==="fork"&&t&&!R&&(je&&at(),It(s=>(s.delete("action"),s),{replace:!0}))},[t,R,Ke,je]);async function Ft(){$e(!0);try{await r(o),O(!1),await E()}finally{$e(!1)}}async function Ut(){Me(!0);try{await f.post(`web/tasks/${o}/retry`,{json:{reuseWorkspace:Ge}}),$(!1),pe(!1),await E()}finally{Me(!1)}}function at(){Oe(""),Ue(""),Be("append"),S(!0)}async function qt(){Ae(!0);try{const s=Pe.trim()||void 0,i=await f.post(`web/tasks/${o}/fork`,{json:{description:s,descriptionMode:s?qe:void 0,agentType:Fe||void 0}}).json();S(!1),W.success(a("tasks.fork_success")),c(`/tasks/${i.task.id}`)}catch{W.error(a("tasks.fork_error"))}finally{Ae(!1)}}async function Bt(){if(t){Re(!0);try{await f.post(`web/tasks/${o}/review`,{json:{agentTypes:U.length>0?U:["claude"],description:D.trim()||void 0,skipFix:Le||void 0}}).json(),M(!1),T(""),De(!1),c(`/review/${o}`)}catch(s){const i=s instanceof Error?s.message:String(s);W.error(i)}finally{Re(!1)}}}const j=n.useMemo(()=>t?Cs(t):[],[t==null?void 0:t.configSnapshot,t==null?void 0:t.currentStage,t==null?void 0:t.status]),Ne=j.findIndex(s=>s.status==="running"),ne=n.useMemo(()=>{if(!(t!=null&&t.configSnapshot))return[];try{const s=JSON.parse(t.configSnapshot);return Array.isArray(s.defaultReviewers)?s.defaultReviewers:[]}catch{return[]}},[t==null?void 0:t.configSnapshot]);if(n.useEffect(()=>{ne.length>0&&v(ne)},[ne.join(",")]),R)return e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("tasks.loading_task")})});if(!t)return e.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-8 font-mono lowercase text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:a("tasks.task_not_found")}),e.jsxs("button",{onClick:()=>c("/tasks"),className:"mt-4 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:["< ",a("tasks.back_to_tasks")]})]});const k=t.status===y.QUEUED&&t.queuePosition!=null&&t.queueTotal!=null?{position:t.queuePosition,total:t.queueTotal}:null,b=os(t.startedAt,t.completedAt),Q=ls(t),ye=Z(t.agentType),Gt=[{value:"",label:a("tasks.fork_agent_type_placeholder",{agent:Z(Q)})},...ft(Z,Q)],le=`${a("tasks.status_suspended")} / ${ye}`,rt=k?e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"queue"}),e.jsxs("span",{className:"text-[var(--info)]",children:["#",k.position," / ",k.total]})]}):null,nt=t.taskMode&&t.taskMode!=="develop"?e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[10px] font-bold uppercase",style:t.taskMode==="plan"?{color:"#3b82f6",backgroundColor:"rgba(59,130,246,0.12)"}:{color:"#a855f7",backgroundColor:"rgba(168,85,247,0.12)"},children:t.taskMode}):null,ce=Ye.length>1?e.jsx("div",{className:"flex items-center gap-1 text-xs text-[var(--text-secondary)]",children:Ye.map((s,i)=>e.jsxs(Qt.Fragment,{children:[i>0&&e.jsx("span",{className:"text-[var(--text-muted)]",children:"→"}),e.jsxs(ie,{to:`/tasks/${s.id}`,className:s.id===t.id?"text-[var(--accent)]":"text-[var(--info)] hover:underline",children:[s.taskMode," #",s.id]})]},s.id))}):t.sourceTaskId?e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["source:"," ",e.jsxs(ie,{to:`/tasks/${t.sourceTaskId}`,className:"text-[var(--info)] hover:underline",children:["#",t.sourceTaskId]})]}):null,lt=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:()=>c("/tasks"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(ps,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",title:Yt(t),children:["#",t.id," ",mt(t,80)]}),nt]}),ce&&e.jsx("div",{className:"text-[11px]",children:ce})]})]}),ke=e.jsxs("div",{className:"hidden md:flex items-center gap-4 border-b border-[var(--border)] bg-[var(--bg-primary)] px-5 shrink-0",style:{height:44},children:[e.jsx(Ce,{status:t.status,agentType:t.agentType}),nt,b&&e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// time cost: ",b]}),k&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsx("span",{className:"text-xs text-[var(--info)]",children:a("tasks.queue_position",{position:String(k.position),total:String(k.total)})})]}),e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs(ie,{to:`/projects/${t.projectKey}`,className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:["project: ",e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),t.branch&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["branch: ",z(m,t.branch)?e.jsx("a",{href:z(m,t.branch),target:"_blank",rel:"noopener noreferrer",className:"text-[var(--text-primary)] hover:text-[var(--info)] hover:underline transition-colors",children:t.branch}):e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch})]})]}),t.mrUrl&&/^https?:\/\//.test(t.mrUrl)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline",children:["MR: ",((it=t.mrUrl.match(/!?\d+$/))==null?void 0:it[0])??"view"]})]}),ce&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),ce]})]}),ct=e.jsxs("div",{className:"flex items-center gap-3 border-t border-[var(--border)] bg-[var(--bg-primary)] px-4 md:px-5 shrink-0",style:{height:48},children:[!g&&e.jsxs("button",{onClick:()=>O(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--destructive)]/10 px-3 h-8 text-[11px] font-medium text-[var(--destructive)]",children:[e.jsx(Se,{className:"h-3 w-3"}),a("tasks.cancel_task")]}),Pt&&e.jsxs("button",{onClick:()=>$(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(St,{className:"h-3 w-3"}),a("tasks.retry_task")]}),je&&e.jsxs("button",{onClick:at,className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(us,{className:"h-3 w-3"}),a("tasks.fork_task")]}),Ot&&e.jsxs("button",{onClick:()=>M(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] px-3 h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(vt,{className:"h-3 w-3"}),a("review.launch")]}),t.workerId&&!g&&e.jsxs("button",{onClick:()=>{ue("pipeline"),setTimeout(()=>{var s,i;(i=(s=Qe.current)==null?void 0:s.scrollIntoView)==null||i.call(s,{behavior:"smooth",block:"center"})},50)},className:"hidden lg:flex items-center justify-center gap-1.5 rounded-[4px] px-3 h-8 text-[11px] font-medium text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:[e.jsx(gt,{className:"h-3 w-3"}),a("tasks.cursor_tunnel")]})]}),Kt=e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-6 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-4 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),e.jsx(yt,{stages:j})]}),b&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2 text-[11px] text-[var(--text-secondary)]",children:["// time cost: ",b]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),h.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:h.slice(0,8).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},i))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]}),we=e.jsxs(e.Fragment,{children:[e.jsx(ys,{isOpen:de,onClose:()=>O(!1),onConfirm:Ft,taskId:o,isLoading:Et}),e.jsx(ks,{isOpen:F,onClose:()=>{$(!1),pe(!1)},onConfirm:Ut,taskId:o,mrUrl:t.mrUrl??void 0,isLoading:Lt,reuseWorkspace:Ge,onReuseWorkspaceChange:pe}),e.jsx(Ee,{isOpen:me,onClose:()=>S(!1),onConfirm:qt,title:a("tasks.fork_task"),message:a("tasks.fork_task_desc"),confirmLabel:a("tasks.fork_task"),confirmVariant:"accent",isLoading:Dt,children:e.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["fork of #",o]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx(ht,{value:Fe,onChange:Ue,options:Gt})]}),e.jsx("textarea",{value:Pe,onChange:s=>Oe(s.target.value),placeholder:a("tasks.fork_description_placeholder"),rows:4,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsxs("label",{className:"flex items-start gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 text-[11px] text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:qe==="replace",onChange:s=>Be(s.target.checked?"replace":"append"),className:"mt-0.5 h-3.5 w-3.5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] accent-[var(--accent)]"}),e.jsxs("span",{children:[a("tasks.fork_replace_description"),e.jsx("span",{className:"mt-1 block text-[10px] text-[var(--text-muted)]",children:a("tasks.fork_append_hint")})]})]})]})}),X&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 font-mono",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("review.launch")}),e.jsx("button",{onClick:()=>M(!1),className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(Se,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsxs("p",{className:"text-[11px] text-[var(--text-muted)]",children:["task #",o," — ",a("review.select_agents")]}),ne.length>0&&e.jsx("span",{className:"rounded-[4px] border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-500",children:"using project defaults"})]}),e.jsx("div",{className:"mb-4 flex flex-col gap-2",children:ft(Z).map(s=>e.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 text-xs hover:bg-[var(--bg-input)] transition-colors",children:[e.jsx("input",{type:"checkbox",checked:U.includes(s.value),onChange:()=>v(i=>i.includes(s.value)?i.filter(p=>p!==s.value):[...i,s.value]),className:"h-3.5 w-3.5 accent-[var(--accent)]"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:s.label})]},s.value))}),e.jsx("textarea",{value:D,onChange:s=>T(s.target.value),placeholder:a("review.description_placeholder"),rows:3,className:"mb-3 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsxs("label",{className:"mb-4 flex cursor-pointer items-center gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 text-xs hover:bg-[var(--bg-input)] transition-colors",children:[e.jsx("input",{type:"checkbox",checked:Le,onChange:s=>De(s.target.checked),className:"h-3.5 w-3.5 accent-[var(--accent)]"}),e.jsx("span",{className:"text-[var(--text-muted)]",children:a("review.skip_fix_label")})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:Bt,disabled:Ie||U.length===0,className:"flex flex-1 items-center justify-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(vt,{className:"h-3 w-3"}),a(Ie?"common.processing":"review.launch")]}),e.jsx("button",{onClick:()=>M(!1),className:"rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")})]})]})})]});return Mt&&N==="terminal"?e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-[var(--bg-primary)] font-mono lowercase h-screen",style:{height:"100dvh",paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[ke,e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsx(kt,{task:t,ptyStatus:Je,displayAgentType:Q,t:a,gap:"gap-3"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(wt,{isFinished:g,takeoverState:ge,ptyRef:J,t:a}),e.jsx("button",{onClick:()=>Ve(!1),className:"flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 py-1 text-[var(--text-muted)]",children:e.jsx(bs,{className:"h-3 w-3"})})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(ut,{ref:J,taskId:o,sessionId:t.currentSessionId??void 0,taskFinished:g,onStatusChange:ve,onTakeoverChange:be})}),ct,we]}):t.status===y.SUSPENDED?e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[lt,ke,e.jsx("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0",style:{backgroundColor:"rgba(245,158,11,0.08)",borderColor:"rgba(245,158,11,0.2)",color:"var(--warning)"},children:a("tasks.task_suspended_banner")}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row gap-4 md:gap-6 p-4 md:p-6 overflow-y-auto",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[e.jsxs("span",{className:"text-xl font-bold text-[var(--text-primary)]",children:["#",t.id]}),e.jsx("span",{className:"text-base text-[var(--text-secondary)] truncate max-w-[60%]",children:e.jsx(ms,{content:Zt(t),children:mt(t,200)})}),e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:le})]}),e.jsx("div",{className:"flex items-center gap-2 md:hidden",children:e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:le})}),d&&e.jsxs("div",{className:"rounded-[4px] border p-4",style:{borderColor:"rgba(245,158,11,0.27)",backgroundColor:"#1a1a1a"},children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pending_confirmation")}),e.jsx("p",{className:"mb-3 text-xs text-[var(--text-secondary)]",children:d.prompt??a("tasks.pipeline_requires_confirmation")}),e.jsx("div",{className:"mb-3 flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"stage"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:d.stageName})]})}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:gap-3",children:[e.jsx("button",{onClick:async()=>{try{await f.post(`web/tasks/${o}/confirm-stage`,{json:{stageName:d.stageName,approved:!0,feedback:""}}),re()}catch{W.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[var(--accent)] px-4 py-2.5 md:py-2 text-[11px] font-bold text-[#0c0c0c]",children:a("tasks.confirm_and_proceed")}),e.jsx("button",{onClick:async()=>{try{await f.post(`web/tasks/${o}/confirm-stage`,{json:{stageName:d.stageName,approved:!1,feedback:""}}),re()}catch{W.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[#1a1a1a] px-4 py-2.5 md:py-2 text-[11px] text-[var(--destructive)]",style:{border:"1px solid rgba(239,68,68,0.27)"},children:a("tasks.reject")})]})]}),e.jsxs("div",{className:"flex flex-col gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:le})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]})]})]}),e.jsx("div",{className:"hidden md:flex flex-wrap items-center gap-2 py-2",children:j.map((s,i)=>{const p=s.status==="failed",u=s.status==="completed",L=s.status==="running"&&t.status===y.SUSPENDED,I=p?"var(--destructive)":u?"var(--accent)":L?"var(--warning)":"#525252",w=p?"rgba(239,68,68,0.12)":u?"rgba(34,197,94,0.12)":L?"rgba(245,158,11,0.12)":"transparent";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px]",style:{color:I,backgroundColor:w,fontWeight:L?700:400,border:L?`1px solid ${I}`:void 0},children:L?"confirm":`${s.name}${u?" ✓":p?" ✗":""}`}),i<j.length-1&&e.jsx("div",{className:"h-px w-6 bg-[var(--border)]"})]},s.name)})}),e.jsxs("div",{className:"hidden md:block min-h-[200px] flex-1 rounded-[4px] border border-[var(--border)] bg-[#0c0c0c] p-4",children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pty_output")}),e.jsxs("div",{className:"flex flex-col gap-1",children:[h.slice(-10).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-secondary)]",children:s},i)),h.length===0&&e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_output")})]})]})]}),e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:flex",children:[e.jsx("span",{className:"text-[13px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:le})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2",children:j.map(s=>{const i=s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#525252",p=s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#a3a3a3",u=s.status==="completed"?"completed":s.status==="running"?"suspended":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[4px]",style:{backgroundColor:i}}),e.jsxs("span",{className:"text-[11px]",style:{color:p,fontWeight:s.status==="running"?700:400},children:[s.name," ",u]})]},s.name)})}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("div",{className:"flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]})})]})]}),d&&e.jsx(pt,{isOpen:!!d,onClose:st,taskId:o,stageName:d.stageName,timeoutSeconds:Math.ceil(d.timeout/1e3),confirmType:d.confirmType,onSubmitted:re}),we]}):e.jsxs("div",{className:"flex h-full flex-col overflow-hidden font-mono lowercase",children:[lt,e.jsxs("div",{className:"flex flex-wrap items-center gap-3 gap-y-1 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-2 shrink-0 md:hidden",children:[e.jsx(Ce,{status:t.status,agentType:t.agentType}),b&&e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:["// time cost: ",b]}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.projectKey}),t.workerName&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.workerName}),t.branch&&(z(m,t.branch)?e.jsx("a",{href:z(m,t.branch),target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-[11px] text-[var(--text-muted)] hover:text-[var(--info)] hover:underline truncate max-w-[80px] md:max-w-[120px] transition-colors",children:t.branch}):e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)] truncate max-w-[80px] md:max-w-[120px]",children:t.branch}))]}),ke,t.errorMessage&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-6 py-2 text-xs shrink-0 bg-[var(--destructive)]/10 text-[var(--destructive)]",style:{borderColor:"rgba(239,68,68,0.2)"},children:["// error: ",t.errorMessage]}),k&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0 text-[var(--info)]",style:{backgroundColor:"color-mix(in srgb, var(--info) 8%, transparent)",borderColor:"color-mix(in srgb, var(--info) 20%, transparent)"},children:[e.jsx(vs,{className:"h-3.5 w-3.5 shrink-0"}),e.jsxs("span",{children:[a("tasks.queue_position_banner",{position:String(k.position),total:String(k.total)}),k.position>1?` — ${a("tasks.queue_ahead",{count:String(k.position-1)})}`:` — ${a("tasks.queue_next")}`]})]}),d&&e.jsx(pt,{isOpen:!!d,onClose:st,taskId:o,stageName:d.stageName,timeoutSeconds:Math.ceil(d.timeout/1e3),confirmType:d.confirmType,onSubmitted:re}),e.jsxs("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[e.jsx("div",{className:"flex items-center border-b border-[var(--border)] shrink-0 overflow-x-auto no-scrollbar",children:["terminal","pipeline","logs","detail"].map(s=>e.jsx("button",{onClick:()=>ue(s),className:`shrink-0 whitespace-nowrap px-4 py-2.5 text-xs transition-colors ${N===s?"border-b-2 border-[var(--accent)] text-[var(--accent)] font-medium":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:a(s==="terminal"?"tasks.terminal":s==="pipeline"?"tasks.pipeline_tab":s==="logs"?"tasks.logs":"tasks.detail_tab")},s))}),N==="terminal"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 md:px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsx(kt,{task:t,ptyStatus:Je,displayAgentType:Q,t:a}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(wt,{isFinished:g,takeoverState:ge,ptyRef:J,t:a}),!g&&ge==="requesting"&&e.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 h-10 md:h-8 text-[11px] text-[var(--warning)]",children:[e.jsx(Tt,{className:"h-3 w-3 animate-spin"}),a("tasks.requesting_takeover")]}),!g&&t.currentStage&&e.jsxs("button",{className:"hidden md:flex items-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[11px] text-[var(--text-muted)]",children:[e.jsx(hs,{className:"h-3 w-3"}),a("tasks.skip_stage")]}),e.jsx("button",{onClick:()=>Ve(!0),className:"hidden md:flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[var(--text-muted)]",children:e.jsx(gs,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"border-b border-[var(--border)] px-4 py-2 shrink-0 md:hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.currentStage&&e.jsxs("span",{className:"text-[11px] font-semibold text-[var(--accent)]",children:[a("tasks.stage"),": ",t.currentStage]}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["agent: ",Q]}),t.workerName&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["worker: ",t.workerName]})]}),e.jsx("div",{className:"overflow-x-auto no-scrollbar pr-4",style:{borderRadius:0},children:e.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.stage_progress")}),j.map((s,i)=>{const p=s.status==="completed",u=s.status==="running",I=s.status==="failed"?"var(--destructive)":p||u?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",children:[e.jsxs("span",{className:"shrink-0 text-[11px] leading-normal whitespace-nowrap",style:{color:I,fontWeight:u?600:400},children:[s.name,p?" ✓":u?" ...":""]}),i<j.length-1&&e.jsx("div",{className:"mx-1.5 h-px w-4 shrink-0",style:{backgroundColor:I}})]},s.name)})]})})]}),At?e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(cs,{ref:J,taskId:o,sessionId:t.currentSessionId??void 0,taskFinished:g,onStatusChange:ve,onTakeoverChange:be})}):e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(ut,{ref:J,taskId:o,sessionId:t.currentSessionId??void 0,taskFinished:g,onStatusChange:ve,onTakeoverChange:be})}),ct]}),N==="pipeline"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("div",{className:"mb-4 md:mb-5 overflow-x-auto no-scrollbar",style:{borderRadius:0},children:e.jsx("div",{className:"flex items-center py-5",children:j.map((s,i)=>{const p=s.status==="completed",u=s.status==="running",w=s.status==="failed"?"var(--destructive)":p||u?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",style:{flex:i<j.length-1?1:void 0},children:[e.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[e.jsxs("div",{className:"flex h-6 w-6 md:h-7 md:w-7 items-center justify-center rounded-full shrink-0",style:{backgroundColor:w},children:[p&&e.jsx("span",{className:"text-[11px] md:text-xs font-semibold text-[#0c0c0c]",children:"✓"}),u&&e.jsx("span",{className:"h-2 w-2 md:h-2.5 md:w-2.5 rounded-full bg-[#0c0c0c]"})]}),e.jsx("span",{className:"text-[11px] leading-normal font-medium whitespace-nowrap",style:{color:w},children:s.name})]}),i<j.length-1&&e.jsx("div",{className:"mx-1 md:mx-2 h-0.5 flex-1 min-w-3 rounded-full",style:{backgroundColor:i<(Ne>=0?Ne:0)?"var(--accent)":"#525252"}})]},s.name)})})}),t.currentStage&&e.jsxs("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:[e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// stage: ",t.currentStage," (",Ne+1,"/",j.length,")"]}),t.startedAt&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// elapsed: ",Y(t.startedAt).replace(" ago","")]}),b&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",b]}),e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// retries: ",t.retryCount,"/2"]})]}),!t.currentStage&&b&&e.jsx("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",b]})}),e.jsx("button",{onClick:()=>ue("terminal"),className:"flex-1 min-h-[100px] rounded-[4px] border border-dashed border-[var(--border)] flex items-center justify-center gap-2 text-[11px] text-[var(--text-muted)] hover:border-[var(--accent)] hover:text-[var(--accent)] transition-colors",children:e.jsxs("span",{children:["// ",a("tasks.view_terminal")]})}),e.jsxs("div",{className:"mt-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch??"-"})]}),rt]})]}),e.jsxs("div",{className:"flex flex-col gap-6 mt-4 lg:hidden",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),e.jsx(yt,{stages:j,runningBg:"bg-[var(--bg-input)]",py:"py-2"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),h.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:h.slice(-12).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},i))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]})]}),N==="logs"&&e.jsxs("div",{className:"flex flex-1 flex-col gap-3 md:gap-5 overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)] md:hidden",children:a("tasks.task_logs")}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:gap-3",children:[e.jsx("div",{className:"flex items-center gap-1 overflow-x-auto no-scrollbar md:hidden",children:["","error","system"].map(s=>e.jsx("button",{onClick:()=>{He(s),q(0)},className:`shrink-0 rounded-[4px] px-2.5 py-1 text-[11px] ${V===s?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)]"}`,children:s||"all"},s))}),e.jsx("div",{className:"hidden md:block",children:e.jsx(ht,{value:V,onChange:s=>{He(s),q(0)},options:[{value:"",label:"all"},{value:"stage_change",label:"stage_change"},{value:"info",label:"info"},{value:"warning",label:"warning"},{value:"error",label:"error"},{value:"system",label:"system"}],className:"w-36"})}),e.jsxs("div",{className:"flex flex-1 items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:[e.jsx(es,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("tasks.search_logs"),value:se,onChange:s=>{Rt(s.target.value),q(0)},className:"flex-1 bg-transparent text-xs text-[var(--text-primary)] outline-none placeholder:text-[var(--text-muted)]"})]})]}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[ze.map((s,i)=>e.jsxs("div",{className:`flex items-start md:items-center gap-2 md:gap-4 rounded-[4px] px-2 md:px-3 py-2 text-[11px] md:text-xs ${i%2===0?"bg-[var(--bg-card)]":""}`,children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:new Date(s.timestamp).toLocaleTimeString("en-US",{hour12:!1})}),e.jsx("span",{className:`shrink-0 font-medium ${_s(s.type)}`,children:s.type}),e.jsx("span",{className:"min-w-0 break-words md:truncate text-[var(--text-primary)]",children:s.message})]},s.id)),ze.length===0&&!$t&&e.jsx("p",{className:"py-8 text-center text-xs text-[var(--text-muted)]",children:a("tasks.no_log_entries")})]}),te>50&&e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[Array.from({length:Math.ceil(te/50)}).slice(0,5).map((s,i)=>e.jsx("button",{onClick:()=>q(i),className:`rounded-[4px] px-2 py-1 text-xs ${H===i?"bg-[var(--accent)] text-black font-medium":"text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:i+1},i)),Math.ceil(te/50)>5&&e.jsx("button",{onClick:()=>q(H+1),disabled:H>=Math.ceil(te/50)-1,className:"rounded-[4px] px-2 py-1 text-xs text-[var(--text-muted)] disabled:opacity-30",children:">"})]})]}),N==="detail"&&e.jsxs("div",{className:"flex flex-1 flex-col gap-4 md:gap-5 overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(ts,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_basic_info")})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_creator")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.creatorName??"-"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("common.created_at")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:xs(t.createdAt)}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:Y(t.createdAt)})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("common.status")}),e.jsx(Ce,{status:t.status,agentType:t.agentType})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_project")}),e.jsx(ie,{to:`/projects/${t.projectKey}`,className:"text-xs text-[var(--info)] hover:underline transition-colors",children:t.projectKey})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_worker")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:ye})]}),b&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_time_cost")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:b})]}),t.branch&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_branch")}),z(m,t.branch)?e.jsx("a",{href:z(m,t.branch),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline transition-colors truncate",children:t.branch}):e.jsx("span",{className:"text-xs text-[var(--text-primary)] truncate",children:t.branch})]}),t.mrUrl&&/^https?:\/\//.test(t.mrUrl)&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.mr_link")}),e.jsx("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline truncate",children:((ot=t.mrUrl.match(/!?\d+$/))==null?void 0:ot[0])??"view"})]})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(bt,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_task_name")})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[t.name&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_ai_name")}),e.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)]",children:t.name})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_task_id")}),e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:["#",t.id]})]}),t.sourcePlatform&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_source")}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:t.sourcePlatform})]})]})]}),t.taskMode==="plan"&&t.status===y.COMPLETED&&(()=>{let s="main";if(t.configSnapshot)try{const p=JSON.parse(t.configSnapshot);p.defaultBranch&&(s=p.defaultBranch)}catch{}const i=Ss(m,s);return i?e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(bt,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("plan.view_spec")})]}),e.jsxs("p",{className:"mb-2 text-xs text-[var(--text-muted)]",children:["the spec document was pushed to ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:s})," at ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"docs/specs/"})]}),e.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--info)] hover:underline transition-colors",children:[e.jsx(gt,{className:"h-3 w-3"}),a("plan.view_spec")]})]}):null})(),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(ss,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_description")})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[#0c0c0c] p-4 overflow-x-auto",children:e.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs leading-relaxed text-[var(--text-secondary)] font-mono",children:t.description})})]})]})]}),N==="terminal"&&Kt,N==="pipeline"&&e.jsxs("div",{className:"hidden w-[420px] shrink-0 flex-col gap-5 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-5 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"creator"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.creatorName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("common.created_at")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:ye})]}),b&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"time cost"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:b})]}),rt]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.workspace_section")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:t.branch??(B==null?void 0:B.branch)??"-"})]}),e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"worktree"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:(B==null?void 0:B.path)??"-"})]}),t.mrUrl&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.mr_link")}),e.jsx("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-[var(--info)] hover:underline",children:((xt=t.mrUrl.match(/!?\d+$/))==null?void 0:xt[0])??"view"})]})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{ref:Qe,className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.cursor_tunnel_section")}),t.workerId?e.jsx(Ns,{taskId:o,taskFinished:g,compact:!0}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.no_worker_assigned")})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2 text-xs",children:j.map(s=>{const i=s.status==="completed"?"✓":s.status==="running"?"→":"·",p=s.status==="running"?"var(--accent)":s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":"#525252",u=s.status==="completed"?"done":s.status==="running"?"running...":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold",style:{color:p},children:i}),e.jsx("span",{className:s.status==="running"?"font-medium":"",style:{color:p},children:s.name}),e.jsxs("span",{className:"text-[11px]",style:{color:"#525252"},children:["— ",u]})]},s.name)})})]})]})]}),we]})}export{Xs as default};