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,4 +1,4 @@
1
- import{O as R,u as Y,j as e,B as i,aw as Se,aU as Pe,aR as Me,r as j,C as Q,ap as te,ao as ae,a as Z,n as Ae,H as Le,cR as Ee,o as he,s as Ie,e as X,J as ue,K as pe,c as fe,cS as ge,W as je,b as ie,i as le,Z as de,k as ne,l as Ne,m as re,cC as ke,cn as ze,cT as be,L as xe,af as we,N as Ce,aN as Fe,U as Te}from"./index-rLgoBCfV.js";import{T as Oe}from"./TabsNavigation-DZAAspqR.js";import{C as qe,A as Re,E as $e,T as He}from"./TaskDrawer-BJkwfhIZ.js";import"./Collapsible-DEm1rJ4h.js";import{P as K}from"./package-CH3smL37.js";import{F as Ve}from"./file-text-DwuwPDPi.js";import{M as De,a as Be}from"./minimize-2-CtkoJXcz.js";import{M as ce}from"./messages-square-Dzq5LGg9.js";import{H as ve}from"./hash-80O0kJO7.js";import{C as Ue}from"./cpu-CZNSJFdq.js";import{T as We}from"./target-DW5tsDW6.js";import{L as Qe}from"./link-2-CB9HKeuZ.js";import{S as Ze}from"./settings-2--SuN9rAt.js";import"./link-koEYiemK.js";import"./test-tube-BHm7w3ON.js";import"./index-Bs80iCX0.js";/* empty css */import"./folder-CL6vb42J.js";/**
1
+ import{O as R,u as Y,j as e,B as i,aw as Se,aU as Pe,aR as Me,r as j,C as Q,ap as te,ao as ae,a as Z,n as Ae,H as Le,cS as Ee,o as he,s as Ie,e as X,J as ue,K as pe,c as fe,cT as ge,W as je,b as ie,i as le,Z as de,k as ne,l as Ne,m as re,cD as ke,co as ze,cU as be,L as xe,af as we,N as Ce,aN as Fe,U as Te}from"./index-BUol9HDD.js";import{T as Oe}from"./TabsNavigation-CPh6Zor1.js";import{C as qe,A as Re,E as $e,T as He}from"./TaskDrawer-Ds-8830B.js";import"./Collapsible-DXFl3VKF.js";import{P as K}from"./package-DrNgkamn.js";import{F as Ve}from"./file-text-Byn2_2v6.js";import{M as De,a as Ue}from"./minimize-2-CWkphauf.js";import{M as ce}from"./messages-square-K6_Chm7n.js";import{H as ve}from"./hash-C1DMpBua.js";import{C as Be}from"./cpu-D27G86Ul.js";import{T as We}from"./target-C32OUSGf.js";import{L as Qe}from"./link-2-CC5cFeq6.js";import{S as Ze}from"./settings-2-CAKRU_QC.js";import"./link-ngFQ9bs0.js";import"./test-tube-0IxoyAVZ.js";import"./index-CT9oykfw.js";/* empty css */import"./folder-BoAsK_FL.js";/**
2
2
  * @license lucide-react v0.460.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -73,5 +73,5 @@ import{O as R,u as Y,j as e,B as i,aw as Se,aU as Pe,aR as Me,r as j,C as Q,ap a
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const ls=R("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);function rs(s){var h;return s?(h=s.items)!=null&&h.length?s.items:s.data?Object.entries(s.data).map(([a,o])=>({id:a,title:a.replace(/-/g," ").replace(/^\w/,l=>l.toUpperCase()),...typeof o=="object"&&o!==null?o:{}})):[]:[]}function G({icon:s,title:h,badge:a,children:o,defaultOpen:l=!0}){const[u,f]=j.useState(l);return e.jsxs(Q,{className:"border-border",onClick:p=>p.stopPropagation(),children:[e.jsxs("button",{className:"w-full flex items-center gap-2 p-3 text-left hover:bg-muted/50 transition-colors",onClick:()=>f(!u),children:[e.jsx("span",{className:"text-muted-foreground",children:s}),e.jsx("span",{className:"text-sm font-medium text-foreground flex-1",children:h}),a&&e.jsx(i,{variant:"secondary",className:"text-[10px]",children:a}),u?e.jsx(te,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ae,{className:"h-4 w-4 text-muted-foreground"})]}),u&&e.jsx(Z,{className:"px-3 pb-3 pt-0",children:o})]})}function _e({contextData:s,session:h}){var c,t,m,g,A,$,H,v,U,z,D,L,W,F;const{formatMessage:a}=Y(),o=h.plan||{},l=s.context,u=!!((c=s.explorations)!=null&&c.manifest),f=rs(s.diagnoses),p=!!((t=s.diagnoses)!=null&&t.manifest||f.length>0),M=!!l,r=!!((m=o.focus_paths)!=null&&m.length),_=!!o.summary;return u||p||M||r||_?e.jsxs("div",{className:"space-y-3",children:[u&&e.jsx(G,{icon:e.jsx(Ge,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.explorations"}),badge:(A=(g=s.explorations)==null?void 0:g.manifest)!=null&&A.exploration_count?a({id:"liteTasks.contextPanel.explorationsCount"},{count:s.explorations.manifest.exploration_count}):void 0,children:e.jsxs("div",{className:"space-y-2",children:[!!((H=($=s.explorations)==null?void 0:$.manifest)!=null&&H.task_description)&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.taskDescription"}),":"]})," ",String(s.explorations.manifest.task_description)]}),!!((U=(v=s.explorations)==null?void 0:v.manifest)!=null&&U.complexity)&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.complexity"}),":"]})," ",e.jsx(i,{variant:"info",className:"text-[10px]",children:String(s.explorations.manifest.complexity)})]}),((z=s.explorations)==null?void 0:z.data)&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:Object.keys(s.explorations.data).map(n=>e.jsx(i,{variant:"secondary",className:"text-[10px] capitalize",children:n.replace(/-/g," ")},n))})]})}),p&&e.jsx(G,{icon:e.jsx(ns,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.diagnoses"}),badge:f.length>0?a({id:"liteTasks.contextPanel.diagnosesCount"},{count:f.length}):void 0,children:f.map((n,x)=>e.jsx("div",{className:"text-xs text-muted-foreground py-1 border-b border-border/50 last:border-0",children:n.title||n.description||`Diagnosis ${x+1}`},x))}),M&&l&&e.jsx(G,{icon:e.jsx(K,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.contextPackage"}),children:e.jsxs("div",{className:"space-y-2 text-xs",children:[l.task_description&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.taskDescription"}),":"]})," ",l.task_description]}),l.constraints&&l.constraints.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground mb-1",children:e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.constraints"}),":"]})}),e.jsx("div",{className:"space-y-1 pl-2",children:l.constraints.map((n,x)=>e.jsxs("div",{className:"text-muted-foreground flex items-start gap-1",children:[e.jsx("span",{className:"text-primary/50",children:"•"}),e.jsx("span",{children:n})]},x))})]}),l.focus_paths&&l.focus_paths.length>0&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.focusPaths"}),":"]})," ",e.jsx("div",{className:"flex flex-wrap gap-1 mt-0.5",children:l.focus_paths.map((n,x)=>e.jsx(i,{variant:"secondary",className:"text-[10px] font-mono",children:n},x))})]}),l.relevant_files&&l.relevant_files.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-muted-foreground mb-1",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.relevantFiles"}),":"]})," ",e.jsx(i,{variant:"outline",className:"text-[10px] align-middle",children:l.relevant_files.length})]}),e.jsx("div",{className:"space-y-0.5 pl-2 max-h-32 overflow-y-auto",children:l.relevant_files.map((n,x)=>{const y=typeof n=="string"?n:n.path,N=typeof n=="string"?void 0:n.reason;return e.jsxs("div",{className:"group flex items-start gap-1 text-muted-foreground hover:bg-muted/30 rounded px-1 py-0.5",children:[e.jsxs("span",{className:"text-primary/50 shrink-0",children:[x+1,"."]}),e.jsx("span",{className:"font-mono text-xs truncate flex-1",title:y,children:y}),N&&e.jsxs("span",{className:"text-[10px] text-muted-foreground/60 truncate ml-1",title:N,children:["(",N,")"]})]},x)})})]}),l.dependencies&&l.dependencies.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground mb-1",children:e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.dependencies"}),":"]})}),e.jsx("div",{className:"flex flex-wrap gap-1",children:l.dependencies.map((n,x)=>{const y=typeof n=="string"?{name:n,version:""}:n;return e.jsxs(i,{variant:"outline",className:"text-[10px]",children:[y.name,y.version&&e.jsxs("span",{className:"ml-1 opacity-70",children:["@",y.version]})]},x)})})]}),l.session_id&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.sessionId"}),":"]})," ",e.jsx("span",{className:"font-mono bg-muted/50 px-1.5 py-0.5 rounded",children:l.session_id})]}),l.metadata&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground mb-1",children:e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.metadata"}),":"]})}),e.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-0.5 pl-2 text-muted-foreground",children:Object.entries(l.metadata).map(([n,x])=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:"font-mono text-[10px] text-primary/60",children:[n,":"]}),e.jsx("span",{className:"truncate",children:String(x)})]},n))})]})]})}),(l==null?void 0:l.conflict_risks)&&Array.isArray(l.conflict_risks)&&l.conflict_risks.length>0&&e.jsx(G,{icon:e.jsx(Se,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.conflictRisks"}),children:e.jsx("ul",{className:"space-y-1",children:l.conflict_risks.map((n,x)=>{const y=typeof n=="string"?n:n.description,N=typeof n=="string"?void 0:n.severity;return e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[N&&e.jsx(i,{variant:N==="high"?"destructive":"warning",className:"text-[10px]",children:N}),e.jsx("span",{children:y})]},x)})})}),(l==null?void 0:l.conflict_detection)&&e.jsx(qe,{data:l.conflict_detection}),(l==null?void 0:l.assets)&&e.jsx(Re,{data:l.assets}),((D=s.explorations)==null?void 0:D.data)&&Object.values(s.explorations.data).some(n=>{var x,y,N;return((x=n.project_structure)==null?void 0:x.length)||((y=n.relevant_files)==null?void 0:y.length)||((N=n.patterns)==null?void 0:N.length)})&&e.jsx($e,{data:{manifest:{task_description:((L=s.explorations.manifest)==null?void 0:L.task_description)||"",complexity:(W=s.explorations.manifest)==null?void 0:W.complexity,exploration_count:((F=s.explorations.manifest)==null?void 0:F.exploration_count)||Object.keys(s.explorations.data).length},data:s.explorations.data}}),r&&e.jsx(G,{icon:e.jsx(Pe,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.focusPaths"}),children:e.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.focus_paths.map((n,x)=>e.jsx(i,{variant:"secondary",className:"text-[10px] font-mono",children:n},x))})}),_&&e.jsx(G,{icon:e.jsx(Ve,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.summary"}),children:e.jsx("p",{className:"text-xs text-muted-foreground",children:o.summary})}),s.context&&e.jsx(G,{icon:e.jsx(Me,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.rawJson"}),defaultOpen:!1,children:e.jsx("pre",{className:"text-xs font-mono bg-muted p-3 rounded-lg overflow-x-auto max-h-64 overflow-y-auto whitespace-pre-wrap break-all",children:JSON.stringify(s.context,null,2)})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(K,{className:"h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.contextPanel.empty"})})]})}function cs(s){if(s)return typeof s=="string"?s:s.en||s.zh}function ds({session:s,onTaskClick:h}){const{formatMessage:a}=Y(),[o,l]=j.useState("tasks"),[u,f]=j.useState(null),[p,M]=j.useState(!1),[r,_]=j.useState(null),k=s.tasks||[],c=k.length;return j.useEffect(()=>{if(o==="context"&&!(u||p)){if(!s.path){_("No session path available");return}M(!0),be(s.path).then(t=>{f(t),_(null)}).catch(t=>{_(t.message||"Failed to load context")}).finally(()=>{M(!1)})}},[o,s.path,u,p]),e.jsxs("div",{className:"mt-2 ml-6 pb-2",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[e.jsxs("button",{onClick:t=>{t.stopPropagation(),l("tasks")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="tasks"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(xe,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.tasks"}),e.jsx(i,{variant:"secondary",className:"ml-1 text-[10px] px-1.5 py-0",children:c})]}),e.jsxs("button",{onClick:t=>{t.stopPropagation(),l("context")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="context"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(K,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.context"})]})]}),o==="tasks"&&e.jsx("div",{className:"space-y-2",children:k.map((t,m)=>{var v,U,z,D,L,W,F,n,x,y,N;const g=((U=(v=t.flow_control)==null?void 0:v.target_files)==null?void 0:U.length)||0,A=((D=(z=t.flow_control)==null?void 0:z.implementation_approach)==null?void 0:D.length)||0,$=((W=(L=t.context)==null?void 0:L.acceptance)==null?void 0:W.length)||0,H=((n=(F=t.context)==null?void 0:F.depends_on)==null?void 0:n.length)||0;return e.jsx(Q,{className:"cursor-pointer hover:shadow-sm hover:border-primary/50 transition-all border-border border-l-4 border-l-primary/50",onClick:B=>{B.stopPropagation(),h(t)},children:e.jsxs(Z,{className:"p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(i,{className:"text-xs font-mono shrink-0 bg-primary/10 text-primary border-primary/20",children:t.task_id||`#${m+1}`}),e.jsx("h4",{className:"text-sm font-medium text-foreground line-clamp-1",children:t.title||a({id:"liteTasks.untitled"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[((x=t.meta)==null?void 0:x.type)&&e.jsx(i,{variant:"info",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:t.meta.type}),g>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 gap-0.5 whitespace-nowrap",children:[e.jsx(we,{className:"h-2.5 w-2.5"}),g," files"]}),A>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[A," steps"]}),$>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[$," criteria"]}),H>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),(N=(y=t.context)==null?void 0:y.depends_on)==null?void 0:N.map((B,J)=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-mono border-primary/30 text-primary whitespace-nowrap",children:B},J))]})]})]}),t.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1.5 pl-[calc(1.5rem+0.75rem)] line-clamp-2",children:t.description})]})},t.id||m)})}),o==="context"&&e.jsxs("div",{className:"space-y-3",children:[p&&e.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[e.jsx(Ce,{className:"h-5 w-5 animate-spin mr-2"}),e.jsx("span",{className:"text-sm",children:a({id:"liteTasks.contextPanel.loading"})})]}),r&&!p&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:[e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"}),a({id:"liteTasks.contextPanel.error"}),": ",r]}),!p&&!r&&u&&e.jsx(_e,{contextData:u,session:s}),!p&&!r&&!u&&!s.path&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(K,{className:"h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.contextPanel.empty"})})]})]})]})}function os({round:s,isLast:h}){const{formatMessage:a}=Y(),[o,l]=j.useState(h),u=s.solutions||[],f=s.convergence,p=s.cross_verification,M=s.clarification_questions||[],r=s.cli_executions||{},_=c=>c<1e3?`${c}ms`:`${(c/1e3).toFixed(1)}s`,k=c=>{switch(c){case"converged":return"success";case"continue":return"warning";case"user_input_needed":return"destructive";default:return"secondary"}};return e.jsx(Q,{className:"border-border",children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>l(!o),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary/10 text-primary font-semibold text-sm",children:s.round}),e.jsxs("div",{children:[e.jsxs("h4",{className:"font-medium text-foreground flex items-center gap-2",children:[a({id:"liteTasks.multiCli.round"})," ",s.round,f&&e.jsxs(i,{variant:k(f.recommendation),className:"text-[10px]",children:[f.recommendation==="converged"&&e.jsx(Je,{className:"h-3 w-3 mr-1"}),f.recommendation==="converged"&&a({id:"liteTasks.multiCli.converged"}),f.recommendation==="continue"&&a({id:"liteTasks.multiCli.continuing"}),f.recommendation==="user_input_needed"&&a({id:"liteTasks.multiCli.needsInput"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.timestamp?new Date(s.timestamp).toLocaleString():""})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1",children:Object.entries(r).map(([c,t])=>e.jsx(i,{variant:t.status==="success"?"success":"destructive",className:"text-[10px] px-1.5 py-0",children:c},c))}),o?e.jsx(te,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ae,{className:"h-4 w-4 text-muted-foreground"})]})]}),o&&e.jsxs("div",{className:"mt-4 space-y-4",children:[s.user_feedback_incorporated&&e.jsxs("div",{className:"p-3 bg-primary/5 border border-primary/20 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-primary mb-1",children:[e.jsx(ke,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.userFeedback"})]}),e.jsx("p",{className:"text-sm text-foreground",children:s.user_feedback_incorporated})]}),Object.keys(r).length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(Ue,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.cliExecutions"})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(r).map(([c,t])=>e.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted/50 rounded-md text-xs",children:[e.jsx("span",{className:"font-medium",children:c}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:t.model}),e.jsxs(i,{variant:t.status==="success"?"success":"destructive",className:"text-[10px] px-1 py-0",children:[e.jsx(Fe,{className:"h-3 w-3 mr-1"}),_(t.duration_ms)]})]})]},c))})]}),u.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(Te,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.solutions"})," (",u.length,")"]}),e.jsx("div",{className:"space-y-3",children:u.map((c,t)=>e.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg border border-border/50",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("h5",{className:"font-medium text-foreground text-sm",children:c.name}),e.jsx("div",{className:"flex items-center gap-1",children:c.source_cli.map(m=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:m},m))})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:c.summary}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[e.jsxs(i,{variant:"success",className:"text-[10px]",children:[Math.round(c.feasibility*100),"% ",a({id:"liteTasks.multiCli.feasible"})]}),e.jsx(i,{variant:"warning",className:"text-[10px]",children:c.effort}),e.jsxs(i,{variant:c.risk==="high"?"destructive":c.risk==="low"?"success":"warning",className:"text-[10px]",children:[c.risk," ",a({id:"liteTasks.multiCli.risk"})]})]}),e.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[c.pros.length>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1 text-xs text-success",children:[e.jsx(ls,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.pros"})]}),e.jsx("ul",{className:"text-[10px] text-muted-foreground space-y-0.5",children:c.pros.slice(0,3).map((m,g)=>e.jsxs("li",{className:"truncate",children:["• ",m]},g))})]}),c.cons.length>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1 text-xs text-destructive",children:[e.jsx(is,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.cons"})]}),e.jsx("ul",{className:"text-[10px] text-muted-foreground space-y-0.5",children:c.cons.slice(0,3).map((m,g)=>e.jsxs("li",{className:"truncate",children:["• ",m]},g))})]})]})]},t))})]}),f&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(We,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.convergence"})]}),e.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full ${f.score>=.9?"bg-success":f.score>=.7?"bg-warning":"bg-destructive"}`,style:{width:`${f.score*100}%`}})}),e.jsxs("span",{className:"text-xs font-medium",children:[Math.round(f.score*100),"%"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:f.rationale})]})]}),p&&(p.agreements.length>0||p.disagreements.length>0)&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(Xe,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.crossVerification"})]}),e.jsxs("div",{className:"space-y-2",children:[p.agreements.length>0&&e.jsxs("div",{className:"p-3 bg-success/10 border border-success/20 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-success mb-2",children:[e.jsx(ne,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.agreements"})," (",p.agreements.length,")"]}),e.jsx("ul",{className:"text-[10px] text-muted-foreground space-y-1",children:p.agreements.slice(0,5).map((c,t)=>e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx(ne,{className:"h-3 w-3 text-success shrink-0 mt-0.5"}),e.jsx("span",{children:c})]},t))})]}),p.disagreements.length>0&&e.jsxs("div",{className:"p-3 bg-warning/10 border border-warning/20 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-warning mb-2",children:[e.jsx(re,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.disagreements"})," (",p.disagreements.length,")"]}),e.jsx("div",{className:"space-y-2",children:p.disagreements.map((c,t)=>e.jsxs("div",{className:"text-[10px]",children:[e.jsx("div",{className:"font-medium text-foreground mb-1",children:c.topic}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(i,{variant:"outline",className:"text-[9px] px-1 py-0",children:"gemini"}),e.jsx("span",{className:"text-muted-foreground truncate",children:c.gemini})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(i,{variant:"outline",className:"text-[9px] px-1 py-0",children:"codex"}),e.jsx("span",{className:"text-muted-foreground truncate",children:c.codex})]})]})]},t))})]}),p.resolution&&e.jsxs("div",{className:"text-xs text-muted-foreground italic",children:[a({id:"liteTasks.multiCli.resolution"}),": ",p.resolution]})]})]}),M.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(ye,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.clarificationQuestions"})," (",M.length,")"]}),e.jsx("ul",{className:"space-y-1",children:M.map((c,t)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(ye,{className:"h-3 w-3 shrink-0 mt-0.5 text-info"}),e.jsx("span",{children:c})]},t))})]})]})]})})}function ms({data:s}){var p,M,r,_,k,c;const{formatMessage:h}=Y(),[a,o]=j.useState(new Set(["solution","plan"])),l=t=>{o(m=>{const g=new Set(m);return g.has(t)?g.delete(t):g.add(t),g})},u=t=>a.has(t),f=({id:t,icon:m,title:g,badge:A,children:$,defaultExpanded:H=!0})=>(j.useEffect(()=>{H&&!a.has(t)&&o(v=>new Set(v).add(t))},[t,H]),e.jsxs(Q,{className:"border-border",children:[e.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 p-3 text-left hover:bg-muted/50 transition-colors",onClick:()=>l(t),children:[e.jsx("span",{className:"text-muted-foreground",children:m}),e.jsx("span",{className:"text-sm font-medium text-foreground flex-1",children:g}),A,u(t)?e.jsx(te,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ae,{className:"h-4 w-4 text-muted-foreground"})]}),u(t)&&e.jsx(Z,{className:"px-3 pb-3 pt-0",children:$})]}));return e.jsxs("div",{className:"space-y-3",children:[s.solution&&e.jsx(f,{id:"solution",icon:e.jsx(Te,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.solution"}),badge:e.jsx("div",{className:"flex items-center gap-1",children:s.solution.source_cli.map(t=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:t},t))}),children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-foreground text-sm",children:s.solution.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.solution.summary}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(i,{variant:"success",className:"text-[10px]",children:[Math.round(s.solution.feasibility*100),"% ",h({id:"liteTasks.multiCli.feasible"})]}),e.jsx(i,{variant:"warning",className:"text-[10px]",children:s.solution.effort}),e.jsxs(i,{variant:s.solution.risk==="high"?"destructive":s.solution.risk==="low"?"success":"warning",className:"text-[10px]",children:[s.solution.risk," ",h({id:"liteTasks.multiCli.risk"})]})]})]})}),s.implementation_plan&&e.jsx(f,{id:"plan",icon:e.jsx(ts,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.implementationPlan"}),badge:e.jsxs(i,{variant:"secondary",className:"text-[10px]",children:[((p=s.implementation_plan.tasks)==null?void 0:p.length)||0," tasks"]}),children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[h({id:"liteTasks.multiCli.context.approach"}),":"]})," ",s.implementation_plan.approach]}),s.implementation_plan.execution_flow&&e.jsx("div",{className:"p-2 bg-muted/50 rounded-md",children:e.jsx("code",{className:"text-xs font-mono text-foreground",children:s.implementation_plan.execution_flow})}),s.implementation_plan.tasks&&s.implementation_plan.tasks.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-xs font-medium text-foreground",children:h({id:"liteTasks.multiCli.context.tasks"})}),e.jsx("div",{className:"space-y-1.5",children:s.implementation_plan.tasks.map((t,m)=>e.jsxs("div",{className:"flex items-start gap-2 p-2 bg-muted/30 rounded-md",children:[e.jsx(i,{variant:"outline",className:"text-[10px] font-mono shrink-0",children:t.id}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-xs font-medium text-foreground",children:t.name}),t.key_point&&e.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5",children:t.key_point}),t.files&&t.files.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:t.files.map((g,A)=>e.jsxs(i,{variant:"secondary",className:"text-[9px] font-mono",children:[g.action==="create"?"+":g.action==="delete"?"-":"~"," ",g.file]},A))})]})]},t.id||m))})]}),s.implementation_plan.milestones&&s.implementation_plan.milestones.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-foreground",children:[e.jsx(Ke,{className:"h-3 w-3"}),h({id:"liteTasks.multiCli.context.milestones"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.implementation_plan.milestones.map((t,m)=>e.jsx(i,{variant:"info",className:"text-[10px]",children:t},m))})]})]})}),s.dependencies&&(((M=s.dependencies.internal)==null?void 0:M.length)>0||((r=s.dependencies.external)==null?void 0:r.length)>0)&&e.jsx(f,{id:"deps",icon:e.jsx(Qe,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.dependencies"}),badge:e.jsx(i,{variant:"secondary",className:"text-[10px]",children:(((_=s.dependencies.internal)==null?void 0:_.length)||0)+(((k=s.dependencies.external)==null?void 0:k.length)||0)}),children:e.jsxs("div",{className:"space-y-2",children:[s.dependencies.internal&&s.dependencies.internal.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-foreground mb-1",children:h({id:"liteTasks.multiCli.context.internal"})}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.dependencies.internal.map((t,m)=>e.jsx(i,{variant:"outline",className:"text-[10px] font-mono",children:t},m))})]}),s.dependencies.external&&s.dependencies.external.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-foreground mb-1",children:h({id:"liteTasks.multiCli.context.external"})}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.dependencies.external.map((t,m)=>e.jsx(i,{variant:"secondary",className:"text-[10px] font-mono",children:t},m))})]})]})}),s.consensus&&((c=s.consensus.agreements)==null?void 0:c.length)>0&&e.jsx(f,{id:"consensus",icon:e.jsx(as,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.consensus"}),badge:e.jsx(i,{variant:"success",className:"text-[10px]",children:s.consensus.agreements.length}),children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("ul",{className:"space-y-1",children:s.consensus.agreements.map((t,m)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(ne,{className:"h-3 w-3 text-success shrink-0 mt-0.5"}),e.jsx("span",{children:t})]},m))}),s.consensus.resolved_conflicts&&e.jsxs("div",{className:"mt-2 p-2 bg-success/10 border border-success/20 rounded-md text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-success",children:[h({id:"liteTasks.multiCli.context.resolvedConflicts"}),":"]})," ",s.consensus.resolved_conflicts]})]})}),s.technical_concerns&&s.technical_concerns.length>0&&e.jsx(f,{id:"concerns",icon:e.jsx(es,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.technicalConcerns"}),badge:e.jsx(i,{variant:"warning",className:"text-[10px]",children:s.technical_concerns.length}),children:e.jsx("ul",{className:"space-y-1",children:s.technical_concerns.map((t,m)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(re,{className:"h-3 w-3 text-warning shrink-0 mt-0.5"}),e.jsx("span",{children:t})]},m))})}),s.constraints&&s.constraints.length>0&&e.jsx(f,{id:"constraints",icon:e.jsx(Ze,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.constraints"}),badge:e.jsx(i,{variant:"secondary",className:"text-[10px]",children:s.constraints.length}),children:e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.constraints.map((t,m)=>e.jsx(i,{variant:"outline",className:"text-[10px]",children:t},m))})}),(s.task_description||s.session_id)&&e.jsx(f,{id:"info",icon:e.jsx(K,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.sessionInfo"}),defaultExpanded:!1,children:e.jsxs("div",{className:"space-y-2 text-xs",children:[s.task_description&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[h({id:"liteTasks.contextPanel.taskDescription"}),":"]})," ",s.task_description]}),s.session_id&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[h({id:"liteTasks.contextPanel.sessionId"}),":"]})," ",e.jsx("span",{className:"font-mono bg-muted/50 px-1.5 py-0.5 rounded",children:s.session_id})]})]})})]})}function xs({session:s,onTaskClick:h}){var W,F;const{formatMessage:a}=Y(),[o,l]=j.useState("tasks"),[u,f]=j.useState(null),[p,M]=j.useState(!1),[r,_]=j.useState(null),k=s.tasks||[],c=k.length,t=s.latestSynthesis||{},m=s.plan||{},g=s.roundCount||((W=s.metadata)==null?void 0:W.roundId)||1,A=n=>n?typeof n=="string"?n:n.en||n.zh||"":"",$=()=>{if(k.length===0)return"";const n=new Set;k.forEach(b=>{var V;const O=b.task_id||b.id;n.add(O),(V=b.context)!=null&&V.depends_on});const x=k.filter(b=>{var V;const O=((V=b.context)==null?void 0:V.depends_on)||[];return O.length===0||O.every(d=>!n.has(d))}).map(b=>b.task_id||b.id),y=x.length>1?`(${x.join(" | ")})`:x[0]||"",N=new Set(x),B=[y];let J=0;for(;N.size<k.length&&J<20;){J++;const b=[];if(k.forEach(O=>{var w;const V=O.task_id||O.id;if(N.has(V))return;(((w=O.context)==null?void 0:w.depends_on)||[]).every(q=>N.has(q)||!n.has(q))&&b.push(V)}),b.length===0)break;b.forEach(O=>N.add(O)),b.length>1?B.push(`(${b.join(" | ")})`):B.push(b[0])}return B.filter(Boolean).join(" → ")};j.useEffect(()=>{if(o==="context"&&!(u||p)){if(!s.path){_("No session path available");return}M(!0),be(s.path).then(n=>{f(n),_(null)}).catch(n=>{_(n.message||"Failed to load context")}).finally(()=>{M(!1)})}},[o,s.path,u,p]);const H=$(),v=A(m.goal)||A(t.title)||"",U=A(m.solution)||"",z=m.feasibility||0,D=m.effort||"",L=m.risk||"";return e.jsxs("div",{className:"mt-2 ml-6 pb-2",children:[e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground mb-3 pb-2 border-b border-border/50",children:[s.createdAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.createdAt"}),": ",new Date(s.createdAt).toLocaleDateString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(xe,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.tasks"}),": ",c," ",a({id:"liteTasks.tasksCount"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[e.jsxs("button",{onClick:n=>{n.stopPropagation(),l("tasks")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="tasks"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(xe,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.tasks"}),e.jsx(i,{variant:"secondary",className:"ml-1 text-[10px] px-1.5 py-0",children:c})]}),e.jsxs("button",{onClick:n=>{n.stopPropagation(),l("discussion")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="discussion"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(ce,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.multiCli.discussion"}),e.jsx(i,{variant:"secondary",className:"ml-1 text-[10px] px-1.5 py-0",children:g})]}),e.jsxs("button",{onClick:n=>{n.stopPropagation(),l("context")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="context"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(K,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.context"})]})]}),o==="tasks"&&e.jsxs("div",{className:"space-y-3",children:[(v||U||H)&&e.jsx(Q,{className:"border-border bg-muted/30",children:e.jsxs(Z,{className:"p-3 space-y-2",children:[v&&e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a({id:"liteTasks.multiCli.goal"}),":"]}),e.jsx("span",{className:"ml-2 text-foreground",children:v})]}),U&&e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a({id:"liteTasks.multiCli.solution"}),":"]}),e.jsx("span",{className:"ml-2 text-foreground",children:U})]}),H&&e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a({id:"liteTasks.multiCli.implementation"}),":"]}),e.jsx("code",{className:"ml-2 px-2 py-0.5 rounded bg-background border border-border text-xs font-mono",children:H})]}),(z>0||D||L)&&e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[z>0&&e.jsxs(i,{variant:"success",className:"text-[10px]",children:[z,"%"]}),D&&e.jsx(i,{variant:"warning",className:"text-[10px]",children:D}),L&&e.jsxs(i,{variant:L==="high"?"destructive":L==="medium"?"warning":"success",className:"text-[10px]",children:[L," ",a({id:"liteTasks.multiCli.risk"})]})]})]})}),k.map((n,x)=>{var b,O,V,d,w,q,C,P,T,E,I;const y=((O=(b=n.flow_control)==null?void 0:b.target_files)==null?void 0:O.length)||0,N=((d=(V=n.flow_control)==null?void 0:V.implementation_approach)==null?void 0:d.length)||0,B=((q=(w=n.context)==null?void 0:w.acceptance)==null?void 0:q.length)||0,J=((P=(C=n.context)==null?void 0:C.depends_on)==null?void 0:P.length)||0;return e.jsx(Q,{className:"cursor-pointer hover:shadow-sm hover:border-primary/50 transition-all border-border border-l-4 border-l-primary/50",onClick:S=>{S.stopPropagation(),h(n)},children:e.jsx(Z,{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(i,{className:"text-xs font-mono shrink-0 bg-primary/10 text-primary border-primary/20",children:n.task_id||`T${x+1}`}),e.jsx("h4",{className:"text-sm font-medium text-foreground line-clamp-1",children:n.title||a({id:"liteTasks.untitled"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[((T=n.meta)==null?void 0:T.type)&&e.jsx(i,{variant:"info",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:n.meta.type}),y>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 gap-0.5 whitespace-nowrap",children:[e.jsx(we,{className:"h-2.5 w-2.5"}),y," files"]}),N>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[N," steps"]}),B>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[B," criteria"]}),J>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),(I=(E=n.context)==null?void 0:E.depends_on)==null?void 0:I.map((S,ee)=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-mono border-primary/30 text-primary whitespace-nowrap",children:S},ee))]})]})]})})},n.id||x)})]}),o==="discussion"&&e.jsx("div",{className:"space-y-3",children:s.rounds&&s.rounds.length>0?s.rounds.map((n,x)=>e.jsx(os,{round:n,isLast:x===s.rounds.length-1},n.round||x)):e.jsx(Q,{className:"border-border",children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(ce,{className:"h-5 w-5 text-primary"}),e.jsx("h4",{className:"font-medium text-foreground",children:a({id:"liteTasks.multiCli.discussionRounds"})}),e.jsxs(i,{variant:"secondary",className:"text-xs",children:[g," ",a({id:"liteTasks.rounds"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.multiCli.discussionDescription"})}),v&&e.jsx("div",{className:"mt-3 p-3 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm text-foreground",children:v})})]})})}),o==="context"&&e.jsxs("div",{className:"space-y-3",children:[p&&e.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[e.jsx(Ce,{className:"h-5 w-5 animate-spin mr-2"}),e.jsx("span",{className:"text-sm",children:a({id:"liteTasks.contextPanel.loading"})})]}),r&&!p&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:[e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"}),a({id:"liteTasks.contextPanel.error"}),": ",r]}),!p&&!r&&u&&((F=u.context)!=null&&F.solution?e.jsx(ms,{data:u.context}):e.jsx(_e,{contextData:u,session:s})),!p&&!r&&!u&&!s.path&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(K,{className:"h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.contextPanel.empty"})})]})]})]})}function As(){const s=Ae(),{subType:h,id:a}=Le(),{litePlan:o,liteFix:l,multiCliPlan:u,isLoading:f,error:p,refetch:M}=Ee(),{formatMessage:r}=Y(),[_,k]=j.useState("lite-plan"),[c,t]=j.useState(null),[m,g]=j.useState(null),A=j.useRef(!1),[$,H]=j.useState(""),[v,U]=j.useState("date"),[z,D]=j.useState("desc"),L=he(Ie),W=he(d=>d.toggleImmersiveMode),F=j.useCallback(d=>{let w=d;if($.trim()){const C=$.toLowerCase();w=d.filter(P=>{var T;return P.id.toLowerCase().includes(C)||((T=P.tasks)==null?void 0:T.some(E=>{var I,S;return((I=E.title)==null?void 0:I.toLowerCase().includes(C))||((S=E.task_id)==null?void 0:S.toLowerCase().includes(C))}))})}return[...w].sort((C,P)=>{var E,I;let T=0;switch(v){case"date":T=new Date(C.createdAt||0).getTime()-new Date(P.createdAt||0).getTime();break;case"name":T=C.id.localeCompare(P.id);break;case"tasks":T=(((E=C.tasks)==null?void 0:E.length)||0)-(((I=P.tasks)==null?void 0:I.length)||0);break}return z==="asc"?T:-T})},[$,v,z]),n=j.useMemo(()=>F(o),[o,F]),x=j.useMemo(()=>F(l),[l,F]),y=j.useMemo(()=>F(u),[u,F]);j.useEffect(()=>{var q;if(!a||A.current||f)return;const w=[...o,...l,...u].find(C=>C.id===a);if(w){A.current=!0,h==="lite-plan"?k("lite-plan"):h==="lite-fix"?k("lite-fix"):h==="multi-cli-plan"&&k("multi-cli-plan"),t(a);const C=(q=w.tasks)==null?void 0:q.find(P=>P.task_id===a||P.id===a);C&&g(C)}},[a,h,f,o,l,u]);const N=d=>{v===d?D(w=>w==="asc"?"desc":"asc"):(U(d),D("desc"))},B=()=>{s("/sessions")},J=d=>({decided:"success",converged:"success",plan_generated:"success",completed:"success",exploring:"info",initialized:"info",analyzing:"warning",debating:"warning",blocked:"destructive",conflict:"destructive"})[d||""]||"secondary",b=d=>{var I;const w=d.type==="lite-plan",q=((I=d.tasks)==null?void 0:I.length)||0,C=c===d.id,P=d.tasks||[],T={completed:P.filter(S=>S.status==="completed").length,inProgress:P.filter(S=>S.status==="in_progress").length,blocked:P.filter(S=>S.status==="blocked").length},E=P[0];return e.jsxs("div",{children:[e.jsx(Q,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t(C?null:d.id),children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"flex-shrink-0",children:C?e.jsx(te,{className:"h-5 w-5 text-muted-foreground"}):e.jsx(ae,{className:"h-5 w-5 text-muted-foreground"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("h3",{className:"font-bold text-foreground text-sm tracking-wide uppercase",children:d.id})})]}),e.jsxs(i,{variant:w?"secondary":"warning",className:"gap-1 flex-shrink-0",children:[w?e.jsx(ge,{className:"h-3 w-3"}):e.jsx(je,{className:"h-3 w-3"}),r({id:w?"liteTasks.type.plan":"liteTasks.type.fix"})]})]}),(E==null?void 0:E.title)&&e.jsx("div",{className:"mb-3 pb-3 border-b border-border/50",children:e.jsx("p",{className:"text-sm text-foreground line-clamp-1",children:E.title})}),e.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-3",children:[T.completed>0&&e.jsxs(i,{variant:"success",className:"gap-1 text-xs",children:[e.jsx(ne,{className:"h-3 w-3"}),T.completed," ",r({id:"liteTasks.status.completed"})]}),T.inProgress>0&&e.jsxs(i,{variant:"warning",className:"gap-1 text-xs",children:[e.jsx(Ne,{className:"h-3 w-3"}),T.inProgress," ",r({id:"liteTasks.status.inProgress"})]}),T.blocked>0&&e.jsxs(i,{variant:"destructive",className:"gap-1 text-xs",children:[e.jsx(re,{className:"h-3 w-3"}),T.blocked," ",r({id:"liteTasks.status.blocked"})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[d.createdAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),new Date(d.createdAt).toLocaleDateString()]}),q>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ve,{className:"h-3.5 w-3.5"}),q," ",r({id:"liteTasks.tasksCount"})]})]})]})}),C&&d.tasks&&d.tasks.length>0&&e.jsx(ds,{session:d,onTaskClick:g})]},d.id)},O=d=>{const w=d.metadata||{},q=d.latestSynthesis||{},C=w.roundId||d.roundCount||1,P=cs(q.title)||r({id:"liteTasks.discussionTopic"}),T=q.status||d.status||"analyzing",E=w.timestamp||d.createdAt||"",I=d.tasks||[],S={completed:I.filter(se=>se.status==="completed").length,inProgress:I.filter(se=>se.status==="in_progress").length,blocked:I.filter(se=>se.status==="blocked").length,total:I.length},ee=c===d.id;return e.jsxs("div",{children:[e.jsx(Q,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t(ee?null:d.id),children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"flex-shrink-0",children:ee?e.jsx(te,{className:"h-5 w-5 text-muted-foreground"}):e.jsx(ae,{className:"h-5 w-5 text-muted-foreground"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("h3",{className:"font-bold text-foreground text-sm tracking-wide uppercase",children:d.id})})]}),e.jsxs(i,{variant:"secondary",className:"gap-1 flex-shrink-0",children:[e.jsx(ce,{className:"h-3 w-3"}),r({id:"liteTasks.type.multiCli"})]})]}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-3",children:[e.jsx(ke,{className:"h-4 w-4"}),e.jsx("span",{className:"line-clamp-1",children:P})]}),S.total>0&&e.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-3",children:[S.completed>0&&e.jsxs(i,{variant:"success",className:"gap-1 text-xs",children:[e.jsx(ne,{className:"h-3 w-3"}),S.completed," ",r({id:"liteTasks.status.completed"})]}),S.inProgress>0&&e.jsxs(i,{variant:"warning",className:"gap-1 text-xs",children:[e.jsx(Ne,{className:"h-3 w-3"}),S.inProgress," ",r({id:"liteTasks.status.inProgress"})]}),S.blocked>0&&e.jsxs(i,{variant:"destructive",className:"gap-1 text-xs",children:[e.jsx(re,{className:"h-3 w-3"}),S.blocked," ",r({id:"liteTasks.status.blocked"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[E&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),new Date(E).toLocaleDateString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ss,{className:"h-3.5 w-3.5"}),C," ",r({id:"liteTasks.rounds"})]}),e.jsxs(i,{variant:J(T),className:"gap-1",children:[e.jsx(ze,{className:"h-3 w-3"}),T]})]})]})}),ee&&e.jsx(xs,{session:d,onTaskClick:g})]},d.id)};if(f)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(X,{variant:"ghost",size:"sm",disabled:!0,children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),r({id:"common.actions.back"})]}),e.jsx("div",{className:"h-8 w-64 rounded bg-muted animate-pulse"})]}),e.jsx("div",{className:"h-64 rounded-lg bg-muted animate-pulse"})]});if(p)return e.jsxs("div",{className:"flex items-center gap-2 p-4 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive",children:[e.jsx(pe,{className:"h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:r({id:"common.errors.loadFailed"})}),e.jsx("p",{className:"text-xs mt-0.5",children:p.message})]}),e.jsx(X,{variant:"outline",size:"sm",onClick:()=>M(),children:r({id:"common.actions.retry"})})]});const V=o.length+l.length+u.length;return e.jsxs("div",{className:fe("space-y-6",L&&"h-screen overflow-hidden"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(X,{variant:"ghost",size:"sm",onClick:B,children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),r({id:"common.actions.back"})]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:r({id:"liteTasks.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.subtitle"},{count:V})})]})]}),e.jsx("button",{onClick:W,className:fe("p-2 rounded-md transition-colors",L?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:L?"Exit Fullscreen":"Fullscreen",children:L?e.jsx(De,{className:"w-4 h-4"}):e.jsx(Be,{className:"w-4 h-4"})})]}),e.jsx(Oe,{value:_,onValueChange:d=>k(d),tabs:[{value:"lite-plan",label:r({id:"liteTasks.type.plan"}),icon:e.jsx(ge,{className:"h-4 w-4"}),badge:e.jsx(i,{variant:"secondary",className:"ml-2",children:o.length})},{value:"lite-fix",label:r({id:"liteTasks.type.fix"}),icon:e.jsx(je,{className:"h-4 w-4"}),badge:e.jsx(i,{variant:"secondary",className:"ml-2",children:l.length})},{value:"multi-cli-plan",label:r({id:"liteTasks.type.multiCli"}),icon:e.jsx(ce,{className:"h-4 w-4"}),badge:e.jsx(i,{variant:"secondary",className:"ml-2",children:u.length})}]}),e.jsxs("div",{className:"mt-4 flex flex-col sm:flex-row gap-3 items-start sm:items-center justify-between",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(ie,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:r({id:"liteTasks.searchPlaceholder"}),value:$,onChange:d=>H(d.target.value),className:"w-full pl-10 pr-4 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(Ye,{className:"h-3.5 w-3.5"}),r({id:"liteTasks.sortBy"}),":"]}),e.jsxs(X,{variant:v==="date"?"secondary":"ghost",size:"sm",onClick:()=>N("date"),className:"h-8 px-3 text-xs gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),r({id:"liteTasks.sort.date"}),v==="date"&&(z==="desc"?e.jsx(oe,{className:"h-3 w-3"}):e.jsx(me,{className:"h-3 w-3"}))]}),e.jsxs(X,{variant:v==="name"?"secondary":"ghost",size:"sm",onClick:()=>N("name"),className:"h-8 px-3 text-xs gap-1",children:[r({id:"liteTasks.sort.name"}),v==="name"&&(z==="desc"?e.jsx(oe,{className:"h-3 w-3"}):e.jsx(me,{className:"h-3 w-3"}))]}),e.jsxs(X,{variant:v==="tasks"?"secondary":"ghost",size:"sm",onClick:()=>N("tasks"),className:"h-8 px-3 text-xs gap-1",children:[e.jsx(ve,{className:"h-3.5 w-3.5"}),r({id:"liteTasks.sort.tasks"}),v==="tasks"&&(z==="desc"?e.jsx(oe,{className:"h-3 w-3"}):e.jsx(me,{className:"h-3 w-3"}))]})]})]}),_==="lite-plan"&&e.jsx("div",{className:"mt-4",children:o.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(de,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.empty.title"},{type:"lite-plan"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.empty.message"})})]}):n.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(ie,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.noResults.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.noResults.message"})})]}):e.jsx("div",{className:"grid gap-3",children:n.map(b)})}),_==="lite-fix"&&e.jsx("div",{className:"mt-4",children:l.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(de,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.empty.title"},{type:"lite-fix"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.empty.message"})})]}):x.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(ie,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.noResults.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.noResults.message"})})]}):e.jsx("div",{className:"grid gap-3",children:x.map(b)})}),_==="multi-cli-plan"&&e.jsx("div",{className:"mt-4",children:u.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(de,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.empty.title"},{type:"multi-cli-plan"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.empty.message"})})]}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(ie,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.noResults.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.noResults.message"})})]}):e.jsx("div",{className:"grid gap-3",children:y.map(O)})}),e.jsx(He,{task:m,isOpen:!!m,onClose:()=>g(null)})]})}export{As as LiteTasksPage,As as default};
77
- //# sourceMappingURL=LiteTasksPage-CSt2oVKQ.js.map
76
+ */const ls=R("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);function rs(s){var h;return s?(h=s.items)!=null&&h.length?s.items:s.data?Object.entries(s.data).map(([a,o])=>({id:a,title:a.replace(/-/g," ").replace(/^\w/,l=>l.toUpperCase()),...typeof o=="object"&&o!==null?o:{}})):[]:[]}function G({icon:s,title:h,badge:a,children:o,defaultOpen:l=!0}){const[u,f]=j.useState(l);return e.jsxs(Q,{className:"border-border",onClick:p=>p.stopPropagation(),children:[e.jsxs("button",{className:"w-full flex items-center gap-2 p-3 text-left hover:bg-muted/50 transition-colors",onClick:()=>f(!u),children:[e.jsx("span",{className:"text-muted-foreground",children:s}),e.jsx("span",{className:"text-sm font-medium text-foreground flex-1",children:h}),a&&e.jsx(i,{variant:"secondary",className:"text-[10px]",children:a}),u?e.jsx(te,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ae,{className:"h-4 w-4 text-muted-foreground"})]}),u&&e.jsx(Z,{className:"px-3 pb-3 pt-0",children:o})]})}function _e({contextData:s,session:h}){var c,t,m,g,A,$,H,v,B,z,D,L,W,F;const{formatMessage:a}=Y(),o=h.plan||{},l=s.context,u=!!((c=s.explorations)!=null&&c.manifest),f=rs(s.diagnoses),p=!!((t=s.diagnoses)!=null&&t.manifest||f.length>0),M=!!l,r=!!((m=o.focus_paths)!=null&&m.length),_=!!o.summary;return u||p||M||r||_?e.jsxs("div",{className:"space-y-3",children:[u&&e.jsx(G,{icon:e.jsx(Ge,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.explorations"}),badge:(A=(g=s.explorations)==null?void 0:g.manifest)!=null&&A.exploration_count?a({id:"liteTasks.contextPanel.explorationsCount"},{count:s.explorations.manifest.exploration_count}):void 0,children:e.jsxs("div",{className:"space-y-2",children:[!!((H=($=s.explorations)==null?void 0:$.manifest)!=null&&H.task_description)&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.taskDescription"}),":"]})," ",String(s.explorations.manifest.task_description)]}),!!((B=(v=s.explorations)==null?void 0:v.manifest)!=null&&B.complexity)&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.complexity"}),":"]})," ",e.jsx(i,{variant:"info",className:"text-[10px]",children:String(s.explorations.manifest.complexity)})]}),((z=s.explorations)==null?void 0:z.data)&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:Object.keys(s.explorations.data).map(n=>e.jsx(i,{variant:"secondary",className:"text-[10px] capitalize",children:n.replace(/-/g," ")},n))})]})}),p&&e.jsx(G,{icon:e.jsx(ns,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.diagnoses"}),badge:f.length>0?a({id:"liteTasks.contextPanel.diagnosesCount"},{count:f.length}):void 0,children:f.map((n,x)=>e.jsx("div",{className:"text-xs text-muted-foreground py-1 border-b border-border/50 last:border-0",children:n.title||n.description||`Diagnosis ${x+1}`},x))}),M&&l&&e.jsx(G,{icon:e.jsx(K,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.contextPackage"}),children:e.jsxs("div",{className:"space-y-2 text-xs",children:[l.task_description&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.taskDescription"}),":"]})," ",l.task_description]}),l.constraints&&l.constraints.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground mb-1",children:e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.constraints"}),":"]})}),e.jsx("div",{className:"space-y-1 pl-2",children:l.constraints.map((n,x)=>e.jsxs("div",{className:"text-muted-foreground flex items-start gap-1",children:[e.jsx("span",{className:"text-primary/50",children:"•"}),e.jsx("span",{children:n})]},x))})]}),l.focus_paths&&l.focus_paths.length>0&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.focusPaths"}),":"]})," ",e.jsx("div",{className:"flex flex-wrap gap-1 mt-0.5",children:l.focus_paths.map((n,x)=>e.jsx(i,{variant:"secondary",className:"text-[10px] font-mono",children:n},x))})]}),l.relevant_files&&l.relevant_files.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-muted-foreground mb-1",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.relevantFiles"}),":"]})," ",e.jsx(i,{variant:"outline",className:"text-[10px] align-middle",children:l.relevant_files.length})]}),e.jsx("div",{className:"space-y-0.5 pl-2 max-h-32 overflow-y-auto",children:l.relevant_files.map((n,x)=>{const y=typeof n=="string"?n:n.path,N=typeof n=="string"?void 0:n.reason;return e.jsxs("div",{className:"group flex items-start gap-1 text-muted-foreground hover:bg-muted/30 rounded px-1 py-0.5",children:[e.jsxs("span",{className:"text-primary/50 shrink-0",children:[x+1,"."]}),e.jsx("span",{className:"font-mono text-xs truncate flex-1",title:y,children:y}),N&&e.jsxs("span",{className:"text-[10px] text-muted-foreground/60 truncate ml-1",title:N,children:["(",N,")"]})]},x)})})]}),l.dependencies&&l.dependencies.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground mb-1",children:e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.dependencies"}),":"]})}),e.jsx("div",{className:"flex flex-wrap gap-1",children:l.dependencies.map((n,x)=>{const y=typeof n=="string"?{name:n,version:""}:n;return e.jsxs(i,{variant:"outline",className:"text-[10px]",children:[y.name,y.version&&e.jsxs("span",{className:"ml-1 opacity-70",children:["@",y.version]})]},x)})})]}),l.session_id&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.sessionId"}),":"]})," ",e.jsx("span",{className:"font-mono bg-muted/50 px-1.5 py-0.5 rounded",children:l.session_id})]}),l.metadata&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground mb-1",children:e.jsxs("span",{className:"font-medium text-foreground",children:[a({id:"liteTasks.contextPanel.metadata"}),":"]})}),e.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-0.5 pl-2 text-muted-foreground",children:Object.entries(l.metadata).map(([n,x])=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:"font-mono text-[10px] text-primary/60",children:[n,":"]}),e.jsx("span",{className:"truncate",children:String(x)})]},n))})]})]})}),(l==null?void 0:l.conflict_risks)&&Array.isArray(l.conflict_risks)&&l.conflict_risks.length>0&&e.jsx(G,{icon:e.jsx(Se,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.conflictRisks"}),children:e.jsx("ul",{className:"space-y-1",children:l.conflict_risks.map((n,x)=>{const y=typeof n=="string"?n:n.description,N=typeof n=="string"?void 0:n.severity;return e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[N&&e.jsx(i,{variant:N==="high"?"destructive":"warning",className:"text-[10px]",children:N}),e.jsx("span",{children:y})]},x)})})}),(l==null?void 0:l.conflict_detection)&&e.jsx(qe,{data:l.conflict_detection}),(l==null?void 0:l.assets)&&e.jsx(Re,{data:l.assets}),((D=s.explorations)==null?void 0:D.data)&&Object.values(s.explorations.data).some(n=>{var x,y,N;return((x=n.project_structure)==null?void 0:x.length)||((y=n.relevant_files)==null?void 0:y.length)||((N=n.patterns)==null?void 0:N.length)})&&e.jsx($e,{data:{manifest:{task_description:((L=s.explorations.manifest)==null?void 0:L.task_description)||"",complexity:(W=s.explorations.manifest)==null?void 0:W.complexity,exploration_count:((F=s.explorations.manifest)==null?void 0:F.exploration_count)||Object.keys(s.explorations.data).length},data:s.explorations.data}}),r&&e.jsx(G,{icon:e.jsx(Pe,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.focusPaths"}),children:e.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.focus_paths.map((n,x)=>e.jsx(i,{variant:"secondary",className:"text-[10px] font-mono",children:n},x))})}),_&&e.jsx(G,{icon:e.jsx(Ve,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.summary"}),children:e.jsx("p",{className:"text-xs text-muted-foreground",children:o.summary})}),s.context&&e.jsx(G,{icon:e.jsx(Me,{className:"h-4 w-4"}),title:a({id:"liteTasks.contextPanel.rawJson"}),defaultOpen:!1,children:e.jsx("pre",{className:"text-xs font-mono bg-muted p-3 rounded-lg overflow-x-auto max-h-64 overflow-y-auto whitespace-pre-wrap break-all",children:JSON.stringify(s.context,null,2)})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(K,{className:"h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.contextPanel.empty"})})]})}function cs(s){if(s)return typeof s=="string"?s:s.en||s.zh}function ds({session:s,onTaskClick:h}){const{formatMessage:a}=Y(),[o,l]=j.useState("tasks"),[u,f]=j.useState(null),[p,M]=j.useState(!1),[r,_]=j.useState(null),k=s.tasks||[],c=k.length;return j.useEffect(()=>{if(o==="context"&&!(u||p)){if(!s.path){_("No session path available");return}M(!0),be(s.path).then(t=>{f(t),_(null)}).catch(t=>{_(t.message||"Failed to load context")}).finally(()=>{M(!1)})}},[o,s.path,u,p]),e.jsxs("div",{className:"mt-2 ml-6 pb-2",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[e.jsxs("button",{onClick:t=>{t.stopPropagation(),l("tasks")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="tasks"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(xe,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.tasks"}),e.jsx(i,{variant:"secondary",className:"ml-1 text-[10px] px-1.5 py-0",children:c})]}),e.jsxs("button",{onClick:t=>{t.stopPropagation(),l("context")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="context"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(K,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.context"})]})]}),o==="tasks"&&e.jsx("div",{className:"space-y-2",children:k.map((t,m)=>{var v,B,z,D,L,W,F,n,x,y,N;const g=((B=(v=t.flow_control)==null?void 0:v.target_files)==null?void 0:B.length)||0,A=((D=(z=t.flow_control)==null?void 0:z.implementation_approach)==null?void 0:D.length)||0,$=((W=(L=t.context)==null?void 0:L.acceptance)==null?void 0:W.length)||0,H=((n=(F=t.context)==null?void 0:F.depends_on)==null?void 0:n.length)||0;return e.jsx(Q,{className:"cursor-pointer hover:shadow-sm hover:border-primary/50 transition-all border-border border-l-4 border-l-primary/50",onClick:U=>{U.stopPropagation(),h(t)},children:e.jsxs(Z,{className:"p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(i,{className:"text-xs font-mono shrink-0 bg-primary/10 text-primary border-primary/20",children:t.task_id||`#${m+1}`}),e.jsx("h4",{className:"text-sm font-medium text-foreground line-clamp-1",children:t.title||a({id:"liteTasks.untitled"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[((x=t.meta)==null?void 0:x.type)&&e.jsx(i,{variant:"info",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:t.meta.type}),g>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 gap-0.5 whitespace-nowrap",children:[e.jsx(we,{className:"h-2.5 w-2.5"}),g," files"]}),A>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[A," steps"]}),$>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[$," criteria"]}),H>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),(N=(y=t.context)==null?void 0:y.depends_on)==null?void 0:N.map((U,J)=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-mono border-primary/30 text-primary whitespace-nowrap",children:U},J))]})]})]}),t.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1.5 pl-[calc(1.5rem+0.75rem)] line-clamp-2",children:t.description})]})},t.id||m)})}),o==="context"&&e.jsxs("div",{className:"space-y-3",children:[p&&e.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[e.jsx(Ce,{className:"h-5 w-5 animate-spin mr-2"}),e.jsx("span",{className:"text-sm",children:a({id:"liteTasks.contextPanel.loading"})})]}),r&&!p&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:[e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"}),a({id:"liteTasks.contextPanel.error"}),": ",r]}),!p&&!r&&u&&e.jsx(_e,{contextData:u,session:s}),!p&&!r&&!u&&!s.path&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(K,{className:"h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.contextPanel.empty"})})]})]})]})}function os({round:s,isLast:h}){const{formatMessage:a}=Y(),[o,l]=j.useState(h),u=s.solutions||[],f=s.convergence,p=s.cross_verification,M=s.clarification_questions||[],r=s.cli_executions||{},_=c=>c<1e3?`${c}ms`:`${(c/1e3).toFixed(1)}s`,k=c=>{switch(c){case"converged":return"success";case"continue":return"warning";case"user_input_needed":return"destructive";default:return"secondary"}};return e.jsx(Q,{className:"border-border",children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>l(!o),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary/10 text-primary font-semibold text-sm",children:s.round}),e.jsxs("div",{children:[e.jsxs("h4",{className:"font-medium text-foreground flex items-center gap-2",children:[a({id:"liteTasks.multiCli.round"})," ",s.round,f&&e.jsxs(i,{variant:k(f.recommendation),className:"text-[10px]",children:[f.recommendation==="converged"&&e.jsx(Je,{className:"h-3 w-3 mr-1"}),f.recommendation==="converged"&&a({id:"liteTasks.multiCli.converged"}),f.recommendation==="continue"&&a({id:"liteTasks.multiCli.continuing"}),f.recommendation==="user_input_needed"&&a({id:"liteTasks.multiCli.needsInput"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.timestamp?new Date(s.timestamp).toLocaleString():""})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1",children:Object.entries(r).map(([c,t])=>e.jsx(i,{variant:t.status==="success"?"success":"destructive",className:"text-[10px] px-1.5 py-0",children:c},c))}),o?e.jsx(te,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ae,{className:"h-4 w-4 text-muted-foreground"})]})]}),o&&e.jsxs("div",{className:"mt-4 space-y-4",children:[s.user_feedback_incorporated&&e.jsxs("div",{className:"p-3 bg-primary/5 border border-primary/20 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-primary mb-1",children:[e.jsx(ke,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.userFeedback"})]}),e.jsx("p",{className:"text-sm text-foreground",children:s.user_feedback_incorporated})]}),Object.keys(r).length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(Be,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.cliExecutions"})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(r).map(([c,t])=>e.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted/50 rounded-md text-xs",children:[e.jsx("span",{className:"font-medium",children:c}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:t.model}),e.jsxs(i,{variant:t.status==="success"?"success":"destructive",className:"text-[10px] px-1 py-0",children:[e.jsx(Fe,{className:"h-3 w-3 mr-1"}),_(t.duration_ms)]})]})]},c))})]}),u.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(Te,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.solutions"})," (",u.length,")"]}),e.jsx("div",{className:"space-y-3",children:u.map((c,t)=>e.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg border border-border/50",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("h5",{className:"font-medium text-foreground text-sm",children:c.name}),e.jsx("div",{className:"flex items-center gap-1",children:c.source_cli.map(m=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:m},m))})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:c.summary}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[e.jsxs(i,{variant:"success",className:"text-[10px]",children:[Math.round(c.feasibility*100),"% ",a({id:"liteTasks.multiCli.feasible"})]}),e.jsx(i,{variant:"warning",className:"text-[10px]",children:c.effort}),e.jsxs(i,{variant:c.risk==="high"?"destructive":c.risk==="low"?"success":"warning",className:"text-[10px]",children:[c.risk," ",a({id:"liteTasks.multiCli.risk"})]})]}),e.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[c.pros.length>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1 text-xs text-success",children:[e.jsx(ls,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.pros"})]}),e.jsx("ul",{className:"text-[10px] text-muted-foreground space-y-0.5",children:c.pros.slice(0,3).map((m,g)=>e.jsxs("li",{className:"truncate",children:["• ",m]},g))})]}),c.cons.length>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1 text-xs text-destructive",children:[e.jsx(is,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.cons"})]}),e.jsx("ul",{className:"text-[10px] text-muted-foreground space-y-0.5",children:c.cons.slice(0,3).map((m,g)=>e.jsxs("li",{className:"truncate",children:["• ",m]},g))})]})]})]},t))})]}),f&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(We,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.convergence"})]}),e.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full ${f.score>=.9?"bg-success":f.score>=.7?"bg-warning":"bg-destructive"}`,style:{width:`${f.score*100}%`}})}),e.jsxs("span",{className:"text-xs font-medium",children:[Math.round(f.score*100),"%"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:f.rationale})]})]}),p&&(p.agreements.length>0||p.disagreements.length>0)&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(Xe,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.crossVerification"})]}),e.jsxs("div",{className:"space-y-2",children:[p.agreements.length>0&&e.jsxs("div",{className:"p-3 bg-success/10 border border-success/20 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-success mb-2",children:[e.jsx(ne,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.agreements"})," (",p.agreements.length,")"]}),e.jsx("ul",{className:"text-[10px] text-muted-foreground space-y-1",children:p.agreements.slice(0,5).map((c,t)=>e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx(ne,{className:"h-3 w-3 text-success shrink-0 mt-0.5"}),e.jsx("span",{children:c})]},t))})]}),p.disagreements.length>0&&e.jsxs("div",{className:"p-3 bg-warning/10 border border-warning/20 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-warning mb-2",children:[e.jsx(re,{className:"h-3 w-3"}),a({id:"liteTasks.multiCli.disagreements"})," (",p.disagreements.length,")"]}),e.jsx("div",{className:"space-y-2",children:p.disagreements.map((c,t)=>e.jsxs("div",{className:"text-[10px]",children:[e.jsx("div",{className:"font-medium text-foreground mb-1",children:c.topic}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(i,{variant:"outline",className:"text-[9px] px-1 py-0",children:"gemini"}),e.jsx("span",{className:"text-muted-foreground truncate",children:c.gemini})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(i,{variant:"outline",className:"text-[9px] px-1 py-0",children:"codex"}),e.jsx("span",{className:"text-muted-foreground truncate",children:c.codex})]})]})]},t))})]}),p.resolution&&e.jsxs("div",{className:"text-xs text-muted-foreground italic",children:[a({id:"liteTasks.multiCli.resolution"}),": ",p.resolution]})]})]}),M.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[e.jsx(ye,{className:"h-4 w-4"}),a({id:"liteTasks.multiCli.clarificationQuestions"})," (",M.length,")"]}),e.jsx("ul",{className:"space-y-1",children:M.map((c,t)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(ye,{className:"h-3 w-3 shrink-0 mt-0.5 text-info"}),e.jsx("span",{children:c})]},t))})]})]})]})})}function ms({data:s}){var p,M,r,_,k,c;const{formatMessage:h}=Y(),[a,o]=j.useState(new Set(["solution","plan"])),l=t=>{o(m=>{const g=new Set(m);return g.has(t)?g.delete(t):g.add(t),g})},u=t=>a.has(t),f=({id:t,icon:m,title:g,badge:A,children:$,defaultExpanded:H=!0})=>(j.useEffect(()=>{H&&!a.has(t)&&o(v=>new Set(v).add(t))},[t,H]),e.jsxs(Q,{className:"border-border",children:[e.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 p-3 text-left hover:bg-muted/50 transition-colors",onClick:()=>l(t),children:[e.jsx("span",{className:"text-muted-foreground",children:m}),e.jsx("span",{className:"text-sm font-medium text-foreground flex-1",children:g}),A,u(t)?e.jsx(te,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ae,{className:"h-4 w-4 text-muted-foreground"})]}),u(t)&&e.jsx(Z,{className:"px-3 pb-3 pt-0",children:$})]}));return e.jsxs("div",{className:"space-y-3",children:[s.solution&&e.jsx(f,{id:"solution",icon:e.jsx(Te,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.solution"}),badge:e.jsx("div",{className:"flex items-center gap-1",children:s.solution.source_cli.map(t=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:t},t))}),children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-foreground text-sm",children:s.solution.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.solution.summary}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(i,{variant:"success",className:"text-[10px]",children:[Math.round(s.solution.feasibility*100),"% ",h({id:"liteTasks.multiCli.feasible"})]}),e.jsx(i,{variant:"warning",className:"text-[10px]",children:s.solution.effort}),e.jsxs(i,{variant:s.solution.risk==="high"?"destructive":s.solution.risk==="low"?"success":"warning",className:"text-[10px]",children:[s.solution.risk," ",h({id:"liteTasks.multiCli.risk"})]})]})]})}),s.implementation_plan&&e.jsx(f,{id:"plan",icon:e.jsx(ts,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.implementationPlan"}),badge:e.jsxs(i,{variant:"secondary",className:"text-[10px]",children:[((p=s.implementation_plan.tasks)==null?void 0:p.length)||0," tasks"]}),children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[h({id:"liteTasks.multiCli.context.approach"}),":"]})," ",s.implementation_plan.approach]}),s.implementation_plan.execution_flow&&e.jsx("div",{className:"p-2 bg-muted/50 rounded-md",children:e.jsx("code",{className:"text-xs font-mono text-foreground",children:s.implementation_plan.execution_flow})}),s.implementation_plan.tasks&&s.implementation_plan.tasks.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-xs font-medium text-foreground",children:h({id:"liteTasks.multiCli.context.tasks"})}),e.jsx("div",{className:"space-y-1.5",children:s.implementation_plan.tasks.map((t,m)=>e.jsxs("div",{className:"flex items-start gap-2 p-2 bg-muted/30 rounded-md",children:[e.jsx(i,{variant:"outline",className:"text-[10px] font-mono shrink-0",children:t.id}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-xs font-medium text-foreground",children:t.name}),t.key_point&&e.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5",children:t.key_point}),t.files&&t.files.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:t.files.map((g,A)=>e.jsxs(i,{variant:"secondary",className:"text-[9px] font-mono",children:[g.action==="create"?"+":g.action==="delete"?"-":"~"," ",g.file]},A))})]})]},t.id||m))})]}),s.implementation_plan.milestones&&s.implementation_plan.milestones.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-foreground",children:[e.jsx(Ke,{className:"h-3 w-3"}),h({id:"liteTasks.multiCli.context.milestones"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.implementation_plan.milestones.map((t,m)=>e.jsx(i,{variant:"info",className:"text-[10px]",children:t},m))})]})]})}),s.dependencies&&(((M=s.dependencies.internal)==null?void 0:M.length)>0||((r=s.dependencies.external)==null?void 0:r.length)>0)&&e.jsx(f,{id:"deps",icon:e.jsx(Qe,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.dependencies"}),badge:e.jsx(i,{variant:"secondary",className:"text-[10px]",children:(((_=s.dependencies.internal)==null?void 0:_.length)||0)+(((k=s.dependencies.external)==null?void 0:k.length)||0)}),children:e.jsxs("div",{className:"space-y-2",children:[s.dependencies.internal&&s.dependencies.internal.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-foreground mb-1",children:h({id:"liteTasks.multiCli.context.internal"})}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.dependencies.internal.map((t,m)=>e.jsx(i,{variant:"outline",className:"text-[10px] font-mono",children:t},m))})]}),s.dependencies.external&&s.dependencies.external.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-foreground mb-1",children:h({id:"liteTasks.multiCli.context.external"})}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.dependencies.external.map((t,m)=>e.jsx(i,{variant:"secondary",className:"text-[10px] font-mono",children:t},m))})]})]})}),s.consensus&&((c=s.consensus.agreements)==null?void 0:c.length)>0&&e.jsx(f,{id:"consensus",icon:e.jsx(as,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.consensus"}),badge:e.jsx(i,{variant:"success",className:"text-[10px]",children:s.consensus.agreements.length}),children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("ul",{className:"space-y-1",children:s.consensus.agreements.map((t,m)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(ne,{className:"h-3 w-3 text-success shrink-0 mt-0.5"}),e.jsx("span",{children:t})]},m))}),s.consensus.resolved_conflicts&&e.jsxs("div",{className:"mt-2 p-2 bg-success/10 border border-success/20 rounded-md text-xs text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-success",children:[h({id:"liteTasks.multiCli.context.resolvedConflicts"}),":"]})," ",s.consensus.resolved_conflicts]})]})}),s.technical_concerns&&s.technical_concerns.length>0&&e.jsx(f,{id:"concerns",icon:e.jsx(es,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.technicalConcerns"}),badge:e.jsx(i,{variant:"warning",className:"text-[10px]",children:s.technical_concerns.length}),children:e.jsx("ul",{className:"space-y-1",children:s.technical_concerns.map((t,m)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(re,{className:"h-3 w-3 text-warning shrink-0 mt-0.5"}),e.jsx("span",{children:t})]},m))})}),s.constraints&&s.constraints.length>0&&e.jsx(f,{id:"constraints",icon:e.jsx(Ze,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.constraints"}),badge:e.jsx(i,{variant:"secondary",className:"text-[10px]",children:s.constraints.length}),children:e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.constraints.map((t,m)=>e.jsx(i,{variant:"outline",className:"text-[10px]",children:t},m))})}),(s.task_description||s.session_id)&&e.jsx(f,{id:"info",icon:e.jsx(K,{className:"h-4 w-4"}),title:h({id:"liteTasks.multiCli.context.sessionInfo"}),defaultExpanded:!1,children:e.jsxs("div",{className:"space-y-2 text-xs",children:[s.task_description&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[h({id:"liteTasks.contextPanel.taskDescription"}),":"]})," ",s.task_description]}),s.session_id&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsxs("span",{className:"font-medium text-foreground",children:[h({id:"liteTasks.contextPanel.sessionId"}),":"]})," ",e.jsx("span",{className:"font-mono bg-muted/50 px-1.5 py-0.5 rounded",children:s.session_id})]})]})})]})}function xs({session:s,onTaskClick:h}){var W,F;const{formatMessage:a}=Y(),[o,l]=j.useState("tasks"),[u,f]=j.useState(null),[p,M]=j.useState(!1),[r,_]=j.useState(null),k=s.tasks||[],c=k.length,t=s.latestSynthesis||{},m=s.plan||{},g=s.roundCount||((W=s.metadata)==null?void 0:W.roundId)||1,A=n=>n?typeof n=="string"?n:n.en||n.zh||"":"",$=()=>{if(k.length===0)return"";const n=new Set;k.forEach(b=>{var V;const O=b.task_id||b.id;n.add(O),(V=b.context)!=null&&V.depends_on});const x=k.filter(b=>{var V;const O=((V=b.context)==null?void 0:V.depends_on)||[];return O.length===0||O.every(d=>!n.has(d))}).map(b=>b.task_id||b.id),y=x.length>1?`(${x.join(" | ")})`:x[0]||"",N=new Set(x),U=[y];let J=0;for(;N.size<k.length&&J<20;){J++;const b=[];if(k.forEach(O=>{var w;const V=O.task_id||O.id;if(N.has(V))return;(((w=O.context)==null?void 0:w.depends_on)||[]).every(q=>N.has(q)||!n.has(q))&&b.push(V)}),b.length===0)break;b.forEach(O=>N.add(O)),b.length>1?U.push(`(${b.join(" | ")})`):U.push(b[0])}return U.filter(Boolean).join(" → ")};j.useEffect(()=>{if(o==="context"&&!(u||p)){if(!s.path){_("No session path available");return}M(!0),be(s.path).then(n=>{f(n),_(null)}).catch(n=>{_(n.message||"Failed to load context")}).finally(()=>{M(!1)})}},[o,s.path,u,p]);const H=$(),v=A(m.goal)||A(t.title)||"",B=A(m.solution)||"",z=m.feasibility||0,D=m.effort||"",L=m.risk||"";return e.jsxs("div",{className:"mt-2 ml-6 pb-2",children:[e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground mb-3 pb-2 border-b border-border/50",children:[s.createdAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.createdAt"}),": ",new Date(s.createdAt).toLocaleDateString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(xe,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.tasks"}),": ",c," ",a({id:"liteTasks.tasksCount"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[e.jsxs("button",{onClick:n=>{n.stopPropagation(),l("tasks")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="tasks"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(xe,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.tasks"}),e.jsx(i,{variant:"secondary",className:"ml-1 text-[10px] px-1.5 py-0",children:c})]}),e.jsxs("button",{onClick:n=>{n.stopPropagation(),l("discussion")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="discussion"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(ce,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.multiCli.discussion"}),e.jsx(i,{variant:"secondary",className:"ml-1 text-[10px] px-1.5 py-0",children:g})]}),e.jsxs("button",{onClick:n=>{n.stopPropagation(),l("context")},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${o==="context"?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border hover:bg-muted"}`,children:[e.jsx(K,{className:"h-3.5 w-3.5"}),a({id:"liteTasks.quickCards.context"})]})]}),o==="tasks"&&e.jsxs("div",{className:"space-y-3",children:[(v||B||H)&&e.jsx(Q,{className:"border-border bg-muted/30",children:e.jsxs(Z,{className:"p-3 space-y-2",children:[v&&e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a({id:"liteTasks.multiCli.goal"}),":"]}),e.jsx("span",{className:"ml-2 text-foreground",children:v})]}),B&&e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a({id:"liteTasks.multiCli.solution"}),":"]}),e.jsx("span",{className:"ml-2 text-foreground",children:B})]}),H&&e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a({id:"liteTasks.multiCli.implementation"}),":"]}),e.jsx("code",{className:"ml-2 px-2 py-0.5 rounded bg-background border border-border text-xs font-mono",children:H})]}),(z>0||D||L)&&e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[z>0&&e.jsxs(i,{variant:"success",className:"text-[10px]",children:[z,"%"]}),D&&e.jsx(i,{variant:"warning",className:"text-[10px]",children:D}),L&&e.jsxs(i,{variant:L==="high"?"destructive":L==="medium"?"warning":"success",className:"text-[10px]",children:[L," ",a({id:"liteTasks.multiCli.risk"})]})]})]})}),k.map((n,x)=>{var b,O,V,d,w,q,C,P,T,E,I;const y=((O=(b=n.flow_control)==null?void 0:b.target_files)==null?void 0:O.length)||0,N=((d=(V=n.flow_control)==null?void 0:V.implementation_approach)==null?void 0:d.length)||0,U=((q=(w=n.context)==null?void 0:w.acceptance)==null?void 0:q.length)||0,J=((P=(C=n.context)==null?void 0:C.depends_on)==null?void 0:P.length)||0;return e.jsx(Q,{className:"cursor-pointer hover:shadow-sm hover:border-primary/50 transition-all border-border border-l-4 border-l-primary/50",onClick:S=>{S.stopPropagation(),h(n)},children:e.jsx(Z,{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(i,{className:"text-xs font-mono shrink-0 bg-primary/10 text-primary border-primary/20",children:n.task_id||`T${x+1}`}),e.jsx("h4",{className:"text-sm font-medium text-foreground line-clamp-1",children:n.title||a({id:"liteTasks.untitled"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[((T=n.meta)==null?void 0:T.type)&&e.jsx(i,{variant:"info",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:n.meta.type}),y>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 gap-0.5 whitespace-nowrap",children:[e.jsx(we,{className:"h-2.5 w-2.5"}),y," files"]}),N>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[N," steps"]}),U>0&&e.jsxs(i,{variant:"secondary",className:"text-[10px] px-1.5 py-0 whitespace-nowrap",children:[U," criteria"]}),J>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),(I=(E=n.context)==null?void 0:E.depends_on)==null?void 0:I.map((S,ee)=>e.jsx(i,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-mono border-primary/30 text-primary whitespace-nowrap",children:S},ee))]})]})]})})},n.id||x)})]}),o==="discussion"&&e.jsx("div",{className:"space-y-3",children:s.rounds&&s.rounds.length>0?s.rounds.map((n,x)=>e.jsx(os,{round:n,isLast:x===s.rounds.length-1},n.round||x)):e.jsx(Q,{className:"border-border",children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(ce,{className:"h-5 w-5 text-primary"}),e.jsx("h4",{className:"font-medium text-foreground",children:a({id:"liteTasks.multiCli.discussionRounds"})}),e.jsxs(i,{variant:"secondary",className:"text-xs",children:[g," ",a({id:"liteTasks.rounds"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.multiCli.discussionDescription"})}),v&&e.jsx("div",{className:"mt-3 p-3 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm text-foreground",children:v})})]})})}),o==="context"&&e.jsxs("div",{className:"space-y-3",children:[p&&e.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[e.jsx(Ce,{className:"h-5 w-5 animate-spin mr-2"}),e.jsx("span",{className:"text-sm",children:a({id:"liteTasks.contextPanel.loading"})})]}),r&&!p&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:[e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"}),a({id:"liteTasks.contextPanel.error"}),": ",r]}),!p&&!r&&u&&((F=u.context)!=null&&F.solution?e.jsx(ms,{data:u.context}):e.jsx(_e,{contextData:u,session:s})),!p&&!r&&!u&&!s.path&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(K,{className:"h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a({id:"liteTasks.contextPanel.empty"})})]})]})]})}function As(){const s=Ae(),{subType:h,id:a}=Le(),{litePlan:o,liteFix:l,multiCliPlan:u,isLoading:f,error:p,refetch:M}=Ee(),{formatMessage:r}=Y(),[_,k]=j.useState("lite-plan"),[c,t]=j.useState(null),[m,g]=j.useState(null),A=j.useRef(!1),[$,H]=j.useState(""),[v,B]=j.useState("date"),[z,D]=j.useState("desc"),L=he(Ie),W=he(d=>d.toggleImmersiveMode),F=j.useCallback(d=>{let w=d;if($.trim()){const C=$.toLowerCase();w=d.filter(P=>{var T;return P.id.toLowerCase().includes(C)||((T=P.tasks)==null?void 0:T.some(E=>{var I,S;return((I=E.title)==null?void 0:I.toLowerCase().includes(C))||((S=E.task_id)==null?void 0:S.toLowerCase().includes(C))}))})}return[...w].sort((C,P)=>{var E,I;let T=0;switch(v){case"date":T=new Date(C.createdAt||0).getTime()-new Date(P.createdAt||0).getTime();break;case"name":T=C.id.localeCompare(P.id);break;case"tasks":T=(((E=C.tasks)==null?void 0:E.length)||0)-(((I=P.tasks)==null?void 0:I.length)||0);break}return z==="asc"?T:-T})},[$,v,z]),n=j.useMemo(()=>F(o),[o,F]),x=j.useMemo(()=>F(l),[l,F]),y=j.useMemo(()=>F(u),[u,F]);j.useEffect(()=>{var q;if(!a||A.current||f)return;const w=[...o,...l,...u].find(C=>C.id===a);if(w){A.current=!0,h==="lite-plan"?k("lite-plan"):h==="lite-fix"?k("lite-fix"):h==="multi-cli-plan"&&k("multi-cli-plan"),t(a);const C=(q=w.tasks)==null?void 0:q.find(P=>P.task_id===a||P.id===a);C&&g(C)}},[a,h,f,o,l,u]);const N=d=>{v===d?D(w=>w==="asc"?"desc":"asc"):(B(d),D("desc"))},U=()=>{s("/sessions")},J=d=>({decided:"success",converged:"success",plan_generated:"success",completed:"success",exploring:"info",initialized:"info",analyzing:"warning",debating:"warning",blocked:"destructive",conflict:"destructive"})[d||""]||"secondary",b=d=>{var I;const w=d.type==="lite-plan",q=((I=d.tasks)==null?void 0:I.length)||0,C=c===d.id,P=d.tasks||[],T={completed:P.filter(S=>S.status==="completed").length,inProgress:P.filter(S=>S.status==="in_progress").length,blocked:P.filter(S=>S.status==="blocked").length},E=P[0];return e.jsxs("div",{children:[e.jsx(Q,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t(C?null:d.id),children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"flex-shrink-0",children:C?e.jsx(te,{className:"h-5 w-5 text-muted-foreground"}):e.jsx(ae,{className:"h-5 w-5 text-muted-foreground"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("h3",{className:"font-bold text-foreground text-sm tracking-wide uppercase",children:d.id})})]}),e.jsxs(i,{variant:w?"secondary":"warning",className:"gap-1 flex-shrink-0",children:[w?e.jsx(ge,{className:"h-3 w-3"}):e.jsx(je,{className:"h-3 w-3"}),r({id:w?"liteTasks.type.plan":"liteTasks.type.fix"})]})]}),(E==null?void 0:E.title)&&e.jsx("div",{className:"mb-3 pb-3 border-b border-border/50",children:e.jsx("p",{className:"text-sm text-foreground line-clamp-1",children:E.title})}),e.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-3",children:[T.completed>0&&e.jsxs(i,{variant:"success",className:"gap-1 text-xs",children:[e.jsx(ne,{className:"h-3 w-3"}),T.completed," ",r({id:"liteTasks.status.completed"})]}),T.inProgress>0&&e.jsxs(i,{variant:"warning",className:"gap-1 text-xs",children:[e.jsx(Ne,{className:"h-3 w-3"}),T.inProgress," ",r({id:"liteTasks.status.inProgress"})]}),T.blocked>0&&e.jsxs(i,{variant:"destructive",className:"gap-1 text-xs",children:[e.jsx(re,{className:"h-3 w-3"}),T.blocked," ",r({id:"liteTasks.status.blocked"})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[d.createdAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),new Date(d.createdAt).toLocaleDateString()]}),q>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ve,{className:"h-3.5 w-3.5"}),q," ",r({id:"liteTasks.tasksCount"})]})]})]})}),C&&d.tasks&&d.tasks.length>0&&e.jsx(ds,{session:d,onTaskClick:g})]},d.id)},O=d=>{const w=d.metadata||{},q=d.latestSynthesis||{},C=w.roundId||d.roundCount||1,P=cs(q.title)||r({id:"liteTasks.discussionTopic"}),T=q.status||d.status||"analyzing",E=w.timestamp||d.createdAt||"",I=d.tasks||[],S={completed:I.filter(se=>se.status==="completed").length,inProgress:I.filter(se=>se.status==="in_progress").length,blocked:I.filter(se=>se.status==="blocked").length,total:I.length},ee=c===d.id;return e.jsxs("div",{children:[e.jsx(Q,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t(ee?null:d.id),children:e.jsxs(Z,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"flex-shrink-0",children:ee?e.jsx(te,{className:"h-5 w-5 text-muted-foreground"}):e.jsx(ae,{className:"h-5 w-5 text-muted-foreground"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("h3",{className:"font-bold text-foreground text-sm tracking-wide uppercase",children:d.id})})]}),e.jsxs(i,{variant:"secondary",className:"gap-1 flex-shrink-0",children:[e.jsx(ce,{className:"h-3 w-3"}),r({id:"liteTasks.type.multiCli"})]})]}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-3",children:[e.jsx(ke,{className:"h-4 w-4"}),e.jsx("span",{className:"line-clamp-1",children:P})]}),S.total>0&&e.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-3",children:[S.completed>0&&e.jsxs(i,{variant:"success",className:"gap-1 text-xs",children:[e.jsx(ne,{className:"h-3 w-3"}),S.completed," ",r({id:"liteTasks.status.completed"})]}),S.inProgress>0&&e.jsxs(i,{variant:"warning",className:"gap-1 text-xs",children:[e.jsx(Ne,{className:"h-3 w-3"}),S.inProgress," ",r({id:"liteTasks.status.inProgress"})]}),S.blocked>0&&e.jsxs(i,{variant:"destructive",className:"gap-1 text-xs",children:[e.jsx(re,{className:"h-3 w-3"}),S.blocked," ",r({id:"liteTasks.status.blocked"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[E&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),new Date(E).toLocaleDateString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ss,{className:"h-3.5 w-3.5"}),C," ",r({id:"liteTasks.rounds"})]}),e.jsxs(i,{variant:J(T),className:"gap-1",children:[e.jsx(ze,{className:"h-3 w-3"}),T]})]})]})}),ee&&e.jsx(xs,{session:d,onTaskClick:g})]},d.id)};if(f)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(X,{variant:"ghost",size:"sm",disabled:!0,children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),r({id:"common.actions.back"})]}),e.jsx("div",{className:"h-8 w-64 rounded bg-muted animate-pulse"})]}),e.jsx("div",{className:"h-64 rounded-lg bg-muted animate-pulse"})]});if(p)return e.jsxs("div",{className:"flex items-center gap-2 p-4 rounded-lg bg-destructive/10 border border-destructive/30 text-destructive",children:[e.jsx(pe,{className:"h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:r({id:"common.errors.loadFailed"})}),e.jsx("p",{className:"text-xs mt-0.5",children:p.message})]}),e.jsx(X,{variant:"outline",size:"sm",onClick:()=>M(),children:r({id:"common.actions.retry"})})]});const V=o.length+l.length+u.length;return e.jsxs("div",{className:fe("space-y-6",L&&"h-screen overflow-hidden"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(X,{variant:"ghost",size:"sm",onClick:U,children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),r({id:"common.actions.back"})]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:r({id:"liteTasks.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.subtitle"},{count:V})})]})]}),e.jsx("button",{onClick:W,className:fe("p-2 rounded-md transition-colors",L?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:L?"Exit Fullscreen":"Fullscreen",children:L?e.jsx(De,{className:"w-4 h-4"}):e.jsx(Ue,{className:"w-4 h-4"})})]}),e.jsx(Oe,{value:_,onValueChange:d=>k(d),tabs:[{value:"lite-plan",label:r({id:"liteTasks.type.plan"}),icon:e.jsx(ge,{className:"h-4 w-4"}),badge:e.jsx(i,{variant:"secondary",className:"ml-2",children:o.length})},{value:"lite-fix",label:r({id:"liteTasks.type.fix"}),icon:e.jsx(je,{className:"h-4 w-4"}),badge:e.jsx(i,{variant:"secondary",className:"ml-2",children:l.length})},{value:"multi-cli-plan",label:r({id:"liteTasks.type.multiCli"}),icon:e.jsx(ce,{className:"h-4 w-4"}),badge:e.jsx(i,{variant:"secondary",className:"ml-2",children:u.length})}]}),e.jsxs("div",{className:"mt-4 flex flex-col sm:flex-row gap-3 items-start sm:items-center justify-between",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(ie,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:r({id:"liteTasks.searchPlaceholder"}),value:$,onChange:d=>H(d.target.value),className:"w-full pl-10 pr-4 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(Ye,{className:"h-3.5 w-3.5"}),r({id:"liteTasks.sortBy"}),":"]}),e.jsxs(X,{variant:v==="date"?"secondary":"ghost",size:"sm",onClick:()=>N("date"),className:"h-8 px-3 text-xs gap-1",children:[e.jsx(le,{className:"h-3.5 w-3.5"}),r({id:"liteTasks.sort.date"}),v==="date"&&(z==="desc"?e.jsx(oe,{className:"h-3 w-3"}):e.jsx(me,{className:"h-3 w-3"}))]}),e.jsxs(X,{variant:v==="name"?"secondary":"ghost",size:"sm",onClick:()=>N("name"),className:"h-8 px-3 text-xs gap-1",children:[r({id:"liteTasks.sort.name"}),v==="name"&&(z==="desc"?e.jsx(oe,{className:"h-3 w-3"}):e.jsx(me,{className:"h-3 w-3"}))]}),e.jsxs(X,{variant:v==="tasks"?"secondary":"ghost",size:"sm",onClick:()=>N("tasks"),className:"h-8 px-3 text-xs gap-1",children:[e.jsx(ve,{className:"h-3.5 w-3.5"}),r({id:"liteTasks.sort.tasks"}),v==="tasks"&&(z==="desc"?e.jsx(oe,{className:"h-3 w-3"}):e.jsx(me,{className:"h-3 w-3"}))]})]})]}),_==="lite-plan"&&e.jsx("div",{className:"mt-4",children:o.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(de,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.empty.title"},{type:"lite-plan"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.empty.message"})})]}):n.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(ie,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.noResults.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.noResults.message"})})]}):e.jsx("div",{className:"grid gap-3",children:n.map(b)})}),_==="lite-fix"&&e.jsx("div",{className:"mt-4",children:l.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(de,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.empty.title"},{type:"lite-fix"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.empty.message"})})]}):x.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(ie,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.noResults.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.noResults.message"})})]}):e.jsx("div",{className:"grid gap-3",children:x.map(b)})}),_==="multi-cli-plan"&&e.jsx("div",{className:"mt-4",children:u.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(de,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.empty.title"},{type:"multi-cli-plan"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.empty.message"})})]}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(ie,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r({id:"liteTasks.noResults.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r({id:"liteTasks.noResults.message"})})]}):e.jsx("div",{className:"grid gap-3",children:y.map(O)})}),e.jsx(He,{task:m,isOpen:!!m,onClose:()=>g(null)})]})}export{As as LiteTasksPage,As as default};
77
+ //# sourceMappingURL=LiteTasksPage-B5c2Kb9r.js.map