claude-code-workflow 7.2.28 → 7.2.29

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 (225) hide show
  1. package/.codex/skills/brainstorm/SKILL.md +3 -3
  2. package/.codex/skills/clean/SKILL.md +3 -3
  3. package/.codex/skills/issue-discover/SKILL.md +13 -13
  4. package/.codex/skills/issue-discover/phases/02-discover.md +4 -4
  5. package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +3 -3
  6. package/.codex/skills/parallel-dev-cycle/SKILL.md +4 -4
  7. package/.codex/skills/parallel-dev-cycle/phases/02-agent-execution.md +6 -6
  8. package/.codex/skills/parallel-dev-cycle/phases/03-result-aggregation.md +10 -10
  9. package/.codex/skills/review-cycle/SKILL.md +10 -10
  10. package/.codex/skills/review-cycle/phases/02-parallel-review.md +6 -6
  11. package/.codex/skills/review-cycle/phases/04-iterative-deep-dive.md +4 -4
  12. package/.codex/skills/review-cycle/phases/07-fix-parallel-planning.md +4 -4
  13. package/.codex/skills/review-cycle/phases/08-fix-execution.md +2 -2
  14. package/.codex/skills/roadmap-with-file/SKILL.md +14 -14
  15. package/.codex/skills/spec-generator/README.md +1 -1
  16. package/.codex/skills/spec-generator/SKILL.md +184 -88
  17. package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +4 -7
  18. package/.codex/skills/spec-generator/phases/01-discovery.md +30 -11
  19. package/.codex/skills/spec-generator/phases/02-product-brief.md +2 -5
  20. package/.codex/skills/spec-generator/phases/03-requirements.md +4 -6
  21. package/.codex/skills/spec-generator/phases/04-architecture.md +4 -6
  22. package/.codex/skills/spec-generator/phases/05-epics-stories.md +4 -6
  23. package/.codex/skills/spec-generator/phases/06-5-auto-fix.md +4 -5
  24. package/.codex/skills/spec-generator/phases/06-readiness-check.md +8 -8
  25. package/.codex/skills/spec-generator/phases/07-issue-export.md +2 -2
  26. package/.codex/skills/spec-setup/SKILL.md +4 -4
  27. package/.codex/skills/workflow-plan/SKILL.md +6 -6
  28. package/.codex/skills/workflow-tdd-plan/SKILL.md +5 -5
  29. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +19 -19
  30. package/.codex/skills/workflow-test-fix-cycle/phases/01-test-fix-gen.md +5 -5
  31. package/.codex/skills/workflow-test-fix-cycle/phases/02-test-cycle-execute.md +5 -5
  32. package/ccw/frontend/dist/assets/{AlertDialog-BjP1ydDR.js → AlertDialog-exlTDW81.js} +3 -3
  33. package/ccw/frontend/dist/assets/{AlertDialog-BjP1ydDR.js.map → AlertDialog-exlTDW81.js.map} +1 -1
  34. package/ccw/frontend/dist/assets/{AnalysisPage-CAX3xqMf.js → AnalysisPage-cgV9LfAI.js} +2 -2
  35. package/ccw/frontend/dist/assets/{AnalysisPage-CAX3xqMf.js.map → AnalysisPage-cgV9LfAI.js.map} +1 -1
  36. package/ccw/frontend/dist/assets/{ApiSettingsPage-CtWlmztq.js → ApiSettingsPage-Dk5jJdWt.js} +2 -2
  37. package/ccw/frontend/dist/assets/{ApiSettingsPage-CtWlmztq.js.map → ApiSettingsPage-Dk5jJdWt.js.map} +1 -1
  38. package/ccw/frontend/dist/assets/{CliModeToggle-hR4a-eLX.js → CliModeToggle-Be9xsPiv.js} +2 -2
  39. package/ccw/frontend/dist/assets/{CliModeToggle-hR4a-eLX.js.map → CliModeToggle-Be9xsPiv.js.map} +1 -1
  40. package/ccw/frontend/dist/assets/{CliSessionSharePage-DzNPkFN9.js → CliSessionSharePage-Bh9jBtPI.js} +2 -2
  41. package/ccw/frontend/dist/assets/{CliSessionSharePage-DzNPkFN9.js.map → CliSessionSharePage-Bh9jBtPI.js.map} +1 -1
  42. package/ccw/frontend/dist/assets/{CliViewerPage-BPEGN4TT.js → CliViewerPage-BrE-oyEq.js} +2 -2
  43. package/ccw/frontend/dist/assets/{CliViewerPage-BPEGN4TT.js.map → CliViewerPage-BrE-oyEq.js.map} +1 -1
  44. package/ccw/frontend/dist/assets/{CodexLensPage-Cf0r2RHY.js → CodexLensPage-Cd3nrC93.js} +2 -2
  45. package/ccw/frontend/dist/assets/{CodexLensPage-Cf0r2RHY.js.map → CodexLensPage-Cd3nrC93.js.map} +1 -1
  46. package/ccw/frontend/dist/assets/{Collapsible-DEm1rJ4h.js → Collapsible-DXFl3VKF.js} +2 -2
  47. package/ccw/frontend/dist/assets/{Collapsible-DEm1rJ4h.js.map → Collapsible-DXFl3VKF.js.map} +1 -1
  48. package/ccw/frontend/dist/assets/{CommandsManagerPage-BpeWw8HO.js → CommandsManagerPage-IV8zpjgX.js} +2 -2
  49. package/ccw/frontend/dist/assets/{CommandsManagerPage-BpeWw8HO.js.map → CommandsManagerPage-IV8zpjgX.js.map} +1 -1
  50. package/ccw/frontend/dist/assets/{DeepWikiPage-BEsmh2vF.js → DeepWikiPage-CpDxtmRX.js} +2 -2
  51. package/ccw/frontend/dist/assets/{DeepWikiPage-BEsmh2vF.js.map → DeepWikiPage-CpDxtmRX.js.map} +1 -1
  52. package/ccw/frontend/dist/assets/{EndpointsPage-B30SFdtU.js → EndpointsPage-BchjWe7s.js} +2 -2
  53. package/ccw/frontend/dist/assets/{EndpointsPage-B30SFdtU.js.map → EndpointsPage-BchjWe7s.js.map} +1 -1
  54. package/ccw/frontend/dist/assets/{ExplorerPage-BVvMpg1O.js → ExplorerPage-CbWvaJ0y.js} +2 -2
  55. package/ccw/frontend/dist/assets/{ExplorerPage-BVvMpg1O.js.map → ExplorerPage-CbWvaJ0y.js.map} +1 -1
  56. package/ccw/frontend/dist/assets/{FixSessionPage-CL73dHbh.js → FixSessionPage-YMjVRiCk.js} +2 -2
  57. package/ccw/frontend/dist/assets/{FixSessionPage-CL73dHbh.js.map → FixSessionPage-YMjVRiCk.js.map} +1 -1
  58. package/ccw/frontend/dist/assets/{FloatingFileBrowser-BL-28lMZ.js → FloatingFileBrowser-JW2ehYY_.js} +2 -2
  59. package/ccw/frontend/dist/assets/{FloatingFileBrowser-BL-28lMZ.js.map → FloatingFileBrowser-JW2ehYY_.js.map} +1 -1
  60. package/ccw/frontend/dist/assets/{FloatingPanel-BzZDciHZ.js → FloatingPanel-BtqzqDVq.js} +2 -2
  61. package/ccw/frontend/dist/assets/{FloatingPanel-BzZDciHZ.js.map → FloatingPanel-BtqzqDVq.js.map} +1 -1
  62. package/ccw/frontend/dist/assets/{GraphExplorerPage-CDp6-d8P.js → GraphExplorerPage-BsJL_W4d.js} +3 -3
  63. package/ccw/frontend/dist/assets/{GraphExplorerPage-CDp6-d8P.js.map → GraphExplorerPage-BsJL_W4d.js.map} +1 -1
  64. package/ccw/frontend/dist/assets/{HistoryPage-fZY_7O9n.js → HistoryPage-BuWpQ7k5.js} +2 -2
  65. package/ccw/frontend/dist/assets/{HistoryPage-fZY_7O9n.js.map → HistoryPage-BuWpQ7k5.js.map} +1 -1
  66. package/ccw/frontend/dist/assets/{HookManagerPage-4LJeC9bq.js → HookManagerPage-D0BtMIWy.js} +2 -2
  67. package/ccw/frontend/dist/assets/{HookManagerPage-4LJeC9bq.js.map → HookManagerPage-D0BtMIWy.js.map} +1 -1
  68. package/ccw/frontend/dist/assets/{InstallationsPage-Bpigrbhw.js → InstallationsPage-C7dwsAKG.js} +2 -2
  69. package/ccw/frontend/dist/assets/{InstallationsPage-Bpigrbhw.js.map → InstallationsPage-C7dwsAKG.js.map} +1 -1
  70. package/ccw/frontend/dist/assets/{IssueHubPage-BP0zJc1R.js → IssueHubPage-D0nCNaeB.js} +2 -2
  71. package/ccw/frontend/dist/assets/{IssueHubPage-BP0zJc1R.js.map → IssueHubPage-D0nCNaeB.js.map} +1 -1
  72. package/ccw/frontend/dist/assets/{LiteTasksPage-CSt2oVKQ.js → LiteTasksPage-B5c2Kb9r.js} +3 -3
  73. package/ccw/frontend/dist/assets/{LiteTasksPage-CSt2oVKQ.js.map → LiteTasksPage-B5c2Kb9r.js.map} +1 -1
  74. package/ccw/frontend/dist/assets/{McpManagerPage-B-xaMA0w.js → McpManagerPage-C-S5CehM.js} +2 -2
  75. package/ccw/frontend/dist/assets/{McpManagerPage-B-xaMA0w.js.map → McpManagerPage-C-S5CehM.js.map} +1 -1
  76. package/ccw/frontend/dist/assets/{MemoryPage-CJqo_7DY.js → MemoryPage-P_B0JVUQ.js} +2 -2
  77. package/ccw/frontend/dist/assets/{MemoryPage-CJqo_7DY.js.map → MemoryPage-P_B0JVUQ.js.map} +1 -1
  78. package/ccw/frontend/dist/assets/{NotFoundPage-ibZeQA-Y.js → NotFoundPage-S4Jn9LUE.js} +2 -2
  79. package/ccw/frontend/dist/assets/{NotFoundPage-ibZeQA-Y.js.map → NotFoundPage-S4Jn9LUE.js.map} +1 -1
  80. package/ccw/frontend/dist/assets/{OrchestratorPage-DgJ4ctPQ.js → OrchestratorPage-C2Zlr7AC.js} +2 -2
  81. package/ccw/frontend/dist/assets/{OrchestratorPage-DgJ4ctPQ.js.map → OrchestratorPage-C2Zlr7AC.js.map} +1 -1
  82. package/ccw/frontend/dist/assets/{ProjectOverviewPage-Cit0Yq0D.js → ProjectOverviewPage-CMVfz8s5.js} +2 -2
  83. package/ccw/frontend/dist/assets/{ProjectOverviewPage-Cit0Yq0D.js.map → ProjectOverviewPage-CMVfz8s5.js.map} +1 -1
  84. package/ccw/frontend/dist/assets/{PromptHistoryPage-Ce1HDIK0.js → PromptHistoryPage-YEMjFARX.js} +3 -3
  85. package/ccw/frontend/dist/assets/{PromptHistoryPage-Ce1HDIK0.js.map → PromptHistoryPage-YEMjFARX.js.map} +1 -1
  86. package/ccw/frontend/dist/assets/{ReviewSessionPage-J1KikNrk.js → ReviewSessionPage-DnTm55nG.js} +2 -2
  87. package/ccw/frontend/dist/assets/{ReviewSessionPage-J1KikNrk.js.map → ReviewSessionPage-DnTm55nG.js.map} +1 -1
  88. package/ccw/frontend/dist/assets/{RulesManagerPage-CdBjTmth.js → RulesManagerPage-CUwebtO2.js} +2 -2
  89. package/ccw/frontend/dist/assets/{RulesManagerPage-CdBjTmth.js.map → RulesManagerPage-CUwebtO2.js.map} +1 -1
  90. package/ccw/frontend/dist/assets/{SessionDetailPage-B9ZK7LvX.js → SessionDetailPage-0qyH1Z5P.js} +2 -2
  91. package/ccw/frontend/dist/assets/{SessionDetailPage-B9ZK7LvX.js.map → SessionDetailPage-0qyH1Z5P.js.map} +1 -1
  92. package/ccw/frontend/dist/assets/{SessionsPage-CW_nS5UR.js → SessionsPage-BpgP4087.js} +2 -2
  93. package/ccw/frontend/dist/assets/{SessionsPage-CW_nS5UR.js.map → SessionsPage-BpgP4087.js.map} +1 -1
  94. package/ccw/frontend/dist/assets/SettingsPage-C3SJajeT.js +150 -0
  95. package/ccw/frontend/dist/assets/SettingsPage-C3SJajeT.js.map +1 -0
  96. package/ccw/frontend/dist/assets/SkillsManagerPage-vD9PTsmy.js +7 -0
  97. package/ccw/frontend/dist/assets/SkillsManagerPage-vD9PTsmy.js.map +1 -0
  98. package/ccw/frontend/dist/assets/{SpecsSettingsPage-DJpi9XQL.js → SpecsSettingsPage-DT-yTVkD.js} +4 -4
  99. package/ccw/frontend/dist/assets/{SpecsSettingsPage-DJpi9XQL.js.map → SpecsSettingsPage-DT-yTVkD.js.map} +1 -1
  100. package/ccw/frontend/dist/assets/{Switch-Ac6Ov7uy.js → Switch-CYSPdqWk.js} +2 -2
  101. package/ccw/frontend/dist/assets/{Switch-Ac6Ov7uy.js.map → Switch-CYSPdqWk.js.map} +1 -1
  102. package/ccw/frontend/dist/assets/{TabsNavigation-DZAAspqR.js → TabsNavigation-CPh6Zor1.js} +2 -2
  103. package/ccw/frontend/dist/assets/{TabsNavigation-DZAAspqR.js.map → TabsNavigation-CPh6Zor1.js.map} +1 -1
  104. package/ccw/frontend/dist/assets/{TaskDrawer-BJkwfhIZ.js → TaskDrawer-Ds-8830B.js} +2 -2
  105. package/ccw/frontend/dist/assets/{TaskDrawer-BJkwfhIZ.js.map → TaskDrawer-Ds-8830B.js.map} +1 -1
  106. package/ccw/frontend/dist/assets/{TeamPage-BJgjxBgb.js → TeamPage-CJODUxBk.js} +2 -2
  107. package/ccw/frontend/dist/assets/{TeamPage-BJgjxBgb.js.map → TeamPage-CJODUxBk.js.map} +1 -1
  108. package/ccw/frontend/dist/assets/{TerminalDashboardPage-D1WekoOy.js → TerminalDashboardPage-Cn3fGUuO.js} +3 -3
  109. package/ccw/frontend/dist/assets/{TerminalDashboardPage-D1WekoOy.js.map → TerminalDashboardPage-Cn3fGUuO.js.map} +1 -1
  110. package/ccw/frontend/dist/assets/{archive-DxemgIhF.js → archive-CjwVpw6k.js} +2 -2
  111. package/ccw/frontend/dist/assets/{archive-DxemgIhF.js.map → archive-CjwVpw6k.js.map} +1 -1
  112. package/ccw/frontend/dist/assets/{archive-restore-CjS83f1V.js → archive-restore-2vZa9Ic3.js} +2 -2
  113. package/ccw/frontend/dist/assets/{archive-restore-CjS83f1V.js.map → archive-restore-2vZa9Ic3.js.map} +1 -1
  114. package/ccw/frontend/dist/assets/{arrow-right-B5PUcn8I.js → arrow-right-CUU5XDgT.js} +2 -2
  115. package/ccw/frontend/dist/assets/{arrow-right-B5PUcn8I.js.map → arrow-right-CUU5XDgT.js.map} +1 -1
  116. package/ccw/frontend/dist/assets/{bookmark-plus-DCc9aPbb.js → bookmark-plus-Cc3nKRZ5.js} +2 -2
  117. package/ccw/frontend/dist/assets/{bookmark-plus-DCc9aPbb.js.map → bookmark-plus-Cc3nKRZ5.js.map} +1 -1
  118. package/ccw/frontend/dist/assets/{bot-DOwFtzak.js → bot-BwpSRDUa.js} +2 -2
  119. package/ccw/frontend/dist/assets/{bot-DOwFtzak.js.map → bot-BwpSRDUa.js.map} +1 -1
  120. package/ccw/frontend/dist/assets/{braces-96qH3aFh.js → braces-DBzUW1XC.js} +2 -2
  121. package/ccw/frontend/dist/assets/{braces-96qH3aFh.js.map → braces-DBzUW1XC.js.map} +1 -1
  122. package/ccw/frontend/dist/assets/{circle-stop-CCxSuil1.js → circle-stop-CGNNsjvE.js} +2 -2
  123. package/ccw/frontend/dist/assets/{circle-stop-CCxSuil1.js.map → circle-stop-CGNNsjvE.js.map} +1 -1
  124. package/ccw/frontend/dist/assets/{cpu-CZNSJFdq.js → cpu-D27G86Ul.js} +2 -2
  125. package/ccw/frontend/dist/assets/{cpu-CZNSJFdq.js.map → cpu-D27G86Ul.js.map} +1 -1
  126. package/ccw/frontend/dist/assets/{ellipsis-vertical-h8xtvw2_.js → ellipsis-vertical-C1Ij47Yz.js} +2 -2
  127. package/ccw/frontend/dist/assets/{ellipsis-vertical-h8xtvw2_.js.map → ellipsis-vertical-C1Ij47Yz.js.map} +1 -1
  128. package/ccw/frontend/dist/assets/{eye-D3NY0bm6.js → eye-C6MOB7Au.js} +2 -2
  129. package/ccw/frontend/dist/assets/{eye-D3NY0bm6.js.map → eye-C6MOB7Au.js.map} +1 -1
  130. package/ccw/frontend/dist/assets/{eye-off-Cy2vkc8p.js → eye-off-BxfBlZ26.js} +2 -2
  131. package/ccw/frontend/dist/assets/{eye-off-Cy2vkc8p.js.map → eye-off-BxfBlZ26.js.map} +1 -1
  132. package/ccw/frontend/dist/assets/{file-json-Bzq3U1Mx.js → file-json-NI237wA-.js} +2 -2
  133. package/ccw/frontend/dist/assets/{file-json-Bzq3U1Mx.js.map → file-json-NI237wA-.js.map} +1 -1
  134. package/ccw/frontend/dist/assets/{file-text-DwuwPDPi.js → file-text-Byn2_2v6.js} +2 -2
  135. package/ccw/frontend/dist/assets/{file-text-DwuwPDPi.js.map → file-text-Byn2_2v6.js.map} +1 -1
  136. package/ccw/frontend/dist/assets/{filter-q9g-bknU.js → filter-D-7PhZjx.js} +2 -2
  137. package/ccw/frontend/dist/assets/{filter-q9g-bknU.js.map → filter-D-7PhZjx.js.map} +1 -1
  138. package/ccw/frontend/dist/assets/{folder-CL6vb42J.js → folder-BoAsK_FL.js} +2 -2
  139. package/ccw/frontend/dist/assets/{folder-CL6vb42J.js.map → folder-BoAsK_FL.js.map} +1 -1
  140. package/ccw/frontend/dist/assets/{gauge-BkrcQBly.js → gauge-DCSxJIS4.js} +2 -2
  141. package/ccw/frontend/dist/assets/{gauge-BkrcQBly.js.map → gauge-DCSxJIS4.js.map} +1 -1
  142. package/ccw/frontend/dist/assets/{globe-BQbwyNeV.js → globe-CHS3prza.js} +2 -2
  143. package/ccw/frontend/dist/assets/{globe-BQbwyNeV.js.map → globe-CHS3prza.js.map} +1 -1
  144. package/ccw/frontend/dist/assets/{grid-3x3-x5_7DrN7.js → grid-3x3-D7K35U7S.js} +2 -2
  145. package/ccw/frontend/dist/assets/{grid-3x3-x5_7DrN7.js.map → grid-3x3-D7K35U7S.js.map} +1 -1
  146. package/ccw/frontend/dist/assets/{hard-drive-DTyWXwzf.js → hard-drive-eq9xE07G.js} +2 -2
  147. package/ccw/frontend/dist/assets/{hard-drive-DTyWXwzf.js.map → hard-drive-eq9xE07G.js.map} +1 -1
  148. package/ccw/frontend/dist/assets/{hash-80O0kJO7.js → hash-C1DMpBua.js} +2 -2
  149. package/ccw/frontend/dist/assets/{hash-80O0kJO7.js.map → hash-C1DMpBua.js.map} +1 -1
  150. package/ccw/frontend/dist/assets/{history-DDlN2Bwa.js → history-Di5SBCY-.js} +2 -2
  151. package/ccw/frontend/dist/assets/{history-DDlN2Bwa.js.map → history-Di5SBCY-.js.map} +1 -1
  152. package/ccw/frontend/dist/assets/{index-mbeo62f8.js → index--_R7COnA.js} +2 -2
  153. package/ccw/frontend/dist/assets/{index-mbeo62f8.js.map → index--_R7COnA.js.map} +1 -1
  154. package/ccw/frontend/dist/assets/{index-rLgoBCfV.js → index-BUol9HDD.js} +3 -3
  155. package/ccw/frontend/dist/assets/{index-rLgoBCfV.js.map → index-BUol9HDD.js.map} +1 -1
  156. package/ccw/frontend/dist/assets/{index-Bs80iCX0.js → index-CT9oykfw.js} +2 -2
  157. package/ccw/frontend/dist/assets/{index-Bs80iCX0.js.map → index-CT9oykfw.js.map} +1 -1
  158. package/ccw/frontend/dist/assets/{index-B9A3Hnrk.js → index-Ddwvf87H.js} +2 -2
  159. package/ccw/frontend/dist/assets/{index-B9A3Hnrk.js.map → index-Ddwvf87H.js.map} +1 -1
  160. package/ccw/frontend/dist/assets/{layout-grid-C1niOWJx.js → layout-grid-LiX0qZbN.js} +2 -2
  161. package/ccw/frontend/dist/assets/{layout-grid-C1niOWJx.js.map → layout-grid-LiX0qZbN.js.map} +1 -1
  162. package/ccw/frontend/dist/assets/{lightbulb-BTmI7SUg.js → lightbulb-CL3DVEwb.js} +2 -2
  163. package/ccw/frontend/dist/assets/{lightbulb-BTmI7SUg.js.map → lightbulb-CL3DVEwb.js.map} +1 -1
  164. package/ccw/frontend/dist/assets/{link-2-CB9HKeuZ.js → link-2-CC5cFeq6.js} +2 -2
  165. package/ccw/frontend/dist/assets/{link-2-CB9HKeuZ.js.map → link-2-CC5cFeq6.js.map} +1 -1
  166. package/ccw/frontend/dist/assets/{link-koEYiemK.js → link-ngFQ9bs0.js} +2 -2
  167. package/ccw/frontend/dist/assets/{link-koEYiemK.js.map → link-ngFQ9bs0.js.map} +1 -1
  168. package/ccw/frontend/dist/assets/{list-v2_GaLdC.js → list-BEU6I0KK.js} +2 -2
  169. package/ccw/frontend/dist/assets/{list-v2_GaLdC.js.map → list-BEU6I0KK.js.map} +1 -1
  170. package/ccw/frontend/dist/assets/{map-pin-BQNfAqG_.js → map-pin-BWZdLA6y.js} +2 -2
  171. package/ccw/frontend/dist/assets/{map-pin-BQNfAqG_.js.map → map-pin-BWZdLA6y.js.map} +1 -1
  172. package/ccw/frontend/dist/assets/{messages-square-Dzq5LGg9.js → messages-square-K6_Chm7n.js} +2 -2
  173. package/ccw/frontend/dist/assets/{messages-square-Dzq5LGg9.js.map → messages-square-K6_Chm7n.js.map} +1 -1
  174. package/ccw/frontend/dist/assets/{minimize-2-CtkoJXcz.js → minimize-2-CWkphauf.js} +2 -2
  175. package/ccw/frontend/dist/assets/{minimize-2-CtkoJXcz.js.map → minimize-2-CWkphauf.js.map} +1 -1
  176. package/ccw/frontend/dist/assets/{package-CH3smL37.js → package-DrNgkamn.js} +2 -2
  177. package/ccw/frontend/dist/assets/{package-CH3smL37.js.map → package-DrNgkamn.js.map} +1 -1
  178. package/ccw/frontend/dist/assets/{plug-CZ0aL_yF.js → plug-CMo3sw5_.js} +2 -2
  179. package/ccw/frontend/dist/assets/{plug-CZ0aL_yF.js.map → plug-CMo3sw5_.js.map} +1 -1
  180. package/ccw/frontend/dist/assets/{power-F2A_J4l6.js → power-DppNTW5e.js} +2 -2
  181. package/ccw/frontend/dist/assets/{power-F2A_J4l6.js.map → power-DppNTW5e.js.map} +1 -1
  182. package/ccw/frontend/dist/assets/{save-Byxot0YU.js → save-CD8aPMbZ.js} +2 -2
  183. package/ccw/frontend/dist/assets/{save-Byxot0YU.js.map → save-CD8aPMbZ.js.map} +1 -1
  184. package/ccw/frontend/dist/assets/{send-JjqhUkpw.js → send-B4z90fQD.js} +2 -2
  185. package/ccw/frontend/dist/assets/{send-JjqhUkpw.js.map → send-B4z90fQD.js.map} +1 -1
  186. package/ccw/frontend/dist/assets/{settings-2--SuN9rAt.js → settings-2-CAKRU_QC.js} +2 -2
  187. package/ccw/frontend/dist/assets/{settings-2--SuN9rAt.js.map → settings-2-CAKRU_QC.js.map} +1 -1
  188. package/ccw/frontend/dist/assets/{square-check-big-BbngGB2h.js → square-check-big-KhI3HrzX.js} +2 -2
  189. package/ccw/frontend/dist/assets/{square-check-big-BbngGB2h.js.map → square-check-big-KhI3HrzX.js.map} +1 -1
  190. package/ccw/frontend/dist/assets/{square-pen-CgrHgZSl.js → square-pen-BtdGIpuq.js} +2 -2
  191. package/ccw/frontend/dist/assets/{square-pen-CgrHgZSl.js.map → square-pen-BtdGIpuq.js.map} +1 -1
  192. package/ccw/frontend/dist/assets/{star-BU3TQr7Z.js → star-ZoBUkXoD.js} +2 -2
  193. package/ccw/frontend/dist/assets/{star-BU3TQr7Z.js.map → star-ZoBUkXoD.js.map} +1 -1
  194. package/ccw/frontend/dist/assets/{style-CKs7nnn3.js → style-CltxQP-P.js} +2 -2
  195. package/ccw/frontend/dist/assets/{style-CKs7nnn3.js.map → style-CltxQP-P.js.map} +1 -1
  196. package/ccw/frontend/dist/assets/{target-DW5tsDW6.js → target-C32OUSGf.js} +2 -2
  197. package/ccw/frontend/dist/assets/{target-DW5tsDW6.js.map → target-C32OUSGf.js.map} +1 -1
  198. package/ccw/frontend/dist/assets/{test-tube-BHm7w3ON.js → test-tube-0IxoyAVZ.js} +2 -2
  199. package/ccw/frontend/dist/assets/{test-tube-BHm7w3ON.js.map → test-tube-0IxoyAVZ.js.map} +1 -1
  200. package/ccw/frontend/dist/assets/{upload-DYR7PWwt.js → upload-4eKCkyBn.js} +2 -2
  201. package/ccw/frontend/dist/assets/{upload-DYR7PWwt.js.map → upload-4eKCkyBn.js.map} +1 -1
  202. package/ccw/frontend/dist/assets/{useApiSettings-D0TVgQD_.js → useApiSettings-zLTUWqhi.js} +2 -2
  203. package/ccw/frontend/dist/assets/{useApiSettings-D0TVgQD_.js.map → useApiSettings-zLTUWqhi.js.map} +1 -1
  204. package/ccw/frontend/dist/assets/{useCli-DfY8mAP8.js → useCli-BtN2vpOX.js} +2 -2
  205. package/ccw/frontend/dist/assets/{useCli-DfY8mAP8.js.map → useCli-BtN2vpOX.js.map} +1 -1
  206. package/ccw/frontend/dist/assets/{useCommands-CGusDp0F.js → useCommands-_spj49qL.js} +2 -2
  207. package/ccw/frontend/dist/assets/{useCommands-CGusDp0F.js.map → useCommands-_spj49qL.js.map} +1 -1
  208. package/ccw/frontend/dist/assets/{useDebounce-CIwh0fF1.js → useDebounce-Bm9KFZvd.js} +2 -2
  209. package/ccw/frontend/dist/assets/{useDebounce-CIwh0fF1.js.map → useDebounce-Bm9KFZvd.js.map} +1 -1
  210. package/ccw/frontend/dist/assets/{useFileExplorer-FMyFv39K.js → useFileExplorer-DOmpm6v9.js} +2 -2
  211. package/ccw/frontend/dist/assets/{useFileExplorer-FMyFv39K.js.map → useFileExplorer-DOmpm6v9.js.map} +1 -1
  212. package/ccw/frontend/dist/assets/{useLocale-B2qhsoTb.js → useLocale-D2rj4rea.js} +2 -2
  213. package/ccw/frontend/dist/assets/{useLocale-B2qhsoTb.js.map → useLocale-D2rj4rea.js.map} +1 -1
  214. package/ccw/frontend/dist/assets/{useSkills-cxKXMBm3.js → useSkills-OskEpomF.js} +3 -3
  215. package/ccw/frontend/dist/assets/{useSkills-cxKXMBm3.js.map → useSkills-OskEpomF.js.map} +1 -1
  216. package/ccw/frontend/dist/assets/{useSystemSettings-B-xUT_z-.js → useSystemSettings-BjMgsNSF.js} +2 -2
  217. package/ccw/frontend/dist/assets/{useSystemSettings-B-xUT_z-.js.map → useSystemSettings-BjMgsNSF.js.map} +1 -1
  218. package/ccw/frontend/dist/assets/{wand-sparkles-DZV_3lPr.js → wand-sparkles-CLhyYWa7.js} +2 -2
  219. package/ccw/frontend/dist/assets/{wand-sparkles-DZV_3lPr.js.map → wand-sparkles-CLhyYWa7.js.map} +1 -1
  220. package/ccw/frontend/dist/index.html +1 -1
  221. package/package.json +1 -1
  222. package/ccw/frontend/dist/assets/SettingsPage-B2PYzSoO.js +0 -150
  223. package/ccw/frontend/dist/assets/SettingsPage-B2PYzSoO.js.map +0 -1
  224. package/ccw/frontend/dist/assets/SkillsManagerPage-CTnWrrwp.js +0 -7
  225. package/ccw/frontend/dist/assets/SkillsManagerPage-CTnWrrwp.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{ej as Ne,ek as be,el as ye,ab as X,aF as Y,aH as Z,em as we,en as Te,eo as _e,ep as Ce,eq as Se,er as Me,u as T,j as e,e as k,J as ke,B as p,cA as U,aV as ee,a1 as se,bu as Fe,R as de,es as Ae,et as Le,ad as Ee,N as H,k as Pe,c as j,C as L,a as E,r as h,cy as me,ap as te,X as xe,aq as W,ar as I,as as J,at as G,au as D,eu as De,ev as $e,ao as Re,D as qe,d as ze,f as Ve,g as B,h as re,T as Be,l as Oe,b as Ke,I as Qe,x as Ue,y as We,z as Ie,A as Je,E as Ge,G as He,o as ne,s as Xe,aw as Ye}from"./index-rLgoBCfV.js";import{T as ue}from"./TabsNavigation-DZAAspqR.js";import{S as Ze}from"./Switch-Ac6Ov7uy.js";import{F as es}from"./filter-q9g-bknU.js";import{F as ae}from"./file-text-DwuwPDPi.js";import{P as Q}from"./package-CH3smL37.js";import{F as ss}from"./folder-CL6vb42J.js";import{F as ts}from"./file-json-Bzq3U1Mx.js";import{E as as}from"./ellipsis-vertical-h8xtvw2_.js";import{E as rs}from"./eye-D3NY0bm6.js";import{A as ns}from"./archive-restore-CjS83f1V.js";import{A as is}from"./archive-DxemgIhF.js";import{M as ls,a as cs}from"./minimize-2-CtkoJXcz.js";const z=Ne()(be(ye(s=>({selectedTeam:null,autoRefresh:!0,messageFilter:{},timelineExpanded:!0,viewMode:"list",locationFilter:"active",searchQuery:"",detailTab:"pipeline",setSelectedTeam:t=>s({selectedTeam:t}),toggleAutoRefresh:()=>s(t=>({autoRefresh:!t.autoRefresh})),setMessageFilter:t=>s(a=>({messageFilter:{...a.messageFilter,...t}})),clearMessageFilter:()=>s({messageFilter:{}}),setTimelineExpanded:t=>s({timelineExpanded:t}),setViewMode:t=>s({viewMode:t}),setLocationFilter:t=>s({locationFilter:t}),setSearchQuery:t=>s({searchQuery:t}),setDetailTab:t=>s({detailTab:t}),selectTeamAndShowDetail:t=>s({selectedTeam:t,viewMode:"detail",detailTab:"pipeline"}),backToList:()=>s({viewMode:"list",detailTab:"pipeline"})}),{name:"ccw-team-store"}),{name:"TeamStore"})),S={all:["teams"],lists:()=>[...S.all,"list"],listByLocation:s=>[...S.lists(),s],messages:(s,t)=>[...S.all,"messages",s,t],status:s=>[...S.all,"status",s]};function he(s){var n;const t=z(i=>i.autoRefresh),a=s||"active",r=X({queryKey:S.listByLocation(a),queryFn:async()=>({teams:(await Ce(a)).teams??[]}),staleTime:1e4,refetchInterval:t?1e4:!1});return{teams:((n=r.data)==null?void 0:n.teams)??[],isLoading:r.isLoading,isFetching:r.isFetching,error:r.error,refetch:r.refetch}}function os(s,t,a){var i,l;const r=z(c=>c.autoRefresh),n=X({queryKey:S.messages(s??"",t),queryFn:async()=>{if(!s)return{total:0,showing:0,messages:[]};const c=await Se(s,{...t,last:50});return{total:c.total,showing:c.showing,messages:c.messages}},enabled:!!s,staleTime:5e3,refetchInterval:r?5e3:!1});return{messages:((i=n.data)==null?void 0:i.messages)??[],total:((l=n.data)==null?void 0:l.total)??0,isLoading:n.isLoading,error:n.error,refetch:n.refetch}}function ds(s){var r,n;const t=z(i=>i.autoRefresh),a=X({queryKey:S.status(s??""),queryFn:async()=>{if(!s)return{members:[],total_messages:0};const i=await Me(s);return{members:i.members,total_messages:i.total_messages}},enabled:!!s,staleTime:5e3,refetchInterval:t?5e3:!1});return{members:((r=a.data)==null?void 0:r.members)??[],totalMessages:((n=a.data)==null?void 0:n.total_messages)??0,isLoading:a.isLoading,error:a.error,refetch:a.refetch}}function ms(){const s=Y(),t=Z({mutationFn:we,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{archiveTeam:t.mutateAsync,isArchiving:t.isPending,error:t.error}}function xs(){const s=Y(),t=Z({mutationFn:Te,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{unarchiveTeam:t.mutateAsync,isUnarchiving:t.isPending,error:t.error}}function us(){const s=Y(),t=Z({mutationFn:_e,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{deleteTeam:t.mutateAsync,isDeleting:t.isPending,error:t.error}}function hs({selectedTeam:s,onBack:t,members:a,totalMessages:r,autoRefresh:n,onToggleAutoRefresh:i,skillType:l,pipelineMode:c}){const{formatMessage:x}=T();return e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs(k,{variant:"ghost",size:"sm",onClick:t,className:"gap-1",children:[e.jsx(ke,{className:"h-4 w-4"}),x({id:"team.detail.backToList"})]}),s&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(U,{className:"w-3 h-3"}),x({id:"team.members"}),": ",a.length]}),e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(ee,{className:"w-3 h-3"}),x({id:"team.messages"}),": ",r]})]}),(l||c)&&e.jsxs("div",{className:"flex items-center gap-2",children:[l&&e.jsx(p,{variant:"outline",className:"gap-1",children:l}),c&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"w-3 h-3"}),c]})]})]})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{id:"auto-refresh",checked:n,onCheckedChange:i}),e.jsx(Fe,{htmlFor:"auto-refresh",className:"text-sm text-muted-foreground cursor-pointer",children:x({id:"team.autoRefresh"})}),n&&e.jsx(de,{className:"w-3.5 h-3.5 text-primary animate-spin",style:{animationDuration:"3s"}})]})})]})}const fe={completed:{icon:Pe,color:"text-green-500",bg:"bg-green-500/10 border-green-500/30"},in_progress:{icon:H,color:"text-blue-500",bg:"bg-blue-500/10 border-blue-500/30",animate:!0},pending:{icon:Ee,color:"text-muted-foreground",bg:"bg-muted border-border"},blocked:{icon:Le,color:"text-red-500",bg:"bg-red-500/10 border-red-500/30"},skipped:{icon:Ae,color:"text-yellow-500",bg:"bg-yellow-500/10 border-yellow-500/30"}},fs=["completed","in_progress","pending","blocked","skipped"];function ie({stage:s}){const{formatMessage:t}=T(),a=fe[s.status],r=a.icon,n=s.status==="in_progress"?"inProgress":s.status;return e.jsxs("div",{className:j("flex flex-col items-center gap-1.5 px-4 py-3 rounded-lg border-2 min-w-[90px] transition-all",a.bg),children:[e.jsx(r,{className:j("w-5 h-5",a.color,a.animate&&"animate-spin"),style:a.animate?{animationDuration:"2s"}:void 0}),e.jsx("span",{className:"text-xs font-medium",children:s.label}),e.jsx("span",{className:j("text-[10px]",a.color),children:t({id:`team.pipeline.${n}`})}),s.role&&e.jsx("span",{className:"text-[10px] text-muted-foreground truncate max-w-[80px]",children:s.role})]})}function ps(){return e.jsxs("div",{className:"flex items-center px-1",children:[e.jsx("div",{className:"w-6 h-0.5 bg-border"}),e.jsx("div",{className:"w-0 h-0 border-t-[4px] border-t-transparent border-b-[4px] border-b-transparent border-l-[6px] border-l-border"})]})}function gs({stages:s,phaseInfo:t}){const{formatMessage:a}=T();return s.length===0?e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground text-center py-8",children:a({id:"team.pipeline.noStages"})})]}):e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"space-y-3 flex-1",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),t&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.phase"}),": ",t.currentPhase,t.totalPhases!=null&&`/${t.totalPhases}`]}),t.currentStep&&e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.step"}),": ",t.currentStep]}),t.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[a({id:"team.coordinates.gap"}),": ",t.gapIteration]})]}),e.jsx("div",{className:"hidden sm:flex items-center gap-0",children:s.map((r,n)=>e.jsxs("div",{className:"flex items-center",children:[n>0&&e.jsx(ps,{}),e.jsx(ie,{stage:r})]},r.id))}),e.jsx("div",{className:"flex sm:hidden flex-col items-center gap-2",children:s.map(r=>e.jsx(ie,{stage:r},r.id))})]}),e.jsx("div",{className:"flex flex-wrap gap-3 text-[10px] text-muted-foreground mt-auto pt-3 border-t border-border",children:fs.map(r=>{const n=fe[r],i=n.icon,l=r==="in_progress"?"inProgress":r;return e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(i,{className:j("w-3 h-3",n.color)}),a({id:`team.pipeline.${l}`})]},r)})})]})}function js(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function vs(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function Ns({members:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:t({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(a=>{const r=vs(a),n=r==="active";return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",n?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:a.member}),e.jsx(p,{variant:n?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:t({id:`team.membersPanel.${r}`})})]}),a.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:a.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[a.messageCount," ",t({id:"team.messages"}).toLowerCase()]}),a.lastSeen&&e.jsxs("span",{children:[js(a.lastSeen)," ",t({id:"team.membersPanel.ago"})]})]})]})]})})},a.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:t({id:"team.empty.noMessages"})})]})]})}function bs(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function ys(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function ws(s,t){const a=s.member.toLowerCase();return t.find(r=>r.role&&r.role.toLowerCase()===a||r.id.toLowerCase()===a)}const Ts={completed:"success",in_progress:"info",pending:"secondary",blocked:"destructive",skipped:"warning"};function le({members:s,stages:t,roleState:a}){const{formatMessage:r}=T();return t.length===0?e.jsx(Ns,{members:s}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:r({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(n=>{const i=ys(n),l=i==="active",c=ws(n,t);return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",l?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:n.member}),e.jsx(p,{variant:l?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:r({id:`team.membersPanel.${i}`})}),c&&e.jsx(p,{variant:Ts[c.status]??"secondary",className:"text-[10px] px-1.5 py-0",children:c.label})]}),n.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[n.messageCount," ",r({id:"team.messages"}).toLowerCase()]}),n.lastSeen&&e.jsxs("span",{children:[bs(n.lastSeen)," ",r({id:"team.membersPanel.ago"})]})]})]})]})})},n.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:r({id:"team.empty.noMessages"})})]})]})}function _s({phaseInfo:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.phase"}),": ",s.currentPhase,s.totalPhases!=null&&`/${s.totalPhases}`]}),s.currentStep&&e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.step"}),": ",s.currentStep]}),s.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[t({id:"team.coordinates.gap"}),": ",s.gapIteration]})]})}const ce={plan_ready:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_approved:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_revision:"bg-amber-500/15 text-amber-600 dark:text-amber-400 border-amber-500/30",task_unblocked:"bg-cyan-500/15 text-cyan-600 dark:text-cyan-400 border-cyan-500/30",impl_complete:"bg-primary/15 text-primary border-primary/30",impl_progress:"bg-primary/15 text-primary border-primary/30",test_result:"bg-green-500/15 text-green-600 dark:text-green-400 border-green-500/30",review_result:"bg-purple-500/15 text-purple-600 dark:text-purple-400 border-purple-500/30",fix_required:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",error:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",shutdown:"bg-muted text-muted-foreground border-border",message:"bg-muted text-muted-foreground border-border"};function Cs({type:s}){const{formatMessage:t}=T(),a=ce[s]||ce.message,r=`team.messageType.${s}`;let n;try{n=t({id:r})}catch{n=s}return e.jsx("span",{className:j("text-[10px] px-1.5 py-0.5 rounded border font-medium",a),children:n})}function Ss({msg:s}){var n,i;const[t,a]=h.useState(!1),r=s.ts?s.ts.substring(11,19):"";return e.jsxs("div",{className:"flex gap-3 py-2.5 border-b border-border last:border-b-0 animate-in fade-in slide-in-from-top-1 duration-300",children:[e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground w-16 shrink-0 pt-0.5",children:r}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xs font-medium",children:s.from}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),e.jsx("span",{className:"text-xs font-medium",children:s.to}),e.jsx(Cs,{type:s.type}),s.id&&e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.id})]}),e.jsx("p",{className:"text-xs text-foreground/80",children:s.summary}),(s.ref||((n=s.data)==null?void 0:n.ref))&&e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[e.jsx(ae,{className:"w-3 h-3"}),e.jsx("span",{className:"font-mono truncate",children:s.ref||((i=s.data)==null?void 0:i.ref)})]}),s.data&&Object.keys(s.data).length>0&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>a(!t),className:"text-[10px] text-primary hover:underline flex items-center gap-0.5",children:t?e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-3 h-3"})," collapse"]}):e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"w-3 h-3"})," data"]})}),t&&e.jsx("pre",{className:"text-[10px] bg-muted p-2 rounded mt-1 overflow-x-auto max-h-40",children:JSON.stringify(s.data,null,2)})]})]})]})}function Ms({messages:s,total:t,filter:a,onFilterChange:r,onClearFilter:n,expanded:i,onExpandedChange:l}){const{formatMessage:c}=T(),x=!!(a.from||a.to||a.type),{senders:g,receivers:v,types:C}=h.useMemo(()=>{const d=new Set,m=new Set,_=new Set;for(const y of s)d.add(y.from),m.add(y.to),_.add(y.type);return{senders:Array.from(d).sort(),receivers:Array.from(m).sort(),types:Array.from(_).sort()}},[s]),N=[...s].reverse();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>l(!i),className:"flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[i?e.jsx(me,{className:"w-4 h-4"}):e.jsx(te,{className:"w-4 h-4"}),c({id:"team.timeline.title"}),e.jsxs("span",{className:"text-xs font-normal",children:["(",c({id:"team.timeline.showing"},{showing:s.length,total:t}),")"]})]}),x&&e.jsxs(k,{variant:"ghost",size:"sm",onClick:n,className:"h-6 text-xs gap-1",children:[e.jsx(xe,{className:"w-3 h-3"}),c({id:"team.timeline.clearFilters"})]})]}),i&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(W,{value:a.from??"__all__",onValueChange:d=>r({from:d==="__all__"?void 0:d}),children:[e.jsxs(I,{className:"w-[130px] h-7 text-xs",children:[e.jsx(es,{className:"w-3 h-3 mr-1"}),e.jsx(J,{placeholder:c({id:"team.timeline.filterFrom"})})]}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),g.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.to??"__all__",onValueChange:d=>r({to:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[130px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterTo"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),v.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.type??"__all__",onValueChange:d=>r({type:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[150px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterType"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),C.map(d=>e.jsx(D,{value:d,children:d},d))]})]})]}),e.jsx(L,{children:e.jsx(E,{className:"p-3",children:N.length>0?e.jsx("div",{className:"divide-y-0",children:N.map(d=>e.jsx(Ss,{msg:d},d.id))}):e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:c({id:"team.empty.noMessages"})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:c({id:"team.empty.noMessagesHint"})})]})})})]})]})}function pe(s){return s.endsWith(".json")?"json":s.endsWith(".md")?"markdown":s.endsWith(".txt")||s.endsWith(".log")||s.endsWith(".tsv")||s.endsWith(".csv")?"text":"unknown"}function ge(s){return s?s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`:""}function ks(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric"})}catch{return""}}function je({contentType:s}){return s==="json"?e.jsx(ts,{className:"w-4 h-4 text-blue-500"}):e.jsx(ae,{className:"w-4 h-4 text-gray-500"})}function ve({node:s,depth:t,expanded:a,selectedPath:r,onToggle:n,onSelect:i}){if(s.type==="directory"){const x=a.has(s.path);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",style:{paddingLeft:t*16+8},onClick:()=>n(s.path),children:[x?e.jsx(te,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(Re,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(ss,{className:j("w-4 h-4",x?"text-amber-500":"text-amber-400")}),e.jsx("span",{className:"text-sm truncate",children:s.name})]}),x&&s.children&&e.jsx("div",{children:s.children.map(g=>e.jsx(ve,{node:g,depth:t+1,expanded:a,selectedPath:r,onToggle:n,onSelect:i},g.path))})]},s.path)}const l=r===s.path,c=s.contentType||pe(s.path);return e.jsxs("div",{className:j("flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",l&&"bg-accent"),style:{paddingLeft:t*16+28},onClick:()=>i(s),children:[e.jsx(je,{contentType:c}),e.jsx("span",{className:"text-sm truncate flex-1",children:s.name}),s.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:ge(s.size)})]},s.path)}function Fs({teamName:s}){const{formatMessage:t}=T(),[a,r]=h.useState([]),[n,i]=h.useState(new Set),[l,c]=h.useState(null),[x,g]=h.useState(""),[v,C]=h.useState(!1),[N,d]=h.useState(!0),[m,_]=h.useState(null);h.useEffect(()=>{s&&(d(!0),_(null),De(s).then(f=>{r(f.tree||[]);const b=(f.tree||[]).filter(w=>w.type==="directory").map(w=>w.path);i(new Set(b))}).catch(f=>{console.error("Failed to load artifacts:",f),_(t({id:"team.artifacts.loadError",defaultMessage:"Failed to load artifacts"}))}).finally(()=>{d(!1)}))},[s,t]);const y=h.useCallback(f=>{i(b=>{const w=new Set(b);return w.has(f)?w.delete(f):w.add(f),w})},[]),F=h.useCallback(async f=>{if(f.type!=="directory"){c(f),C(!0),g("");try{const b=await $e(s,f.path);g(b.content)}catch(b){console.error("Failed to load file content:",b),g(t({id:"team.artifacts.contentError",defaultMessage:"Failed to load file content"}))}finally{C(!1)}}},[s,t]),A=l?l.contentType||pe(l.path):"text",M=A==="json"?"json":A==="markdown"?"markdown":"text";return N?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(H,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:t({id:"team.artifacts.loading",defaultMessage:"Loading artifacts..."})})]}):m?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:m})]}):a.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:t({id:"team.artifacts.noArtifacts",defaultMessage:"No artifacts yet"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t({id:"team.artifacts.emptyHint",defaultMessage:"Artifacts will appear here when the team generates them"})})]}):e.jsxs("div",{className:"flex h-[600px] border rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"w-72 shrink-0 border-r bg-muted/30 flex flex-col",children:[e.jsx("div",{className:"p-3 border-b bg-background shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Q,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium",children:t({id:"team.artifacts.title",defaultMessage:"Artifacts"})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:a.map(f=>e.jsx(ve,{node:f,depth:0,expanded:n,selectedPath:l==null?void 0:l.path,onToggle:y,onSelect:F},f.path))})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:l?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-3 border-b bg-muted/30 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{contentType:A}),e.jsx("span",{className:"text-sm font-medium truncate",children:l.name}),l.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:ge(l.size)}),l.modifiedAt&&e.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:ks(l.modifiedAt)})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:v?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(H,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e.jsx(Ls,{content:x,contentType:M})})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-center p-8",children:e.jsxs("div",{children:[e.jsx(ae,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:t({id:"team.artifacts.selectFile",defaultMessage:"Select a file to preview"})})]})})})]})}function q({data:s,depth:t=0}){if(s===null)return e.jsx("span",{className:"text-red-500 font-mono text-sm",children:"null"});if(s===void 0)return e.jsx("span",{className:"text-muted-foreground font-mono text-sm",children:"undefined"});if(typeof s=="boolean")return e.jsx("span",{className:j("font-mono text-sm",s?"text-orange-500":"text-red-500"),children:s?"true":"false"});if(typeof s=="number")return e.jsx("span",{className:"text-blue-500 font-mono text-sm",children:s});if(typeof s=="string")return s.length>200?e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm break-all",children:['"',s.slice(0,200),'..."']}):e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm",children:['"',s,'"']});if(Array.isArray(s))return s.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"[]"}):e.jsx("div",{className:"space-y-2",children:s.map((a,r)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(p,{variant:"outline",className:"text-xs shrink-0 mt-0.5",children:r}),e.jsx("div",{className:"flex-1 min-w-0",children:typeof a=="object"&&a!==null?e.jsx("div",{className:"bg-muted/30 rounded-lg p-2 border",children:e.jsx(q,{data:a,depth:t+1})}):e.jsx(q,{data:a,depth:t+1})})]},r))});if(typeof s=="object"){const a=Object.entries(s);return a.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"{}"}):e.jsx("div",{className:j("space-y-2",t>0&&"pl-2 border-l-2 border-border"),children:a.map(([r,n])=>{const i=typeof n=="object"&&n!==null,l=Array.isArray(n),c=l?n.length:i?Object.keys(n).length:0;return e.jsxs("div",{className:"group",children:[e.jsxs("div",{className:"flex items-center gap-2 py-1",children:[e.jsx("span",{className:"text-purple-600 dark:text-purple-400 font-medium text-sm shrink-0",children:r}),i&&e.jsx(p,{variant:"secondary",className:"text-[10px] h-4 px-1",children:l?`${c} items`:`${c} fields`})]}),e.jsx("div",{className:"ml-3",children:i?e.jsx("div",{className:"bg-muted/20 rounded-md p-2 border",children:e.jsx(q,{data:n,depth:t+1})}):e.jsx(q,{data:n,depth:t+1})})]},r)})})}return e.jsx("span",{className:"text-sm",children:String(s)})}function As({data:s}){const t=h.useMemo(()=>{const a={type:"",fields:0,items:0,depth:0},r=(n,i)=>{a.depth=Math.max(a.depth,i),Array.isArray(n)?(a.type="Array",a.items=n.length,n.forEach(l=>r(l,i+1))):typeof n=="object"&&n!==null&&(a.type="Object",a.fields=Object.keys(n).length,Object.values(n).forEach(l=>r(l,i+1)))};return r(s,0),a},[s]);return e.jsxs("div",{className:"flex items-center gap-4 p-3 bg-muted/50 rounded-lg mb-4 text-sm",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(p,{variant:"outline",children:t.type})}),t.type==="Object"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.fields})," fields"]}),t.type==="Array"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.items})," items"]}),e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.depth})," levels deep"]})]})}function Ls({content:s,contentType:t}){if(!s)return e.jsx("div",{className:"text-muted-foreground text-sm",children:"No content"});if(t==="json")try{const a=JSON.parse(s);return e.jsxs("div",{className:"space-y-2",children:[e.jsx(As,{data:a}),e.jsx("div",{className:"bg-card rounded-lg",children:e.jsx(q,{data:a})})]})}catch{return e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}return t==="markdown"?e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:e.jsx("pre",{className:"whitespace-pre-wrap break-words font-sans text-sm leading-relaxed bg-transparent p-0",children:s})}):e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}const Es={active:{variant:"info"},completed:{variant:"success"},archived:{variant:"secondary"}},oe={active:"team.status.active",completed:"team.status.completed",archived:"team.status.archived"};function Ps(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function Ds({team:s,onClick:t,onArchive:a,onUnarchive:r,onDelete:n,showActions:i=!0,actionsDisabled:l=!1,className:c}){const{formatMessage:x}=T(),{variant:g}=Es[s.status]||{variant:"default"},v=oe[s.status]?x({id:oe[s.status]}):s.status,C=s.status==="archived",N=m=>{m.target.closest("[data-radix-popper-content-wrapper]")||t==null||t(s.name)},d=(m,_)=>{switch(m.stopPropagation(),_){case"view":t==null||t(s.name);break;case"archive":a==null||a(s.name);break;case"unarchive":r==null||r(s.name);break;case"delete":n==null||n(s.name);break}};return e.jsx(L,{className:j("group cursor-pointer transition-all duration-200 hover:shadow-md hover:border-primary/30",c),onClick:N,children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("h3",{className:"font-bold text-card-foreground text-sm tracking-wide truncate",children:s.name})})}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(p,{variant:g,children:v}),s.pipeline_mode&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"h-3 w-3"}),s.pipeline_mode]}),i&&e.jsxs(qe,{children:[e.jsx(ze,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"icon",className:"h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity",onClick:m=>m.stopPropagation(),disabled:l,children:e.jsx(as,{className:"h-4 w-4"})})}),e.jsxs(Ve,{align:"end",children:[e.jsxs(B,{onClick:m=>d(m,"view"),children:[e.jsx(rs,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.viewDetails"})]}),e.jsx(re,{}),C?e.jsxs(B,{onClick:m=>d(m,"unarchive"),children:[e.jsx(ns,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.unarchive"})]}):e.jsxs(B,{onClick:m=>d(m,"archive"),children:[e.jsx(is,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.archive"})]}),e.jsx(re,{}),e.jsxs(B,{onClick:m=>d(m,"delete"),className:"text-destructive focus:text-destructive",children:[e.jsx(Be,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.delete"})]})]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s.messageCount," ",x({id:"team.card.messages"})]}),s.lastActivity&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Oe,{className:"h-3.5 w-3.5"}),Ps(s.lastActivity)]})]}),s.members&&s.members.length>0&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-2 flex-wrap",children:[e.jsx(U,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),s.members.map(m=>e.jsx(p,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-normal",children:m},m))]})]})})}function $s({className:s}){return e.jsx(L,{className:j("animate-pulse",s),children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"h-5 w-32 rounded bg-muted"})}),e.jsx("div",{className:"h-5 w-16 rounded-full bg-muted"})]}),e.jsxs("div",{className:"mt-3 flex gap-4",children:[e.jsx("div",{className:"h-4 w-24 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"})]})]})})}function Rs(){const{formatMessage:s}=T(),{locationFilter:t,setLocationFilter:a,searchQuery:r,setSearchQuery:n,selectTeamAndShowDetail:i}=z(),[l,c]=h.useState(!1),[x,g]=h.useState(null),{teams:v,isLoading:C,isFetching:N,refetch:d}=he(t),{archiveTeam:m,isArchiving:_}=ms(),{unarchiveTeam:y,isUnarchiving:F}=xs(),{deleteTeam:A,isDeleting:M}=us(),f=_||F||M,b=h.useMemo(()=>{if(!r)return v;const u=r.toLowerCase();return v.filter(P=>P.name.toLowerCase().includes(u))},[v,r]),w=async u=>{try{await m(u)}catch(P){console.error("Failed to archive team:",P)}},o=async u=>{try{await y(u)}catch(P){console.error("Failed to unarchive team:",P)}},$=u=>{g(u),c(!0)},R=async()=>{if(x)try{await A(x),c(!1),g(null)}catch(u){console.error("Failed to delete team:",u)}},V=()=>n("");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{className:"w-5 h-5"}),e.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:s({id:"team.title"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s({id:"team.description"})})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(k,{variant:"outline",size:"sm",onClick:()=>d(),disabled:N,children:[e.jsx(de,{className:j("h-4 w-4 mr-2",N&&"animate-spin")}),s({id:"common.actions.refresh"})]})})]}),e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsx(ue,{value:t,onValueChange:u=>a(u),tabs:[{value:"active",label:s({id:"team.filters.active"})},{value:"archived",label:s({id:"team.filters.archived"})},{value:"all",label:s({id:"team.filters.all"})}]}),e.jsxs("div",{className:"flex-1 max-w-sm relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(Qe,{placeholder:s({id:"team.searchPlaceholder"}),value:r,onChange:u=>n(u.target.value),className:"pl-9 pr-9"}),r&&e.jsx("button",{onClick:V,className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:e.jsx(xe,{className:"h-4 w-4"})})]})]}),C?e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((u,P)=>e.jsx($s,{},P))}):b.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 border border-dashed border-border rounded-lg",children:[e.jsx(U,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:s(r?{id:"team.emptyState.noMatching"}:{id:"team.emptyState.noTeams"})}),e.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-4",children:s(r?{id:"team.emptyState.noMatchingDescription"}:{id:"team.emptyState.noTeamsDescription"})}),r&&e.jsx(k,{variant:"outline",onClick:V,children:s({id:"common.actions.clearFilters"})})]}):e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:b.map(u=>e.jsx(Ds,{team:u,onClick:i,onArchive:w,onUnarchive:o,onDelete:$,actionsDisabled:f},u.name))}),e.jsx(Ue,{open:l,onOpenChange:c,children:e.jsxs(We,{children:[e.jsxs(Ie,{children:[e.jsx(Je,{children:s({id:"team.dialog.deleteTeam"})}),e.jsx(Ge,{children:s({id:"team.dialog.deleteConfirm"})})]}),e.jsxs(He,{children:[e.jsx(k,{variant:"outline",onClick:()=>{c(!1),g(null)},children:s({id:"team.dialog.cancel"})}),e.jsx(k,{variant:"destructive",onClick:R,disabled:M,children:s(M?{id:"team.dialog.deleting"}:{id:"team.actions.delete"})})]})]})})]})}const qs=["plan","impl","test","review"];function O(s){return s?s.charAt(0).toUpperCase()+s.slice(1).toLowerCase():""}function K(s,t){const a=s.toLowerCase(),r=t.filter(l=>{const c=l.from.toLowerCase();return c===a||c.startsWith(a)});if(r.length===0)return"pending";const n=r[r.length-1];return["shutdown","impl_complete","review_result","test_result"].includes(n.type)?"completed":n.type==="error"?"blocked":"in_progress"}function zs(s,t){if(s.pipeline_stages&&s.pipeline_stages.length>0)return s.pipeline_stages.map(a=>{var l;const r=a.toUpperCase(),n=a.toLowerCase(),i=(l=s.roles)==null?void 0:l.find(c=>c.toLowerCase().startsWith(n));return{id:r,label:O(a),role:i,status:K(a,t)}});if(s.roles&&s.roles.length>0){const a=s.roles.filter(r=>r.toLowerCase()!=="coordinator");if(a.length>0)return a.map(r=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}if(t.length>0){const a=new Map;for(const r of t){const n=r.from;if(n.toLowerCase()==="coordinator")continue;const i=n.toLowerCase();a.has(i)||a.set(i,n)}if(a.size>0)return Array.from(a.entries()).map(([,r])=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}return qs.map(a=>({id:a.toUpperCase(),label:O(a),role:void 0,status:K(a,t)}))}function Vs(s){if(!s||Object.keys(s).length===0)return null;const t=s.coordinator;return!t||typeof t.current_phase!="number"?null:{currentPhase:t.current_phase,totalPhases:typeof t.total_phases=="number"?t.total_phases:null,currentStep:typeof t.current_step=="string"?t.current_step:null,gapIteration:typeof t.gap_iteration=="number"?t.gap_iteration:0}}function et(){const{formatMessage:s}=T(),{selectedTeam:t,viewMode:a,autoRefresh:r,toggleAutoRefresh:n,messageFilter:i,setMessageFilter:l,clearMessageFilter:c,timelineExpanded:x,setTimelineExpanded:g,detailTab:v,setDetailTab:C,backToList:N,locationFilter:d}=z(),m=ne(Xe),_=ne(u=>u.toggleImmersiveMode),{teams:y,error:F,isLoading:A}=he(d),{messages:M,total:f}=os(a==="detail"?t:null,i),{members:b,totalMessages:w}=ds(a==="detail"?t:null),o=h.useMemo(()=>y.find(u=>u.name===t),[y,t]);h.useEffect(()=>{a==="detail"&&t&&!A&&y.length>0&&!o&&N()},[a,t,A,y.length,o,N]);const $=h.useMemo(()=>zs({pipeline_stages:o==null?void 0:o.pipeline_stages,role_state:o==null?void 0:o.role_state,roles:o==null?void 0:o.roles},M),[o==null?void 0:o.pipeline_stages,o==null?void 0:o.role_state,o==null?void 0:o.roles,M]),R=h.useMemo(()=>Vs(o==null?void 0:o.role_state),[o==null?void 0:o.role_state]);if(F&&a==="detail")return e.jsx("div",{className:"flex items-center justify-center min-h-[400px] p-8",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"mb-4",children:e.jsx(Ye,{className:"w-16 h-16 mx-auto text-destructive"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:s({id:"team.error.loadFailed"})}),e.jsx("p",{className:"text-muted-foreground mb-6",children:F instanceof Error?F.message:String(F)}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsx(k,{onClick:N,variant:"default",children:s({id:"team.detail.backToList"})}),e.jsx(k,{onClick:()=>window.location.reload(),variant:"outline",children:s({id:"common.actions.retry"})})]})]})});if(a==="list"||!t||a==="detail"&&y.length>0&&!o)return e.jsx("div",{className:"space-y-6",children:e.jsx(Rs,{})});const V=[{value:"pipeline",label:s({id:"team.tabs.pipeline"}),icon:e.jsx(se,{className:"h-4 w-4"})},{value:"artifacts",label:s({id:"team.tabs.artifacts"}),icon:e.jsx(Q,{className:"h-4 w-4"})},{value:"messages",label:s({id:"team.tabs.messages"}),icon:e.jsx(ee,{className:"h-4 w-4"})}];return e.jsxs("div",{className:j("space-y-6",m&&"h-screen overflow-hidden"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(hs,{selectedTeam:t,onBack:N,members:b,totalMessages:w,autoRefresh:r,onToggleAutoRefresh:n,skillType:o!=null&&o.team_name?`team-${o.team_name}`:void 0,pipelineMode:o==null?void 0:o.pipeline_mode}),e.jsx("button",{onClick:_,className:j("p-2 rounded-md transition-colors",m?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:m?"Exit Fullscreen":"Fullscreen",children:m?e.jsx(ls,{className:"w-4 h-4"}):e.jsx(cs,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsx(L,{className:"lg:col-span-2 flex flex-col",children:e.jsx(E,{className:"p-4 flex-1",children:e.jsx(gs,{stages:$,phaseInfo:R})})}),e.jsx(L,{children:e.jsx(E,{className:"p-4",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})})]}),R&&e.jsx(_s,{phaseInfo:R}),e.jsx(ue,{value:v,onValueChange:u=>C(u),tabs:V}),v==="pipeline"&&e.jsx(L,{children:e.jsx(E,{className:"p-6",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})}),v==="artifacts"&&e.jsx(Fs,{teamName:t}),v==="messages"&&e.jsx(Ms,{messages:M,total:f,filter:i,onFilterChange:l,onClearFilter:c,expanded:x,onExpandedChange:g})]})}export{et as TeamPage,et as default};
2
- //# sourceMappingURL=TeamPage-BJgjxBgb.js.map
1
+ import{ek as Ne,el as be,em as ye,ab as X,aF as Y,aH as Z,en as we,eo as Te,ep as _e,eq as Ce,er as Se,es as Me,u as T,j as e,e as k,J as ke,B as p,cB as U,aV as ee,a1 as se,bu as Fe,R as de,et as Ae,eu as Le,ad as Ee,N as H,k as Pe,c as j,C as L,a as E,r as h,cz as me,ap as te,X as xe,aq as W,ar as I,as as J,at as G,au as D,ev as De,ew as $e,ao as Re,D as qe,d as ze,f as Be,g as V,h as re,T as Ve,l as Oe,b as Ke,I as Qe,x as Ue,y as We,z as Ie,A as Je,E as Ge,G as He,o as ne,s as Xe,aw as Ye}from"./index-BUol9HDD.js";import{T as ue}from"./TabsNavigation-CPh6Zor1.js";import{S as Ze}from"./Switch-CYSPdqWk.js";import{F as es}from"./filter-D-7PhZjx.js";import{F as ae}from"./file-text-Byn2_2v6.js";import{P as Q}from"./package-DrNgkamn.js";import{F as ss}from"./folder-BoAsK_FL.js";import{F as ts}from"./file-json-NI237wA-.js";import{E as as}from"./ellipsis-vertical-C1Ij47Yz.js";import{E as rs}from"./eye-C6MOB7Au.js";import{A as ns}from"./archive-restore-2vZa9Ic3.js";import{A as is}from"./archive-CjwVpw6k.js";import{M as ls,a as cs}from"./minimize-2-CWkphauf.js";const z=Ne()(be(ye(s=>({selectedTeam:null,autoRefresh:!0,messageFilter:{},timelineExpanded:!0,viewMode:"list",locationFilter:"active",searchQuery:"",detailTab:"pipeline",setSelectedTeam:t=>s({selectedTeam:t}),toggleAutoRefresh:()=>s(t=>({autoRefresh:!t.autoRefresh})),setMessageFilter:t=>s(a=>({messageFilter:{...a.messageFilter,...t}})),clearMessageFilter:()=>s({messageFilter:{}}),setTimelineExpanded:t=>s({timelineExpanded:t}),setViewMode:t=>s({viewMode:t}),setLocationFilter:t=>s({locationFilter:t}),setSearchQuery:t=>s({searchQuery:t}),setDetailTab:t=>s({detailTab:t}),selectTeamAndShowDetail:t=>s({selectedTeam:t,viewMode:"detail",detailTab:"pipeline"}),backToList:()=>s({viewMode:"list",detailTab:"pipeline"})}),{name:"ccw-team-store"}),{name:"TeamStore"})),S={all:["teams"],lists:()=>[...S.all,"list"],listByLocation:s=>[...S.lists(),s],messages:(s,t)=>[...S.all,"messages",s,t],status:s=>[...S.all,"status",s]};function he(s){var n;const t=z(i=>i.autoRefresh),a=s||"active",r=X({queryKey:S.listByLocation(a),queryFn:async()=>({teams:(await Ce(a)).teams??[]}),staleTime:1e4,refetchInterval:t?1e4:!1});return{teams:((n=r.data)==null?void 0:n.teams)??[],isLoading:r.isLoading,isFetching:r.isFetching,error:r.error,refetch:r.refetch}}function os(s,t,a){var i,l;const r=z(c=>c.autoRefresh),n=X({queryKey:S.messages(s??"",t),queryFn:async()=>{if(!s)return{total:0,showing:0,messages:[]};const c=await Se(s,{...t,last:50});return{total:c.total,showing:c.showing,messages:c.messages}},enabled:!!s,staleTime:5e3,refetchInterval:r?5e3:!1});return{messages:((i=n.data)==null?void 0:i.messages)??[],total:((l=n.data)==null?void 0:l.total)??0,isLoading:n.isLoading,error:n.error,refetch:n.refetch}}function ds(s){var r,n;const t=z(i=>i.autoRefresh),a=X({queryKey:S.status(s??""),queryFn:async()=>{if(!s)return{members:[],total_messages:0};const i=await Me(s);return{members:i.members,total_messages:i.total_messages}},enabled:!!s,staleTime:5e3,refetchInterval:t?5e3:!1});return{members:((r=a.data)==null?void 0:r.members)??[],totalMessages:((n=a.data)==null?void 0:n.total_messages)??0,isLoading:a.isLoading,error:a.error,refetch:a.refetch}}function ms(){const s=Y(),t=Z({mutationFn:we,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{archiveTeam:t.mutateAsync,isArchiving:t.isPending,error:t.error}}function xs(){const s=Y(),t=Z({mutationFn:Te,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{unarchiveTeam:t.mutateAsync,isUnarchiving:t.isPending,error:t.error}}function us(){const s=Y(),t=Z({mutationFn:_e,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{deleteTeam:t.mutateAsync,isDeleting:t.isPending,error:t.error}}function hs({selectedTeam:s,onBack:t,members:a,totalMessages:r,autoRefresh:n,onToggleAutoRefresh:i,skillType:l,pipelineMode:c}){const{formatMessage:x}=T();return e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs(k,{variant:"ghost",size:"sm",onClick:t,className:"gap-1",children:[e.jsx(ke,{className:"h-4 w-4"}),x({id:"team.detail.backToList"})]}),s&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(U,{className:"w-3 h-3"}),x({id:"team.members"}),": ",a.length]}),e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(ee,{className:"w-3 h-3"}),x({id:"team.messages"}),": ",r]})]}),(l||c)&&e.jsxs("div",{className:"flex items-center gap-2",children:[l&&e.jsx(p,{variant:"outline",className:"gap-1",children:l}),c&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"w-3 h-3"}),c]})]})]})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{id:"auto-refresh",checked:n,onCheckedChange:i}),e.jsx(Fe,{htmlFor:"auto-refresh",className:"text-sm text-muted-foreground cursor-pointer",children:x({id:"team.autoRefresh"})}),n&&e.jsx(de,{className:"w-3.5 h-3.5 text-primary animate-spin",style:{animationDuration:"3s"}})]})})]})}const fe={completed:{icon:Pe,color:"text-green-500",bg:"bg-green-500/10 border-green-500/30"},in_progress:{icon:H,color:"text-blue-500",bg:"bg-blue-500/10 border-blue-500/30",animate:!0},pending:{icon:Ee,color:"text-muted-foreground",bg:"bg-muted border-border"},blocked:{icon:Le,color:"text-red-500",bg:"bg-red-500/10 border-red-500/30"},skipped:{icon:Ae,color:"text-yellow-500",bg:"bg-yellow-500/10 border-yellow-500/30"}},fs=["completed","in_progress","pending","blocked","skipped"];function ie({stage:s}){const{formatMessage:t}=T(),a=fe[s.status],r=a.icon,n=s.status==="in_progress"?"inProgress":s.status;return e.jsxs("div",{className:j("flex flex-col items-center gap-1.5 px-4 py-3 rounded-lg border-2 min-w-[90px] transition-all",a.bg),children:[e.jsx(r,{className:j("w-5 h-5",a.color,a.animate&&"animate-spin"),style:a.animate?{animationDuration:"2s"}:void 0}),e.jsx("span",{className:"text-xs font-medium",children:s.label}),e.jsx("span",{className:j("text-[10px]",a.color),children:t({id:`team.pipeline.${n}`})}),s.role&&e.jsx("span",{className:"text-[10px] text-muted-foreground truncate max-w-[80px]",children:s.role})]})}function ps(){return e.jsxs("div",{className:"flex items-center px-1",children:[e.jsx("div",{className:"w-6 h-0.5 bg-border"}),e.jsx("div",{className:"w-0 h-0 border-t-[4px] border-t-transparent border-b-[4px] border-b-transparent border-l-[6px] border-l-border"})]})}function gs({stages:s,phaseInfo:t}){const{formatMessage:a}=T();return s.length===0?e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground text-center py-8",children:a({id:"team.pipeline.noStages"})})]}):e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"space-y-3 flex-1",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),t&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.phase"}),": ",t.currentPhase,t.totalPhases!=null&&`/${t.totalPhases}`]}),t.currentStep&&e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.step"}),": ",t.currentStep]}),t.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[a({id:"team.coordinates.gap"}),": ",t.gapIteration]})]}),e.jsx("div",{className:"hidden sm:flex items-center gap-0",children:s.map((r,n)=>e.jsxs("div",{className:"flex items-center",children:[n>0&&e.jsx(ps,{}),e.jsx(ie,{stage:r})]},r.id))}),e.jsx("div",{className:"flex sm:hidden flex-col items-center gap-2",children:s.map(r=>e.jsx(ie,{stage:r},r.id))})]}),e.jsx("div",{className:"flex flex-wrap gap-3 text-[10px] text-muted-foreground mt-auto pt-3 border-t border-border",children:fs.map(r=>{const n=fe[r],i=n.icon,l=r==="in_progress"?"inProgress":r;return e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(i,{className:j("w-3 h-3",n.color)}),a({id:`team.pipeline.${l}`})]},r)})})]})}function js(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function vs(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function Ns({members:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:t({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(a=>{const r=vs(a),n=r==="active";return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",n?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:a.member}),e.jsx(p,{variant:n?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:t({id:`team.membersPanel.${r}`})})]}),a.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:a.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[a.messageCount," ",t({id:"team.messages"}).toLowerCase()]}),a.lastSeen&&e.jsxs("span",{children:[js(a.lastSeen)," ",t({id:"team.membersPanel.ago"})]})]})]})]})})},a.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:t({id:"team.empty.noMessages"})})]})]})}function bs(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function ys(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function ws(s,t){const a=s.member.toLowerCase();return t.find(r=>r.role&&r.role.toLowerCase()===a||r.id.toLowerCase()===a)}const Ts={completed:"success",in_progress:"info",pending:"secondary",blocked:"destructive",skipped:"warning"};function le({members:s,stages:t,roleState:a}){const{formatMessage:r}=T();return t.length===0?e.jsx(Ns,{members:s}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:r({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(n=>{const i=ys(n),l=i==="active",c=ws(n,t);return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",l?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:n.member}),e.jsx(p,{variant:l?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:r({id:`team.membersPanel.${i}`})}),c&&e.jsx(p,{variant:Ts[c.status]??"secondary",className:"text-[10px] px-1.5 py-0",children:c.label})]}),n.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[n.messageCount," ",r({id:"team.messages"}).toLowerCase()]}),n.lastSeen&&e.jsxs("span",{children:[bs(n.lastSeen)," ",r({id:"team.membersPanel.ago"})]})]})]})]})})},n.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:r({id:"team.empty.noMessages"})})]})]})}function _s({phaseInfo:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.phase"}),": ",s.currentPhase,s.totalPhases!=null&&`/${s.totalPhases}`]}),s.currentStep&&e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.step"}),": ",s.currentStep]}),s.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[t({id:"team.coordinates.gap"}),": ",s.gapIteration]})]})}const ce={plan_ready:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_approved:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_revision:"bg-amber-500/15 text-amber-600 dark:text-amber-400 border-amber-500/30",task_unblocked:"bg-cyan-500/15 text-cyan-600 dark:text-cyan-400 border-cyan-500/30",impl_complete:"bg-primary/15 text-primary border-primary/30",impl_progress:"bg-primary/15 text-primary border-primary/30",test_result:"bg-green-500/15 text-green-600 dark:text-green-400 border-green-500/30",review_result:"bg-purple-500/15 text-purple-600 dark:text-purple-400 border-purple-500/30",fix_required:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",error:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",shutdown:"bg-muted text-muted-foreground border-border",message:"bg-muted text-muted-foreground border-border"};function Cs({type:s}){const{formatMessage:t}=T(),a=ce[s]||ce.message,r=`team.messageType.${s}`;let n;try{n=t({id:r})}catch{n=s}return e.jsx("span",{className:j("text-[10px] px-1.5 py-0.5 rounded border font-medium",a),children:n})}function Ss({msg:s}){var n,i;const[t,a]=h.useState(!1),r=s.ts?s.ts.substring(11,19):"";return e.jsxs("div",{className:"flex gap-3 py-2.5 border-b border-border last:border-b-0 animate-in fade-in slide-in-from-top-1 duration-300",children:[e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground w-16 shrink-0 pt-0.5",children:r}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xs font-medium",children:s.from}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),e.jsx("span",{className:"text-xs font-medium",children:s.to}),e.jsx(Cs,{type:s.type}),s.id&&e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.id})]}),e.jsx("p",{className:"text-xs text-foreground/80",children:s.summary}),(s.ref||((n=s.data)==null?void 0:n.ref))&&e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[e.jsx(ae,{className:"w-3 h-3"}),e.jsx("span",{className:"font-mono truncate",children:s.ref||((i=s.data)==null?void 0:i.ref)})]}),s.data&&Object.keys(s.data).length>0&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>a(!t),className:"text-[10px] text-primary hover:underline flex items-center gap-0.5",children:t?e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-3 h-3"})," collapse"]}):e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"w-3 h-3"})," data"]})}),t&&e.jsx("pre",{className:"text-[10px] bg-muted p-2 rounded mt-1 overflow-x-auto max-h-40",children:JSON.stringify(s.data,null,2)})]})]})]})}function Ms({messages:s,total:t,filter:a,onFilterChange:r,onClearFilter:n,expanded:i,onExpandedChange:l}){const{formatMessage:c}=T(),x=!!(a.from||a.to||a.type),{senders:g,receivers:v,types:C}=h.useMemo(()=>{const d=new Set,m=new Set,_=new Set;for(const y of s)d.add(y.from),m.add(y.to),_.add(y.type);return{senders:Array.from(d).sort(),receivers:Array.from(m).sort(),types:Array.from(_).sort()}},[s]),N=[...s].reverse();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>l(!i),className:"flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[i?e.jsx(me,{className:"w-4 h-4"}):e.jsx(te,{className:"w-4 h-4"}),c({id:"team.timeline.title"}),e.jsxs("span",{className:"text-xs font-normal",children:["(",c({id:"team.timeline.showing"},{showing:s.length,total:t}),")"]})]}),x&&e.jsxs(k,{variant:"ghost",size:"sm",onClick:n,className:"h-6 text-xs gap-1",children:[e.jsx(xe,{className:"w-3 h-3"}),c({id:"team.timeline.clearFilters"})]})]}),i&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(W,{value:a.from??"__all__",onValueChange:d=>r({from:d==="__all__"?void 0:d}),children:[e.jsxs(I,{className:"w-[130px] h-7 text-xs",children:[e.jsx(es,{className:"w-3 h-3 mr-1"}),e.jsx(J,{placeholder:c({id:"team.timeline.filterFrom"})})]}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),g.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.to??"__all__",onValueChange:d=>r({to:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[130px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterTo"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),v.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.type??"__all__",onValueChange:d=>r({type:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[150px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterType"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),C.map(d=>e.jsx(D,{value:d,children:d},d))]})]})]}),e.jsx(L,{children:e.jsx(E,{className:"p-3",children:N.length>0?e.jsx("div",{className:"divide-y-0",children:N.map(d=>e.jsx(Ss,{msg:d},d.id))}):e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:c({id:"team.empty.noMessages"})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:c({id:"team.empty.noMessagesHint"})})]})})})]})]})}function pe(s){return s.endsWith(".json")?"json":s.endsWith(".md")?"markdown":s.endsWith(".txt")||s.endsWith(".log")||s.endsWith(".tsv")||s.endsWith(".csv")?"text":"unknown"}function ge(s){return s?s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`:""}function ks(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric"})}catch{return""}}function je({contentType:s}){return s==="json"?e.jsx(ts,{className:"w-4 h-4 text-blue-500"}):e.jsx(ae,{className:"w-4 h-4 text-gray-500"})}function ve({node:s,depth:t,expanded:a,selectedPath:r,onToggle:n,onSelect:i}){if(s.type==="directory"){const x=a.has(s.path);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",style:{paddingLeft:t*16+8},onClick:()=>n(s.path),children:[x?e.jsx(te,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(Re,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(ss,{className:j("w-4 h-4",x?"text-amber-500":"text-amber-400")}),e.jsx("span",{className:"text-sm truncate",children:s.name})]}),x&&s.children&&e.jsx("div",{children:s.children.map(g=>e.jsx(ve,{node:g,depth:t+1,expanded:a,selectedPath:r,onToggle:n,onSelect:i},g.path))})]},s.path)}const l=r===s.path,c=s.contentType||pe(s.path);return e.jsxs("div",{className:j("flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",l&&"bg-accent"),style:{paddingLeft:t*16+28},onClick:()=>i(s),children:[e.jsx(je,{contentType:c}),e.jsx("span",{className:"text-sm truncate flex-1",children:s.name}),s.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:ge(s.size)})]},s.path)}function Fs({teamName:s}){const{formatMessage:t}=T(),[a,r]=h.useState([]),[n,i]=h.useState(new Set),[l,c]=h.useState(null),[x,g]=h.useState(""),[v,C]=h.useState(!1),[N,d]=h.useState(!0),[m,_]=h.useState(null);h.useEffect(()=>{s&&(d(!0),_(null),De(s).then(f=>{r(f.tree||[]);const b=(f.tree||[]).filter(w=>w.type==="directory").map(w=>w.path);i(new Set(b))}).catch(f=>{console.error("Failed to load artifacts:",f),_(t({id:"team.artifacts.loadError",defaultMessage:"Failed to load artifacts"}))}).finally(()=>{d(!1)}))},[s,t]);const y=h.useCallback(f=>{i(b=>{const w=new Set(b);return w.has(f)?w.delete(f):w.add(f),w})},[]),F=h.useCallback(async f=>{if(f.type!=="directory"){c(f),C(!0),g("");try{const b=await $e(s,f.path);g(b.content)}catch(b){console.error("Failed to load file content:",b),g(t({id:"team.artifacts.contentError",defaultMessage:"Failed to load file content"}))}finally{C(!1)}}},[s,t]),A=l?l.contentType||pe(l.path):"text",M=A==="json"?"json":A==="markdown"?"markdown":"text";return N?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(H,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:t({id:"team.artifacts.loading",defaultMessage:"Loading artifacts..."})})]}):m?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:m})]}):a.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:t({id:"team.artifacts.noArtifacts",defaultMessage:"No artifacts yet"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t({id:"team.artifacts.emptyHint",defaultMessage:"Artifacts will appear here when the team generates them"})})]}):e.jsxs("div",{className:"flex h-[600px] border rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"w-72 shrink-0 border-r bg-muted/30 flex flex-col",children:[e.jsx("div",{className:"p-3 border-b bg-background shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Q,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium",children:t({id:"team.artifacts.title",defaultMessage:"Artifacts"})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:a.map(f=>e.jsx(ve,{node:f,depth:0,expanded:n,selectedPath:l==null?void 0:l.path,onToggle:y,onSelect:F},f.path))})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:l?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-3 border-b bg-muted/30 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{contentType:A}),e.jsx("span",{className:"text-sm font-medium truncate",children:l.name}),l.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:ge(l.size)}),l.modifiedAt&&e.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:ks(l.modifiedAt)})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:v?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(H,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e.jsx(Ls,{content:x,contentType:M})})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-center p-8",children:e.jsxs("div",{children:[e.jsx(ae,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:t({id:"team.artifacts.selectFile",defaultMessage:"Select a file to preview"})})]})})})]})}function q({data:s,depth:t=0}){if(s===null)return e.jsx("span",{className:"text-red-500 font-mono text-sm",children:"null"});if(s===void 0)return e.jsx("span",{className:"text-muted-foreground font-mono text-sm",children:"undefined"});if(typeof s=="boolean")return e.jsx("span",{className:j("font-mono text-sm",s?"text-orange-500":"text-red-500"),children:s?"true":"false"});if(typeof s=="number")return e.jsx("span",{className:"text-blue-500 font-mono text-sm",children:s});if(typeof s=="string")return s.length>200?e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm break-all",children:['"',s.slice(0,200),'..."']}):e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm",children:['"',s,'"']});if(Array.isArray(s))return s.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"[]"}):e.jsx("div",{className:"space-y-2",children:s.map((a,r)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(p,{variant:"outline",className:"text-xs shrink-0 mt-0.5",children:r}),e.jsx("div",{className:"flex-1 min-w-0",children:typeof a=="object"&&a!==null?e.jsx("div",{className:"bg-muted/30 rounded-lg p-2 border",children:e.jsx(q,{data:a,depth:t+1})}):e.jsx(q,{data:a,depth:t+1})})]},r))});if(typeof s=="object"){const a=Object.entries(s);return a.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"{}"}):e.jsx("div",{className:j("space-y-2",t>0&&"pl-2 border-l-2 border-border"),children:a.map(([r,n])=>{const i=typeof n=="object"&&n!==null,l=Array.isArray(n),c=l?n.length:i?Object.keys(n).length:0;return e.jsxs("div",{className:"group",children:[e.jsxs("div",{className:"flex items-center gap-2 py-1",children:[e.jsx("span",{className:"text-purple-600 dark:text-purple-400 font-medium text-sm shrink-0",children:r}),i&&e.jsx(p,{variant:"secondary",className:"text-[10px] h-4 px-1",children:l?`${c} items`:`${c} fields`})]}),e.jsx("div",{className:"ml-3",children:i?e.jsx("div",{className:"bg-muted/20 rounded-md p-2 border",children:e.jsx(q,{data:n,depth:t+1})}):e.jsx(q,{data:n,depth:t+1})})]},r)})})}return e.jsx("span",{className:"text-sm",children:String(s)})}function As({data:s}){const t=h.useMemo(()=>{const a={type:"",fields:0,items:0,depth:0},r=(n,i)=>{a.depth=Math.max(a.depth,i),Array.isArray(n)?(a.type="Array",a.items=n.length,n.forEach(l=>r(l,i+1))):typeof n=="object"&&n!==null&&(a.type="Object",a.fields=Object.keys(n).length,Object.values(n).forEach(l=>r(l,i+1)))};return r(s,0),a},[s]);return e.jsxs("div",{className:"flex items-center gap-4 p-3 bg-muted/50 rounded-lg mb-4 text-sm",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(p,{variant:"outline",children:t.type})}),t.type==="Object"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.fields})," fields"]}),t.type==="Array"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.items})," items"]}),e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.depth})," levels deep"]})]})}function Ls({content:s,contentType:t}){if(!s)return e.jsx("div",{className:"text-muted-foreground text-sm",children:"No content"});if(t==="json")try{const a=JSON.parse(s);return e.jsxs("div",{className:"space-y-2",children:[e.jsx(As,{data:a}),e.jsx("div",{className:"bg-card rounded-lg",children:e.jsx(q,{data:a})})]})}catch{return e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}return t==="markdown"?e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:e.jsx("pre",{className:"whitespace-pre-wrap break-words font-sans text-sm leading-relaxed bg-transparent p-0",children:s})}):e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}const Es={active:{variant:"info"},completed:{variant:"success"},archived:{variant:"secondary"}},oe={active:"team.status.active",completed:"team.status.completed",archived:"team.status.archived"};function Ps(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function Ds({team:s,onClick:t,onArchive:a,onUnarchive:r,onDelete:n,showActions:i=!0,actionsDisabled:l=!1,className:c}){const{formatMessage:x}=T(),{variant:g}=Es[s.status]||{variant:"default"},v=oe[s.status]?x({id:oe[s.status]}):s.status,C=s.status==="archived",N=m=>{m.target.closest("[data-radix-popper-content-wrapper]")||t==null||t(s.name)},d=(m,_)=>{switch(m.stopPropagation(),_){case"view":t==null||t(s.name);break;case"archive":a==null||a(s.name);break;case"unarchive":r==null||r(s.name);break;case"delete":n==null||n(s.name);break}};return e.jsx(L,{className:j("group cursor-pointer transition-all duration-200 hover:shadow-md hover:border-primary/30",c),onClick:N,children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("h3",{className:"font-bold text-card-foreground text-sm tracking-wide truncate",children:s.name})})}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(p,{variant:g,children:v}),s.pipeline_mode&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"h-3 w-3"}),s.pipeline_mode]}),i&&e.jsxs(qe,{children:[e.jsx(ze,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"icon",className:"h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity",onClick:m=>m.stopPropagation(),disabled:l,children:e.jsx(as,{className:"h-4 w-4"})})}),e.jsxs(Be,{align:"end",children:[e.jsxs(V,{onClick:m=>d(m,"view"),children:[e.jsx(rs,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.viewDetails"})]}),e.jsx(re,{}),C?e.jsxs(V,{onClick:m=>d(m,"unarchive"),children:[e.jsx(ns,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.unarchive"})]}):e.jsxs(V,{onClick:m=>d(m,"archive"),children:[e.jsx(is,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.archive"})]}),e.jsx(re,{}),e.jsxs(V,{onClick:m=>d(m,"delete"),className:"text-destructive focus:text-destructive",children:[e.jsx(Ve,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.delete"})]})]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s.messageCount," ",x({id:"team.card.messages"})]}),s.lastActivity&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Oe,{className:"h-3.5 w-3.5"}),Ps(s.lastActivity)]})]}),s.members&&s.members.length>0&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-2 flex-wrap",children:[e.jsx(U,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),s.members.map(m=>e.jsx(p,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-normal",children:m},m))]})]})})}function $s({className:s}){return e.jsx(L,{className:j("animate-pulse",s),children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"h-5 w-32 rounded bg-muted"})}),e.jsx("div",{className:"h-5 w-16 rounded-full bg-muted"})]}),e.jsxs("div",{className:"mt-3 flex gap-4",children:[e.jsx("div",{className:"h-4 w-24 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"})]})]})})}function Rs(){const{formatMessage:s}=T(),{locationFilter:t,setLocationFilter:a,searchQuery:r,setSearchQuery:n,selectTeamAndShowDetail:i}=z(),[l,c]=h.useState(!1),[x,g]=h.useState(null),{teams:v,isLoading:C,isFetching:N,refetch:d}=he(t),{archiveTeam:m,isArchiving:_}=ms(),{unarchiveTeam:y,isUnarchiving:F}=xs(),{deleteTeam:A,isDeleting:M}=us(),f=_||F||M,b=h.useMemo(()=>{if(!r)return v;const u=r.toLowerCase();return v.filter(P=>P.name.toLowerCase().includes(u))},[v,r]),w=async u=>{try{await m(u)}catch(P){console.error("Failed to archive team:",P)}},o=async u=>{try{await y(u)}catch(P){console.error("Failed to unarchive team:",P)}},$=u=>{g(u),c(!0)},R=async()=>{if(x)try{await A(x),c(!1),g(null)}catch(u){console.error("Failed to delete team:",u)}},B=()=>n("");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{className:"w-5 h-5"}),e.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:s({id:"team.title"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s({id:"team.description"})})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(k,{variant:"outline",size:"sm",onClick:()=>d(),disabled:N,children:[e.jsx(de,{className:j("h-4 w-4 mr-2",N&&"animate-spin")}),s({id:"common.actions.refresh"})]})})]}),e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsx(ue,{value:t,onValueChange:u=>a(u),tabs:[{value:"active",label:s({id:"team.filters.active"})},{value:"archived",label:s({id:"team.filters.archived"})},{value:"all",label:s({id:"team.filters.all"})}]}),e.jsxs("div",{className:"flex-1 max-w-sm relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(Qe,{placeholder:s({id:"team.searchPlaceholder"}),value:r,onChange:u=>n(u.target.value),className:"pl-9 pr-9"}),r&&e.jsx("button",{onClick:B,className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:e.jsx(xe,{className:"h-4 w-4"})})]})]}),C?e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((u,P)=>e.jsx($s,{},P))}):b.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 border border-dashed border-border rounded-lg",children:[e.jsx(U,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:s(r?{id:"team.emptyState.noMatching"}:{id:"team.emptyState.noTeams"})}),e.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-4",children:s(r?{id:"team.emptyState.noMatchingDescription"}:{id:"team.emptyState.noTeamsDescription"})}),r&&e.jsx(k,{variant:"outline",onClick:B,children:s({id:"common.actions.clearFilters"})})]}):e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:b.map(u=>e.jsx(Ds,{team:u,onClick:i,onArchive:w,onUnarchive:o,onDelete:$,actionsDisabled:f},u.name))}),e.jsx(Ue,{open:l,onOpenChange:c,children:e.jsxs(We,{children:[e.jsxs(Ie,{children:[e.jsx(Je,{children:s({id:"team.dialog.deleteTeam"})}),e.jsx(Ge,{children:s({id:"team.dialog.deleteConfirm"})})]}),e.jsxs(He,{children:[e.jsx(k,{variant:"outline",onClick:()=>{c(!1),g(null)},children:s({id:"team.dialog.cancel"})}),e.jsx(k,{variant:"destructive",onClick:R,disabled:M,children:s(M?{id:"team.dialog.deleting"}:{id:"team.actions.delete"})})]})]})})]})}const qs=["plan","impl","test","review"];function O(s){return s?s.charAt(0).toUpperCase()+s.slice(1).toLowerCase():""}function K(s,t){const a=s.toLowerCase(),r=t.filter(l=>{const c=l.from.toLowerCase();return c===a||c.startsWith(a)});if(r.length===0)return"pending";const n=r[r.length-1];return["shutdown","impl_complete","review_result","test_result"].includes(n.type)?"completed":n.type==="error"?"blocked":"in_progress"}function zs(s,t){if(s.pipeline_stages&&s.pipeline_stages.length>0)return s.pipeline_stages.map(a=>{var l;const r=a.toUpperCase(),n=a.toLowerCase(),i=(l=s.roles)==null?void 0:l.find(c=>c.toLowerCase().startsWith(n));return{id:r,label:O(a),role:i,status:K(a,t)}});if(s.roles&&s.roles.length>0){const a=s.roles.filter(r=>r.toLowerCase()!=="coordinator");if(a.length>0)return a.map(r=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}if(t.length>0){const a=new Map;for(const r of t){const n=r.from;if(n.toLowerCase()==="coordinator")continue;const i=n.toLowerCase();a.has(i)||a.set(i,n)}if(a.size>0)return Array.from(a.entries()).map(([,r])=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}return qs.map(a=>({id:a.toUpperCase(),label:O(a),role:void 0,status:K(a,t)}))}function Bs(s){if(!s||Object.keys(s).length===0)return null;const t=s.coordinator;return!t||typeof t.current_phase!="number"?null:{currentPhase:t.current_phase,totalPhases:typeof t.total_phases=="number"?t.total_phases:null,currentStep:typeof t.current_step=="string"?t.current_step:null,gapIteration:typeof t.gap_iteration=="number"?t.gap_iteration:0}}function et(){const{formatMessage:s}=T(),{selectedTeam:t,viewMode:a,autoRefresh:r,toggleAutoRefresh:n,messageFilter:i,setMessageFilter:l,clearMessageFilter:c,timelineExpanded:x,setTimelineExpanded:g,detailTab:v,setDetailTab:C,backToList:N,locationFilter:d}=z(),m=ne(Xe),_=ne(u=>u.toggleImmersiveMode),{teams:y,error:F,isLoading:A}=he(d),{messages:M,total:f}=os(a==="detail"?t:null,i),{members:b,totalMessages:w}=ds(a==="detail"?t:null),o=h.useMemo(()=>y.find(u=>u.name===t),[y,t]);h.useEffect(()=>{a==="detail"&&t&&!A&&y.length>0&&!o&&N()},[a,t,A,y.length,o,N]);const $=h.useMemo(()=>zs({pipeline_stages:o==null?void 0:o.pipeline_stages,role_state:o==null?void 0:o.role_state,roles:o==null?void 0:o.roles},M),[o==null?void 0:o.pipeline_stages,o==null?void 0:o.role_state,o==null?void 0:o.roles,M]),R=h.useMemo(()=>Bs(o==null?void 0:o.role_state),[o==null?void 0:o.role_state]);if(F&&a==="detail")return e.jsx("div",{className:"flex items-center justify-center min-h-[400px] p-8",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"mb-4",children:e.jsx(Ye,{className:"w-16 h-16 mx-auto text-destructive"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:s({id:"team.error.loadFailed"})}),e.jsx("p",{className:"text-muted-foreground mb-6",children:F instanceof Error?F.message:String(F)}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsx(k,{onClick:N,variant:"default",children:s({id:"team.detail.backToList"})}),e.jsx(k,{onClick:()=>window.location.reload(),variant:"outline",children:s({id:"common.actions.retry"})})]})]})});if(a==="list"||!t||a==="detail"&&y.length>0&&!o)return e.jsx("div",{className:"space-y-6",children:e.jsx(Rs,{})});const B=[{value:"pipeline",label:s({id:"team.tabs.pipeline"}),icon:e.jsx(se,{className:"h-4 w-4"})},{value:"artifacts",label:s({id:"team.tabs.artifacts"}),icon:e.jsx(Q,{className:"h-4 w-4"})},{value:"messages",label:s({id:"team.tabs.messages"}),icon:e.jsx(ee,{className:"h-4 w-4"})}];return e.jsxs("div",{className:j("space-y-6",m&&"h-screen overflow-hidden"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(hs,{selectedTeam:t,onBack:N,members:b,totalMessages:w,autoRefresh:r,onToggleAutoRefresh:n,skillType:o!=null&&o.team_name?`team-${o.team_name}`:void 0,pipelineMode:o==null?void 0:o.pipeline_mode}),e.jsx("button",{onClick:_,className:j("p-2 rounded-md transition-colors",m?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:m?"Exit Fullscreen":"Fullscreen",children:m?e.jsx(ls,{className:"w-4 h-4"}):e.jsx(cs,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsx(L,{className:"lg:col-span-2 flex flex-col",children:e.jsx(E,{className:"p-4 flex-1",children:e.jsx(gs,{stages:$,phaseInfo:R})})}),e.jsx(L,{children:e.jsx(E,{className:"p-4",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})})]}),R&&e.jsx(_s,{phaseInfo:R}),e.jsx(ue,{value:v,onValueChange:u=>C(u),tabs:B}),v==="pipeline"&&e.jsx(L,{children:e.jsx(E,{className:"p-6",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})}),v==="artifacts"&&e.jsx(Fs,{teamName:t}),v==="messages"&&e.jsx(Ms,{messages:M,total:f,filter:i,onFilterChange:l,onClearFilter:c,expanded:x,onExpandedChange:g})]})}export{et as TeamPage,et as default};
2
+ //# sourceMappingURL=TeamPage-CJODUxBk.js.map