@shipit-ai/cli 1.165.0 → 1.166.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (742) hide show
  1. package/LICENSE +2 -1
  2. package/README.md +6 -0
  3. package/apis/json-schema/AgentSession.yaml +1 -1
  4. package/apis/json-schema/AgentType.yaml +2 -0
  5. package/dist/eslint.config.mjs +2 -0
  6. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +1 -1
  7. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.js +1 -1
  8. package/dist/packages/core/src/application/use-cases/agents/delete-agent-run.use-case.js +1 -1
  9. package/dist/packages/core/src/domain/generated/output.d.ts +3 -1
  10. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  11. package/dist/packages/core/src/domain/generated/output.js +2 -0
  12. package/dist/packages/core/src/infrastructure/di/modules/agents.module.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/di/modules/agents.module.js +6 -0
  14. package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -1
  15. package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.js +33 -0
  16. package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -1
  17. package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.js +2 -0
  18. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts +1 -1
  19. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.js +1 -1
  20. package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.d.ts +34 -0
  21. package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.d.ts.map +1 -0
  22. package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.js +149 -0
  23. package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +2 -2
  24. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.d.ts +1 -1
  25. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.d.ts.map +1 -1
  26. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.js +2 -2
  27. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.d.ts +1 -1
  28. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.d.ts.map +1 -1
  29. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.js +1 -1
  30. package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.d.ts +37 -0
  31. package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.d.ts.map +1 -0
  32. package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.js +150 -0
  33. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +1 -1
  34. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +1 -1
  35. package/dist/packages/core/src/infrastructure/services/git/merge-strategy.service.js +1 -1
  36. package/dist/packages/core/src/infrastructure/services/interactive/feature-context.builder.js +1 -1
  37. package/dist/packages/core/src/infrastructure/services/notifications/notification-bus.js +1 -1
  38. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -1
  39. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +3 -3
  40. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/copilot-cli.json +31 -0
  41. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/rovo-dev.json +31 -0
  42. package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts.map +1 -1
  43. package/dist/src/presentation/web/app/actions/check-agent-auth.js +35 -0
  44. package/dist/src/presentation/web/app/actions/check-agent-tool.d.ts.map +1 -1
  45. package/dist/src/presentation/web/app/actions/check-agent-tool.js +4 -0
  46. package/dist/src/presentation/web/app/actions/get-all-agent-models.d.ts.map +1 -1
  47. package/dist/src/presentation/web/app/actions/get-all-agent-models.js +8 -2
  48. package/dist/src/presentation/web/components/assistant-ui/thread.js +2 -2
  49. package/dist/src/presentation/web/components/common/action-button/action-button.js +2 -2
  50. package/dist/src/presentation/web/components/common/action-button/action-button.stories.d.ts +1 -1
  51. package/dist/src/presentation/web/components/common/action-button/action-button.stories.d.ts.map +1 -1
  52. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.d.ts.map +1 -1
  53. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.js +3 -2
  54. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.stories.d.ts +1 -1
  55. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.stories.d.ts.map +1 -1
  56. package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.stories.js +1 -1
  57. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map +1 -1
  58. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.js +2 -2
  59. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts +1 -1
  60. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map +1 -1
  61. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js +1 -1
  62. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +2 -2
  63. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts +1 -1
  64. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map +1 -1
  65. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js +1 -1
  66. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts +1 -1
  67. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts.map +1 -1
  68. package/dist/src/presentation/web/components/common/ci-status-badge/ci-status-badge.js +4 -4
  69. package/dist/src/presentation/web/components/common/ci-status-badge/ci-status-badge.stories.d.ts +1 -1
  70. package/dist/src/presentation/web/components/common/ci-status-badge/ci-status-badge.stories.d.ts.map +1 -1
  71. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +3 -3
  72. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts +1 -1
  73. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts.map +1 -1
  74. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.js +1 -1
  75. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.stories.d.ts +1 -1
  76. package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.stories.d.ts.map +1 -1
  77. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  78. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +3 -3
  79. package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.stories.d.ts +1 -1
  80. package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.stories.d.ts.map +1 -1
  81. package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +5 -5
  82. package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.stories.d.ts +1 -1
  83. package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.stories.d.ts.map +1 -1
  84. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +2 -2
  85. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts +1 -1
  86. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts.map +1 -1
  87. package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.js +1 -1
  88. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +2 -2
  89. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts +1 -1
  90. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts.map +1 -1
  91. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.js +2 -2
  92. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.d.ts +1 -1
  93. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.d.ts.map +1 -1
  94. package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.js +1 -1
  95. package/dist/src/presentation/web/components/common/drawer-revision-input/drawer-revision-input.stories.d.ts +1 -1
  96. package/dist/src/presentation/web/components/common/drawer-revision-input/drawer-revision-input.stories.d.ts.map +1 -1
  97. package/dist/src/presentation/web/components/common/drawer-revision-input/drawer-revision-input.stories.js +1 -1
  98. package/dist/src/presentation/web/components/common/editor-type-icons.stories.d.ts +1 -1
  99. package/dist/src/presentation/web/components/common/editor-type-icons.stories.d.ts.map +1 -1
  100. package/dist/src/presentation/web/components/common/elapsed-time/elapsed-time.stories.d.ts +1 -1
  101. package/dist/src/presentation/web/components/common/elapsed-time/elapsed-time.stories.d.ts.map +1 -1
  102. package/dist/src/presentation/web/components/common/empty-state/empty-state.stories.d.ts +1 -1
  103. package/dist/src/presentation/web/components/common/empty-state/empty-state.stories.d.ts.map +1 -1
  104. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +1 -1
  105. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  106. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +1 -1
  107. package/dist/src/presentation/web/components/common/feature-create-drawer/parent-feature-combobox.stories.d.ts +1 -1
  108. package/dist/src/presentation/web/components/common/feature-create-drawer/parent-feature-combobox.stories.d.ts.map +1 -1
  109. package/dist/src/presentation/web/components/common/feature-create-drawer/prompt-section.stories.d.ts +1 -1
  110. package/dist/src/presentation/web/components/common/feature-create-drawer/prompt-section.stories.d.ts.map +1 -1
  111. package/dist/src/presentation/web/components/common/feature-create-drawer/prompt-section.stories.js +1 -1
  112. package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.js +2 -2
  113. package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts +1 -1
  114. package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts.map +1 -1
  115. package/dist/src/presentation/web/components/common/feature-create-drawer/workflow-options-section.stories.d.ts +1 -1
  116. package/dist/src/presentation/web/components/common/feature-create-drawer/workflow-options-section.stories.d.ts.map +1 -1
  117. package/dist/src/presentation/web/components/common/feature-create-drawer/workflow-options-section.stories.js +1 -1
  118. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +7 -7
  119. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts +1 -1
  120. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts.map +1 -1
  121. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.js +2 -2
  122. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts +1 -1
  123. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts.map +1 -1
  124. package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.js +1 -1
  125. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.js +4 -6
  126. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.stories.d.ts +1 -1
  127. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.stories.d.ts.map +1 -1
  128. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +2 -2
  129. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.d.ts +1 -1
  130. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.d.ts.map +1 -1
  131. package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.js +2 -2
  132. package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.stories.d.ts +1 -1
  133. package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.stories.d.ts.map +1 -1
  134. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +4 -4
  135. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +1 -1
  136. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
  137. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +1 -1
  138. package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.js +4 -4
  139. package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.d.ts +1 -1
  140. package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.d.ts.map +1 -1
  141. package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts +1 -1
  142. package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts.map +1 -1
  143. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts +1 -1
  144. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts.map +1 -1
  145. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +3 -3
  146. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +5 -11
  147. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +1 -1
  148. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
  149. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +1 -1
  150. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts +1 -1
  151. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts.map +1 -1
  152. package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.stories.d.ts +1 -1
  153. package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.stories.d.ts.map +1 -1
  154. package/dist/src/presentation/web/components/common/feature-status-config.js +2 -2
  155. package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts +1 -1
  156. package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts.map +1 -1
  157. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.js +2 -2
  158. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts +1 -1
  159. package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts.map +1 -1
  160. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts +1 -1
  161. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts.map +1 -1
  162. package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.js +1 -1
  163. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.js +3 -3
  164. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts +1 -1
  165. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts.map +1 -1
  166. package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.js +1 -1
  167. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.js +2 -2
  168. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts +1 -1
  169. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts.map +1 -1
  170. package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.js +1 -1
  171. package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.d.ts +1 -1
  172. package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.d.ts.map +1 -1
  173. package/dist/src/presentation/web/components/common/loading-skeleton/loading-skeleton.stories.d.ts +1 -1
  174. package/dist/src/presentation/web/components/common/loading-skeleton/loading-skeleton.stories.d.ts.map +1 -1
  175. package/dist/src/presentation/web/components/common/merge-review/diff-view.stories.d.ts +1 -1
  176. package/dist/src/presentation/web/components/common/merge-review/diff-view.stories.d.ts.map +1 -1
  177. package/dist/src/presentation/web/components/common/merge-review/merge-review.js +3 -5
  178. package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.d.ts +1 -1
  179. package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.d.ts.map +1 -1
  180. package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.js +1 -1
  181. package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.js +2 -2
  182. package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts +1 -1
  183. package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts.map +1 -1
  184. package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.js +1 -1
  185. package/dist/src/presentation/web/components/common/page-header/page-header.stories.d.ts +1 -1
  186. package/dist/src/presentation/web/components/common/page-header/page-header.stories.d.ts.map +1 -1
  187. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.d.ts +1 -1
  188. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.d.ts.map +1 -1
  189. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.js +1 -1
  190. package/dist/src/presentation/web/components/common/product-decisions-summary/product-decisions-summary.stories.d.ts +1 -1
  191. package/dist/src/presentation/web/components/common/product-decisions-summary/product-decisions-summary.stories.d.ts.map +1 -1
  192. package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.js +2 -2
  193. package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.stories.d.ts +1 -1
  194. package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.stories.d.ts.map +1 -1
  195. package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.stories.js +1 -1
  196. package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.js +2 -2
  197. package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.stories.d.ts +1 -1
  198. package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.stories.d.ts.map +1 -1
  199. package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.stories.js +1 -1
  200. package/dist/src/presentation/web/components/common/repo-group/repo-group.stories.d.ts +1 -1
  201. package/dist/src/presentation/web/components/common/repo-group/repo-group.stories.d.ts.map +1 -1
  202. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts +1 -1
  203. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts.map +1 -1
  204. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +4 -7
  205. package/dist/src/presentation/web/components/common/repository-node/repository-node.stories.d.ts +1 -1
  206. package/dist/src/presentation/web/components/common/repository-node/repository-node.stories.d.ts.map +1 -1
  207. package/dist/src/presentation/web/components/common/server-log-viewer/server-log-viewer.stories.d.ts +1 -1
  208. package/dist/src/presentation/web/components/common/server-log-viewer/server-log-viewer.stories.d.ts.map +1 -1
  209. package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.stories.d.ts +1 -1
  210. package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.stories.d.ts.map +1 -1
  211. package/dist/src/presentation/web/components/common/sidebar-collapse-toggle/sidebar-collapse-toggle.stories.d.ts +1 -1
  212. package/dist/src/presentation/web/components/common/sidebar-collapse-toggle/sidebar-collapse-toggle.stories.d.ts.map +1 -1
  213. package/dist/src/presentation/web/components/common/sidebar-nav-item/sidebar-nav-item.stories.d.ts +1 -1
  214. package/dist/src/presentation/web/components/common/sidebar-nav-item/sidebar-nav-item.stories.d.ts.map +1 -1
  215. package/dist/src/presentation/web/components/common/sidebar-section-header/sidebar-section-header.stories.d.ts +1 -1
  216. package/dist/src/presentation/web/components/common/sidebar-section-header/sidebar-section-header.stories.d.ts.map +1 -1
  217. package/dist/src/presentation/web/components/common/sound-toggle/sound-toggle.stories.d.ts +1 -1
  218. package/dist/src/presentation/web/components/common/sound-toggle/sound-toggle.stories.d.ts.map +1 -1
  219. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.js +4 -4
  220. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.stories.d.ts +1 -1
  221. package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.stories.d.ts.map +1 -1
  222. package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.d.ts +1 -1
  223. package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.d.ts.map +1 -1
  224. package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.js +1 -1
  225. package/dist/src/presentation/web/components/common/theme-toggle/theme-toggle.stories.d.ts +1 -1
  226. package/dist/src/presentation/web/components/common/theme-toggle/theme-toggle.stories.d.ts.map +1 -1
  227. package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.d.ts +1 -1
  228. package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.d.ts.map +1 -1
  229. package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.js +7 -7
  230. package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.stories.d.ts +1 -1
  231. package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.stories.d.ts.map +1 -1
  232. package/dist/src/presentation/web/components/features/chat/ChatComposer.stories.d.ts +1 -1
  233. package/dist/src/presentation/web/components/features/chat/ChatComposer.stories.d.ts.map +1 -1
  234. package/dist/src/presentation/web/components/features/chat/ChatComposer.stories.js +1 -1
  235. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts +1 -1
  236. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts.map +1 -1
  237. package/dist/src/presentation/web/components/features/chat/ChatInput.stories.d.ts +1 -1
  238. package/dist/src/presentation/web/components/features/chat/ChatInput.stories.d.ts.map +1 -1
  239. package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.stories.d.ts +1 -1
  240. package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.stories.d.ts.map +1 -1
  241. package/dist/src/presentation/web/components/features/chat/ChatMessageList.stories.d.ts +2 -2
  242. package/dist/src/presentation/web/components/features/chat/ChatMessageList.stories.d.ts.map +1 -1
  243. package/dist/src/presentation/web/components/features/chat/ChatSheet.stories.d.ts +2 -2
  244. package/dist/src/presentation/web/components/features/chat/ChatSheet.stories.d.ts.map +1 -1
  245. package/dist/src/presentation/web/components/features/chat/ChatTab.stories.d.ts +1 -1
  246. package/dist/src/presentation/web/components/features/chat/ChatTab.stories.d.ts.map +1 -1
  247. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +9 -13
  248. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.stories.d.ts +1 -1
  249. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.stories.d.ts.map +1 -1
  250. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  251. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +3 -2
  252. package/dist/src/presentation/web/components/features/control-center/control-center-inner.stories.d.ts +2 -2
  253. package/dist/src/presentation/web/components/features/control-center/control-center-inner.stories.d.ts.map +1 -1
  254. package/dist/src/presentation/web/components/features/control-center/control-center.stories.d.ts +1 -1
  255. package/dist/src/presentation/web/components/features/control-center/control-center.stories.d.ts.map +1 -1
  256. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +3 -3
  257. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.d.ts +1 -1
  258. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.d.ts.map +1 -1
  259. package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.js +1 -1
  260. package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.stories.d.ts +2 -2
  261. package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.stories.d.ts.map +1 -1
  262. package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.stories.js +1 -1
  263. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.stories.d.ts +1 -1
  264. package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.stories.d.ts.map +1 -1
  265. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.d.ts +1 -1
  266. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.d.ts.map +1 -1
  267. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.js +1 -4
  268. package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.d.ts +1 -1
  269. package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.d.ts.map +1 -1
  270. package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.js +1 -1
  271. package/dist/src/presentation/web/components/features/settings/ModelPicker/ModelPicker.stories.d.ts +1 -1
  272. package/dist/src/presentation/web/components/features/settings/ModelPicker/ModelPicker.stories.d.ts.map +1 -1
  273. package/dist/src/presentation/web/components/features/settings/ModelPicker/ModelPicker.stories.js +1 -1
  274. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts +1 -1
  275. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts.map +1 -1
  276. package/dist/src/presentation/web/components/features/settings/ci-settings-section.stories.d.ts +1 -1
  277. package/dist/src/presentation/web/components/features/settings/ci-settings-section.stories.d.ts.map +1 -1
  278. package/dist/src/presentation/web/components/features/settings/database-settings-section.stories.d.ts +1 -1
  279. package/dist/src/presentation/web/components/features/settings/database-settings-section.stories.d.ts.map +1 -1
  280. package/dist/src/presentation/web/components/features/settings/environment-settings-section.stories.d.ts +1 -1
  281. package/dist/src/presentation/web/components/features/settings/environment-settings-section.stories.d.ts.map +1 -1
  282. package/dist/src/presentation/web/components/features/settings/fab-layout-settings-section.stories.d.ts +1 -1
  283. package/dist/src/presentation/web/components/features/settings/fab-layout-settings-section.stories.d.ts.map +1 -1
  284. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts +1 -1
  285. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  286. package/dist/src/presentation/web/components/features/settings/interactive-agent-settings-section.stories.d.ts +1 -1
  287. package/dist/src/presentation/web/components/features/settings/interactive-agent-settings-section.stories.d.ts.map +1 -1
  288. package/dist/src/presentation/web/components/features/settings/language-settings-section.stories.d.ts +1 -1
  289. package/dist/src/presentation/web/components/features/settings/language-settings-section.stories.d.ts.map +1 -1
  290. package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.d.ts +1 -1
  291. package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.d.ts.map +1 -1
  292. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts +1 -1
  293. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  294. package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.d.ts +1 -1
  295. package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.d.ts.map +1 -1
  296. package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.js +1 -1
  297. package/dist/src/presentation/web/components/features/settings/stage-timeouts-settings-section.stories.d.ts +1 -1
  298. package/dist/src/presentation/web/components/features/settings/stage-timeouts-settings-section.stories.d.ts.map +1 -1
  299. package/dist/src/presentation/web/components/features/settings/timeout-slider.stories.d.ts +1 -1
  300. package/dist/src/presentation/web/components/features/settings/timeout-slider.stories.d.ts.map +1 -1
  301. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts +1 -1
  302. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts.map +1 -1
  303. package/dist/src/presentation/web/components/features/skills/category-filter.stories.d.ts +1 -1
  304. package/dist/src/presentation/web/components/features/skills/category-filter.stories.d.ts.map +1 -1
  305. package/dist/src/presentation/web/components/features/skills/skill-card.stories.d.ts +1 -1
  306. package/dist/src/presentation/web/components/features/skills/skill-card.stories.d.ts.map +1 -1
  307. package/dist/src/presentation/web/components/features/skills/skill-card.stories.js +3 -3
  308. package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.stories.d.ts +1 -1
  309. package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.stories.d.ts.map +1 -1
  310. package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.stories.js +3 -3
  311. package/dist/src/presentation/web/components/features/skills/skill-list.stories.d.ts +1 -1
  312. package/dist/src/presentation/web/components/features/skills/skill-list.stories.d.ts.map +1 -1
  313. package/dist/src/presentation/web/components/features/skills/skill-list.stories.js +4 -4
  314. package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts +1 -1
  315. package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts.map +1 -1
  316. package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.js +8 -8
  317. package/dist/src/presentation/web/components/features/tools/tool-card.js +3 -5
  318. package/dist/src/presentation/web/components/features/tools/tool-card.stories.d.ts +1 -1
  319. package/dist/src/presentation/web/components/features/tools/tool-card.stories.d.ts.map +1 -1
  320. package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.js +3 -7
  321. package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.stories.d.ts +1 -1
  322. package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.stories.d.ts.map +1 -1
  323. package/dist/src/presentation/web/components/features/tools/tools-page-client.stories.d.ts +1 -1
  324. package/dist/src/presentation/web/components/features/tools/tools-page-client.stories.d.ts.map +1 -1
  325. package/dist/src/presentation/web/components/features/version/version-page-client.stories.d.ts +1 -1
  326. package/dist/src/presentation/web/components/features/version/version-page-client.stories.d.ts.map +1 -1
  327. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.stories.d.ts +1 -1
  328. package/dist/src/presentation/web/components/layouts/app-shell/app-shell.stories.d.ts.map +1 -1
  329. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts +1 -1
  330. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
  331. package/dist/src/presentation/web/components/layouts/dashboard-layout/dashboard-layout.stories.d.ts +1 -1
  332. package/dist/src/presentation/web/components/layouts/dashboard-layout/dashboard-layout.stories.d.ts.map +1 -1
  333. package/dist/src/presentation/web/components/layouts/header/header.stories.d.ts +1 -1
  334. package/dist/src/presentation/web/components/layouts/header/header.stories.d.ts.map +1 -1
  335. package/dist/src/presentation/web/components/layouts/sidebar/sidebar.stories.d.ts +1 -1
  336. package/dist/src/presentation/web/components/layouts/sidebar/sidebar.stories.d.ts.map +1 -1
  337. package/dist/src/presentation/web/components/ui/accordion.stories.d.ts +1 -1
  338. package/dist/src/presentation/web/components/ui/accordion.stories.d.ts.map +1 -1
  339. package/dist/src/presentation/web/components/ui/alert-dialog.stories.d.ts +1 -1
  340. package/dist/src/presentation/web/components/ui/alert-dialog.stories.d.ts.map +1 -1
  341. package/dist/src/presentation/web/components/ui/alert.stories.d.ts +1 -1
  342. package/dist/src/presentation/web/components/ui/alert.stories.d.ts.map +1 -1
  343. package/dist/src/presentation/web/components/ui/alert.stories.js +2 -2
  344. package/dist/src/presentation/web/components/ui/badge.stories.d.ts +1 -1
  345. package/dist/src/presentation/web/components/ui/badge.stories.d.ts.map +1 -1
  346. package/dist/src/presentation/web/components/ui/button.stories.d.ts +1 -1
  347. package/dist/src/presentation/web/components/ui/button.stories.d.ts.map +1 -1
  348. package/dist/src/presentation/web/components/ui/card.stories.d.ts +1 -1
  349. package/dist/src/presentation/web/components/ui/card.stories.d.ts.map +1 -1
  350. package/dist/src/presentation/web/components/ui/checkbox-group-item.stories.d.ts +1 -1
  351. package/dist/src/presentation/web/components/ui/checkbox-group-item.stories.d.ts.map +1 -1
  352. package/dist/src/presentation/web/components/ui/checkbox-group.stories.d.ts +1 -1
  353. package/dist/src/presentation/web/components/ui/checkbox-group.stories.d.ts.map +1 -1
  354. package/dist/src/presentation/web/components/ui/checkbox.stories.d.ts +1 -1
  355. package/dist/src/presentation/web/components/ui/checkbox.stories.d.ts.map +1 -1
  356. package/dist/src/presentation/web/components/ui/comet-spinner.stories.d.ts +1 -1
  357. package/dist/src/presentation/web/components/ui/comet-spinner.stories.d.ts.map +1 -1
  358. package/dist/src/presentation/web/components/ui/command.stories.d.ts +2 -2
  359. package/dist/src/presentation/web/components/ui/command.stories.d.ts.map +1 -1
  360. package/dist/src/presentation/web/components/ui/dialog.stories.d.ts +1 -1
  361. package/dist/src/presentation/web/components/ui/dialog.stories.d.ts.map +1 -1
  362. package/dist/src/presentation/web/components/ui/drawer.stories.d.ts +1 -1
  363. package/dist/src/presentation/web/components/ui/drawer.stories.d.ts.map +1 -1
  364. package/dist/src/presentation/web/components/ui/dropdown-menu.stories.d.ts +1 -1
  365. package/dist/src/presentation/web/components/ui/dropdown-menu.stories.d.ts.map +1 -1
  366. package/dist/src/presentation/web/components/ui/github-icon.d.ts +13 -0
  367. package/dist/src/presentation/web/components/ui/github-icon.d.ts.map +1 -0
  368. package/dist/src/presentation/web/components/ui/github-icon.js +15 -0
  369. package/dist/src/presentation/web/components/ui/github-icon.stories.d.ts +10 -0
  370. package/dist/src/presentation/web/components/ui/github-icon.stories.d.ts.map +1 -0
  371. package/dist/src/presentation/web/components/ui/github-icon.stories.js +22 -0
  372. package/dist/src/presentation/web/components/ui/input.stories.d.ts +1 -1
  373. package/dist/src/presentation/web/components/ui/input.stories.d.ts.map +1 -1
  374. package/dist/src/presentation/web/components/ui/label.stories.d.ts +1 -1
  375. package/dist/src/presentation/web/components/ui/label.stories.d.ts.map +1 -1
  376. package/dist/src/presentation/web/components/ui/popover.stories.d.ts +1 -1
  377. package/dist/src/presentation/web/components/ui/popover.stories.d.ts.map +1 -1
  378. package/dist/src/presentation/web/components/ui/scroll-area.stories.d.ts +1 -1
  379. package/dist/src/presentation/web/components/ui/scroll-area.stories.d.ts.map +1 -1
  380. package/dist/src/presentation/web/components/ui/select.stories.d.ts +1 -1
  381. package/dist/src/presentation/web/components/ui/select.stories.d.ts.map +1 -1
  382. package/dist/src/presentation/web/components/ui/separator.stories.d.ts +1 -1
  383. package/dist/src/presentation/web/components/ui/separator.stories.d.ts.map +1 -1
  384. package/dist/src/presentation/web/components/ui/sheet.stories.d.ts +1 -1
  385. package/dist/src/presentation/web/components/ui/sheet.stories.d.ts.map +1 -1
  386. package/dist/src/presentation/web/components/ui/sidebar.stories.d.ts +1 -1
  387. package/dist/src/presentation/web/components/ui/sidebar.stories.d.ts.map +1 -1
  388. package/dist/src/presentation/web/components/ui/skeleton.stories.d.ts +1 -1
  389. package/dist/src/presentation/web/components/ui/skeleton.stories.d.ts.map +1 -1
  390. package/dist/src/presentation/web/components/ui/slider.stories.d.ts +1 -1
  391. package/dist/src/presentation/web/components/ui/slider.stories.d.ts.map +1 -1
  392. package/dist/src/presentation/web/components/ui/sonner.stories.d.ts +1 -1
  393. package/dist/src/presentation/web/components/ui/sonner.stories.d.ts.map +1 -1
  394. package/dist/src/presentation/web/components/ui/spinner.stories.d.ts +1 -1
  395. package/dist/src/presentation/web/components/ui/spinner.stories.d.ts.map +1 -1
  396. package/dist/src/presentation/web/components/ui/switch.stories.d.ts +1 -1
  397. package/dist/src/presentation/web/components/ui/switch.stories.d.ts.map +1 -1
  398. package/dist/src/presentation/web/components/ui/tabs.stories.d.ts +1 -1
  399. package/dist/src/presentation/web/components/ui/tabs.stories.d.ts.map +1 -1
  400. package/dist/src/presentation/web/components/ui/textarea.stories.d.ts +1 -1
  401. package/dist/src/presentation/web/components/ui/textarea.stories.d.ts.map +1 -1
  402. package/dist/src/presentation/web/components/ui/tooltip.stories.d.ts +2 -2
  403. package/dist/src/presentation/web/components/ui/tooltip.stories.d.ts.map +1 -1
  404. package/dist/src/presentation/web/hooks/use-notifications.stories.d.ts +1 -1
  405. package/dist/src/presentation/web/hooks/use-notifications.stories.d.ts.map +1 -1
  406. package/dist/src/presentation/web/hooks/use-sound-action.stories.d.ts +1 -1
  407. package/dist/src/presentation/web/hooks/use-sound-action.stories.d.ts.map +1 -1
  408. package/dist/src/presentation/web/hooks/use-sound.stories.d.ts +1 -1
  409. package/dist/src/presentation/web/hooks/use-sound.stories.d.ts.map +1 -1
  410. package/dist/src/presentation/web/lib/session-scanner.js +2 -2
  411. package/dist/src/presentation/web/lib/skills.js +2 -2
  412. package/dist/tsconfig.build.tsbuildinfo +1 -1
  413. package/package.json +21 -24
  414. package/web/.next/BUILD_ID +1 -1
  415. package/web/.next/build-manifest.json +5 -5
  416. package/web/.next/fallback-build-manifest.json +3 -3
  417. package/web/.next/prerender-manifest.json +3 -3
  418. package/web/.next/required-server-files.js +2 -2
  419. package/web/.next/required-server-files.json +2 -2
  420. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +2 -2
  421. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +3 -3
  422. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  423. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  424. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  425. package/web/.next/server/app/(dashboard)/@drawer/chat/page/build-manifest.json +2 -2
  426. package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +3 -3
  427. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  428. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  429. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  430. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
  431. package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +3 -3
  432. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
  433. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  434. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  435. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  436. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
  437. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  438. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  439. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  440. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  441. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +2 -2
  442. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +3 -3
  443. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
  444. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  445. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  446. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  447. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
  448. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
  449. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  450. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  451. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  452. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
  453. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
  454. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  455. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  456. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  457. package/web/.next/server/app/(dashboard)/chat/page/build-manifest.json +2 -2
  458. package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +3 -3
  459. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  460. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  461. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  462. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
  463. package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +3 -3
  464. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
  465. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  466. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  467. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  468. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
  469. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  470. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  471. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  472. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  473. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +2 -2
  474. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +3 -3
  475. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
  476. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  477. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  478. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  479. package/web/.next/server/app/(dashboard)/page/build-manifest.json +2 -2
  480. package/web/.next/server/app/(dashboard)/page/react-loadable-manifest.json +3 -3
  481. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  482. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  483. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  484. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
  485. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
  486. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  487. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  488. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  489. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
  490. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
  491. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  492. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  493. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  494. package/web/.next/server/app/_global-error/page/build-manifest.json +2 -2
  495. package/web/.next/server/app/_global-error.html +1 -1
  496. package/web/.next/server/app/_global-error.rsc +1 -1
  497. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  498. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  499. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  500. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  501. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  502. package/web/.next/server/app/_not-found/page/build-manifest.json +2 -2
  503. package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
  504. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  505. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  506. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  507. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  508. package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
  509. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  510. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  511. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  512. package/web/.next/server/app/api/sessions/route.js +2 -2
  513. package/web/.next/server/app/settings/page/build-manifest.json +2 -2
  514. package/web/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
  515. package/web/.next/server/app/settings/page/server-reference-manifest.json +11 -11
  516. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  517. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  518. package/web/.next/server/app/skills/page/build-manifest.json +2 -2
  519. package/web/.next/server/app/skills/page/react-loadable-manifest.json +3 -3
  520. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  521. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  522. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  523. package/web/.next/server/app/tools/page/build-manifest.json +2 -2
  524. package/web/.next/server/app/tools/page/react-loadable-manifest.json +3 -3
  525. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  526. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  527. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  528. package/web/.next/server/app/version/page/build-manifest.json +2 -2
  529. package/web/.next/server/app/version/page/react-loadable-manifest.json +3 -3
  530. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  531. package/web/.next/server/app/version/page.js.nft.json +1 -1
  532. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  533. package/web/.next/server/chunks/0n.o_server_app_api_interactive_chat_[featureId]_stop_route_actions_09da~zt.js +1 -1
  534. package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js +1 -1
  535. package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js.map +1 -1
  536. package/web/.next/server/chunks/[root-of-the-server]__07suer1._.js.map +1 -1
  537. package/web/.next/server/chunks/[root-of-the-server]__0_.w-eb._.js +1 -1
  538. package/web/.next/server/chunks/[root-of-the-server]__0_.w-eb._.js.map +1 -1
  539. package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
  540. package/web/.next/server/chunks/[root-of-the-server]__13ni_ow._.js +1 -1
  541. package/web/.next/server/chunks/ssr/{0lyk_lucide-react_dist_esm_icons_0shxsmr._.js → 08qz_lucide-react_dist_esm_icons_0_gqlce._.js} +2 -2
  542. package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0_gqlce._.js.map +1 -0
  543. package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0zwb4s4._.js +3 -0
  544. package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0zwb4s4._.js.map +1 -0
  545. package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js +1 -1
  546. package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js.map +1 -1
  547. package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js +1 -1
  548. package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js.map +1 -1
  549. package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js +1 -1
  550. package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js.map +1 -1
  551. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
  552. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
  553. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +3 -3
  554. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
  555. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
  556. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
  557. package/web/.next/server/chunks/ssr/11es_next_dist_0e36~wi._.js +2 -2
  558. package/web/.next/server/chunks/ssr/11es_next_dist_client_components_058~c_t._.js +1 -1
  559. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0l-25e2.js +1 -1
  560. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_global-chat-drawer-client_tsx_03s32.q._.js +1 -1
  561. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
  562. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
  563. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0uxn6-j._.js → [root-of-the-server]__045sv4b._.js} +2 -2
  564. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0uxn6-j._.js.map → [root-of-the-server]__045sv4b._.js.map} +1 -1
  565. package/web/.next/server/chunks/ssr/[root-of-the-server]__0brje6_._.js +1 -1
  566. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0np51e2._.js → [root-of-the-server]__0d_0_fp._.js} +2 -2
  567. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0np51e2._.js.map → [root-of-the-server]__0d_0_fp._.js.map} +1 -1
  568. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0~h382a._.js → [root-of-the-server]__0l4d7e.._.js} +2 -2
  569. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0~h382a._.js.map → [root-of-the-server]__0l4d7e.._.js.map} +1 -1
  570. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0_ag.8y._.js → [root-of-the-server]__0lslgap._.js} +3 -3
  571. package/web/.next/server/chunks/ssr/[root-of-the-server]__0lslgap._.js.map +1 -0
  572. package/web/.next/server/chunks/ssr/[root-of-the-server]__0o3qggc._.js +3 -0
  573. package/web/.next/server/chunks/ssr/[root-of-the-server]__0o3qggc._.js.map +1 -0
  574. package/web/.next/server/chunks/ssr/{[root-of-the-server]__01~y8wi._.js → [root-of-the-server]__0r32z03._.js} +2 -2
  575. package/web/.next/server/chunks/ssr/{[root-of-the-server]__01~y8wi._.js.map → [root-of-the-server]__0r32z03._.js.map} +1 -1
  576. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
  577. package/web/.next/server/chunks/ssr/[root-of-the-server]__122xqm6._.js +1 -1
  578. package/web/.next/server/chunks/ssr/[root-of-the-server]__12g8h3_._.js +1 -1
  579. package/web/.next/server/chunks/ssr/[root-of-the-server]__12g8h3_._.js.map +1 -1
  580. package/web/.next/server/chunks/ssr/{_0d-pkk0._.js → _0-09vq7._.js} +2 -2
  581. package/web/.next/server/chunks/ssr/_0-09vq7._.js.map +1 -0
  582. package/web/.next/server/chunks/ssr/_0.rsra~._.js.map +1 -1
  583. package/web/.next/server/chunks/ssr/_00k65h-._.js +3 -0
  584. package/web/.next/server/chunks/ssr/_00k65h-._.js.map +1 -0
  585. package/web/.next/server/chunks/ssr/_01mq~sm._.js +2 -2
  586. package/web/.next/server/chunks/ssr/_01mq~sm._.js.map +1 -1
  587. package/web/.next/server/chunks/ssr/_01sesw0._.js +3 -0
  588. package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -0
  589. package/web/.next/server/chunks/ssr/_04s_q5r._.js +1 -1
  590. package/web/.next/server/chunks/ssr/_04s_q5r._.js.map +1 -1
  591. package/web/.next/server/chunks/ssr/{_0xtds88._.js → _08i-c2n._.js} +2 -2
  592. package/web/.next/server/chunks/ssr/_08i-c2n._.js.map +1 -0
  593. package/web/.next/server/chunks/ssr/{_0jk5q_z._.js → _09di2m~._.js} +2 -2
  594. package/web/.next/server/chunks/ssr/_09di2m~._.js.map +1 -0
  595. package/web/.next/server/chunks/ssr/_0gdghcr._.js +3 -0
  596. package/web/.next/server/chunks/ssr/_0gdghcr._.js.map +1 -0
  597. package/web/.next/server/chunks/ssr/_0hwjfpu._.js +3 -0
  598. package/web/.next/server/chunks/ssr/_0hwjfpu._.js.map +1 -0
  599. package/web/.next/server/chunks/ssr/_0hw~zvl._.js +3 -0
  600. package/web/.next/server/chunks/ssr/_0hw~zvl._.js.map +1 -0
  601. package/web/.next/server/chunks/ssr/_0jpbsh_._.js +1 -1
  602. package/web/.next/server/chunks/ssr/_0jpbsh_._.js.map +1 -1
  603. package/web/.next/server/chunks/ssr/_0phryzt._.js +3 -0
  604. package/web/.next/server/chunks/ssr/_0phryzt._.js.map +1 -0
  605. package/web/.next/server/chunks/ssr/_0r~xv6k._.js +3 -0
  606. package/web/.next/server/chunks/ssr/_0r~xv6k._.js.map +1 -0
  607. package/web/.next/server/chunks/ssr/_0vyfc4b._.js +3 -0
  608. package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -0
  609. package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
  610. package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
  611. package/web/.next/server/chunks/ssr/{_0j9vx-1._.js → _0y8u4.e._.js} +3 -3
  612. package/web/.next/server/chunks/ssr/_0y8u4.e._.js.map +1 -0
  613. package/web/.next/server/chunks/ssr/_0~7lwu_._.js +3 -0
  614. package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -0
  615. package/web/.next/server/chunks/ssr/{_0rvaoj4._.js → _109n-y4._.js} +2 -2
  616. package/web/.next/server/chunks/ssr/_109n-y4._.js.map +1 -0
  617. package/web/.next/server/chunks/ssr/{_13bl-l1._.js → _12104w0._.js} +2 -2
  618. package/web/.next/server/chunks/ssr/_12104w0._.js.map +1 -0
  619. package/web/.next/server/chunks/ssr/{_09g41d0._.js → _12un22l._.js} +3 -3
  620. package/web/.next/server/chunks/ssr/_12un22l._.js.map +1 -0
  621. package/web/.next/server/chunks/ssr/node_modules__pnpm_0l8_ov3._.js +3 -0
  622. package/web/.next/server/chunks/ssr/node_modules__pnpm_0l8_ov3._.js.map +1 -0
  623. package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js +1 -1
  624. package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js.map +1 -1
  625. package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js +1 -1
  626. package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js.map +1 -1
  627. package/web/.next/server/chunks/ssr/src_presentation_web_05-w-~v._.js +1 -1
  628. package/web/.next/server/chunks/ssr/src_presentation_web_05-w-~v._.js.map +1 -1
  629. package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js +2 -2
  630. package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js.map +1 -1
  631. package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js +1 -1
  632. package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js.map +1 -1
  633. package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js +1 -1
  634. package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js.map +1 -1
  635. package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js +2 -2
  636. package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js.map +1 -1
  637. package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js +1 -1
  638. package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js.map +1 -1
  639. package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js +1 -1
  640. package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js.map +1 -1
  641. package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js +1 -1
  642. package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js.map +1 -1
  643. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js +1 -1
  644. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js.map +1 -1
  645. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js +1 -1
  646. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js.map +1 -1
  647. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js +1 -1
  648. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js.map +1 -1
  649. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_load-settings_ts_0b8f3pf._.js +1 -1
  650. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
  651. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js.map +1 -1
  652. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
  653. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
  654. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js +1 -1
  655. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js.map +1 -1
  656. package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_select_tsx_0b.-59k._.js +1 -1
  657. package/web/.next/server/middleware-build-manifest.js +5 -5
  658. package/web/.next/server/pages/500.html +1 -1
  659. package/web/.next/server/server-reference-manifest.js +1 -1
  660. package/web/.next/server/server-reference-manifest.json +49 -49
  661. package/web/.next/static/chunks/0-lu0b1ewsb0_.js +1 -0
  662. package/web/.next/static/chunks/00uywouqbytc0.js +5 -0
  663. package/web/.next/static/chunks/{0t_48qc0x7bhs.js → 01hf_nf2ge.tn.js} +3 -3
  664. package/web/.next/static/chunks/01~dudieyb7wl.js +5 -0
  665. package/web/.next/static/chunks/{0riti1bs-erm~.js → 02kpdawdtqcxm.js} +1 -1
  666. package/web/.next/static/chunks/{0~er~22zwvx0i.js → 09_oo_kc.j.df.js} +1 -1
  667. package/web/.next/static/chunks/0b01fd0lkhnzf.js +1 -0
  668. package/web/.next/static/chunks/0b_anwzlzr9p7.js +1 -0
  669. package/web/.next/static/chunks/0fg~vc93spa9c.js +1 -0
  670. package/web/.next/static/chunks/0fmbl3o08a~-h.js +1 -0
  671. package/web/.next/static/chunks/0j_0i2qsrwh-c.js +1 -0
  672. package/web/.next/static/chunks/{07yqyvabetyrh.js → 0l.kymg3jmf7n.js} +2 -2
  673. package/web/.next/static/chunks/0m5~9kij3s~81.js +1 -0
  674. package/web/.next/static/chunks/0ntps8p7wo1re.js +1 -0
  675. package/web/.next/static/chunks/{0wmckrtphfa12.js → 0odlgm-ixqorl.js} +1 -1
  676. package/web/.next/static/chunks/0q~uf2s33.48w.js +1 -0
  677. package/web/.next/static/chunks/0rfap2l5xz_-p.js +1 -0
  678. package/web/.next/static/chunks/0rhoh5o1y7grf.js +7 -0
  679. package/web/.next/static/chunks/0sywjtf8m0_fb.js +1 -0
  680. package/web/.next/static/chunks/{071_2_.sfp-im.js → 0tutcr7trd_7d.js} +1 -1
  681. package/web/.next/static/chunks/11bi612fz8agh.js +1 -0
  682. package/web/.next/static/chunks/121l3o3vd~hvn.js +1 -0
  683. package/web/.next/static/chunks/13ryk8qc9y3qu.js +1 -0
  684. package/web/.next/static/chunks/164dnpi666fv_.js +5 -0
  685. package/web/.next/static/chunks/16jcg65-2mxc..js +1 -0
  686. package/web/.next/static/chunks/{turbopack-0ve8f54_veg.u.js → turbopack-0wsav6to5abtk.js} +1 -1
  687. package/web/package.json +5 -5
  688. package/web/.next/server/chunks/ssr/0lyk_lucide-react_dist_esm_icons_06zrfq4._.js +0 -3
  689. package/web/.next/server/chunks/ssr/0lyk_lucide-react_dist_esm_icons_06zrfq4._.js.map +0 -1
  690. package/web/.next/server/chunks/ssr/0lyk_lucide-react_dist_esm_icons_0shxsmr._.js.map +0 -1
  691. package/web/.next/server/chunks/ssr/[root-of-the-server]__0_ag.8y._.js.map +0 -1
  692. package/web/.next/server/chunks/ssr/[root-of-the-server]__12qqi.~._.js +0 -3
  693. package/web/.next/server/chunks/ssr/[root-of-the-server]__12qqi.~._.js.map +0 -1
  694. package/web/.next/server/chunks/ssr/_0.gy.n8._.js +0 -3
  695. package/web/.next/server/chunks/ssr/_0.gy.n8._.js.map +0 -1
  696. package/web/.next/server/chunks/ssr/_0.k7wl.._.js +0 -3
  697. package/web/.next/server/chunks/ssr/_0.k7wl.._.js.map +0 -1
  698. package/web/.next/server/chunks/ssr/_09g41d0._.js.map +0 -1
  699. package/web/.next/server/chunks/ssr/_0aa~oer._.js +0 -3
  700. package/web/.next/server/chunks/ssr/_0aa~oer._.js.map +0 -1
  701. package/web/.next/server/chunks/ssr/_0d-pkk0._.js.map +0 -1
  702. package/web/.next/server/chunks/ssr/_0ez.1o4._.js +0 -3
  703. package/web/.next/server/chunks/ssr/_0ez.1o4._.js.map +0 -1
  704. package/web/.next/server/chunks/ssr/_0j9vx-1._.js.map +0 -1
  705. package/web/.next/server/chunks/ssr/_0jk5q_z._.js.map +0 -1
  706. package/web/.next/server/chunks/ssr/_0n.xy38._.js +0 -3
  707. package/web/.next/server/chunks/ssr/_0n.xy38._.js.map +0 -1
  708. package/web/.next/server/chunks/ssr/_0rvaoj4._.js.map +0 -1
  709. package/web/.next/server/chunks/ssr/_0v.yfmg._.js +0 -3
  710. package/web/.next/server/chunks/ssr/_0v.yfmg._.js.map +0 -1
  711. package/web/.next/server/chunks/ssr/_0vl.03w._.js +0 -3
  712. package/web/.next/server/chunks/ssr/_0vl.03w._.js.map +0 -1
  713. package/web/.next/server/chunks/ssr/_0xtds88._.js.map +0 -1
  714. package/web/.next/server/chunks/ssr/_11kuznh._.js +0 -3
  715. package/web/.next/server/chunks/ssr/_11kuznh._.js.map +0 -1
  716. package/web/.next/server/chunks/ssr/_13bl-l1._.js.map +0 -1
  717. package/web/.next/server/chunks/ssr/_13euo-f._.js +0 -3
  718. package/web/.next/server/chunks/ssr/_13euo-f._.js.map +0 -1
  719. package/web/.next/server/chunks/ssr/node_modules__pnpm_0xyo1be._.js +0 -3
  720. package/web/.next/server/chunks/ssr/node_modules__pnpm_0xyo1be._.js.map +0 -1
  721. package/web/.next/static/chunks/00racug7sobut.js +0 -1
  722. package/web/.next/static/chunks/06sdx5zm71_u5.js +0 -1
  723. package/web/.next/static/chunks/08iq.j3rbmhbm.js +0 -1
  724. package/web/.next/static/chunks/08iuksm8rvb09.js +0 -1
  725. package/web/.next/static/chunks/08se-_opmk~.7.js +0 -1
  726. package/web/.next/static/chunks/09b2usag59_bi.js +0 -5
  727. package/web/.next/static/chunks/0icjwdqytqa_8.js +0 -5
  728. package/web/.next/static/chunks/0qjoc4x5q-aeg.js +0 -1
  729. package/web/.next/static/chunks/0rhzqh.-6e6k7.js +0 -1
  730. package/web/.next/static/chunks/0s-e-ekdbgoqa.js +0 -1
  731. package/web/.next/static/chunks/0u5.s.lv2bae5.js +0 -1
  732. package/web/.next/static/chunks/0vgbvqu82ac1x.js +0 -1
  733. package/web/.next/static/chunks/0w~84g7r9307~.js +0 -1
  734. package/web/.next/static/chunks/0y1nwnouroh6k.js +0 -1
  735. package/web/.next/static/chunks/0zz.xgsd83.3n.js +0 -1
  736. package/web/.next/static/chunks/0~wymq55b2bn3.js +0 -1
  737. package/web/.next/static/chunks/10wo3waalauct.js +0 -5
  738. package/web/.next/static/chunks/15lcx-697j_3z.js +0 -7
  739. package/web/.next/static/chunks/176x256xw_viv.js +0 -1
  740. /package/web/.next/static/{xP_-L4TLYvd3i_sEmljLs → 21GZVGanhwKlq9p5dtTCB}/_buildManifest.js +0 -0
  741. /package/web/.next/static/{xP_-L4TLYvd3i_sEmljLs → 21GZVGanhwKlq9p5dtTCB}/_clientMiddlewareManifest.js +0 -0
  742. /package/web/.next/static/{xP_-L4TLYvd3i_sEmljLs → 21GZVGanhwKlq9p5dtTCB}/_ssgManifest.js +0 -0
@@ -1,7 +1,7 @@
1
- module.exports=[64885,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(85536);a.i(67999);var e=a.i(89246),f=a.i(40674),g=a.i(52313),h=a.i(88064),i=a.i(16605),j=a.i(50490),k=a.i(5698),l=a.i(98410),m=a.i(72016),n=a.i(33511),o=a.i(1585),p=a.i(6120);let q=(0,p.createServerReference)("600238001c3e908fa4de18aa2ef024d6bec82cc7d4",p.callServer,void 0,p.findSourceMapURL,"approveFeature");var r=a.i(12325),s=a.i(35290),t=a.i(97240);let u=(0,p.createServerReference)("70058ea4a019b792a33c4f373daa88a243bedc19ba",p.callServer,void 0,p.findSourceMapURL,"rejectFeature"),v=(0,p.createServerReference)("40a3b38d4d440be674e98741aebbbc27e952ffd55f",p.callServer,void 0,p.findSourceMapURL,"getFeatureArtifact"),w=(0,p.createServerReference)("400b6ed88289b9d28a47b78510ce9ed0f9da32d062",p.callServer,void 0,p.findSourceMapURL,"getResearchArtifact"),x=(0,p.createServerReference)("40737ca8dbb8b9aa0fd2b2091eaaf0e5090cb66839",p.callServer,void 0,p.findSourceMapURL,"getMergeReviewData");var y=a.i(21333),z=a.i(19884),A=a.i(96213),B=a.i(18662),C=a.i(84871);a.i(78454);var D=a.i(24255);a.i(49235);var E=a.i(85080),F=a.i(82934);a.i(77569);var G=a.i(65310),H=a.i(50488),I=a.i(63698),J=a.i(3195),K=a.i(62147),L=a.i(82697);let M="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40";function N({loading:a,error:c,icon:d}){return a?(0,b.jsx)(h.Loader2,{className:"size-3.5 animate-spin"}):c?(0,b.jsx)(L.CircleAlert,{className:"text-destructive size-3.5"}):(0,b.jsx)(d,{className:"size-4"})}function O({actions:a,repositoryPath:d,worktreePath:e,showSpecs:f}){let[g,h]=(0,c.useState)(!1);return(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openInIde,disabled:a.ideLoading,"aria-label":"Open in IDE",children:(0,b.jsx)(N,{loading:a.ideLoading,error:a.ideError,icon:H.Code2})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open in IDE"})]}),(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openInShell,disabled:a.shellLoading,"aria-label":"Open terminal",children:(0,b.jsx)(N,{loading:a.shellLoading,error:a.shellError,icon:I.Terminal})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open terminal"})]}),(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openFolder,disabled:a.folderLoading,"aria-label":"Open folder",children:(0,b.jsx)(N,{loading:a.folderLoading,error:a.folderError,icon:J.FolderOpen})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open folder"})]}),f?(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openSpecsFolder,disabled:a.specsLoading,"aria-label":"Open specs",children:(0,b.jsx)(N,{loading:a.specsLoading,error:a.specsError,icon:K.FileText})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open specs"})]}):null,(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:()=>{navigator.clipboard.writeText(e??d),h(!0),setTimeout(()=>h(!1),2e3)},"aria-label":"Copy path",children:g?(0,b.jsx)(m.Check,{className:"size-3.5 text-green-500"}):(0,b.jsx)(l.Copy,{className:"size-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:g?"Copied!":"Copy path"})]})]})})}var P=a.i(72980),Q=a.i(56957),R=a.i(44981),S=a.i(25700);let T=(0,S.default)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),U=(0,S.default)("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]),V=(0,S.default)("file-check",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);var W=a.i(65355),X=a.i(21084);let Y=(0,S.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var Z=a.i(12882),$=a.i(18615),_=a.i(3942);let aa=(0,S.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var ab=a.i(41305);let ac=(0,p.createServerReference)("40d248dbf2987d763c031a25d60f2cad747b932bda",p.callServer,void 0,p.findSourceMapURL,"getFeaturePhaseTimings"),ad=(0,p.createServerReference)("40f95c929d80189e73a32d01f46570c79b3350622f",p.callServer,void 0,p.findSourceMapURL,"getFeaturePlan");a.i(54250);var ae=a.i(27039);let af=(0,a.i(42261).cva)("inline-block shrink-0",{variants:{size:{sm:"size-5",md:"size-8",lg:"size-12"}},defaultVariants:{size:"md"}}),ag=[{r:9,spline:"0.12 0 0.04 1",opacity:1},{r:8.2,spline:"0.16 0 0.08 1",opacity:.95},{r:7.4,spline:"0.20 0 0.12 1",opacity:.9},{r:6.6,spline:"0.25 0 0.16 1",opacity:.84},{r:5.8,spline:"0.30 0 0.20 1",opacity:.76},{r:5,spline:"0.36 0 0.25 1",opacity:.67},{r:4.2,spline:"0.42 0 0.31 1",opacity:.56},{r:3.4,spline:"0.48 0 0.37 1",opacity:.44},{r:2.6,spline:"0.55 0 0.44 1",opacity:.32},{r:1.8,spline:"0.62 0 0.52 1",opacity:.2},{r:1,spline:"0.70 0 0.60 1",opacity:.1}];function ah({className:a,size:c="md",duration:e=5,...f}){return(0,b.jsxs)("svg",{"data-slot":"comet-spinner",role:"status","aria-label":"Loading",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:(0,d.cn)(af({size:c}),a),...f,children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("filter",{id:"comet-gooey",x:"-100%",y:"-100%",width:"300%",height:"300%",colorInterpolationFilters:"sRGB",children:[(0,b.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"2.5"}),(0,b.jsx)("feColorMatrix",{mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 50 -30",result:"goo"})]})}),(0,b.jsxs)("g",{filter:"url(#comet-gooey)",children:[(0,b.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:`${e}s`,repeatCount:"indefinite"}),ag.map(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"spline",values:"0 50 50;360 50 50",keyTimes:"0;1",keySplines:a.spline,dur:"1s",repeatCount:"indefinite"}),(0,b.jsx)("circle",{cx:"50",cy:"18",r:a.r,fill:"currentColor",opacity:a.opacity})]},a.r)),(0,b.jsxs)("circle",{cx:"50",cy:"50",r:"4",fill:"currentColor",opacity:"0.15",children:[(0,b.jsx)("animate",{attributeName:"r",values:"3;5;3",dur:"2s",repeatCount:"indefinite"}),(0,b.jsx)("animate",{attributeName:"opacity",values:"0.1;0.25;0.1",dur:"2s",repeatCount:"indefinite"})]})]})]})}var ai=a.i(94132),aj=a.i(3410),ak=a.i(18948),al=a.i(58339),am=a.i(45242);let an=(0,S.default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var ao=a.i(91498),ap=a.i(79620);a.i(307);var aq=a.i(30931),ar=a.i(39116);let as=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]);function at({onReject:a,onApprove:f,approveLabel:g,approveVariant:h="default",revisionPlaceholder:i,isProcessing:j=!1,isRejecting:k=!1,children:l,chatInput:n,onChatInputChange:o}){let{t:p}=(0,e.useTranslation)("web"),q="warning"===h,r=q?ao.AlertTriangle:m.Check,s=q?"bg-orange-500/85":"bg-blue-500/85",[t,u]=(0,c.useState)(""),v=n??t,w=o??u,x=(0,z.useSoundAction)("approve"),y=j||k,[A,B]=(0,c.useState)([]),[C,D]=(0,c.useState)(!1),[E,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(!1),[L,M]=(0,c.useState)(!1),N=v.trim().length>0,O=N?H||J&&L:!H,P=(0,c.useRef)(0),Q=(0,c.useRef)(crypto.randomUUID()),R=(0,c.useRef)(null);(0,c.useEffect)(()=>{function a(a){("Control"===a.key||"Meta"===a.key)&&K(!0),"Shift"===a.key&&M(!0)}function b(a){("Control"===a.key||"Meta"===a.key)&&K(!1),"Shift"===a.key&&M(!1)}function c(){K(!1),M(!1)}return window.addEventListener("keydown",a),window.addEventListener("keyup",b),window.addEventListener("blur",c),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",b),window.removeEventListener("blur",c)}},[]);let S=(0,c.useCallback)(async a=>{for(let b of(G(null),a)){if(b.size>0xa00000)return void G(`"${b.name}" exceeds 10 MB limit`);let a=function(a){let b=a.lastIndexOf(".");return b>=0?a.slice(b).toLowerCase():""}(b.name);if(a&&!as.has(a))return void G(`File type "${a}" is not allowed`)}for(let b of a){let a=crypto.randomUUID();B(c=>[...c,{id:a,name:b.name,size:b.size,mimeType:b.type||"application/octet-stream",path:"",loading:!0}]);try{let c=new FormData;c.append("file",b),c.append("sessionId",Q.current);let d=await fetch("/api/attachments/upload",{method:"POST",body:c});if(!d.ok){let b=await d.json().catch(()=>({error:"Upload failed"}));B(b=>b.filter(b=>b.id!==a)),G(b.error??"Upload failed");return}let e=await d.json();B(b=>b.some(b=>b.id!==a&&b.path===e.path)?b.filter(b=>b.id!==a):b.map(b=>b.id===a?{...e,id:a,loading:!1}:b))}catch{B(b=>b.filter(b=>b.id!==a)),G("Upload failed")}}},[]),T=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),P.current+=1,1===P.current&&D(!0)},[]),U=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),P.current-=1,0===P.current&&D(!1)},[]),V=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation()},[]),W=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),P.current=0,D(!1);let b=Array.from(a.dataTransfer.files);b.length>0&&S(b)},[S]),X=(0,c.useCallback)(a=>{let b=a.clipboardData?.items;if(!b)return;let c=[];for(let a of Array.from(b))if("file"===a.kind){let b=a.getAsFile();b&&c.push(b)}c.length>0&&(a.preventDefault(),S(c))},[S]),Y=(0,c.useCallback)(async()=>{try{let a=await (0,ar.pickFiles)();a&&B(b=>{let c=new Set(b.map(a=>a.path)),d=a.filter(a=>!c.has(a.path)).map(a=>({id:crypto.randomUUID(),name:a.name,size:a.size,mimeType:"application/octet-stream",path:a.path}));return d.length>0?[...b,...d]:b})}catch{}},[]),Z=(0,c.useCallback)(a=>{B(b=>b.filter(b=>b.id!==a))},[]),$=(0,c.useCallback)((a,b)=>{B(c=>c.map(c=>c.id===a?{...c,notes:b}:c))},[]),_=(0,c.useCallback)(()=>{w(""),B([]),G(null)},[w]),aa=(0,c.useCallback)(a=>{(a.ctrlKey||a.metaKey)&&"Enter"===a.key&&(a.preventDefault(),R.current?.requestSubmit())},[]),ab="u">typeof navigator&&/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl";return(0,b.jsxs)("div",{className:"border-border shrink-0 border-t",children:[l,a?(0,b.jsx)(F.TooltipProvider,{delayDuration:400,children:(0,b.jsx)("form",{ref:R,onSubmit:function(b){b.preventDefault();let c=v.trim();if(O)x.play(),f(),_();else{if(!c||!a)return;a(c,A.filter(a=>!a.loading)),_()}},className:"p-3",children:(0,b.jsx)("div",{role:"region","aria-label":p("createDrawer.fileDropZone"),"data-drag-over":C?"true":"false",onDragEnter:T,onDragLeave:U,onDragOver:V,onDrop:W,className:(0,d.cn)("rounded-md border-2 border-transparent transition-colors",C&&"border-primary/50 bg-primary/5"),children:(0,b.jsxs)("div",{className:"border-input focus-within:ring-ring/50 focus-within:border-ring flex flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]",children:[(0,b.jsx)(ap.Textarea,{placeholder:i??"Ask AI to revise...","aria-label":i??"Ask AI to revise...",disabled:y,value:v,onChange:a=>w(a.target.value),onKeyDown:aa,onPaste:X,rows:1,"aria-invalid":!!E,"aria-describedby":E?"drawer-action-upload-error":void 0,className:"max-h-[35dvh] min-h-9 flex-1 resize-none overflow-y-auto rounded-none border-0 py-2 shadow-none focus-visible:ring-0","data-testid":"drawer-chat-input"}),A.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:A.map(a=>(0,b.jsx)(aq.AttachmentChip,{name:a.name,size:a.size,mimeType:a.mimeType,path:a.path,onRemove:()=>Z(a.id),disabled:y,loading:a.loading,notes:a.notes,onNotesChange:b=>$(a.id,b)},a.id))}),E?(0,b.jsx)("p",{id:"drawer-action-upload-error",className:"text-destructive px-3 pb-2 text-xs",role:"alert",children:E}):null,(0,b.jsxs)("div",{className:"border-input flex items-center gap-2 border-t px-3 py-1.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex-1 truncate text-[11px]",children:[(0,b.jsxs)("kbd",{className:"bg-muted rounded px-1 py-0.5 font-mono text-[10px]",children:[ab,"+Enter"]})," ",N?"reject":"approve"]}),(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:Y,disabled:y,"aria-label":p("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,b.jsx)(am.PaperclipIcon,{className:"h-4 w-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"top",children:p("chat.attachFiles")})]}),(0,b.jsx)("div",{onMouseLeave:()=>I(!1),children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("button",{type:"submit",disabled:y,"data-testid":"drawer-action-submit",className:(0,d.cn)("relative flex h-9 min-w-[12rem] cursor-pointer items-center overflow-hidden rounded-md border ps-4 pe-10 text-sm font-medium whitespace-nowrap transition-colors","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",O?`${q?"border-orange-400/60":"border-blue-400/60"} text-white`:N&&J&&!L?"border-primary bg-muted ring-primary/30 shadow-sm ring-1":"border-border bg-muted/50 hover:bg-muted shadow-sm"),children:[(0,b.jsx)("div",{className:(0,d.cn)("pointer-events-none absolute inset-0 transition-transform duration-300 ease-in-out",s),style:{transform:O?"translateX(0)":"translateX(100%)"}}),(0,b.jsxs)("span",{className:(0,d.cn)("absolute inset-0 z-10 flex items-center justify-center gap-2 pe-8 transition-opacity duration-300",O?"opacity-0":"opacity-100"),children:[(0,b.jsx)(an,{className:"h-4 w-4 shrink-0"}),"Reject"]}),(0,b.jsxs)("span",{className:(0,d.cn)("absolute inset-0 z-10 flex items-center justify-center gap-2 text-white transition-opacity duration-300",O?"opacity-100":"opacity-0"),children:[(0,b.jsx)(r,{className:"h-4 w-4 shrink-0"}),g]}),(0,b.jsx)("span",{className:(0,d.cn)(`border-input/60 absolute inset-y-0 right-0 z-20 flex w-8 cursor-pointer items-center justify-center rounded-e-[5px] border-s ${s} transition-opacity duration-300`,!N&&!H&&"pointer-events-none opacity-0"),onMouseEnter:()=>I(!0),children:(0,b.jsx)(ai.ChevronLeft,{className:"h-4 w-4 text-white"})})]})}),q?null:(0,b.jsx)(F.TooltipContent,{side:"top",children:O?g:p("drawerActionBar.sendRevisionFeedback")})]})})]})]})})})}):(0,b.jsx)("div",{className:"flex items-center gap-2 px-4 pb-4",children:(0,b.jsx)(ak.Button,{type:"button",className:"flex-1",disabled:y,onClick:()=>{x.play(),f()},children:g})})]})}function au({data:a,selections:e,onSelect:f,onApprove:g,onReject:h,isProcessing:i=!1,isRejecting:j=!1,showHeader:k=!1,chatInput:l,onChatInputChange:m}){let{question:n,context:o,questions:p,finalAction:q}=a,[r,s]=(0,c.useState)(0),t=(0,z.useSoundAction)("select"),u=(0,z.useSoundAction)("navigate"),v=p.length,w=r===v-1,x=p[r],y=(0,c.useMemo)(()=>Object.keys(e).length,[e]),A=(0,c.useCallback)((a,b)=>{t.play(),f(a,b),w||setTimeout(()=>s(a=>a+1),250)},[f,w,t]);return 0===v?null:(0,b.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[k?(0,b.jsxs)("div",{className:"border-border flex items-start gap-3 border-b pb-3",children:[(0,b.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-amber-500"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("h3",{className:"text-foreground mb-1.5 text-sm font-bold",children:n}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs leading-relaxed",children:o})]})]}):null,(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsxs)("label",{className:"text-foreground min-w-0 flex-1 text-sm font-semibold",children:[r+1,". ",x.question]}),(0,b.jsx)("div",{className:"mt-1.5 flex shrink-0 gap-1",children:p.map((a,c)=>(0,b.jsx)("button",{type:"button","aria-label":`Go to question ${c+1}`,className:(0,d.cn)("h-1.5 rounded-full transition-all duration-200",c===r?"bg-primary w-4":"w-1.5",c!==r&&e[a.id]?"bg-primary/50":"",c===r||e[a.id]?"":"bg-muted-foreground/25"),onClick:()=>{u.play(),s(c)}},a.id))})]}),(0,b.jsx)("div",{className:"space-y-2",children:x.options.map((a,c)=>{let f=e[x.id]===a.id,g=String.fromCharCode(65+c);return(0,b.jsx)("button",{type:"button",className:(0,d.cn)("border-border w-full overflow-hidden rounded-md border px-3 py-3 text-start text-xs transition-all","hover:border-primary/70 hover:bg-primary/5 group",f&&"border-primary bg-primary/5",a.isNew&&"animate-option-highlight"),disabled:i,onClick:()=>A(x.id,a.id),children:(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground mt-0.5 font-mono text-xs",children:[g,"."]}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"text-foreground mb-0.5 text-xs font-semibold wrap-break-word",children:a.label}),(0,b.jsx)("div",{className:"text-muted-foreground text-xs leading-snug",children:a.rationale})]}),a.recommended||a.isNew?(0,b.jsx)("div",{className:"shrink-0 pt-0.5",children:a.recommended?(0,b.jsx)(al.Badge,{className:"px-1.5 py-0 text-[10px] whitespace-nowrap",children:"AI Recommended"}):(0,b.jsx)(al.Badge,{className:"border-transparent bg-emerald-600 px-1.5 py-0 text-[10px] whitespace-nowrap text-white hover:bg-emerald-600/80",children:"New"})}):null]})},a.id)})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,b.jsxs)(ak.Button,{type:"button",variant:"ghost",size:"sm",disabled:0===r||i,onClick:()=>{u.play(),s(a=>a-1)},children:[(0,b.jsx)(ai.ChevronLeft,{className:"me-1 h-4 w-4"}),"Previous"]}),w?null:(0,b.jsxs)(ak.Button,{type:"button",variant:"ghost",size:"sm",disabled:i,onClick:()=>{u.play(),s(a=>a+1)},children:[e[x.id]?"Next":"Skip",(0,b.jsx)(aj.ChevronRight,{className:"ms-1 h-4 w-4"})]})]})]}),(0,b.jsx)(at,{onReject:h,onApprove:()=>g(q.id),approveLabel:q.label,revisionPlaceholder:"Ask AI to refine requirements...",isProcessing:i,isRejecting:j,chatInput:l,onChatInputChange:m,children:(0,b.jsx)("div",{className:(0,d.cn)("bg-muted h-1.5 overflow-hidden",y>0&&y<v||i?"opacity-100":"opacity-0","transition-opacity duration-200"),"data-testid":"progress-bar-container",children:i?(0,b.jsx)("div",{className:"bg-primary animate-indeterminate-progress h-full w-1/3"}):(0,b.jsx)("div",{className:"bg-primary h-full transition-all duration-300",style:{width:`${v>0?y/v*100:0}%`},"data-testid":"progress-bar"})})})]})}var av=a.i(30332);let aw=(0,S.default)("git-compare-arrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]),ax={p:({children:a})=>(0,b.jsx)("p",{className:"text-muted-foreground mb-2 text-xs leading-relaxed last:mb-0",children:a}),strong:({children:a})=>(0,b.jsx)("strong",{className:"text-foreground font-semibold",children:a}),em:({children:a})=>(0,b.jsx)("em",{className:"italic",children:a}),code:({children:a,className:c})=>c?(0,b.jsx)("code",{className:`${c} text-[11px]`,children:a}):(0,b.jsx)("code",{className:"bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]",children:a}),pre:({children:a})=>(0,b.jsx)("pre",{className:"bg-muted my-2 overflow-x-auto rounded-lg border p-3",children:a}),ul:({children:a})=>(0,b.jsx)("ul",{className:"text-muted-foreground mb-2 list-disc space-y-1 ps-4 text-xs",children:a}),ol:({children:a})=>(0,b.jsx)("ol",{className:"text-muted-foreground mb-2 list-decimal space-y-1 ps-4 text-xs",children:a}),li:({children:a})=>(0,b.jsx)("li",{className:"leading-relaxed",children:a}),a:({children:a,href:c})=>(0,b.jsx)("a",{href:c,className:"text-primary underline underline-offset-2",target:"_blank",rel:"noopener noreferrer",children:a})};function ay({decision:a,index:d}){let[e,f]=(0,c.useState)(!1),g=(0,z.useSoundAction)("expand"),h=(0,z.useSoundAction)("collapse");return(0,b.jsxs)("div",{className:"border-border rounded-lg border",children:[(0,b.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,b.jsx)("span",{className:"bg-primary text-primary-foreground flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",children:d+1}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h3",{className:"text-foreground text-sm leading-tight font-semibold",children:a.title}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 text-xs",children:a.chosen})]})]}),"decisionName"in a&&a.decisionName?(0,b.jsx)(al.Badge,{variant:"secondary",className:"bg-primary/10 text-primary shrink-0",children:a.decisionName}):null]}),a.rationale?(0,b.jsx)(av.default,{components:ax,children:a.rationale}):null]}),a.rejected.length>0?(0,b.jsxs)("div",{className:"border-border border-t",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{e?h.play():g.play(),f(a=>!a)},className:"text-muted-foreground hover:bg-muted/50 flex w-full items-center gap-1.5 px-4 py-3 text-xs font-medium transition-colors",children:[(0,b.jsx)(aj.ChevronRight,{className:`h-3.5 w-3.5 transition-transform ${e?"rotate-90":""}`}),(0,b.jsx)(aa,{className:"h-3.5 w-3.5"}),"Other Options Considered (",a.rejected.length,")"]}),e?(0,b.jsx)("div",{className:"space-y-1.5 px-4 pb-3",children:a.rejected.map(a=>(0,b.jsx)("div",{className:"bg-primary/5 rounded-md px-3 py-2",children:(0,b.jsx)("span",{className:"text-foreground text-xs",children:a})},a))}):null]}):null]})}function az({data:a}){let{summary:c,decisions:d}=a;return 0===d.length?null:(0,b.jsxs)("div",{className:"space-y-4 p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("h2",{className:"text-foreground text-sm font-bold",children:"Technical Implementation Plan Review"}),c?(0,b.jsx)("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:c}):null]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,b.jsx)(aw,{className:"text-primary h-4 w-4"}),(0,b.jsx)("h3",{className:"text-foreground text-sm font-bold",children:"Technical Decisions"})]}),d.map((a,c)=>(0,b.jsx)(ay,{decision:a,index:c},a.title))]})}var aA=a.i(69428);function aB({item:a,index:c}){return(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsx)("div",{className:"space-y-2 px-4 py-3",children:(0,b.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,b.jsx)("span",{className:"bg-primary text-primary-foreground flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",children:c+1}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h3",{className:"text-foreground text-sm leading-tight font-semibold",children:a.question}),(0,b.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,b.jsx)("p",{className:"text-muted-foreground min-w-0 truncate text-xs",children:a.selectedOption}),a.wasRecommended?(0,b.jsx)(al.Badge,{className:"shrink-0 px-1.5 py-0 text-[10px] whitespace-nowrap",children:"AI Recommended"}):null]})]})]})})})}function aC({data:a}){let{questions:c}=a;return 0===c.length?null:(0,b.jsxs)("div",{className:"space-y-4 p-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(aA.ClipboardList,{className:"text-primary h-4 w-4"}),(0,b.jsx)("h3",{className:"text-foreground text-sm font-bold",children:"Product Decisions"})]}),c.map((a,c)=>(0,b.jsx)(aB,{item:a,index:c},a.question))]})}var aD=a.i(71238);let aE=(0,S.default)("file-diff",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);var aF=a.i(92548),aG=a.i(53170);let aH=(0,S.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),aI=(0,S.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),aJ=(0,S.default)("monitor-play",[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);var aK=a.i(9955),aL=a.i(71716),aM=a.i(67075),aN=a.i(58428),aN=aN,aO=a.i(46847);function aP({status:a}){switch(a){case aO.CiStatus.Success:return(0,b.jsxs)(al.Badge,{className:"border-transparent bg-green-50 text-green-700 hover:bg-green-50",children:[(0,b.jsx)(aM.CheckCircle2,{className:"me-1 h-3.5 w-3.5"}),"Passing"]});case aO.CiStatus.Pending:return(0,b.jsxs)(al.Badge,{className:"border-transparent bg-yellow-50 text-yellow-700 hover:bg-yellow-50",children:[(0,b.jsx)(h.Loader2,{className:"me-1 h-3.5 w-3.5 animate-spin"}),"Pending"]});case aO.CiStatus.Failure:return(0,b.jsxs)(al.Badge,{className:"border-transparent bg-red-50 text-red-700 hover:bg-red-50",children:[(0,b.jsx)(aN.default,{className:"me-1 h-3.5 w-3.5"}),"Failing"]})}}var aQ=a.i(38019);let aR=(0,S.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);var aS=a.i(65298);let aT={added:{icon:aQ.FilePlus,label:"A",className:"text-green-600"},modified:{icon:aS.FileEdit,label:"M",className:"text-amber-600"},deleted:{icon:aR,label:"D",className:"text-red-600"},renamed:{icon:aS.FileEdit,label:"R",className:"text-blue-600"}};function aU({status:a}){let c=aT[a],e=c.icon;return(0,b.jsx)(e,{className:(0,d.cn)("h-3.5 w-3.5 shrink-0",c.className)})}function aV({hunk:a}){return(0,b.jsxs)("div",{className:"border-border border-t first:border-t-0",children:[(0,b.jsx)("div",{className:"bg-muted/50 text-muted-foreground px-3 py-1 font-mono text-[10px]",children:a.header}),(0,b.jsx)("div",{className:"font-mono text-[11px] leading-[18px]",children:a.lines.map(a=>(0,b.jsxs)("div",{className:(0,d.cn)("flex","added"===a.type&&"bg-green-50 dark:bg-green-950/30","removed"===a.type&&"bg-red-50 dark:bg-red-950/30"),children:[(0,b.jsx)("span",{className:"text-muted-foreground w-10 shrink-0 px-1 text-end text-[10px] select-none",children:a.oldNumber??""}),(0,b.jsx)("span",{className:"text-muted-foreground w-10 shrink-0 px-1 text-end text-[10px] select-none",children:a.newNumber??""}),(0,b.jsx)("span",{className:(0,d.cn)("w-4 shrink-0 text-center select-none","added"===a.type&&"text-green-700 dark:text-green-400","removed"===a.type&&"text-red-700 dark:text-red-400"),children:"added"===a.type?"+":"removed"===a.type?"-":" "}),(0,b.jsx)("span",{className:"min-w-0 flex-1 pe-2 break-all whitespace-pre-wrap",children:a.content})]},`${a.type}-${a.oldNumber??""}-${a.newNumber??""}`))})]})}function aW({file:a}){let[e,f]=(0,c.useState)(!1),g=a.path.split("/").pop()??a.path,h=a.path.includes("/")?a.path.slice(0,a.path.lastIndexOf("/")):"";return(0,b.jsxs)("div",{className:"border-border border-b last:border-b-0",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>f(!e),className:"hover:bg-muted/50 flex w-full items-center gap-2 px-3 py-2 text-start",children:[(0,b.jsx)(aj.ChevronRight,{className:(0,d.cn)("text-muted-foreground h-3 w-3 shrink-0 transition-transform duration-150",e&&"rotate-90")}),(0,b.jsx)(aU,{status:a.status}),(0,b.jsx)("span",{className:"text-foreground min-w-0 flex-1 truncate text-xs",children:h?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[h,"/"]}),g]}):g}),a.oldPath?(0,b.jsxs)("span",{className:"text-muted-foreground truncate text-[10px]",children:["← ",a.oldPath.split("/").pop()]}):null,(0,b.jsxs)("span",{className:"shrink-0 text-[10px]",children:[a.additions>0?(0,b.jsxs)("span",{className:"text-green-600",children:["+",a.additions]}):null,a.additions>0&&a.deletions>0?" ":null,a.deletions>0?(0,b.jsxs)("span",{className:"text-red-600",children:["-",a.deletions]}):null]})]}),e&&a.hunks.length>0?(0,b.jsx)("div",{className:"border-border overflow-x-auto border-t",children:a.hunks.map(a=>(0,b.jsx)(aV,{hunk:a},a.header))}):null]})}function aX({fileDiffs:a}){return 0===a.length?null:(0,b.jsxs)("div",{className:"border-border rounded-lg border",children:[(0,b.jsx)("div",{className:"px-4 py-3",children:(0,b.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,b.jsx)(K.FileText,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Changed Files"}),(0,b.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:["(",a.length,")"]})]})}),(0,b.jsx)("div",{className:"border-border border-t",children:a.map(a=>(0,b.jsx)(aW,{file:a},`${a.status}-${a.path}`))})]})}let aY={Screenshot:aI,Video:aJ,TestOutput:K.FileText,TerminalRecording:I.Terminal},aZ=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp"]),a$=new Set([".mp4",".webm",".mov"]);function a_({evidence:a}){var d,e;let f,[g,h]=(0,c.useState)(!0),i=aY[a.type]??aI,j=(f=(d=a.relativePath).lastIndexOf("."))>=0?d.slice(f).toLowerCase():"",k=(e=a.relativePath,`/api/evidence?path=${encodeURIComponent(e)}`),l="Screenshot"===a.type||aZ.has(j),m="Video"===a.type||a$.has(j),n="TestOutput"===a.type||"TerminalRecording"===a.type;return(0,b.jsxs)("li",{className:"border-border rounded-md border",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>h(!g),className:"flex w-full cursor-pointer items-center gap-2.5 px-3 py-2.5 text-start",children:[g?(0,b.jsx)(aL.ChevronDown,{className:"text-muted-foreground h-3 w-3 shrink-0"}):(0,b.jsx)(aj.ChevronRight,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,b.jsx)(i,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("span",{className:"text-foreground text-xs font-medium",children:a.description}),a.taskRef?(0,b.jsxs)("span",{className:"text-muted-foreground ms-1.5 text-[10px]",children:["(",a.taskRef,")"]}):null]}),(0,b.jsx)("a",{href:k,download:!0,onClick:a=>a.stopPropagation(),className:"text-muted-foreground hover:text-foreground shrink-0 rounded p-1 transition-colors","aria-label":"Download",children:(0,b.jsx)(aK.Download,{className:"h-3 w-3"})})]}),g&&k?(0,b.jsx)("div",{className:"border-border border-t px-3 py-2.5",children:l?(0,b.jsx)("img",{src:k,alt:a.description,className:"max-h-80 w-full rounded-md border object-contain",loading:"lazy"}):m?(0,b.jsx)("video",{src:k,controls:!0,className:"max-h-80 w-full rounded-md border",preload:"metadata",children:(0,b.jsx)("track",{kind:"captions"})}):n?(0,b.jsx)(a0,{url:k}):(0,b.jsx)("p",{className:"text-muted-foreground truncate font-mono text-[10px]",children:a.relativePath})}):null,null]})}function a0({url:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useState)(!1);return f?d?(0,b.jsx)("pre",{className:"bg-muted/50 max-h-60 overflow-auto rounded-md p-3 font-mono text-[11px] leading-relaxed",children:d}):(0,b.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"Unable to load preview"}):(fetch(a).then(a=>a.ok?a.text():Promise.reject(Error("Failed"))).then(a=>{let b=a.split("\n");e(b.length>100?`${b.slice(0,100).join("\n")}
2
- ...`:a)}).catch(()=>e(null)).finally(()=>g(!0)),(0,b.jsx)("div",{className:"bg-muted/50 h-16 animate-pulse rounded-md"}))}function a1({evidence:a}){return(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,b.jsx)(aI,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Evidence"}),(0,b.jsx)(al.Badge,{variant:"secondary",className:"text-[10px]",children:a.length})]}),(0,b.jsx)("ul",{className:"space-y-2",children:a.map(a=>(0,b.jsx)(a_,{evidence:a},`${a.type}-${a.relativePath}`))})]})})}function a2({data:a,readOnly:c=!1,onApprove:d,onReject:e,isProcessing:f=!1,isRejecting:g=!1,chatInput:h,onChatInputChange:i}){let{pr:j,diffSummary:k,fileDiffs:l,branch:m,warning:n,evidence:o,hideCiStatus:p}=a,q=j?.mergeable===!1,r=q&&e?()=>e("Resolve merge conflicts",[]):d;return(0,b.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-emerald-500"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("h2",{className:"text-foreground text-sm font-bold",children:c?"Merge History":"Merge Review"}),(0,b.jsx)("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:c?"This feature was merged. Review the pull request details and evidence below.":j?"Review the pull request details and approve to merge.":"Review the changes and approve to merge."})]})]}),m?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",children:[(0,b.jsx)(aG.GitBranch,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,b.jsx)(al.Badge,{variant:"secondary",className:"font-mono text-[11px]",children:m.source}),(0,b.jsx)(aH,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,b.jsx)(al.Badge,{variant:"outline",className:"font-mono text-[11px]",children:m.target})]})}):null,j?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("a",{href:j.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2",children:["PR #",j.number,(0,b.jsx)(aD.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,b.jsx)(al.Badge,{variant:"outline",className:"text-xs",children:j.status})]}),!1===j.mergeable?(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Merge Status"}),(0,b.jsxs)(al.Badge,{className:"border-transparent bg-orange-50 text-orange-700 hover:bg-orange-50",children:[(0,b.jsx)(ao.AlertTriangle,{className:"me-1 h-3.5 w-3.5"}),"Conflicts"]})]}):null,j.ciStatus&&!0!==p?(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"CI Status"}),(0,b.jsx)(aP,{status:j.ciStatus})]}):null,j.commitHash?(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Commit"}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(aF.GitCommitHorizontal,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,b.jsx)("code",{className:"bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]",children:j.commitHash.slice(0,7)})]})]}):null]})}):null,k?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,b.jsx)(aE,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Changes"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-4 gap-3",children:[(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)("div",{className:"text-foreground text-sm font-bold",children:k.filesChanged}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"files"})]}),(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsxs)("div",{className:"text-sm font-bold text-green-600",children:["+",k.additions]}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"additions"})]}),(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsxs)("div",{className:"text-sm font-bold text-red-600",children:["-",k.deletions]}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"deletions"})]}),(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)("div",{className:"text-foreground text-sm font-bold",children:k.commitCount}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"commits"})]})]})]})}):n?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",children:[(0,b.jsx)(ao.AlertTriangle,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:n})]})}):null,o&&o.length>0?(0,b.jsx)(a1,{evidence:o}):null,l&&l.length>0?(0,b.jsx)(aX,{fileDiffs:l}):null]}),!c&&(0,b.jsx)(at,{onReject:e,onApprove:r,approveLabel:q?"Resolve Conflicts":"Approve Merge",approveVariant:q?"warning":"default",revisionPlaceholder:"Ask AI to revise before merging...",isProcessing:f,isRejecting:g,chatInput:h,onChatInputChange:i})]})}var a3=a.i(46168);let a4=(0,S.default)("file-search",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]]),a5=(0,S.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var a6=a.i(28002),a7=a.i(32703);let a8=(0,S.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var a9=a.i(2807),ba=a.i(45670),bb=a.i(42360),bc=a.i(73998);let bd=(0,S.default)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]),be=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function bf(a){let b=a.lastIndexOf(".");return b>=0&&be.has(a.slice(b).toLowerCase())}function bg(a){let b=a.lastIndexOf(".")>=0?a.slice(a.lastIndexOf(".")):"",c=bf(a)?`image/${b.slice(1).replace("jpg","jpeg")}`:"",d=new URLSearchParams({path:a,...c&&{mimeType:c}});return`/api/attachments/preview?${d.toString()}`}let bh=/(?:^|\s)@(\/[^\s]+)/g;function bi({text:a,attachmentPaths:c}){let d=function(a){let b=[],c=0;for(let d of a.matchAll(bh)){let e=d.index,f=e+(d[0].length-d[0].trimStart().length);f>c&&b.push({type:"text",value:a.slice(c,f)}),b.push({type:"attachment",path:d[1]}),c=e+d[0].length}return c<a.length&&b.push({type:"text",value:a.slice(c)}),b}(a),e=d.some(a=>"attachment"===a.type),f=c?.filter(Boolean)??[];return e||0!==f.length?(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[d.map(a=>{if("text"===a.type){let c=a.value.trim();return c?(0,b.jsx)("span",{className:"text-sm leading-relaxed",children:c},`text-${c.slice(0,40)}`):null}return(0,b.jsx)(bj,{path:a.path},`att-${a.path}`)}),f.map(a=>(0,b.jsx)(bj,{path:a},`extra-${a}`))]}):(0,b.jsx)("span",{className:"text-sm leading-relaxed",children:a})}function bj({path:a}){let d=a.split("/").pop()??a,[e,f]=(0,c.useState)(!1);return bf(a)?e?(0,b.jsxs)("div",{"data-testid":"inline-attachment-image-error",className:"text-muted-foreground flex items-center gap-2 rounded-md border px-3 py-2 text-sm",children:[(0,b.jsx)(bd,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:d})]}):(0,b.jsxs)(ba.Dialog,{children:[(0,b.jsx)(ba.DialogTrigger,{asChild:!0,children:(0,b.jsx)("img",{src:bg(a),alt:d,"data-testid":"inline-attachment-image",onError:()=>f(!0),className:"max-h-48 max-w-full cursor-pointer rounded-md border object-contain transition-opacity hover:opacity-80"})}),(0,b.jsxs)(ba.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,b.jsx)(bb.VisuallyHidden.Root,{children:(0,b.jsxs)(ba.DialogTitle,{children:["Preview: ",d]})}),(0,b.jsx)("div",{className:"relative bg-black/90",children:(0,b.jsx)("img",{src:bg(a),alt:d,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,b.jsxs)("div",{className:"bg-background flex items-center gap-3 px-4 py-3",children:[(0,b.jsx)("div",{className:"flex min-w-0 flex-1 flex-col",children:(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:d})}),(0,b.jsx)("a",{href:bg(a),download:d,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${d}`,children:(0,b.jsx)(bc.DownloadIcon,{className:"h-4 w-4"})})]})]})]}):(0,b.jsx)("a",{href:bg(a),download:d,"data-testid":"inline-attachment-file",className:"text-primary text-sm underline underline-offset-2",children:d})}a.i(69029);var bk=a.i(5623),bl=a.i(17606),bm=a.i(83852);function bn(a){if(0===a)return"0s";let b=Math.floor(a/1e3);if(0===b)return"<1s";let c=Math.floor(b/3600),d=Math.floor(b%3600/60),e=b%60;return c>0?`${c}h ${d}m`:d>0?`${d}m ${e}s`:`${e}s`}function bo({icon:a,title:c,children:d}){return(0,b.jsxs)("div",{className:"px-3 pt-4 pb-1",children:[(0,b.jsxs)("div",{className:"text-foreground mb-2 flex items-center gap-1.5 text-sm font-semibold tracking-wider uppercase",children:[(0,b.jsx)(a,{className:"size-4 opacity-50"}),c]}),d]})}function bp({children:a,className:c}){return(0,b.jsx)("div",{className:(0,d.cn)("bg-muted/60 rounded-md border border-transparent p-3",c),children:a})}function bq({label:a,children:c}){return(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-foreground/40 text-[11px] font-medium tracking-wider uppercase",children:a}),(0,b.jsx)("span",{className:"text-sm leading-snug",children:c})]})}function br({on:a,label:c}){return(0,b.jsxs)("span",{className:(0,d.cn)("inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium",a?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-foreground/[0.04] text-foreground/25"),children:[a?(0,b.jsx)(m.Check,{className:"size-3"}):(0,b.jsx)(a9.X,{className:"size-3"}),c]})}let bs={[aO.PrStatus.Open]:"text-blue-600 dark:text-blue-400",[aO.PrStatus.Merged]:"text-purple-600 dark:text-purple-400",[aO.PrStatus.Closed]:"text-red-600 dark:text-red-400"};function bt({data:a,syncStatus:e,syncLoading:f,syncError:g,onRefreshSync:h,onRebaseOnMain:i,rebaseLoading:j,rebaseError:k}){var l;let m,n,o,p,q,r,s="maintain"===a.lifecycle,t=function(a){let[b,d]=(0,c.useState)(null),e=(0,c.useRef)(null);return(0,c.useEffect)(()=>a?(d(bn(Math.max(0,Date.now()-a))),e.current=setInterval(()=>{d(bn(Math.max(0,Date.now()-a)))},1e3),()=>{e.current&&clearInterval(e.current)}):void d(null),[a]),b}("running"===a.state||"action-required"===a.state?a.startedAt:void 0),u=ae.featureNodeStateConfig[a.state],v=!!a.summary&&!(a.userQuery&&a.summary?.trim()===a.userQuery.trim());return(0,b.jsxs)("div",{"data-testid":"feature-drawer-status",className:"pb-4",children:[!s&&a.progress>0?(0,b.jsx)("div",{"data-testid":"feature-drawer-progress",className:"px-3 pb-2",children:(0,b.jsx)("div",{className:"bg-foreground/[0.06] h-1.5 w-full overflow-hidden rounded-full",children:(0,b.jsx)("div",{className:(0,d.cn)("h-full rounded-full transition-all",u.progressClass),style:{width:`${a.progress}%`}})})}):null,a.oneLiner||a.userQuery||v?(0,b.jsx)(bo,{icon:a5,title:"Description",children:(0,b.jsxs)(bp,{className:"flex flex-col gap-2",children:[a.oneLiner?(0,b.jsx)(bq,{label:"One-Liner",children:a.oneLiner}):null,a.userQuery?(0,b.jsx)(bq,{label:"Query",children:(0,b.jsx)(bi,{text:a.userQuery})}):null,v?(0,b.jsx)(bq,{label:"Summary",children:(0,b.jsx)("span",{className:"leading-snug",children:a.summary})}):null]})}):null,a.pr?(0,b.jsx)(bo,{icon:aF.GitCommitHorizontal,title:"Pull Request",children:(0,b.jsx)(bp,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("a",{href:a.pr.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary inline-flex items-center gap-1 text-sm font-semibold hover:underline",children:["#",a.pr.number," ",(0,b.jsx)(aD.ExternalLink,{className:"size-3"})]}),(0,b.jsx)("span",{className:(0,d.cn)("text-xs font-semibold",bs[a.pr.status]),children:a.pr.status}),!1===a.pr.mergeable?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-orange-600 dark:text-orange-400",children:[(0,b.jsx)(ao.AlertTriangle,{className:"size-3 shrink-0"})," Conflicts"]}):null,a.pr.ciStatus&&!0!==a.hideCiStatus?(0,b.jsx)(aP,{status:a.pr.ciStatus}):null,a.pr.commitHash?(0,b.jsx)("code",{className:"text-foreground/40 ml-auto font-mono text-[11px]",children:a.pr.commitHash.slice(0,7)}):null]})})}):null,(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-2 px-3 pb-1",children:[a.branch?(0,b.jsx)(bp,{children:(0,b.jsxs)(bq,{label:"Branch",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)(aG.GitBranch,{className:"text-foreground/30 size-3 shrink-0"}),(0,b.jsx)("code",{className:"font-mono text-[11px]",children:a.branch})]}),a.baseBranch?(0,b.jsxs)("span",{className:"text-foreground/30 block text-[10px]",children:["from ",a.baseBranch]}):null]})}):null,a.agentType||a.modelId?(0,b.jsx)(bp,{children:(0,b.jsx)(bq,{label:"Agent",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[a.agentType?(m=(0,bl.getAgentTypeIcon)(a.agentType),(0,b.jsx)(m,{className:"size-3.5 shrink-0 opacity-50"})):null,a.agentType?(0,b.jsx)("span",{children:bl.agentTypeLabels[a.agentType]??a.agentType}):null,a.agentType&&a.modelId?(0,b.jsx)("span",{className:"text-foreground/20",children:"/"}):null,a.modelId?(0,b.jsx)("span",{className:"text-foreground/50 text-[12px]",children:(0,bm.getModelMeta)(a.modelId).displayName||a.modelId}):null]})})}):null,a.createdAt?(0,b.jsx)(bp,{children:(0,b.jsx)(bq,{label:"Created",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)(a3.Clock,{className:"text-foreground/30 size-3 shrink-0"}),(l=a.createdAt,n=Date.now(),(r=Math.floor((q=Math.floor((p=Math.floor((n-(o="string"==typeof l?new Date(l).getTime():l))/6e4))/60))/24))>30?new Date(o).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):r>0?`${r}d ago`:q>0?`${q}h ago`:p>0?`${p}m ago`:"just now")]})})}):null,a.fastMode?(0,b.jsx)(bp,{children:(0,b.jsx)(bq,{label:"Mode",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,b.jsx)(_.Zap,{className:"size-3.5"})," Fast"]})})}):null,a.runtime||t?(0,b.jsx)(bp,{children:(0,b.jsx)(bq,{label:a.runtime?"Runtime":"Elapsed",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)(a3.Clock,{className:"text-foreground/30 size-3 shrink-0"}),a.runtime??t]})})}):null]}),a.blockedBy||a.errorMessage?(0,b.jsx)(bo,{icon:ao.AlertTriangle,title:"Issues",children:(0,b.jsxs)(bp,{className:"border-destructive/20 bg-destructive/5",children:[a.blockedBy?(0,b.jsx)(bq,{label:"Blocked By",children:a.blockedBy}):null,a.errorMessage?(0,b.jsx)(bq,{label:"Error",children:(0,b.jsx)("span",{className:"text-destructive",children:a.errorMessage})}):null]})}):null,i&&a.branch&&h?(0,b.jsx)(bo,{icon:a6.RefreshCw,title:"Branch Sync",children:(0,b.jsx)(bu,{syncStatus:e??null,syncLoading:f??!1,syncError:g??null,onRefreshSync:h,onRebaseOnMain:i,rebaseLoading:j??!1,rebaseError:k??null})}):null,(0,b.jsx)(bv,{data:a})]})}function bu({syncStatus:a,syncLoading:c,syncError:f,onRefreshSync:g,onRebaseOnMain:h,rebaseLoading:i,rebaseError:j}){let{t:k}=(0,e.useTranslation)("web"),l=null!=a&&a.behind>0,m=a?.behind===0,n=a?.baseBranch??"main";return(0,b.jsxs)(bp,{children:[(0,b.jsxs)("div",{"data-testid":"branch-sync-status",className:"flex items-center justify-between",children:[(0,b.jsx)("div",{className:"flex items-center gap-1.5 text-[13px]",children:c&&!a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ah,{size:"sm"}),(0,b.jsx)("span",{className:"text-foreground/40",children:"Checking..."})]}):f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ao.AlertTriangle,{className:"size-3.5 text-red-500"}),(0,b.jsx)("span",{className:"text-destructive text-xs",children:f})]}):i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ah,{size:"sm"}),(0,b.jsxs)("span",{children:["Rebasing on ",(0,b.jsx)("code",{className:"font-mono text-[11px]",children:n}),"..."]})]}):l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ao.AlertTriangle,{className:"size-3.5 text-orange-500"}),(0,b.jsxs)("span",{children:[a.behind," behind ",(0,b.jsx)("code",{className:"font-mono text-[11px]",children:n}),a.ahead>0?(0,b.jsxs)("span",{className:"text-foreground/30 ml-1 text-[11px]",children:["· ",a.ahead," ahead"]}):null]})]}):m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aM.CheckCircle2,{className:"size-3.5 text-green-500"}),(0,b.jsxs)("span",{children:["Up to date · ",(0,b.jsx)("code",{className:"font-mono text-[11px]",children:n}),a.ahead>0?(0,b.jsxs)("span",{className:"text-foreground/30 ml-1 text-[11px]",children:["· ",a.ahead," ahead"]}):null]})]}):null}),(a||f)&&!i?(0,b.jsx)("button",{onClick:g,disabled:c,className:"text-foreground/30 hover:text-foreground/60 hover:bg-foreground/5 inline-flex size-6 items-center justify-center rounded-sm disabled:opacity-50","aria-label":k("branchSyncStatus.refreshSyncStatus"),children:(0,b.jsx)(a6.RefreshCw,{className:(0,d.cn)("size-3",c&&"animate-spin")})}):null]}),l&&!i?(0,b.jsx)("div",{className:"pt-2",children:(0,b.jsx)(bk.ActionButton,{label:k("branchSyncStatus.rebaseOnMain"),onClick:h,loading:!1,error:!!j,icon:Y,variant:"outline",size:"sm"})}):null,j?(0,b.jsx)("p",{className:"text-destructive pt-1 text-[11px]",children:j}):null]})}function bv({data:a}){return null==a.approvalGates&&null==a.push&&null==a.openPr&&null==a.ciWatchEnabled&&null==a.enableEvidence&&null==a.forkAndPr&&null==a.commitSpecs?null:(0,b.jsx)(bo,{icon:a7.Settings,title:"Settings",children:(0,b.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[a.approvalGates?(0,b.jsxs)(bp,{children:[(0,b.jsxs)("div",{className:"text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase",children:[(0,b.jsx)(a8,{className:"size-3"})," Approve"]}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)(br,{on:a.approvalGates.allowPrd,label:"PRD"}),(0,b.jsx)(br,{on:a.approvalGates.allowPlan,label:"Plan"}),(0,b.jsx)(br,{on:a.approvalGates.allowMerge,label:"Merge"})]})]}):null,null!=a.enableEvidence?(0,b.jsxs)(bp,{children:[(0,b.jsxs)("div",{className:"text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase",children:[(0,b.jsx)(a4,{className:"size-3"})," Evidence"]}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)(br,{on:a.enableEvidence,label:"Collect"}),null!=a.commitEvidence?(0,b.jsx)(br,{on:a.commitEvidence,label:"Add to PR"}):null]})]}):null,null!=a.push||null!=a.openPr||null!=a.ciWatchEnabled||null!=a.commitSpecs||null!=a.forkAndPr?(0,b.jsxs)(bp,{children:[(0,b.jsxs)("div",{className:"text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase",children:[(0,b.jsx)(aG.GitBranch,{className:"size-3"})," Git"]}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[null!=a.push?(0,b.jsx)(br,{on:a.push,label:"Push"}):null,null!=a.openPr?(0,b.jsx)(br,{on:a.openPr,label:"PR"}):null,null!=a.ciWatchEnabled?(0,b.jsx)(br,{on:a.ciWatchEnabled,label:"Watch"}):null,null!=a.commitSpecs?(0,b.jsx)(br,{on:a.commitSpecs,label:"Specs"}):null,null!=a.forkAndPr?(0,b.jsx)(br,{on:a.forkAndPr,label:"Fork"}):null]})]}):null]})})}let bw=(0,S.default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var aN=aN,bx=a.i(93866),by=a.i(7421);let bz=(0,S.default)("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),bA=(0,S.default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);function bB(a,b){if(null!=a.durationMs&&a.durationMs>0)return a.durationMs;if(!a.completedAt&&a.startedAt){let c=new Date(a.startedAt).getTime();if(!Number.isNaN(c))return Math.max(0,b-c)}return 0}function bC(a){return a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}K`:String(a)}function bD(a){let b=a instanceof Date?a:new Date(String(a));return Number.isNaN(b.getTime())?"":b.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function bE(a){return a>=1?`$${a.toFixed(2)}`:a>=.01?`$${a.toFixed(3)}`:`$${a.toFixed(4)}`}let bF={analyze:"Analyzing",requirements:"Requirements",research:"Researching",plan:"Planning",implement:"Implementing",rebase:"Rebasing","fast-implement":"Fast Implement",evidence:"Evidence",validate:"Validating",repair:"Repairing",merge:"Merging"},bG={"run:started":{label:"started",colorClass:"text-blue-600",bgClass:"bg-blue-50 dark:bg-blue-950/30",icon:j.Play},"run:resumed":{label:"resumed",colorClass:"text-blue-600",bgClass:"bg-blue-50 dark:bg-blue-950/30",icon:$.RotateCcw},"run:completed":{label:"completed",colorClass:"text-emerald-600",bgClass:"bg-emerald-50 dark:bg-emerald-950/30",icon:aM.CheckCircle2},"run:failed":{label:"failed",colorClass:"text-red-600",bgClass:"bg-red-50 dark:bg-red-950/30",icon:aN.default},"run:stopped":{label:"stopped",colorClass:"text-amber-600",bgClass:"bg-amber-50 dark:bg-amber-950/30",icon:k.Square},"run:crashed":{label:"crashed",colorClass:"text-red-600",bgClass:"bg-red-50 dark:bg-red-950/30",icon:aN.default},"run:rejected":{label:"rejected",colorClass:"text-orange-600",bgClass:"bg-orange-50 dark:bg-orange-950/30",icon:bx.Ban}};function bH(a){return a.startsWith("run:")}function bI({timings:a,loading:d,error:f,rejectionFeedback:g}){let{t:i}=(0,e.useTranslation)("web"),j=function(a){let[b,d]=(0,c.useState)(Date.now),e=(0,c.useRef)(null);return(0,c.useEffect)(()=>(a&&a.some(a=>!a.phase.startsWith("run:")&&!a.completedAt&&a.startedAt)&&(e.current=setInterval(()=>d(Date.now()),1e3)),()=>{e.current&&(clearInterval(e.current),e.current=null)}),[a]),b}(a);if(d)return(0,b.jsx)("div",{"data-testid":"activity-tab-loading",className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})});if(f)return(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 text-base text-red-600",children:[(0,b.jsx)(P.AlertCircle,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:f})]});if(!a||0===a.length)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,b.jsx)(a3.Clock,{className:"text-muted-foreground h-8 w-8"}),(0,b.jsx)("p",{className:"text-muted-foreground text-base",children:i("activityTab.noActivityRecorded")})]});let k=a.filter(a=>!bH(a.phase)),l=Math.max(...k.map(a=>bB(a,j)),...k.map(a=>a.approvalWaitMs??0),0),m=function(a,b){if(!a.length)return[];let c=a.filter(a=>"run:rejected"===a.phase).length,d=b?.length??0,e=a;if(d>c){e=[...a];let f=a[a.length-1].agentRunId;for(let a=c;a<d;a++){let d=b[a];a>c&&e.push({agentRunId:f,phase:"run:resumed",startedAt:d.timestamp??`synthetic-resumed-${a}`}),e.push({agentRunId:f,phase:"run:rejected",startedAt:d.timestamp??`synthetic-${a}`})}}let f=[],g=[],h=0;for(let a of e)if(g.push(a),"run:rejected"===a.phase){let a=b?.[h];f.push({number:f.length+1,timings:g,rejectionMessage:a?.message,rejectionAttachments:a?.attachments}),g=[],h++}return g.length>0&&f.push({number:f.length+1,timings:g}),f}(a,g),n=m.length>1,o=k.reduce((a,b)=>a+bB(b,j),0),p=k.reduce((a,b)=>a+(b.approvalWaitMs??0),0),q=k.reduce((a,b)=>a+(b.inputTokens??0),0),r=k.reduce((a,b)=>a+(b.outputTokens??0),0),s=k.reduce((a,b)=>a+(b.costUsd??0),0);return(0,b.jsxs)("div",{className:"flex flex-col gap-3 p-4",children:[(0,b.jsx)("div",{"data-testid":"activity-timings",className:"flex flex-col gap-3",children:m.map(a=>(0,b.jsx)(bJ,{iteration:a,showHeader:n,maxDurationMs:l,now:j},a.number))}),o>0?(0,b.jsx)(bN,{totalExecMs:o,totalWaitMs:p,totalInputTokens:q,totalOutputTokens:r,totalCostUsd:s}):null]})}function bJ({iteration:a,showHeader:c,maxDurationMs:d,now:e}){let f=function(a){let b=[...a.timings].reverse().find(a=>bH(a.phase));if(!b)return null;switch(b.phase){case"run:rejected":return{label:"Rejected",colorClass:"text-orange-600",dotClass:"bg-orange-500"};case"run:completed":return{label:"Completed",colorClass:"text-emerald-600",dotClass:"bg-emerald-500"};case"run:failed":return{label:"Failed",colorClass:"text-red-600",dotClass:"bg-red-500"};case"run:crashed":return{label:"Crashed",colorClass:"text-red-600",dotClass:"bg-red-500"};case"run:stopped":return{label:"Stopped",colorClass:"text-amber-600",dotClass:"bg-amber-500"};default:return null}}(a);return(0,b.jsxs)("div",{"data-testid":`iteration-${a.number}`,className:"border-border/50 bg-card/50 flex flex-col overflow-hidden rounded-lg border",children:[c?(0,b.jsxs)("div",{className:"bg-muted/30 border-border/50 flex items-center justify-between border-b px-3 py-1.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground text-sm font-semibold tracking-wide",children:["Iteration ",a.number]}),f?(0,b.jsxs)("span",{className:`flex items-center gap-1 text-xs font-medium ${f.colorClass}`,children:[(0,b.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${f.dotClass}`}),f.label]}):null]}):null,(0,b.jsxs)("div",{className:"relative flex flex-col",children:[(0,b.jsx)("div",{className:"bg-border/60 absolute top-4 bottom-4 left-[21.5px] w-px"}),a.timings.map((c,f)=>{if(bH(c.phase)){let d,e="run:rejected"===c.phase,g="run:failed"===c.phase||"run:crashed"===c.phase||"run:stopped"===c.phase;if(e)d=a.rejectionMessage;else if(g){let b=[...a.timings].reverse().find(a=>!bH(a.phase)&&a.errorMessage);d=b?.errorMessage??c.errorMessage}return(0,b.jsx)(bK,{timing:c,message:d,attachments:e?a.rejectionAttachments:void 0,isFirst:0===f,isLast:f===a.timings.length-1},`${c.agentRunId}-${c.phase}-${c.startedAt}`)}return(0,b.jsx)(bL,{timing:c,maxDurationMs:d,now:e},`${c.agentRunId}-${c.phase}-${c.startedAt}`)})]})]})}function bK({timing:a,message:c,attachments:d,isFirst:e,isLast:f}){let g,h=bG[a.phase];if(!h)return null;let i=d&&d.length>0,j=h.icon;return(0,b.jsxs)("div",{className:`relative flex flex-col gap-1 px-3 ${e?"pt-2":"pt-1"} ${f?"pb-2":"pb-1"}`,children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:`relative z-10 flex h-5 w-5 shrink-0 items-center justify-center rounded-full ${h.bgClass}`,children:(0,b.jsx)(j,{className:`h-3 w-3 ${h.colorClass}`})}),(0,b.jsx)("span",{className:`text-sm font-medium ${h.colorClass}`,children:h.label}),a.startedAt&&!("string"==typeof a.startedAt&&a.startedAt.startsWith("synthetic"))?(0,b.jsx)("span",{className:"text-muted-foreground/60 ml-auto text-xs tabular-nums",children:bD(String(a.startedAt))}):null]}),c?(g="run:failed"===a.phase||"run:crashed"===a.phase||"run:stopped"===a.phase,(0,b.jsxs)("div",{className:`ml-[26px] flex items-start gap-1.5 rounded-md px-2 py-1.5 ${g?"bg-red-50/50 dark:bg-red-950/20":"bg-orange-50/50 dark:bg-orange-950/20"}`,children:[g?(0,b.jsx)(P.AlertCircle,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-red-400"}):(0,b.jsx)(Z.MessageSquare,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-orange-400"}),(0,b.jsxs)("span",{"data-testid":g?"error-message-text":"rejection-feedback-text",className:"text-muted-foreground text-xs leading-relaxed italic",children:["— ",c]})]})):null,i?(0,b.jsx)("div",{"data-testid":"rejection-feedback-attachments",className:"ml-[26px]",children:(0,b.jsx)(bi,{text:"",attachmentPaths:d})}):null]})}function bL({timing:a,maxDurationMs:d,now:f}){let{t:g}=(0,e.useTranslation)("web"),h=a.phase.includes(":")?a.phase.split(":")[0]:a.phase,i=a.phase.includes(":")?a.phase.split(":")[1]:null,j=null!==i,k=i?.startsWith("phase-")??!1,n=bF[h]??h,o=k?`Phase ${i.replace("phase-","")}`:null!==i?`${n} #${i}`:n,p=bB(a,f),q=!a.completedAt&&!!a.startedAt,r=q?15:2,s=d>0?Math.max(r,p/d*100):r,t=a.completedAt?k?"bg-emerald-400":j?"bg-amber-500":"bg-emerald-500":"bg-blue-500",u=null!=a.inputTokens||null!=a.outputTokens?(a.inputTokens??0)+(a.outputTokens??0):null,[v,w]=(0,c.useState)(!1),x=(0,c.useCallback)(()=>{a.prompt&&navigator.clipboard.writeText(a.prompt).then(()=>{w(!0),setTimeout(()=>w(!1),1500)})},[a.prompt]);return(0,b.jsxs)("div",{className:`group/phase relative flex flex-col gap-0.5 px-3 py-1.5 ${j?"ms-4":""}`,children:[(0,b.jsxs)("div",{"data-testid":`timing-bar-${a.phase}`,className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"relative z-10 flex h-5 w-5 shrink-0 items-center justify-center",children:(0,b.jsx)("div",{className:`rounded-full ${q?"h-3 w-3 animate-pulse":"h-2.5 w-2.5"} ${q?"bg-blue-500":a.completedAt?"bg-emerald-500":"bg-muted-foreground/30"}`})}),(0,b.jsx)("span",{className:`w-28 shrink-0 truncate text-sm font-medium ${j?"text-muted-foreground":"text-foreground/80"}`,children:o}),a.prompt?(0,b.jsx)("button",{type:"button",onClick:x,className:"text-muted-foreground/50 hover:text-foreground/70 -ms-1 shrink-0 opacity-0 transition-opacity group-hover/phase:opacity-100",title:g("activityTab.copyPromptToClipboard"),children:v?(0,b.jsx)(m.Check,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,b.jsx)(l.Copy,{className:"h-3.5 w-3.5"})}):null,(0,b.jsx)("div",{className:`bg-muted relative min-w-0 flex-1 overflow-hidden rounded-full ${j?"h-1.5":"h-2"}`,children:q?(0,b.jsx)("div",{className:"absolute inset-0 rounded-full bg-blue-500/30",style:{backgroundImage:"linear-gradient(90deg, transparent 0%, rgb(59 130 246) 50%, transparent 100%)",backgroundSize:"200% 100%",animation:"shimmer 1.5s ease-in-out infinite"}}):(0,b.jsx)("div",{className:`h-full rounded-full transition-all duration-300 ${t}`,style:{width:`${Math.min(s,100)}%`}})}),(0,b.jsx)("span",{className:"text-muted-foreground w-14 shrink-0 text-end text-sm font-medium tabular-nums",children:bn(p)})]}),(0,b.jsxs)("div",{className:"ml-[28px] flex items-center gap-3 text-xs",children:[a.startedAt?(0,b.jsx)("span",{className:"text-muted-foreground/60 tabular-nums",children:bD(a.startedAt)}):null,null!=u&&u>0?(0,b.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5",children:[(0,b.jsx)(_.Zap,{className:"h-3 w-3 opacity-50"}),bC(u)]}):null,null!=a.costUsd&&a.costUsd>0?(0,b.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5",children:[(0,b.jsx)(bw,{className:"h-3 w-3 opacity-50"}),bE(a.costUsd)]}):null]}),null!=a.approvalWaitMs&&a.approvalWaitMs>0?(0,b.jsx)(bM,{timing:a,maxDurationMs:d}):null]})}function bM({timing:a,maxDurationMs:c}){let d=a.approvalWaitMs??0,e=c>0?Math.max(2,d/c*100):2;return(0,b.jsxs)("div",{"data-testid":`approval-wait-${a.phase}`,className:"ml-[26px] flex items-center gap-2 rounded-md bg-amber-50/50 px-1.5 py-1 dark:bg-amber-950/20",children:[(0,b.jsx)(by.Timer,{className:"h-3.5 w-3.5 shrink-0 text-amber-500"}),(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 text-xs",children:"approval"}),(0,b.jsx)("div",{className:"bg-muted h-1.5 min-w-0 flex-1 overflow-hidden rounded-full",children:(0,b.jsx)("div",{className:"h-full rounded-full bg-amber-500",style:{width:`${Math.min(e,100)}%`}})}),(0,b.jsx)("span",{className:"text-muted-foreground w-14 shrink-0 text-end text-xs tabular-nums",children:bn(d)})]})}function bN({totalExecMs:a,totalWaitMs:c,totalInputTokens:d,totalOutputTokens:f,totalCostUsd:g}){let{t:h}=(0,e.useTranslation)("web"),i=d+f;return(0,b.jsxs)("div",{"data-testid":"activity-summary",className:"border-border bg-card/30 flex flex-col gap-2 rounded-lg border p-3",children:[(0,b.jsx)("div",{className:"text-muted-foreground mb-1 text-xs font-semibold tracking-wider uppercase",children:"Summary"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-3",children:[(0,b.jsx)(bO,{icon:a3.Clock,label:h("activityTab.execution"),value:bn(a)}),(0,b.jsx)(bO,{icon:by.Timer,label:h("activityTab.wait"),value:c>0?bn(c):"n/a"}),(0,b.jsx)(bO,{icon:a3.Clock,label:"Wall-clock",value:c>0?bn(a+c):bn(a)}),(0,b.jsx)(bO,{icon:bw,label:h("activityTab.cost"),value:g>0?bE(g):"n/a"}),(0,b.jsxs)("div",{className:"col-span-2 flex flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[(0,b.jsx)(_.Zap,{className:"h-3 w-3 opacity-40"}),"Tokens"]}),i>0?(0,b.jsxs)("span",{className:"flex items-center gap-2.5 text-sm tabular-nums",children:[(0,b.jsx)("span",{children:bC(i)}),(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-3 text-xs",title:"Input tokens / Output tokens",children:[(0,b.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,b.jsx)(bz,{className:"h-3 w-3 text-blue-500 opacity-60"}),bC(d)]}),(0,b.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,b.jsx)(bA,{className:"h-3 w-3 text-emerald-500 opacity-60"}),bC(f)]})]})]}):(0,b.jsx)("span",{className:"text-muted-foreground/40 text-sm italic tabular-nums",children:"n/a"})]})]})]})}function bO({icon:a,label:c,value:d,className:e=""}){let f="n/a"===d;return(0,b.jsxs)("div",{className:`flex flex-col gap-0.5 ${e}`,children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[(0,b.jsx)(a,{className:"h-3 w-3 opacity-40"}),c]}),(0,b.jsx)("span",{className:`text-sm tabular-nums ${f?"text-muted-foreground/40 italic":""}`,children:d})]})}var bP=a.i(45449),bQ=a.i(44447);let bR=(0,S.default)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]),bS=(0,S.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),bT=(0,S.default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),bU=/^\[(\d{4}-\d{2}-\d{2}T[\d:.]+Z?)\]\s+(?:\[([^\]]+)\]\s+)?(?:\[([^\]|]+)(?:\|([^\]]+))?\]\s+)?(.*)$/,bV=/^\[(tool-result|tool|text|delta|result|tokens|cmd|file|turn|thread|error|event|raw|WORKER)\]\s*(.*)/;function bW(a){let b=a.match(bU);if(!b)return{timestamp:null,phase:null,agent:null,model:null,tag:"raw",message:a,raw:a};let[,c,d,e,f,g]=b,h=null,i=null,j=null,k=g??"";if(null!=e&&null!=d)if(d.includes("|")){let[a,b]=d.split("|");i=a,j=b??null,k=`[${e}] ${g??""}`}else h=d,i=e,j=f??null;else if(null!=d)if(d.includes("|")){let[a,b]=d.split("|");i=a,j=b??null}else h=d;let l=k.match(bV),m="info";return l&&(m=l[1].toLowerCase(),k=l[2]),{timestamp:c??null,phase:h,agent:i,model:j,tag:m,message:k.trim(),raw:a}}function bX({content:a}){let d=(0,c.useMemo)(()=>a?a.split("\n").filter(a=>a.trim().length>0).map(bW):[],[a]);return 0===d.length?null:(0,b.jsx)("div",{className:"flex flex-col",children:d.map((a,c)=>(0,b.jsx)(bY,{line:a},c))})}function bY({line:a}){switch(a.tag){case"tool":return(0,b.jsx)(b_,{line:a});case"tool-result":return(0,b.jsx)(b5,{line:a});case"text":case"delta":return(0,b.jsx)(b1,{line:a});case"result":return(0,b.jsx)(b2,{line:a});case"tokens":case"turn":return(0,b.jsx)(b3,{line:a});case"cmd":return(0,b.jsx)(b6,{line:a});case"file":return(0,b.jsx)(b7,{line:a});case"thread":case"event":case"info":return(0,b.jsx)(b9,{line:a});case"error":return(0,b.jsx)(b8,{line:a});case"worker":return(0,b.jsx)(b4,{line:a});default:return(0,b.jsx)(ca,{line:a})}}function bZ({value:a}){if(!a)return null;let c=a.replace(/^.*T/,"").replace("Z",""),d=c.split(":"),e=d.length>=3?`${d[1]}:${d[2].split(".")[0]}`:c;return(0,b.jsx)("span",{className:"text-muted-foreground/60 w-11 shrink-0 font-mono text-[10px]",children:e})}function b$({phase:a}){return a?(0,b.jsx)("span",{className:"bg-muted text-muted-foreground w-20 shrink-0 truncate rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",title:a,children:a}):(0,b.jsx)("span",{className:"w-20 shrink-0"})}function b_({line:a}){var c;let d,{toolName:e,args:f}=-1===(d=(c=a.message).indexOf(" "))?{toolName:c,args:""}:{toolName:c.slice(0,d),args:c.slice(d+1)},g=function(a,b){try{let c=JSON.parse(b);if("Read"===a&&c.file_path||"Write"===a&&c.file_path||"Edit"===a&&c.file_path)return c.file_path;if("Glob"===a&&c.pattern||"Grep"===a&&c.pattern)return c.pattern;if("Bash"===a&&c.command)return c.command;if("Task"===a&&c.description)return c.description}catch{if(b.length>0)return b}return null}(e,f);return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 border-b border-transparent px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(b0,{toolName:e}),(0,b.jsx)("span",{className:"text-xs font-semibold text-violet-600 dark:text-violet-400",children:e}),g?(0,b.jsx)("span",{className:"text-muted-foreground min-w-0 font-mono text-xs break-all",children:g}):null]})]})}function b0({toolName:a}){let c=a.toLowerCase();return"bash"===c?(0,b.jsx)(I.Terminal,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):"read"===c||"glob"===c||"grep"===c?(0,b.jsx)(K.FileText,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):"write"===c||"edit"===c?(0,b.jsx)(bT,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):(0,b.jsx)(I.Terminal,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"})}function b1({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(Z.MessageSquare,{className:"mt-0.5 h-3 w-3 shrink-0 text-blue-500"}),(0,b.jsx)("span",{className:"text-foreground/80 min-w-0 text-xs leading-relaxed",children:a.message})]})]})}function b2({line:a}){var c;let d,e,{chars:f}=(d=(c=a.message).match(/^(\d+)\s+chars/),e=c.match(/session=(\S+)/),{chars:d?parseInt(d[1],10):0,sessionId:e?e[1]:null});return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(aM.CheckCircle2,{className:"mt-0.5 h-3 w-3 shrink-0 text-emerald-500"}),(0,b.jsxs)("span",{className:"text-xs font-medium text-emerald-600 dark:text-emerald-400",children:["Result: ",f.toLocaleString()," chars"]})]})]})}function b3({line:a}){let c,{inputTokens:d,outputTokens:e}=(c=a.message.match(/^(\d+)\s+in\s*\/\s*(\d+)\s+out/))?{inputTokens:parseInt(c[1],10),outputTokens:parseInt(c[2],10)}:{inputTokens:0,outputTokens:0};return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(bR,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-500"}),(0,b.jsxs)("span",{className:"text-muted-foreground text-xs",children:[(0,b.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:d.toLocaleString()})," in / ",(0,b.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:e.toLocaleString()})," out"]})]})]})}function b4({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 bg-zinc-50 px-3 py-1.5 transition-colors dark:bg-zinc-900/50",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(bS,{className:"mt-0.5 h-3 w-3 shrink-0 text-zinc-500"}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium break-all",children:a.message})]})]})}function b5({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(aH,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-400"}),(0,b.jsx)("span",{className:"text-muted-foreground min-w-0 font-mono text-[11px] break-all",children:a.message})]})]})}function b6({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(j.Play,{className:"mt-0.5 h-3 w-3 shrink-0 text-cyan-500"}),(0,b.jsx)("span",{className:"min-w-0 font-mono text-xs break-all text-cyan-700 dark:text-cyan-400",children:a.message})]})]})}function b7({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(bT,{className:"mt-0.5 h-3 w-3 shrink-0 text-orange-500"}),(0,b.jsx)("span",{className:"min-w-0 text-xs break-all text-orange-700 dark:text-orange-400",children:a.message})]})]})}function b8({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 bg-red-50 px-3 py-1.5 transition-colors dark:bg-red-950/30",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(P.AlertCircle,{className:"mt-0.5 h-3 w-3 shrink-0 text-red-500"}),(0,b.jsx)("span",{className:"min-w-0 text-xs font-medium break-all text-red-700 dark:text-red-400",children:a.message})]})]})}function b9({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bZ,{value:a.timestamp}),(0,b.jsx)(b$,{phase:a.phase}),(0,b.jsx)("span",{className:"text-muted-foreground min-w-0 text-xs break-all",children:a.message})]})}function ca({line:a}){return(0,b.jsx)("div",{className:"px-3 py-0.5",children:(0,b.jsx)("span",{className:"text-muted-foreground/70 font-mono text-[11px] break-all whitespace-pre-wrap",children:a.raw})})}function cb({content:a,isConnected:d,error:f}){let{t:g}=(0,e.useTranslation)("web"),h=(0,c.useRef)(null),[i,j]=(0,c.useState)(!0),[k,l]=(0,c.useState)("structured"),m=(0,c.useCallback)(()=>{let a=h.current;a&&j(a.scrollHeight-a.scrollTop-a.clientHeight<40)},[]),n=(0,c.useCallback)(()=>{let a=h.current;a&&(a.scrollTop=a.scrollHeight,j(!0))},[]);return((0,c.useEffect)(()=>{i&&h.current&&(h.current.scrollTop=h.current.scrollHeight)},[a,i]),f)?(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 text-sm text-red-600",children:[(0,b.jsx)(P.AlertCircle,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:f})]}):a?(0,b.jsxs)("div",{className:"flex h-full flex-col","data-testid":"log-tab",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 border-b px-3 py-1.5",children:[(0,b.jsx)("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-500":"bg-zinc-400"}`}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:d?"Live":"Disconnected"}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,b.jsx)("button",{type:"button",onClick:()=>l("structured"),className:`rounded p-1 transition-colors ${"structured"===k?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,title:g("logTab.structuredView"),children:(0,b.jsx)(K.FileText,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{type:"button",onClick:()=>l("raw"),className:`rounded p-1 transition-colors ${"raw"===k?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,title:g("logTab.rawView"),children:(0,b.jsx)(bQ.Code,{className:"h-3.5 w-3.5"})}),i?null:(0,b.jsxs)("button",{type:"button",onClick:n,className:"text-muted-foreground hover:text-foreground ms-1 flex items-center gap-1 text-xs",children:[(0,b.jsx)(bP.ArrowDown,{className:"h-3 w-3"}),"Jump to bottom"]})]})]}),(0,b.jsx)("div",{ref:h,onScroll:m,className:`flex-1 overflow-y-auto ${"raw"===k?"bg-zinc-950 p-3 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap text-zinc-300":"bg-background"}`,children:"structured"===k?(0,b.jsx)(bX,{content:a}):a})]}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,b.jsx)(I.Terminal,{className:"text-muted-foreground h-8 w-8"}),(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:g("logTab.noLogOutput")}),d?(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:"Waiting for log data..."}):null]})}let cc=(0,S.default)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var cd=a.i(4019),ce=a.i(83886);let cf=(0,S.default)("circle-dashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]),cg={Todo:{icon:cd.Circle,colorClass:"text-muted-foreground",borderClass:"border-border",label:"Todo"},"Work in Progress":{icon:h.Loader2,colorClass:"text-blue-600",borderClass:"border-blue-200",spinning:!0,label:"In Progress"},Done:{icon:m.Check,colorClass:"text-emerald-600",borderClass:"border-emerald-200",label:"Done"},Review:{icon:ce.Eye,colorClass:"text-amber-600",borderClass:"border-amber-200",label:"Review"}},ch={icon:cd.Circle,colorClass:"text-muted-foreground",borderClass:"border-border",label:"Unknown"};function ci({tasks:a}){let{t:c}=(0,e.useTranslation)("web");return 0===a.length?(0,b.jsx)("div",{className:"flex flex-col items-center justify-center gap-2 py-4",children:(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:c("taskProgress.noTasksDefined")})}):(0,b.jsxs)("div",{"data-testid":"task-progress-view",className:"flex flex-col gap-3",children:[(0,b.jsx)(cj,{tasks:a}),(0,b.jsx)("div",{"data-testid":"task-progress-list",className:"flex flex-col gap-2",children:a.map((a,c)=>(0,b.jsx)(cl,{task:a,index:c},a.title||`task-${c}`))})]})}function cj({tasks:a}){let{t:d}=(0,e.useTranslation)("web"),f=(0,c.useMemo)(()=>{let b=a.filter(a=>"Done"===a.state).length,c=a.filter(a=>"Work in Progress"===a.state).length,d=a.filter(a=>"Review"===a.state).length,e=a.filter(a=>"Done"!==a.state&&"Work in Progress"!==a.state&&"Review"!==a.state).length,f=a.length,g=f>0?Math.round(b/f*100):0;return{done:b,wip:c,review:d,todo:e,total:f,percent:g}},[a]);return(0,b.jsxs)("div",{"data-testid":"task-progress-summary",className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Task Progress"}),(0,b.jsxs)("span",{className:"text-muted-foreground text-xs",children:[f.done," of ",f.total," done"]})]}),(0,b.jsx)("div",{className:"bg-muted h-2 w-full overflow-hidden rounded-full",children:(0,b.jsx)("div",{"data-testid":"task-progress-bar",className:"h-full rounded-full bg-emerald-500 transition-all",style:{width:`${f.percent}%`}})}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-3",children:[f.done>0?(0,b.jsx)(ck,{icon:m.Check,label:d("taskProgress.done"),count:f.done,className:"text-emerald-600"}):null,f.wip>0?(0,b.jsx)(ck,{icon:h.Loader2,label:d("taskProgress.inProgress"),count:f.wip,className:"text-blue-600"}):null,f.review>0?(0,b.jsx)(ck,{icon:ce.Eye,label:d("taskProgress.review"),count:f.review,className:"text-amber-600"}):null,f.todo>0?(0,b.jsx)(ck,{icon:cd.Circle,label:d("taskProgress.todo"),count:f.todo,className:"text-muted-foreground"}):null]})]})}function ck({icon:a,label:c,count:e,className:f}){return(0,b.jsxs)("span",{className:(0,d.cn)("flex items-center gap-1 text-xs",f),children:[(0,b.jsx)(a,{className:"h-3 w-3"}),e," ",c]})}function cl({task:a,index:e}){let[f,g]=(0,c.useState)(!1),h=cg[a.state]??ch,i=h.icon,j=a.actionItems.length>0,k=(0,c.useCallback)(()=>{j&&g(a=>!a)},[j]);return(0,b.jsxs)("div",{"data-testid":`task-card-${e}`,className:(0,d.cn)("rounded-lg border",h.borderClass),children:[(0,b.jsxs)("button",{type:"button",onClick:k,disabled:!j,className:(0,d.cn)("flex w-full items-start gap-2 px-3 py-2.5 text-start",j&&"hover:bg-muted/50 cursor-pointer transition-colors"),children:[(0,b.jsx)(i,{className:(0,d.cn)("mt-0.5 h-4 w-4 shrink-0",h.colorClass,h.spinning&&"animate-spin")}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,b.jsx)("span",{className:(0,d.cn)("text-sm font-medium",h.colorClass),children:a.title}),a.description?(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:a.description}):null]}),j?(0,b.jsx)(aj.ChevronRight,{className:(0,d.cn)("text-muted-foreground mt-0.5 h-4 w-4 shrink-0 transition-transform",f&&"rotate-90")}):null]}),f&&j?(0,b.jsx)("div",{className:"border-t px-3 py-2.5",children:(0,b.jsx)("div",{className:"flex flex-col gap-2",children:a.actionItems.map((a,c)=>(0,b.jsx)(cm,{item:a},a.name||`ai-${c}`))})}):null]})}function cm({item:a}){let c=a.acceptanceCriteria.length,d=a.acceptanceCriteria.filter(a=>a.verified).length,e=c>0&&d===c;return(0,b.jsxs)("div",{"data-testid":"action-item",className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[e?(0,b.jsx)(aM.CheckCircle2,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-600"}):(0,b.jsx)(cf,{className:"text-muted-foreground mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.name}),a.description?(0,b.jsx)("span",{className:"text-muted-foreground text-[11px]",children:a.description}):null]}),c>0?(0,b.jsxs)("span",{className:"text-muted-foreground ml-auto shrink-0 text-[11px]",children:[d,"/",c]}):null]}),c>0?(0,b.jsx)("div",{className:"ms-5.5 flex flex-col gap-1",children:a.acceptanceCriteria.map((a,c)=>(0,b.jsx)(cn,{criterion:a},a.description||`ac-${c}`))}):null]})}function cn({criterion:a}){return(0,b.jsxs)("div",{"data-testid":"acceptance-criterion",className:"flex items-start gap-1.5",children:[a.verified?(0,b.jsx)(m.Check,{className:"mt-0.5 h-3 w-3 shrink-0 text-emerald-600"}):(0,b.jsx)(cd.Circle,{className:"text-muted-foreground mt-0.5 h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:(0,d.cn)("text-[11px]",a.verified?"text-muted-foreground line-through":"text-foreground"),children:a.description})]})}let co={Requirements:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",ClarificationRequired:"border-transparent bg-amber-50 text-amber-700 hover:bg-amber-50",Ready:"border-transparent bg-green-50 text-green-700 hover:bg-green-50"};function cp({plan:a,loading:c,error:d}){return c?(0,b.jsx)("div",{"data-testid":"plan-tab-loading",className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})}):d?(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 text-sm text-red-600",children:[(0,b.jsx)(P.AlertCircle,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:d})]}):a?(0,b.jsxs)("div",{className:"flex flex-col gap-4 p-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Plan State"}),(0,b.jsx)(al.Badge,{className:co[a.state]??"border-transparent bg-gray-50 text-gray-700",children:a.state})]}),a.overview?(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Overview"}),(0,b.jsx)("p",{className:"text-sm leading-relaxed",children:a.overview})]}):null,(0,b.jsx)(ci,{tasks:a.tasks})]}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,b.jsx)(cc,{className:"text-muted-foreground h-8 w-8"}),(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:"No plan created yet"})]})}var cq=a.i(61544);function cr(){return{data:null,loading:!1,error:null}}let cs=[{key:"overview",label:"Overview",icon:Q.LayoutDashboard},{key:"activity",label:"Activity",icon:R.Activity},{key:"log",label:"Log",icon:T},{key:"plan",label:"Plan",icon:U},{key:"prd-review",label:"PRD Review",icon:V},{key:"tech-decisions",label:"Tech Decisions",icon:W.Cpu},{key:"product-decisions",label:"Product",icon:X.Package},{key:"merge-review",label:"Merge Review",icon:Y},{key:"chat",label:"Chat",icon:Z.MessageSquare}],ct={activity:async function(a){let b=await ac(a);if("error"in b)throw Error(b.error);return{timings:b.timings,rejectionFeedback:b.rejectionFeedback}},plan:async function(a){let b=await ad(a);if("error"in b)throw Error(b.error);return b.plan}};function cu({featureName:a,headerContent:e,featureNode:g,featureId:i,initialTab:l,urlTab:m,prdData:n,prdSelections:o,onPrdSelect:p,onPrdApprove:q,onPrdReject:r,isPrdLoading:s,techData:t,onTechApprove:u,onTechReject:v,isTechLoading:w,productData:x,mergeData:y,onMergeApprove:z,onMergeReject:A,isMergeLoading:B,syncStatus:C,syncLoading:D,syncError:E,onRefreshSync:G,onRebaseOnMain:H,rebaseLoading:I,rebaseError:J,isRejecting:K,chatInput:L,onChatInputChange:M,sseEvents:N,interactiveAgentEnabled:O=!0,onRetry:Q,onStop:R,onStart:S}){let T,U=(0,f.usePathname)(),V=(0,c.useMemo)(()=>(function(a,b=!0){let c=["overview","activity"];return a.hasAgentRun&&c.push("log"),a.hasPlan&&c.push("plan"),"requirements"===a.lifecycle&&"action-required"===a.state&&c.push("prd-review"),"implementation"===a.lifecycle&&"action-required"===a.state&&c.push("tech-decisions","product-decisions"),"review"===a.lifecycle&&("action-required"===a.state||"error"===a.state)&&c.push("merge-review"),"maintain"===a.lifecycle&&a.pr&&c.push("merge-review"),b&&c.push("chat"),c})(g,O),[g,O]),W=(0,c.useMemo)(()=>cs.filter(a=>V.includes(a.key)).map(a=>"merge-review"===a.key&&"maintain"===g.lifecycle?{...a,label:"Merge History"}:a),[V,g.lifecycle]),X=(0,c.useMemo)(()=>{let a=U.match(/^(\/feature\/[^/]+)/);return a?a[1]:U},[U]),Y=(0,c.useMemo)(()=>m&&V.includes(m)?m:l&&V.includes(l)?l:"overview",[]),[Z,ac]=(0,c.useState)(Y),ad=function(a){let[b,d]=(0,c.useState)(""),[e,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),i=(0,c.useRef)(null),j=(0,c.useCallback)(()=>{i.current&&(i.current.close(),i.current=null),f(!1)},[]);return(0,c.useEffect)(()=>{if(!a){d(""),f(!1),h(null);return}d(""),h(null);let b=new EventSource(`/api/feature-logs?featureId=${a}`);return i.current=b,b.onopen=()=>{f(!0)},b.addEventListener("initial",a=>{d(JSON.parse(a.data).content)}),b.addEventListener("log",a=>{let b=JSON.parse(a.data);d(a=>a+b.content)}),b.addEventListener("error",a=>{try{let b=JSON.parse(a.data);h(b.error)}catch{h(a.data?String(a.data):"Log stream unavailable")}}),b.onerror=()=>{f(!1)},()=>{b.close(),i.current=null}},[a,j]),{content:b,isConnected:e,error:g}}("log"===Z?i:null),{tabs:af,fetchTab:ag,refreshTab:ai}=function(a,b){let d=Object.keys(b),[e,f]=(0,c.useState)(()=>{let a={};for(let b of d)a[b]=cr();return a}),g=(0,c.useRef)(b);g.current=b;let h=(0,c.useRef)(a);h.current=a;let i=(0,c.useRef)(!0);(0,c.useEffect)(()=>(i.current=!0,()=>{i.current=!1}),[]);let j=(0,c.useRef)(a);(0,c.useEffect)(()=>{j.current!==a&&(j.current=a,f(a=>{let b={};for(let c of Object.keys(a))b[c]=cr();return b}))},[a]);let k=(0,c.useCallback)(async a=>{let b=g.current[a],c=h.current;if(b){i.current&&f(b=>b[a]?.data!==null?b:{...b,[a]:{...b[a],loading:!0,error:null}});try{let d=await b(c);i.current&&f(b=>({...b,[a]:{data:d,loading:!1,error:null}}))}catch(b){i.current&&f(c=>{let d=b instanceof Error?b.message:"Failed to fetch tab data",e=c[a]?.data??null;return{...c,[a]:{data:e,loading:!1,error:e?null:d}}})}}},[]),l=(0,c.useCallback)(async a=>{let b=e[a];b&&null!==b.data||b&&b.loading||await k(a)},[e,k]);return{tabs:e,fetchTab:l,refreshTab:(0,c.useCallback)(async a=>{await k(a)},[k])}}(i,ct),aj=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(!aj.current)return;aj.current=!1;let a="overview"===Z?X:`${X}/${Z}`;a!==U&&window.history.pushState(null,"",a)},[Z,X,U]);let ak=(0,c.useRef)(U);(0,c.useEffect)(()=>{if(ak.current===U||(ak.current=U,aj.current))return;let a=U.split("/"),b=a.length>=4?a[3]:void 0,c=b&&V.includes(b)?b:"overview";c!==Z&&(ac(c),("activity"===c||"plan"===c)&&ag(c))},[U]);let al=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(!al.current&&(al.current=!0,!m&&"overview"!==Y)){let a=`${X}/${Y}`;a!==U&&window.history.replaceState(null,"",a)}},[]);let am=(0,c.useRef)(!1);(0,c.useEffect)(()=>{am.current||(am.current=!0,("activity"===Z||"plan"===Z)&&ag(Z))},[Z,ag]);let an=(0,c.useRef)(i);(0,c.useEffect)(()=>{an.current!==i&&(an.current=i,ac("overview"))},[i]);let ao=(0,c.useRef)(l);(0,c.useEffect)(()=>{if(ao.current!==l&&l&&V.includes(l)){ao.current=l,ac(l),("activity"===l||"plan"===l)&&ag(l);let a="overview"===l?X:`${X}/${l}`;a!==window.location.pathname&&window.history.replaceState(null,"",a)}},[l,V,X,ag]),(0,c.useEffect)(()=>{V.includes(Z)||(ac("overview"),window.location.pathname!==X&&window.history.replaceState(null,"",X))},[V,Z,X]);let ap=(0,c.useRef)(Z);ap.current=Z;let aq=(0,c.useRef)(0);(0,c.useEffect)(()=>{if(!N||0===N.length||(aq.current>N.length&&(aq.current=0),N.length<=aq.current))return;let a=N.slice(aq.current);if(aq.current=N.length,!a.some(a=>a.featureId===i))return;ai("activity");let b=ap.current;"plan"===b&&ai(b)},[N,i,ai]);let ar="running"===g.state||"creating"===g.state;(0,c.useEffect)(()=>{if(!ar)return;let a=setInterval(()=>{ai("activity")},5e3);return()=>clearInterval(a)},[ar,ai]);let as=(0,c.useCallback)(a=>{aj.current=!0,ac(a),("activity"===a||"plan"===a)&&ag(a)},[ag]);return(0,b.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,b.jsxs)(ab.Tabs,{value:Z,onValueChange:as,className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsx)(ab.TabsList,{className:"bg-muted/50 h-auto w-full shrink-0 justify-start gap-0 rounded-none border-b p-0",children:W.map(a=>{let c=a.icon;return(0,b.jsxs)(ab.TabsTrigger,{value:a.key,className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,b.jsx)(c,{className:"mr-1.5 size-4"}),a.label]},a.key)})}),(0,b.jsxs)("div",{className:"bg-muted/40 shrink-0 border-b",children:[a?(0,b.jsxs)("div",{className:"flex h-12 items-stretch gap-2 pr-0 pl-4","data-testid":"feature-drawer-header",children:[(0,b.jsx)("div",{className:"flex items-center",children:g.fastMode?(0,b.jsx)(_.Zap,{className:"size-4 shrink-0 text-amber-500"}):(0,b.jsx)(aa,{className:"text-muted-foreground/50 size-4 shrink-0"})}),(0,b.jsx)("h2",{className:"text-foreground flex min-w-0 items-center truncate text-base font-semibold tracking-tight",children:a}),g.repositoryName?(0,b.jsxs)("span",{className:"animate-in fade-in flex shrink-0 items-center gap-1.5 self-center duration-200",children:[(0,b.jsx)("span",{className:"text-muted-foreground/30 text-sm",children:"/"}),g.remoteUrl?(0,b.jsx)("a",{href:g.remoteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground text-sm",children:g.repositoryName}):(0,b.jsx)("span",{className:"text-muted-foreground text-sm",children:g.repositoryName})]}):(0,b.jsxs)("span",{className:"flex items-center gap-1.5 self-center",children:[(0,b.jsx)("span",{className:"text-muted-foreground/30 text-sm",children:"/"}),(0,b.jsx)("span",{className:"bg-muted h-4 w-16 animate-pulse rounded"})]}),(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"ml-auto flex shrink-0 cursor-default items-center self-stretch text-xs font-medium",children:[(0,b.jsxs)("div",{className:(0,d.cn)("flex items-center gap-1.5 self-stretch px-3",ae.featureNodeStateConfig[g.state].labelClass),children:["running"===g.state?(0,b.jsx)(ah,{size:"sm",className:"shrink-0"}):(T=ae.featureNodeStateConfig[g.state].icon,(0,b.jsx)(T,{className:"size-3.5 shrink-0"})),ae.featureNodeStateConfig[g.state].label]}),"pending"===g.state&&S?(0,b.jsxs)("button",{type:"button",onClick:()=>S(g.featureId),className:"text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-green-500/10 hover:text-green-600 dark:hover:text-green-400","data-testid":"feature-drawer-start-button",children:[(0,b.jsx)(j.Play,{className:"size-3.5"})," Start"]}):"error"===g.state&&Q?(0,b.jsxs)("button",{type:"button",onClick:()=>Q(g.featureId),className:"text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-red-500/10 hover:text-red-500 dark:hover:text-red-400","data-testid":"feature-drawer-retry-button",children:[(0,b.jsx)($.RotateCcw,{className:"size-3.5"})," Retry"]}):"running"===g.state&&R?(0,b.jsxs)("button",{type:"button",onClick:()=>R(g.featureId),className:"text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-red-500/10 hover:text-red-500 dark:hover:text-red-400","data-testid":"feature-drawer-stop-button",children:[(0,b.jsx)(k.Square,{className:"size-3.5"})," Stop"]}):null]})}),g.errorMessage?(0,b.jsxs)(F.TooltipContent,{side:"bottom",align:"end",sideOffset:4,className:"z-[100] max-w-xs cursor-pointer text-xs leading-relaxed select-text",onClick:()=>{navigator.clipboard.writeText(g.errorMessage)},children:[g.errorMessage,(0,b.jsx)("span",{className:"text-muted-foreground ml-1 text-[10px] italic",children:"(click to copy)"})]}):null]})})]}):null,e]}),(0,b.jsx)(ab.TabsContent,{value:"overview",className:"mt-0 flex-1 overflow-y-auto",children:(0,b.jsx)(bt,{data:g,syncStatus:C,syncLoading:D,syncError:E,onRefreshSync:G,onRebaseOnMain:H,rebaseLoading:I,rebaseError:J})}),(0,b.jsx)(ab.TabsContent,{value:"activity",className:"mt-0 flex-1 overflow-y-auto",children:(0,b.jsx)(bI,{timings:af.activity.data?.timings??null,loading:af.activity.loading,error:af.activity.error,rejectionFeedback:af.activity.data?.rejectionFeedback})}),(0,b.jsx)(ab.TabsContent,{value:"log",className:"mt-0 flex-1 overflow-hidden",children:(0,b.jsx)(cb,{content:ad.content,isConnected:ad.isConnected,error:ad.error})}),(0,b.jsx)(ab.TabsContent,{value:"plan",className:"mt-0 flex-1 overflow-y-auto",children:(0,b.jsx)(cp,{plan:af.plan.data,loading:af.plan.loading,error:af.plan.error})}),V.includes("prd-review")?(0,b.jsx)(ab.TabsContent,{value:"prd-review",className:"mt-0 flex min-h-0 flex-1 flex-col",children:n?(0,b.jsx)(au,{data:n,selections:o??{},onSelect:p??(()=>void 0),onApprove:q??(()=>void 0),onReject:r,isProcessing:s,isRejecting:K,chatInput:L,onChatInputChange:M}):(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})})}):null,V.includes("tech-decisions")?(0,b.jsx)(ab.TabsContent,{value:"tech-decisions",className:"mt-0 flex min-h-0 flex-1 flex-col",children:t?(0,b.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,b.jsx)(az,{data:t})}),(0,b.jsx)(cv,{onApprove:u??(()=>void 0),onReject:v,isProcessing:w,isRejecting:K,chatInput:L,onChatInputChange:M})]}):(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})})}):null,V.includes("product-decisions")?(0,b.jsx)(ab.TabsContent,{value:"product-decisions",className:"mt-0 flex-1 overflow-y-auto",children:null===x?(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})}):x?(0,b.jsx)(aC,{data:x}):(0,b.jsx)("p",{className:"text-muted-foreground p-4 text-center text-sm",children:"No product decisions available."})}):null,V.includes("merge-review")?(0,b.jsx)(ab.TabsContent,{value:"merge-review",className:"mt-0 flex min-h-0 flex-1 flex-col",children:y?(0,b.jsx)(a2,{data:y,readOnly:"maintain"===g.lifecycle,onApprove:z??(()=>void 0),onReject:A,isProcessing:B,isRejecting:K,chatInput:L,onChatInputChange:M}):(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:B?(0,b.jsx)(h.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"}):(0,b.jsxs)("div",{className:"text-muted-foreground flex flex-col items-center gap-2 text-sm",children:[(0,b.jsx)(P.AlertCircle,{className:"h-6 w-6"}),(0,b.jsx)("span",{children:"Merge review data unavailable"})]})})}):null,V.includes("chat")?(0,b.jsx)(ab.TabsContent,{value:"chat",className:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,b.jsx)(cq.ChatTab,{featureId:i,worktreePath:g.worktreePath})}):null]})})}function cv({onApprove:a,onReject:c,isProcessing:d,isRejecting:f,chatInput:g,onChatInputChange:h}){let{t:i}=(0,e.useTranslation)("web");return(0,b.jsx)(at,{onReject:c,onApprove:a,approveLabel:i("featureDrawer.approvePlan"),revisionPlaceholder:"Ask AI to revise the plan...",isProcessing:d,isRejecting:f,chatInput:g,onChatInputChange:h})}var cw=a.i(52150),cx=a.i(20596),cy=a.i(68430);let cz=(0,p.createServerReference)("40e1f25087a7ea01b451899611d66d390ec6bbcedc",p.callServer,void 0,p.findSourceMapURL,"rebaseFeature");var cA=a.i(74146);function cB(a){return"requirements"===a.lifecycle&&"action-required"===a.state?"prd-review":"implementation"===a.lifecycle&&"action-required"===a.state?"tech-decisions":"review"===a.lifecycle&&("action-required"===a.state||"error"===a.state)?"merge-review":"overview"}function cC(a,b,d,e,f,h){let[i,j]=(0,c.useState)(!1),k=(0,c.useRef)(d),l=(0,c.useRef)(e);return k.current=d,l.current=e,(0,c.useEffect)(()=>{if(l.current(),!a)return;let c=!1;return j(!0),b(a).then(a=>{c||k.current(a)}).catch(()=>{!c&&f&&g.toast.error(f)}).finally(()=>{c||j(!1)}),()=>{c=!0}},[a,b,f,h]),i}let cD=(0,p.createServerReference)("40d3dcb1ea4ccb484109d5d26154b3603cd0e7539f",p.callServer,void 0,p.findSourceMapURL,"getFeatureDrawerData"),cE=(0,p.createServerReference)("40207f736f2afbb86579362cbd909ff38bc4f7e337",p.callServer,void 0,p.findSourceMapURL,"getBranchSyncStatus"),cF=new Map;a.s(["FeatureDrawerClient",0,function({view:a,urlTab:p,interactiveAgentEnabled:H=!0}){var I;let J,K,L,M,N,P,Q=(0,y.useFeatureFlags)(),{t:R}=(0,e.useTranslation)("web"),S=(0,f.useRouter)(),T=(0,z.useSoundAction)("reject"),[U,V]=(0,c.useState)(a);(0,c.useEffect)(()=>{V(b=>"feature"===b.type&&"feature"===a.type&&b.node.featureId===a.node.featureId?{...a,node:{...b.node,...a.node}}:a)},[a]);let W="feature"===U.type?U.node:null,{events:X}=(0,C.useAgentEventsContext)(),Y=(0,c.useRef)(0);(0,c.useEffect)(()=>{if(Y.current>X.length&&(Y.current=0),!W||X.length<=Y.current)return;let a=X.slice(Y.current);for(let b of(Y.current=X.length,(0,cA.resolveSseEventUpdates)(a)))b.featureId===W.featureId&&"deleting"!==W.state&&(void 0!==b.state||void 0!==b.lifecycle)&&V(a=>{if("feature"!==a.type)return a;let c={...a.node,...void 0!==b.state&&{state:b.state},...void 0!==b.lifecycle&&{lifecycle:b.lifecycle}};return{...a,node:c,initialTab:cB(c)}})},[X,W]);let Z=(0,f.usePathname)().startsWith("/feature/");I=W?.featureId??null,J=(0,c.useRef)(Z),K=(0,c.useRef)(!1),L=(0,c.useRef)(0),M=(0,c.useCallback)(async()=>{if(!I||K.current)return;K.current=!0;let a=L.current;try{let b=await cD(I);if(!b||a!==L.current)return;V(a=>(function(a,b){if("feature"!==a.type)return a;let c={...a.node,...b},d=c.state!==a.node.state||c.lifecycle!==a.node.lifecycle;return{...a,node:c,initialTab:d?cB(c):a.initialTab}})(a,b))}catch{}finally{K.current=!1}},[I,V]),N=(0,c.useRef)(!1),(0,c.useEffect)(()=>{!Z||J.current&&N.current||(N.current=!0,L.current+=1,K.current=!1,M()),J.current=Z},[Z,M]),(0,c.useEffect)(()=>{if(!Z||!I)return;let a=setInterval(()=>{M()},15e3);return()=>clearInterval(a)},[Z,I,M]);let $=(0,c.useCallback)(()=>{S.push("/")},[S]),[_,aa]=(0,c.useState)(""),[ab,ac]=(0,c.useState)(null),[ad,ae]=(0,c.useState)({}),[af,ag]=(0,c.useState)({}),[ah,ai]=(0,c.useState)(null),[aj,ak]=(0,c.useState)(void 0),[al,am]=(0,c.useState)(null),[an,ao]=(0,c.useState)(!1),[ap,aq]=(0,c.useState)(!1),[ar,as]=(0,c.useState)(!1),at=`${W?.featureId}:${W?.state}`,au=(0,c.useRef)(at);(0,c.useEffect)(()=>{at!==au.current&&(au.current=at,as(!1))},[at]);let[av,aw]=(0,c.useState)(!1),ax=(0,c.useRef)(!1),ay="feature"===U.type?U.initialTab:void 0;(0,c.useEffect)(()=>{aa("")},[ay]);let az=(0,c.useRef)(0),aA=(0,c.useRef)(W?.state),aB=(0,c.useRef)(W?.lifecycle);(W?.state!==aA.current||W?.lifecycle!==aB.current)&&(aA.current=W?.state,aB.current=W?.lifecycle,az.current+=1);let aC=az.current,aD=cC(W?.lifecycle==="requirements"&&W?.state==="action-required"?W.featureId:null,v,a=>{if(a.error)return void g.toast.error(a.error);if(a.questionnaire){ac(a.questionnaire);let b={};for(let c of a.questionnaire.questions){let a=c.options.find(a=>a.recommended);a&&(b[c.id]=a.id)}ae(b),ag(b)}},()=>{ae({}),ag({}),ac(null)},"Failed to load questionnaire",aC),aE=W?.lifecycle==="implementation"&&W?.state==="action-required"?W.featureId:null,aF=cC(aE,w,a=>{a.error?g.toast.error(a.error):a.techDecisions&&ai(a.techDecisions)},()=>ai(null),"Failed to load tech decisions",aC),aG=cC(aE,v,a=>{a.productDecisions&&ak(a.productDecisions)},()=>ak(void 0),void 0,aC),aH=cC(W?.lifecycle==="review"&&(W?.state==="action-required"||W?.state==="error")||W?.lifecycle==="maintain"&&W?.pr?W.featureId:null,x,a=>{"error"in a?g.toast.error(a.error):am(a)},()=>am(null),"Failed to load merge review data",aC),aI=_.trim().length>0,aJ=W?.lifecycle==="requirements"&&W?.state==="action-required"&&Object.keys(af).some(a=>af[a]!==ad[a]),aK=(0,c.useCallback)(()=>{aa(""),ae({...af})},[af]),{attemptClose:aL}=(0,A.useGuardedDrawerClose)({open:Z,isDirty:aI||aJ,onClose:$,onReset:aK}),aM=(0,c.useCallback)(async(a,b,c=[],d)=>{if(W?.featureId){ax.current=!0,aw(!0);try{let e=c.map(a=>a.path).filter(Boolean),f=c.filter(a=>a.notes?.trim()),h=f.length>0?`${a}
1
+ module.exports=[64885,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(85536);a.i(98617);var e=a.i(50040),f=a.i(40674),g=a.i(52313),h=a.i(20901),i=a.i(65350),j=a.i(7434),k=a.i(28604),l=a.i(34948),m=a.i(60197),n=a.i(48111),o=a.i(16716),p=a.i(6120);let q=(0,p.createServerReference)("60d63e7dfefdb2030633a5ce0b8a9ab911f2f5f1bf",p.callServer,void 0,p.findSourceMapURL,"approveFeature");var r=a.i(93106),s=a.i(3045),t=a.i(37303);let u=(0,p.createServerReference)("7073a2a89f5bd1066886065e9d9135e30c71eb7d8a",p.callServer,void 0,p.findSourceMapURL,"rejectFeature"),v=(0,p.createServerReference)("40e6ab4f184a5112a8559554f64a38ed3e7a547d18",p.callServer,void 0,p.findSourceMapURL,"getFeatureArtifact"),w=(0,p.createServerReference)("4079dd08e2b146ca610665c67cddfc85910e11ff96",p.callServer,void 0,p.findSourceMapURL,"getResearchArtifact"),x=(0,p.createServerReference)("4047578b82147369f8721ed8f0f907d4b0945b7a89",p.callServer,void 0,p.findSourceMapURL,"getMergeReviewData");var y=a.i(21333),z=a.i(19884),A=a.i(96213),B=a.i(18662),C=a.i(84871);a.i(78454);var D=a.i(24255);a.i(49235);var E=a.i(85080),F=a.i(82934);a.i(77569);var G=a.i(65310),H=a.i(32471),I=a.i(8685),J=a.i(83813),K=a.i(63204),L=a.i(63843);let M="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40";function N({loading:a,error:c,icon:d}){return a?(0,b.jsx)(h.LoaderCircle,{className:"size-3.5 animate-spin"}):c?(0,b.jsx)(L.CircleAlert,{className:"text-destructive size-3.5"}):(0,b.jsx)(d,{className:"size-4"})}function O({actions:a,repositoryPath:d,worktreePath:e,showSpecs:f}){let[g,h]=(0,c.useState)(!1);return(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openInIde,disabled:a.ideLoading,"aria-label":"Open in IDE",children:(0,b.jsx)(N,{loading:a.ideLoading,error:a.ideError,icon:H.Code2})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open in IDE"})]}),(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openInShell,disabled:a.shellLoading,"aria-label":"Open terminal",children:(0,b.jsx)(N,{loading:a.shellLoading,error:a.shellError,icon:I.Terminal})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open terminal"})]}),(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openFolder,disabled:a.folderLoading,"aria-label":"Open folder",children:(0,b.jsx)(N,{loading:a.folderLoading,error:a.folderError,icon:J.FolderOpen})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open folder"})]}),f?(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:a.openSpecsFolder,disabled:a.specsLoading,"aria-label":"Open specs",children:(0,b.jsx)(N,{loading:a.specsLoading,error:a.specsError,icon:K.FileText})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:"Open specs"})]}):null,(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",className:M,onClick:()=>{navigator.clipboard.writeText(e??d),h(!0),setTimeout(()=>h(!1),2e3)},"aria-label":"Copy path",children:g?(0,b.jsx)(m.Check,{className:"size-3.5 text-green-500"}):(0,b.jsx)(l.Copy,{className:"size-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:g?"Copied!":"Copy path"})]})]})})}var P=a.i(20970),Q=a.i(51423),R=a.i(97624);let S=(0,R.default)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),T=(0,R.default)("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]),U=(0,R.default)("file-check",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);var V=a.i(39794),W=a.i(69045);let X=(0,R.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var Y=a.i(73952),Z=a.i(6804),$=a.i(42728);let _=(0,R.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var aa=a.i(41305);let ab=(0,p.createServerReference)("4054e8d7d5dde3afcc80430643023fcf6d1d79d4b0",p.callServer,void 0,p.findSourceMapURL,"getFeaturePhaseTimings"),ac=(0,p.createServerReference)("40898ba147024a4b40f4df49859e6d350b878d9ebb",p.callServer,void 0,p.findSourceMapURL,"getFeaturePlan");a.i(54250);var ad=a.i(27039);let ae=(0,a.i(42261).cva)("inline-block shrink-0",{variants:{size:{sm:"size-5",md:"size-8",lg:"size-12"}},defaultVariants:{size:"md"}}),af=[{r:9,spline:"0.12 0 0.04 1",opacity:1},{r:8.2,spline:"0.16 0 0.08 1",opacity:.95},{r:7.4,spline:"0.20 0 0.12 1",opacity:.9},{r:6.6,spline:"0.25 0 0.16 1",opacity:.84},{r:5.8,spline:"0.30 0 0.20 1",opacity:.76},{r:5,spline:"0.36 0 0.25 1",opacity:.67},{r:4.2,spline:"0.42 0 0.31 1",opacity:.56},{r:3.4,spline:"0.48 0 0.37 1",opacity:.44},{r:2.6,spline:"0.55 0 0.44 1",opacity:.32},{r:1.8,spline:"0.62 0 0.52 1",opacity:.2},{r:1,spline:"0.70 0 0.60 1",opacity:.1}];function ag({className:a,size:c="md",duration:e=5,...f}){return(0,b.jsxs)("svg",{"data-slot":"comet-spinner",role:"status","aria-label":"Loading",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:(0,d.cn)(ae({size:c}),a),...f,children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("filter",{id:"comet-gooey",x:"-100%",y:"-100%",width:"300%",height:"300%",colorInterpolationFilters:"sRGB",children:[(0,b.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"2.5"}),(0,b.jsx)("feColorMatrix",{mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 50 -30",result:"goo"})]})}),(0,b.jsxs)("g",{filter:"url(#comet-gooey)",children:[(0,b.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:`${e}s`,repeatCount:"indefinite"}),af.map(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"spline",values:"0 50 50;360 50 50",keyTimes:"0;1",keySplines:a.spline,dur:"1s",repeatCount:"indefinite"}),(0,b.jsx)("circle",{cx:"50",cy:"18",r:a.r,fill:"currentColor",opacity:a.opacity})]},a.r)),(0,b.jsxs)("circle",{cx:"50",cy:"50",r:"4",fill:"currentColor",opacity:"0.15",children:[(0,b.jsx)("animate",{attributeName:"r",values:"3;5;3",dur:"2s",repeatCount:"indefinite"}),(0,b.jsx)("animate",{attributeName:"opacity",values:"0.1;0.25;0.1",dur:"2s",repeatCount:"indefinite"})]})]})]})}var ah=a.i(40227),ai=a.i(38776),aj=a.i(18948),ak=a.i(58339),al=a.i(95014);let am=(0,R.default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var an=a.i(55944),ao=a.i(79620);a.i(307);var ap=a.i(30931),aq=a.i(39116);let ar=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]);function as({onReject:a,onApprove:f,approveLabel:g,approveVariant:h="default",revisionPlaceholder:i,isProcessing:j=!1,isRejecting:k=!1,children:l,chatInput:n,onChatInputChange:o}){let{t:p}=(0,e.useTranslation)("web"),q="warning"===h,r=q?an.TriangleAlert:m.Check,s=q?"bg-orange-500/85":"bg-blue-500/85",[t,u]=(0,c.useState)(""),v=n??t,w=o??u,x=(0,z.useSoundAction)("approve"),y=j||k,[A,B]=(0,c.useState)([]),[C,D]=(0,c.useState)(!1),[E,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(!1),[L,M]=(0,c.useState)(!1),N=v.trim().length>0,O=N?H||J&&L:!H,P=(0,c.useRef)(0),Q=(0,c.useRef)(crypto.randomUUID()),R=(0,c.useRef)(null);(0,c.useEffect)(()=>{function a(a){("Control"===a.key||"Meta"===a.key)&&K(!0),"Shift"===a.key&&M(!0)}function b(a){("Control"===a.key||"Meta"===a.key)&&K(!1),"Shift"===a.key&&M(!1)}function c(){K(!1),M(!1)}return window.addEventListener("keydown",a),window.addEventListener("keyup",b),window.addEventListener("blur",c),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",b),window.removeEventListener("blur",c)}},[]);let S=(0,c.useCallback)(async a=>{for(let b of(G(null),a)){if(b.size>0xa00000)return void G(`"${b.name}" exceeds 10 MB limit`);let a=function(a){let b=a.lastIndexOf(".");return b>=0?a.slice(b).toLowerCase():""}(b.name);if(a&&!ar.has(a))return void G(`File type "${a}" is not allowed`)}for(let b of a){let a=crypto.randomUUID();B(c=>[...c,{id:a,name:b.name,size:b.size,mimeType:b.type||"application/octet-stream",path:"",loading:!0}]);try{let c=new FormData;c.append("file",b),c.append("sessionId",Q.current);let d=await fetch("/api/attachments/upload",{method:"POST",body:c});if(!d.ok){let b=await d.json().catch(()=>({error:"Upload failed"}));B(b=>b.filter(b=>b.id!==a)),G(b.error??"Upload failed");return}let e=await d.json();B(b=>b.some(b=>b.id!==a&&b.path===e.path)?b.filter(b=>b.id!==a):b.map(b=>b.id===a?{...e,id:a,loading:!1}:b))}catch{B(b=>b.filter(b=>b.id!==a)),G("Upload failed")}}},[]),T=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),P.current+=1,1===P.current&&D(!0)},[]),U=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),P.current-=1,0===P.current&&D(!1)},[]),V=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation()},[]),W=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),P.current=0,D(!1);let b=Array.from(a.dataTransfer.files);b.length>0&&S(b)},[S]),X=(0,c.useCallback)(a=>{let b=a.clipboardData?.items;if(!b)return;let c=[];for(let a of Array.from(b))if("file"===a.kind){let b=a.getAsFile();b&&c.push(b)}c.length>0&&(a.preventDefault(),S(c))},[S]),Y=(0,c.useCallback)(async()=>{try{let a=await (0,aq.pickFiles)();a&&B(b=>{let c=new Set(b.map(a=>a.path)),d=a.filter(a=>!c.has(a.path)).map(a=>({id:crypto.randomUUID(),name:a.name,size:a.size,mimeType:"application/octet-stream",path:a.path}));return d.length>0?[...b,...d]:b})}catch{}},[]),Z=(0,c.useCallback)(a=>{B(b=>b.filter(b=>b.id!==a))},[]),$=(0,c.useCallback)((a,b)=>{B(c=>c.map(c=>c.id===a?{...c,notes:b}:c))},[]),_=(0,c.useCallback)(()=>{w(""),B([]),G(null)},[w]),aa=(0,c.useCallback)(a=>{(a.ctrlKey||a.metaKey)&&"Enter"===a.key&&(a.preventDefault(),R.current?.requestSubmit())},[]),ab="u">typeof navigator&&/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl";return(0,b.jsxs)("div",{className:"border-border shrink-0 border-t",children:[l,a?(0,b.jsx)(F.TooltipProvider,{delayDuration:400,children:(0,b.jsx)("form",{ref:R,onSubmit:function(b){b.preventDefault();let c=v.trim();if(O)x.play(),f(),_();else{if(!c||!a)return;a(c,A.filter(a=>!a.loading)),_()}},className:"p-3",children:(0,b.jsx)("div",{role:"region","aria-label":p("createDrawer.fileDropZone"),"data-drag-over":C?"true":"false",onDragEnter:T,onDragLeave:U,onDragOver:V,onDrop:W,className:(0,d.cn)("rounded-md border-2 border-transparent transition-colors",C&&"border-primary/50 bg-primary/5"),children:(0,b.jsxs)("div",{className:"border-input focus-within:ring-ring/50 focus-within:border-ring flex flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]",children:[(0,b.jsx)(ao.Textarea,{placeholder:i??"Ask AI to revise...","aria-label":i??"Ask AI to revise...",disabled:y,value:v,onChange:a=>w(a.target.value),onKeyDown:aa,onPaste:X,rows:1,"aria-invalid":!!E,"aria-describedby":E?"drawer-action-upload-error":void 0,className:"max-h-[35dvh] min-h-9 flex-1 resize-none overflow-y-auto rounded-none border-0 py-2 shadow-none focus-visible:ring-0","data-testid":"drawer-chat-input"}),A.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:A.map(a=>(0,b.jsx)(ap.AttachmentChip,{name:a.name,size:a.size,mimeType:a.mimeType,path:a.path,onRemove:()=>Z(a.id),disabled:y,loading:a.loading,notes:a.notes,onNotesChange:b=>$(a.id,b)},a.id))}),E?(0,b.jsx)("p",{id:"drawer-action-upload-error",className:"text-destructive px-3 pb-2 text-xs",role:"alert",children:E}):null,(0,b.jsxs)("div",{className:"border-input flex items-center gap-2 border-t px-3 py-1.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex-1 truncate text-[11px]",children:[(0,b.jsxs)("kbd",{className:"bg-muted rounded px-1 py-0.5 font-mono text-[10px]",children:[ab,"+Enter"]})," ",N?"reject":"approve"]}),(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:Y,disabled:y,"aria-label":p("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,b.jsx)(al.PaperclipIcon,{className:"h-4 w-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"top",children:p("chat.attachFiles")})]}),(0,b.jsx)("div",{onMouseLeave:()=>I(!1),children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("button",{type:"submit",disabled:y,"data-testid":"drawer-action-submit",className:(0,d.cn)("relative flex h-9 min-w-[12rem] cursor-pointer items-center overflow-hidden rounded-md border ps-4 pe-10 text-sm font-medium whitespace-nowrap transition-colors","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",O?`${q?"border-orange-400/60":"border-blue-400/60"} text-white`:N&&J&&!L?"border-primary bg-muted ring-primary/30 shadow-sm ring-1":"border-border bg-muted/50 hover:bg-muted shadow-sm"),children:[(0,b.jsx)("div",{className:(0,d.cn)("pointer-events-none absolute inset-0 transition-transform duration-300 ease-in-out",s),style:{transform:O?"translateX(0)":"translateX(100%)"}}),(0,b.jsxs)("span",{className:(0,d.cn)("absolute inset-0 z-10 flex items-center justify-center gap-2 pe-8 transition-opacity duration-300",O?"opacity-0":"opacity-100"),children:[(0,b.jsx)(am,{className:"h-4 w-4 shrink-0"}),"Reject"]}),(0,b.jsxs)("span",{className:(0,d.cn)("absolute inset-0 z-10 flex items-center justify-center gap-2 text-white transition-opacity duration-300",O?"opacity-100":"opacity-0"),children:[(0,b.jsx)(r,{className:"h-4 w-4 shrink-0"}),g]}),(0,b.jsx)("span",{className:(0,d.cn)(`border-input/60 absolute inset-y-0 right-0 z-20 flex w-8 cursor-pointer items-center justify-center rounded-e-[5px] border-s ${s} transition-opacity duration-300`,!N&&!H&&"pointer-events-none opacity-0"),onMouseEnter:()=>I(!0),children:(0,b.jsx)(ah.ChevronLeft,{className:"h-4 w-4 text-white"})})]})}),q?null:(0,b.jsx)(F.TooltipContent,{side:"top",children:O?g:p("drawerActionBar.sendRevisionFeedback")})]})})]})]})})})}):(0,b.jsx)("div",{className:"flex items-center gap-2 px-4 pb-4",children:(0,b.jsx)(aj.Button,{type:"button",className:"flex-1",disabled:y,onClick:()=>{x.play(),f()},children:g})})]})}function at({data:a,selections:e,onSelect:f,onApprove:g,onReject:h,isProcessing:i=!1,isRejecting:j=!1,showHeader:k=!1,chatInput:l,onChatInputChange:m}){let{question:n,context:o,questions:p,finalAction:q}=a,[r,s]=(0,c.useState)(0),t=(0,z.useSoundAction)("select"),u=(0,z.useSoundAction)("navigate"),v=p.length,w=r===v-1,x=p[r],y=(0,c.useMemo)(()=>Object.keys(e).length,[e]),A=(0,c.useCallback)((a,b)=>{t.play(),f(a,b),w||setTimeout(()=>s(a=>a+1),250)},[f,w,t]);return 0===v?null:(0,b.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[k?(0,b.jsxs)("div",{className:"border-border flex items-start gap-3 border-b pb-3",children:[(0,b.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-amber-500"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("h3",{className:"text-foreground mb-1.5 text-sm font-bold",children:n}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs leading-relaxed",children:o})]})]}):null,(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsxs)("label",{className:"text-foreground min-w-0 flex-1 text-sm font-semibold",children:[r+1,". ",x.question]}),(0,b.jsx)("div",{className:"mt-1.5 flex shrink-0 gap-1",children:p.map((a,c)=>(0,b.jsx)("button",{type:"button","aria-label":`Go to question ${c+1}`,className:(0,d.cn)("h-1.5 rounded-full transition-all duration-200",c===r?"bg-primary w-4":"w-1.5",c!==r&&e[a.id]?"bg-primary/50":"",c===r||e[a.id]?"":"bg-muted-foreground/25"),onClick:()=>{u.play(),s(c)}},a.id))})]}),(0,b.jsx)("div",{className:"space-y-2",children:x.options.map((a,c)=>{let f=e[x.id]===a.id,g=String.fromCharCode(65+c);return(0,b.jsx)("button",{type:"button",className:(0,d.cn)("border-border w-full overflow-hidden rounded-md border px-3 py-3 text-start text-xs transition-all","hover:border-primary/70 hover:bg-primary/5 group",f&&"border-primary bg-primary/5",a.isNew&&"animate-option-highlight"),disabled:i,onClick:()=>A(x.id,a.id),children:(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground mt-0.5 font-mono text-xs",children:[g,"."]}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"text-foreground mb-0.5 text-xs font-semibold wrap-break-word",children:a.label}),(0,b.jsx)("div",{className:"text-muted-foreground text-xs leading-snug",children:a.rationale})]}),a.recommended||a.isNew?(0,b.jsx)("div",{className:"shrink-0 pt-0.5",children:a.recommended?(0,b.jsx)(ak.Badge,{className:"px-1.5 py-0 text-[10px] whitespace-nowrap",children:"AI Recommended"}):(0,b.jsx)(ak.Badge,{className:"border-transparent bg-emerald-600 px-1.5 py-0 text-[10px] whitespace-nowrap text-white hover:bg-emerald-600/80",children:"New"})}):null]})},a.id)})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,b.jsxs)(aj.Button,{type:"button",variant:"ghost",size:"sm",disabled:0===r||i,onClick:()=>{u.play(),s(a=>a-1)},children:[(0,b.jsx)(ah.ChevronLeft,{className:"me-1 h-4 w-4"}),"Previous"]}),w?null:(0,b.jsxs)(aj.Button,{type:"button",variant:"ghost",size:"sm",disabled:i,onClick:()=>{u.play(),s(a=>a+1)},children:[e[x.id]?"Next":"Skip",(0,b.jsx)(ai.ChevronRight,{className:"ms-1 h-4 w-4"})]})]})]}),(0,b.jsx)(as,{onReject:h,onApprove:()=>g(q.id),approveLabel:q.label,revisionPlaceholder:"Ask AI to refine requirements...",isProcessing:i,isRejecting:j,chatInput:l,onChatInputChange:m,children:(0,b.jsx)("div",{className:(0,d.cn)("bg-muted h-1.5 overflow-hidden",y>0&&y<v||i?"opacity-100":"opacity-0","transition-opacity duration-200"),"data-testid":"progress-bar-container",children:i?(0,b.jsx)("div",{className:"bg-primary animate-indeterminate-progress h-full w-1/3"}):(0,b.jsx)("div",{className:"bg-primary h-full transition-all duration-300",style:{width:`${v>0?y/v*100:0}%`},"data-testid":"progress-bar"})})})]})}var au=a.i(30332);let av=(0,R.default)("git-compare-arrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]),aw={p:({children:a})=>(0,b.jsx)("p",{className:"text-muted-foreground mb-2 text-xs leading-relaxed last:mb-0",children:a}),strong:({children:a})=>(0,b.jsx)("strong",{className:"text-foreground font-semibold",children:a}),em:({children:a})=>(0,b.jsx)("em",{className:"italic",children:a}),code:({children:a,className:c})=>c?(0,b.jsx)("code",{className:`${c} text-[11px]`,children:a}):(0,b.jsx)("code",{className:"bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]",children:a}),pre:({children:a})=>(0,b.jsx)("pre",{className:"bg-muted my-2 overflow-x-auto rounded-lg border p-3",children:a}),ul:({children:a})=>(0,b.jsx)("ul",{className:"text-muted-foreground mb-2 list-disc space-y-1 ps-4 text-xs",children:a}),ol:({children:a})=>(0,b.jsx)("ol",{className:"text-muted-foreground mb-2 list-decimal space-y-1 ps-4 text-xs",children:a}),li:({children:a})=>(0,b.jsx)("li",{className:"leading-relaxed",children:a}),a:({children:a,href:c})=>(0,b.jsx)("a",{href:c,className:"text-primary underline underline-offset-2",target:"_blank",rel:"noopener noreferrer",children:a})};function ax({decision:a,index:d}){let[e,f]=(0,c.useState)(!1),g=(0,z.useSoundAction)("expand"),h=(0,z.useSoundAction)("collapse");return(0,b.jsxs)("div",{className:"border-border rounded-lg border",children:[(0,b.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,b.jsx)("span",{className:"bg-primary text-primary-foreground flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",children:d+1}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h3",{className:"text-foreground text-sm leading-tight font-semibold",children:a.title}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 text-xs",children:a.chosen})]})]}),"decisionName"in a&&a.decisionName?(0,b.jsx)(ak.Badge,{variant:"secondary",className:"bg-primary/10 text-primary shrink-0",children:a.decisionName}):null]}),a.rationale?(0,b.jsx)(au.default,{components:aw,children:a.rationale}):null]}),a.rejected.length>0?(0,b.jsxs)("div",{className:"border-border border-t",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{e?h.play():g.play(),f(a=>!a)},className:"text-muted-foreground hover:bg-muted/50 flex w-full items-center gap-1.5 px-4 py-3 text-xs font-medium transition-colors",children:[(0,b.jsx)(ai.ChevronRight,{className:`h-3.5 w-3.5 transition-transform ${e?"rotate-90":""}`}),(0,b.jsx)(_,{className:"h-3.5 w-3.5"}),"Other Options Considered (",a.rejected.length,")"]}),e?(0,b.jsx)("div",{className:"space-y-1.5 px-4 pb-3",children:a.rejected.map(a=>(0,b.jsx)("div",{className:"bg-primary/5 rounded-md px-3 py-2",children:(0,b.jsx)("span",{className:"text-foreground text-xs",children:a})},a))}):null]}):null]})}function ay({data:a}){let{summary:c,decisions:d}=a;return 0===d.length?null:(0,b.jsxs)("div",{className:"space-y-4 p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("h2",{className:"text-foreground text-sm font-bold",children:"Technical Implementation Plan Review"}),c?(0,b.jsx)("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:c}):null]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,b.jsx)(av,{className:"text-primary h-4 w-4"}),(0,b.jsx)("h3",{className:"text-foreground text-sm font-bold",children:"Technical Decisions"})]}),d.map((a,c)=>(0,b.jsx)(ax,{decision:a,index:c},a.title))]})}var az=a.i(15731);function aA({item:a,index:c}){return(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsx)("div",{className:"space-y-2 px-4 py-3",children:(0,b.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,b.jsx)("span",{className:"bg-primary text-primary-foreground flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",children:c+1}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h3",{className:"text-foreground text-sm leading-tight font-semibold",children:a.question}),(0,b.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,b.jsx)("p",{className:"text-muted-foreground min-w-0 truncate text-xs",children:a.selectedOption}),a.wasRecommended?(0,b.jsx)(ak.Badge,{className:"shrink-0 px-1.5 py-0 text-[10px] whitespace-nowrap",children:"AI Recommended"}):null]})]})]})})})}function aB({data:a}){let{questions:c}=a;return 0===c.length?null:(0,b.jsxs)("div",{className:"space-y-4 p-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(az.ClipboardList,{className:"text-primary h-4 w-4"}),(0,b.jsx)("h3",{className:"text-foreground text-sm font-bold",children:"Product Decisions"})]}),c.map((a,c)=>(0,b.jsx)(aA,{item:a,index:c},a.question))]})}var aC=a.i(2);let aD=(0,R.default)("file-diff",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);var aE=a.i(30536),aF=a.i(37545);let aG=(0,R.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),aH=(0,R.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),aI=(0,R.default)("monitor-play",[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);var aJ=a.i(44877),aK=a.i(29345),aL=a.i(82912),aM=a.i(28966),aN=a.i(46847);function aO({status:a}){switch(a){case aN.CiStatus.Success:return(0,b.jsxs)(ak.Badge,{className:"border-transparent bg-green-50 text-green-700 hover:bg-green-50",children:[(0,b.jsx)(aL.CircleCheck,{className:"me-1 h-3.5 w-3.5"}),"Passing"]});case aN.CiStatus.Pending:return(0,b.jsxs)(ak.Badge,{className:"border-transparent bg-yellow-50 text-yellow-700 hover:bg-yellow-50",children:[(0,b.jsx)(h.LoaderCircle,{className:"me-1 h-3.5 w-3.5 animate-spin"}),"Pending"]});case aN.CiStatus.Failure:return(0,b.jsxs)(ak.Badge,{className:"border-transparent bg-red-50 text-red-700 hover:bg-red-50",children:[(0,b.jsx)(aM.CircleX,{className:"me-1 h-3.5 w-3.5"}),"Failing"]})}}var aP=a.i(41772);let aQ=(0,R.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);var aR=a.i(81262);let aS={added:{icon:aP.FilePlus,label:"A",className:"text-green-600"},modified:{icon:aR.FileEdit,label:"M",className:"text-amber-600"},deleted:{icon:aQ,label:"D",className:"text-red-600"},renamed:{icon:aR.FileEdit,label:"R",className:"text-blue-600"}};function aT({status:a}){let c=aS[a],e=c.icon;return(0,b.jsx)(e,{className:(0,d.cn)("h-3.5 w-3.5 shrink-0",c.className)})}function aU({hunk:a}){return(0,b.jsxs)("div",{className:"border-border border-t first:border-t-0",children:[(0,b.jsx)("div",{className:"bg-muted/50 text-muted-foreground px-3 py-1 font-mono text-[10px]",children:a.header}),(0,b.jsx)("div",{className:"font-mono text-[11px] leading-[18px]",children:a.lines.map(a=>(0,b.jsxs)("div",{className:(0,d.cn)("flex","added"===a.type&&"bg-green-50 dark:bg-green-950/30","removed"===a.type&&"bg-red-50 dark:bg-red-950/30"),children:[(0,b.jsx)("span",{className:"text-muted-foreground w-10 shrink-0 px-1 text-end text-[10px] select-none",children:a.oldNumber??""}),(0,b.jsx)("span",{className:"text-muted-foreground w-10 shrink-0 px-1 text-end text-[10px] select-none",children:a.newNumber??""}),(0,b.jsx)("span",{className:(0,d.cn)("w-4 shrink-0 text-center select-none","added"===a.type&&"text-green-700 dark:text-green-400","removed"===a.type&&"text-red-700 dark:text-red-400"),children:"added"===a.type?"+":"removed"===a.type?"-":" "}),(0,b.jsx)("span",{className:"min-w-0 flex-1 pe-2 break-all whitespace-pre-wrap",children:a.content})]},`${a.type}-${a.oldNumber??""}-${a.newNumber??""}`))})]})}function aV({file:a}){let[e,f]=(0,c.useState)(!1),g=a.path.split("/").pop()??a.path,h=a.path.includes("/")?a.path.slice(0,a.path.lastIndexOf("/")):"";return(0,b.jsxs)("div",{className:"border-border border-b last:border-b-0",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>f(!e),className:"hover:bg-muted/50 flex w-full items-center gap-2 px-3 py-2 text-start",children:[(0,b.jsx)(ai.ChevronRight,{className:(0,d.cn)("text-muted-foreground h-3 w-3 shrink-0 transition-transform duration-150",e&&"rotate-90")}),(0,b.jsx)(aT,{status:a.status}),(0,b.jsx)("span",{className:"text-foreground min-w-0 flex-1 truncate text-xs",children:h?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[h,"/"]}),g]}):g}),a.oldPath?(0,b.jsxs)("span",{className:"text-muted-foreground truncate text-[10px]",children:["← ",a.oldPath.split("/").pop()]}):null,(0,b.jsxs)("span",{className:"shrink-0 text-[10px]",children:[a.additions>0?(0,b.jsxs)("span",{className:"text-green-600",children:["+",a.additions]}):null,a.additions>0&&a.deletions>0?" ":null,a.deletions>0?(0,b.jsxs)("span",{className:"text-red-600",children:["-",a.deletions]}):null]})]}),e&&a.hunks.length>0?(0,b.jsx)("div",{className:"border-border overflow-x-auto border-t",children:a.hunks.map(a=>(0,b.jsx)(aU,{hunk:a},a.header))}):null]})}function aW({fileDiffs:a}){return 0===a.length?null:(0,b.jsxs)("div",{className:"border-border rounded-lg border",children:[(0,b.jsx)("div",{className:"px-4 py-3",children:(0,b.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,b.jsx)(K.FileText,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Changed Files"}),(0,b.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:["(",a.length,")"]})]})}),(0,b.jsx)("div",{className:"border-border border-t",children:a.map(a=>(0,b.jsx)(aV,{file:a},`${a.status}-${a.path}`))})]})}let aX={Screenshot:aH,Video:aI,TestOutput:K.FileText,TerminalRecording:I.Terminal},aY=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp"]),aZ=new Set([".mp4",".webm",".mov"]);function a$({evidence:a}){var d,e;let f,[g,h]=(0,c.useState)(!0),i=aX[a.type]??aH,j=(f=(d=a.relativePath).lastIndexOf("."))>=0?d.slice(f).toLowerCase():"",k=(e=a.relativePath,`/api/evidence?path=${encodeURIComponent(e)}`),l="Screenshot"===a.type||aY.has(j),m="Video"===a.type||aZ.has(j),n="TestOutput"===a.type||"TerminalRecording"===a.type;return(0,b.jsxs)("li",{className:"border-border rounded-md border",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>h(!g),className:"flex w-full cursor-pointer items-center gap-2.5 px-3 py-2.5 text-start",children:[g?(0,b.jsx)(aK.ChevronDown,{className:"text-muted-foreground h-3 w-3 shrink-0"}):(0,b.jsx)(ai.ChevronRight,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,b.jsx)(i,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("span",{className:"text-foreground text-xs font-medium",children:a.description}),a.taskRef?(0,b.jsxs)("span",{className:"text-muted-foreground ms-1.5 text-[10px]",children:["(",a.taskRef,")"]}):null]}),(0,b.jsx)("a",{href:k,download:!0,onClick:a=>a.stopPropagation(),className:"text-muted-foreground hover:text-foreground shrink-0 rounded p-1 transition-colors","aria-label":"Download",children:(0,b.jsx)(aJ.Download,{className:"h-3 w-3"})})]}),g&&k?(0,b.jsx)("div",{className:"border-border border-t px-3 py-2.5",children:l?(0,b.jsx)("img",{src:k,alt:a.description,className:"max-h-80 w-full rounded-md border object-contain",loading:"lazy"}):m?(0,b.jsx)("video",{src:k,controls:!0,className:"max-h-80 w-full rounded-md border",preload:"metadata",children:(0,b.jsx)("track",{kind:"captions"})}):n?(0,b.jsx)(a_,{url:k}):(0,b.jsx)("p",{className:"text-muted-foreground truncate font-mono text-[10px]",children:a.relativePath})}):null,null]})}function a_({url:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useState)(!1);return f?d?(0,b.jsx)("pre",{className:"bg-muted/50 max-h-60 overflow-auto rounded-md p-3 font-mono text-[11px] leading-relaxed",children:d}):(0,b.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"Unable to load preview"}):(fetch(a).then(a=>a.ok?a.text():Promise.reject(Error("Failed"))).then(a=>{let b=a.split("\n");e(b.length>100?`${b.slice(0,100).join("\n")}
2
+ ...`:a)}).catch(()=>e(null)).finally(()=>g(!0)),(0,b.jsx)("div",{className:"bg-muted/50 h-16 animate-pulse rounded-md"}))}function a0({evidence:a}){return(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,b.jsx)(aH,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Evidence"}),(0,b.jsx)(ak.Badge,{variant:"secondary",className:"text-[10px]",children:a.length})]}),(0,b.jsx)("ul",{className:"space-y-2",children:a.map(a=>(0,b.jsx)(a$,{evidence:a},`${a.type}-${a.relativePath}`))})]})})}function a1({data:a,readOnly:c=!1,onApprove:d,onReject:e,isProcessing:f=!1,isRejecting:g=!1,chatInput:h,onChatInputChange:i}){let{pr:j,diffSummary:k,fileDiffs:l,branch:m,warning:n,evidence:o,hideCiStatus:p}=a,q=j?.mergeable===!1,r=q&&e?()=>e("Resolve merge conflicts",[]):d;return(0,b.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-emerald-500"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("h2",{className:"text-foreground text-sm font-bold",children:c?"Merge History":"Merge Review"}),(0,b.jsx)("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:c?"This feature was merged. Review the pull request details and evidence below.":j?"Review the pull request details and approve to merge.":"Review the changes and approve to merge."})]})]}),m?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",children:[(0,b.jsx)(aF.GitBranch,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,b.jsx)(ak.Badge,{variant:"secondary",className:"font-mono text-[11px]",children:m.source}),(0,b.jsx)(aG,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,b.jsx)(ak.Badge,{variant:"outline",className:"font-mono text-[11px]",children:m.target})]})}):null,j?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("a",{href:j.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2",children:["PR #",j.number,(0,b.jsx)(aC.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,b.jsx)(ak.Badge,{variant:"outline",className:"text-xs",children:j.status})]}),!1===j.mergeable?(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Merge Status"}),(0,b.jsxs)(ak.Badge,{className:"border-transparent bg-orange-50 text-orange-700 hover:bg-orange-50",children:[(0,b.jsx)(an.TriangleAlert,{className:"me-1 h-3.5 w-3.5"}),"Conflicts"]})]}):null,j.ciStatus&&!0!==p?(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"CI Status"}),(0,b.jsx)(aO,{status:j.ciStatus})]}):null,j.commitHash?(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Commit"}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(aE.GitCommitHorizontal,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,b.jsx)("code",{className:"bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]",children:j.commitHash.slice(0,7)})]})]}):null]})}):null,k?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,b.jsx)(aD,{className:"text-muted-foreground h-4 w-4"}),(0,b.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Changes"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-4 gap-3",children:[(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)("div",{className:"text-foreground text-sm font-bold",children:k.filesChanged}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"files"})]}),(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsxs)("div",{className:"text-sm font-bold text-green-600",children:["+",k.additions]}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"additions"})]}),(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsxs)("div",{className:"text-sm font-bold text-red-600",children:["-",k.deletions]}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"deletions"})]}),(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)("div",{className:"text-foreground text-sm font-bold",children:k.commitCount}),(0,b.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"commits"})]})]})]})}):n?(0,b.jsx)("div",{className:"border-border rounded-lg border",children:(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",children:[(0,b.jsx)(an.TriangleAlert,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:n})]})}):null,o&&o.length>0?(0,b.jsx)(a0,{evidence:o}):null,l&&l.length>0?(0,b.jsx)(aW,{fileDiffs:l}):null]}),!c&&(0,b.jsx)(as,{onReject:e,onApprove:r,approveLabel:q?"Resolve Conflicts":"Approve Merge",approveVariant:q?"warning":"default",revisionPlaceholder:"Ask AI to revise before merging...",isProcessing:f,isRejecting:g,chatInput:h,onChatInputChange:i})]})}var a2=a.i(41042);let a3=(0,R.default)("file-search",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]]),a4=(0,R.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var a5=a.i(67664),a6=a.i(7481);let a7=(0,R.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var a8=a.i(83695),a9=a.i(45670),ba=a.i(42360),bb=a.i(94059);let bc=(0,R.default)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]),bd=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function be(a){let b=a.lastIndexOf(".");return b>=0&&bd.has(a.slice(b).toLowerCase())}function bf(a){let b=a.lastIndexOf(".")>=0?a.slice(a.lastIndexOf(".")):"",c=be(a)?`image/${b.slice(1).replace("jpg","jpeg")}`:"",d=new URLSearchParams({path:a,...c&&{mimeType:c}});return`/api/attachments/preview?${d.toString()}`}let bg=/(?:^|\s)@(\/[^\s]+)/g;function bh({text:a,attachmentPaths:c}){let d=function(a){let b=[],c=0;for(let d of a.matchAll(bg)){let e=d.index,f=e+(d[0].length-d[0].trimStart().length);f>c&&b.push({type:"text",value:a.slice(c,f)}),b.push({type:"attachment",path:d[1]}),c=e+d[0].length}return c<a.length&&b.push({type:"text",value:a.slice(c)}),b}(a),e=d.some(a=>"attachment"===a.type),f=c?.filter(Boolean)??[];return e||0!==f.length?(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[d.map(a=>{if("text"===a.type){let c=a.value.trim();return c?(0,b.jsx)("span",{className:"text-sm leading-relaxed",children:c},`text-${c.slice(0,40)}`):null}return(0,b.jsx)(bi,{path:a.path},`att-${a.path}`)}),f.map(a=>(0,b.jsx)(bi,{path:a},`extra-${a}`))]}):(0,b.jsx)("span",{className:"text-sm leading-relaxed",children:a})}function bi({path:a}){let d=a.split("/").pop()??a,[e,f]=(0,c.useState)(!1);return be(a)?e?(0,b.jsxs)("div",{"data-testid":"inline-attachment-image-error",className:"text-muted-foreground flex items-center gap-2 rounded-md border px-3 py-2 text-sm",children:[(0,b.jsx)(bc,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:d})]}):(0,b.jsxs)(a9.Dialog,{children:[(0,b.jsx)(a9.DialogTrigger,{asChild:!0,children:(0,b.jsx)("img",{src:bf(a),alt:d,"data-testid":"inline-attachment-image",onError:()=>f(!0),className:"max-h-48 max-w-full cursor-pointer rounded-md border object-contain transition-opacity hover:opacity-80"})}),(0,b.jsxs)(a9.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,b.jsx)(ba.VisuallyHidden.Root,{children:(0,b.jsxs)(a9.DialogTitle,{children:["Preview: ",d]})}),(0,b.jsx)("div",{className:"relative bg-black/90",children:(0,b.jsx)("img",{src:bf(a),alt:d,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,b.jsxs)("div",{className:"bg-background flex items-center gap-3 px-4 py-3",children:[(0,b.jsx)("div",{className:"flex min-w-0 flex-1 flex-col",children:(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:d})}),(0,b.jsx)("a",{href:bf(a),download:d,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${d}`,children:(0,b.jsx)(bb.DownloadIcon,{className:"h-4 w-4"})})]})]})]}):(0,b.jsx)("a",{href:bf(a),download:d,"data-testid":"inline-attachment-file",className:"text-primary text-sm underline underline-offset-2",children:d})}a.i(69029);var bj=a.i(5623),bk=a.i(17606),bl=a.i(83852);function bm(a){if(0===a)return"0s";let b=Math.floor(a/1e3);if(0===b)return"<1s";let c=Math.floor(b/3600),d=Math.floor(b%3600/60),e=b%60;return c>0?`${c}h ${d}m`:d>0?`${d}m ${e}s`:`${e}s`}function bn({icon:a,title:c,children:d}){return(0,b.jsxs)("div",{className:"px-3 pt-4 pb-1",children:[(0,b.jsxs)("div",{className:"text-foreground mb-2 flex items-center gap-1.5 text-sm font-semibold tracking-wider uppercase",children:[(0,b.jsx)(a,{className:"size-4 opacity-50"}),c]}),d]})}function bo({children:a,className:c}){return(0,b.jsx)("div",{className:(0,d.cn)("bg-muted/60 rounded-md border border-transparent p-3",c),children:a})}function bp({label:a,children:c}){return(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-foreground/40 text-[11px] font-medium tracking-wider uppercase",children:a}),(0,b.jsx)("span",{className:"text-sm leading-snug",children:c})]})}function bq({on:a,label:c}){return(0,b.jsxs)("span",{className:(0,d.cn)("inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium",a?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-foreground/[0.04] text-foreground/25"),children:[a?(0,b.jsx)(m.Check,{className:"size-3"}):(0,b.jsx)(a8.X,{className:"size-3"}),c]})}let br={[aN.PrStatus.Open]:"text-blue-600 dark:text-blue-400",[aN.PrStatus.Merged]:"text-purple-600 dark:text-purple-400",[aN.PrStatus.Closed]:"text-red-600 dark:text-red-400"};function bs({data:a,syncStatus:e,syncLoading:f,syncError:g,onRefreshSync:h,onRebaseOnMain:i,rebaseLoading:j,rebaseError:k}){var l;let m,n,o,p,q,r,s="maintain"===a.lifecycle,t=function(a){let[b,d]=(0,c.useState)(null),e=(0,c.useRef)(null);return(0,c.useEffect)(()=>a?(d(bm(Math.max(0,Date.now()-a))),e.current=setInterval(()=>{d(bm(Math.max(0,Date.now()-a)))},1e3),()=>{e.current&&clearInterval(e.current)}):void d(null),[a]),b}("running"===a.state||"action-required"===a.state?a.startedAt:void 0),u=ad.featureNodeStateConfig[a.state],v=!!a.summary&&!(a.userQuery&&a.summary?.trim()===a.userQuery.trim());return(0,b.jsxs)("div",{"data-testid":"feature-drawer-status",className:"pb-4",children:[!s&&a.progress>0?(0,b.jsx)("div",{"data-testid":"feature-drawer-progress",className:"px-3 pb-2",children:(0,b.jsx)("div",{className:"bg-foreground/[0.06] h-1.5 w-full overflow-hidden rounded-full",children:(0,b.jsx)("div",{className:(0,d.cn)("h-full rounded-full transition-all",u.progressClass),style:{width:`${a.progress}%`}})})}):null,a.oneLiner||a.userQuery||v?(0,b.jsx)(bn,{icon:a4,title:"Description",children:(0,b.jsxs)(bo,{className:"flex flex-col gap-2",children:[a.oneLiner?(0,b.jsx)(bp,{label:"One-Liner",children:a.oneLiner}):null,a.userQuery?(0,b.jsx)(bp,{label:"Query",children:(0,b.jsx)(bh,{text:a.userQuery})}):null,v?(0,b.jsx)(bp,{label:"Summary",children:(0,b.jsx)("span",{className:"leading-snug",children:a.summary})}):null]})}):null,a.pr?(0,b.jsx)(bn,{icon:aE.GitCommitHorizontal,title:"Pull Request",children:(0,b.jsx)(bo,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("a",{href:a.pr.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary inline-flex items-center gap-1 text-sm font-semibold hover:underline",children:["#",a.pr.number," ",(0,b.jsx)(aC.ExternalLink,{className:"size-3"})]}),(0,b.jsx)("span",{className:(0,d.cn)("text-xs font-semibold",br[a.pr.status]),children:a.pr.status}),!1===a.pr.mergeable?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-orange-600 dark:text-orange-400",children:[(0,b.jsx)(an.TriangleAlert,{className:"size-3 shrink-0"})," Conflicts"]}):null,a.pr.ciStatus&&!0!==a.hideCiStatus?(0,b.jsx)(aO,{status:a.pr.ciStatus}):null,a.pr.commitHash?(0,b.jsx)("code",{className:"text-foreground/40 ml-auto font-mono text-[11px]",children:a.pr.commitHash.slice(0,7)}):null]})})}):null,(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-2 px-3 pb-1",children:[a.branch?(0,b.jsx)(bo,{children:(0,b.jsxs)(bp,{label:"Branch",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)(aF.GitBranch,{className:"text-foreground/30 size-3 shrink-0"}),(0,b.jsx)("code",{className:"font-mono text-[11px]",children:a.branch})]}),a.baseBranch?(0,b.jsxs)("span",{className:"text-foreground/30 block text-[10px]",children:["from ",a.baseBranch]}):null]})}):null,a.agentType||a.modelId?(0,b.jsx)(bo,{children:(0,b.jsx)(bp,{label:"Agent",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[a.agentType?(m=(0,bk.getAgentTypeIcon)(a.agentType),(0,b.jsx)(m,{className:"size-3.5 shrink-0 opacity-50"})):null,a.agentType?(0,b.jsx)("span",{children:bk.agentTypeLabels[a.agentType]??a.agentType}):null,a.agentType&&a.modelId?(0,b.jsx)("span",{className:"text-foreground/20",children:"/"}):null,a.modelId?(0,b.jsx)("span",{className:"text-foreground/50 text-[12px]",children:(0,bl.getModelMeta)(a.modelId).displayName||a.modelId}):null]})})}):null,a.createdAt?(0,b.jsx)(bo,{children:(0,b.jsx)(bp,{label:"Created",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)(a2.Clock,{className:"text-foreground/30 size-3 shrink-0"}),(l=a.createdAt,n=Date.now(),(r=Math.floor((q=Math.floor((p=Math.floor((n-(o="string"==typeof l?new Date(l).getTime():l))/6e4))/60))/24))>30?new Date(o).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):r>0?`${r}d ago`:q>0?`${q}h ago`:p>0?`${p}m ago`:"just now")]})})}):null,a.fastMode?(0,b.jsx)(bo,{children:(0,b.jsx)(bp,{label:"Mode",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,b.jsx)($.Zap,{className:"size-3.5"})," Fast"]})})}):null,a.runtime||t?(0,b.jsx)(bo,{children:(0,b.jsx)(bp,{label:a.runtime?"Runtime":"Elapsed",children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)(a2.Clock,{className:"text-foreground/30 size-3 shrink-0"}),a.runtime??t]})})}):null]}),a.blockedBy||a.errorMessage?(0,b.jsx)(bn,{icon:an.TriangleAlert,title:"Issues",children:(0,b.jsxs)(bo,{className:"border-destructive/20 bg-destructive/5",children:[a.blockedBy?(0,b.jsx)(bp,{label:"Blocked By",children:a.blockedBy}):null,a.errorMessage?(0,b.jsx)(bp,{label:"Error",children:(0,b.jsx)("span",{className:"text-destructive",children:a.errorMessage})}):null]})}):null,i&&a.branch&&h?(0,b.jsx)(bn,{icon:a5.RefreshCw,title:"Branch Sync",children:(0,b.jsx)(bt,{syncStatus:e??null,syncLoading:f??!1,syncError:g??null,onRefreshSync:h,onRebaseOnMain:i,rebaseLoading:j??!1,rebaseError:k??null})}):null,(0,b.jsx)(bu,{data:a})]})}function bt({syncStatus:a,syncLoading:c,syncError:f,onRefreshSync:g,onRebaseOnMain:h,rebaseLoading:i,rebaseError:j}){let{t:k}=(0,e.useTranslation)("web"),l=null!=a&&a.behind>0,m=a?.behind===0,n=a?.baseBranch??"main";return(0,b.jsxs)(bo,{children:[(0,b.jsxs)("div",{"data-testid":"branch-sync-status",className:"flex items-center justify-between",children:[(0,b.jsx)("div",{className:"flex items-center gap-1.5 text-[13px]",children:c&&!a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ag,{size:"sm"}),(0,b.jsx)("span",{className:"text-foreground/40",children:"Checking..."})]}):f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(an.TriangleAlert,{className:"size-3.5 text-red-500"}),(0,b.jsx)("span",{className:"text-destructive text-xs",children:f})]}):i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ag,{size:"sm"}),(0,b.jsxs)("span",{children:["Rebasing on ",(0,b.jsx)("code",{className:"font-mono text-[11px]",children:n}),"..."]})]}):l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(an.TriangleAlert,{className:"size-3.5 text-orange-500"}),(0,b.jsxs)("span",{children:[a.behind," behind ",(0,b.jsx)("code",{className:"font-mono text-[11px]",children:n}),a.ahead>0?(0,b.jsxs)("span",{className:"text-foreground/30 ml-1 text-[11px]",children:["· ",a.ahead," ahead"]}):null]})]}):m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aL.CircleCheck,{className:"size-3.5 text-green-500"}),(0,b.jsxs)("span",{children:["Up to date · ",(0,b.jsx)("code",{className:"font-mono text-[11px]",children:n}),a.ahead>0?(0,b.jsxs)("span",{className:"text-foreground/30 ml-1 text-[11px]",children:["· ",a.ahead," ahead"]}):null]})]}):null}),(a||f)&&!i?(0,b.jsx)("button",{onClick:g,disabled:c,className:"text-foreground/30 hover:text-foreground/60 hover:bg-foreground/5 inline-flex size-6 items-center justify-center rounded-sm disabled:opacity-50","aria-label":k("branchSyncStatus.refreshSyncStatus"),children:(0,b.jsx)(a5.RefreshCw,{className:(0,d.cn)("size-3",c&&"animate-spin")})}):null]}),l&&!i?(0,b.jsx)("div",{className:"pt-2",children:(0,b.jsx)(bj.ActionButton,{label:k("branchSyncStatus.rebaseOnMain"),onClick:h,loading:!1,error:!!j,icon:X,variant:"outline",size:"sm"})}):null,j?(0,b.jsx)("p",{className:"text-destructive pt-1 text-[11px]",children:j}):null]})}function bu({data:a}){return null==a.approvalGates&&null==a.push&&null==a.openPr&&null==a.ciWatchEnabled&&null==a.enableEvidence&&null==a.forkAndPr&&null==a.commitSpecs?null:(0,b.jsx)(bn,{icon:a6.Settings,title:"Settings",children:(0,b.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[a.approvalGates?(0,b.jsxs)(bo,{children:[(0,b.jsxs)("div",{className:"text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase",children:[(0,b.jsx)(a7,{className:"size-3"})," Approve"]}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)(bq,{on:a.approvalGates.allowPrd,label:"PRD"}),(0,b.jsx)(bq,{on:a.approvalGates.allowPlan,label:"Plan"}),(0,b.jsx)(bq,{on:a.approvalGates.allowMerge,label:"Merge"})]})]}):null,null!=a.enableEvidence?(0,b.jsxs)(bo,{children:[(0,b.jsxs)("div",{className:"text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase",children:[(0,b.jsx)(a3,{className:"size-3"})," Evidence"]}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)(bq,{on:a.enableEvidence,label:"Collect"}),null!=a.commitEvidence?(0,b.jsx)(bq,{on:a.commitEvidence,label:"Add to PR"}):null]})]}):null,null!=a.push||null!=a.openPr||null!=a.ciWatchEnabled||null!=a.commitSpecs||null!=a.forkAndPr?(0,b.jsxs)(bo,{children:[(0,b.jsxs)("div",{className:"text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase",children:[(0,b.jsx)(aF.GitBranch,{className:"size-3"})," Git"]}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[null!=a.push?(0,b.jsx)(bq,{on:a.push,label:"Push"}):null,null!=a.openPr?(0,b.jsx)(bq,{on:a.openPr,label:"PR"}):null,null!=a.ciWatchEnabled?(0,b.jsx)(bq,{on:a.ciWatchEnabled,label:"Watch"}):null,null!=a.commitSpecs?(0,b.jsx)(bq,{on:a.commitSpecs,label:"Specs"}):null,null!=a.forkAndPr?(0,b.jsx)(bq,{on:a.forkAndPr,label:"Fork"}):null]})]}):null]})})}let bv=(0,R.default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var bw=a.i(14561),bx=a.i(69210);let by=(0,R.default)("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),bz=(0,R.default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);function bA(a,b){if(null!=a.durationMs&&a.durationMs>0)return a.durationMs;if(!a.completedAt&&a.startedAt){let c=new Date(a.startedAt).getTime();if(!Number.isNaN(c))return Math.max(0,b-c)}return 0}function bB(a){return a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}K`:String(a)}function bC(a){let b=a instanceof Date?a:new Date(String(a));return Number.isNaN(b.getTime())?"":b.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function bD(a){return a>=1?`$${a.toFixed(2)}`:a>=.01?`$${a.toFixed(3)}`:`$${a.toFixed(4)}`}let bE={analyze:"Analyzing",requirements:"Requirements",research:"Researching",plan:"Planning",implement:"Implementing",rebase:"Rebasing","fast-implement":"Fast Implement",evidence:"Evidence",validate:"Validating",repair:"Repairing",merge:"Merging"},bF={"run:started":{label:"started",colorClass:"text-blue-600",bgClass:"bg-blue-50 dark:bg-blue-950/30",icon:j.Play},"run:resumed":{label:"resumed",colorClass:"text-blue-600",bgClass:"bg-blue-50 dark:bg-blue-950/30",icon:Z.RotateCcw},"run:completed":{label:"completed",colorClass:"text-emerald-600",bgClass:"bg-emerald-50 dark:bg-emerald-950/30",icon:aL.CircleCheck},"run:failed":{label:"failed",colorClass:"text-red-600",bgClass:"bg-red-50 dark:bg-red-950/30",icon:aM.CircleX},"run:stopped":{label:"stopped",colorClass:"text-amber-600",bgClass:"bg-amber-50 dark:bg-amber-950/30",icon:k.Square},"run:crashed":{label:"crashed",colorClass:"text-red-600",bgClass:"bg-red-50 dark:bg-red-950/30",icon:aM.CircleX},"run:rejected":{label:"rejected",colorClass:"text-orange-600",bgClass:"bg-orange-50 dark:bg-orange-950/30",icon:bw.Ban}};function bG(a){return a.startsWith("run:")}function bH({timings:a,loading:d,error:f,rejectionFeedback:g}){let{t:i}=(0,e.useTranslation)("web"),j=function(a){let[b,d]=(0,c.useState)(Date.now),e=(0,c.useRef)(null);return(0,c.useEffect)(()=>(a&&a.some(a=>!a.phase.startsWith("run:")&&!a.completedAt&&a.startedAt)&&(e.current=setInterval(()=>d(Date.now()),1e3)),()=>{e.current&&(clearInterval(e.current),e.current=null)}),[a]),b}(a);if(d)return(0,b.jsx)("div",{"data-testid":"activity-tab-loading",className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.LoaderCircle,{className:"text-muted-foreground h-6 w-6 animate-spin"})});if(f)return(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 text-base text-red-600",children:[(0,b.jsx)(L.CircleAlert,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:f})]});if(!a||0===a.length)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,b.jsx)(a2.Clock,{className:"text-muted-foreground h-8 w-8"}),(0,b.jsx)("p",{className:"text-muted-foreground text-base",children:i("activityTab.noActivityRecorded")})]});let k=a.filter(a=>!bG(a.phase)),l=Math.max(...k.map(a=>bA(a,j)),...k.map(a=>a.approvalWaitMs??0),0),m=function(a,b){if(!a.length)return[];let c=a.filter(a=>"run:rejected"===a.phase).length,d=b?.length??0,e=a;if(d>c){e=[...a];let f=a[a.length-1].agentRunId;for(let a=c;a<d;a++){let d=b[a];a>c&&e.push({agentRunId:f,phase:"run:resumed",startedAt:d.timestamp??`synthetic-resumed-${a}`}),e.push({agentRunId:f,phase:"run:rejected",startedAt:d.timestamp??`synthetic-${a}`})}}let f=[],g=[],h=0;for(let a of e)if(g.push(a),"run:rejected"===a.phase){let a=b?.[h];f.push({number:f.length+1,timings:g,rejectionMessage:a?.message,rejectionAttachments:a?.attachments}),g=[],h++}return g.length>0&&f.push({number:f.length+1,timings:g}),f}(a,g),n=m.length>1,o=k.reduce((a,b)=>a+bA(b,j),0),p=k.reduce((a,b)=>a+(b.approvalWaitMs??0),0),q=k.reduce((a,b)=>a+(b.inputTokens??0),0),r=k.reduce((a,b)=>a+(b.outputTokens??0),0),s=k.reduce((a,b)=>a+(b.costUsd??0),0);return(0,b.jsxs)("div",{className:"flex flex-col gap-3 p-4",children:[(0,b.jsx)("div",{"data-testid":"activity-timings",className:"flex flex-col gap-3",children:m.map(a=>(0,b.jsx)(bI,{iteration:a,showHeader:n,maxDurationMs:l,now:j},a.number))}),o>0?(0,b.jsx)(bM,{totalExecMs:o,totalWaitMs:p,totalInputTokens:q,totalOutputTokens:r,totalCostUsd:s}):null]})}function bI({iteration:a,showHeader:c,maxDurationMs:d,now:e}){let f=function(a){let b=[...a.timings].reverse().find(a=>bG(a.phase));if(!b)return null;switch(b.phase){case"run:rejected":return{label:"Rejected",colorClass:"text-orange-600",dotClass:"bg-orange-500"};case"run:completed":return{label:"Completed",colorClass:"text-emerald-600",dotClass:"bg-emerald-500"};case"run:failed":return{label:"Failed",colorClass:"text-red-600",dotClass:"bg-red-500"};case"run:crashed":return{label:"Crashed",colorClass:"text-red-600",dotClass:"bg-red-500"};case"run:stopped":return{label:"Stopped",colorClass:"text-amber-600",dotClass:"bg-amber-500"};default:return null}}(a);return(0,b.jsxs)("div",{"data-testid":`iteration-${a.number}`,className:"border-border/50 bg-card/50 flex flex-col overflow-hidden rounded-lg border",children:[c?(0,b.jsxs)("div",{className:"bg-muted/30 border-border/50 flex items-center justify-between border-b px-3 py-1.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground text-sm font-semibold tracking-wide",children:["Iteration ",a.number]}),f?(0,b.jsxs)("span",{className:`flex items-center gap-1 text-xs font-medium ${f.colorClass}`,children:[(0,b.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${f.dotClass}`}),f.label]}):null]}):null,(0,b.jsxs)("div",{className:"relative flex flex-col",children:[(0,b.jsx)("div",{className:"bg-border/60 absolute top-4 bottom-4 left-[21.5px] w-px"}),a.timings.map((c,f)=>{if(bG(c.phase)){let d,e="run:rejected"===c.phase,g="run:failed"===c.phase||"run:crashed"===c.phase||"run:stopped"===c.phase;if(e)d=a.rejectionMessage;else if(g){let b=[...a.timings].reverse().find(a=>!bG(a.phase)&&a.errorMessage);d=b?.errorMessage??c.errorMessage}return(0,b.jsx)(bJ,{timing:c,message:d,attachments:e?a.rejectionAttachments:void 0,isFirst:0===f,isLast:f===a.timings.length-1},`${c.agentRunId}-${c.phase}-${c.startedAt}`)}return(0,b.jsx)(bK,{timing:c,maxDurationMs:d,now:e},`${c.agentRunId}-${c.phase}-${c.startedAt}`)})]})]})}function bJ({timing:a,message:c,attachments:d,isFirst:e,isLast:f}){let g,h=bF[a.phase];if(!h)return null;let i=d&&d.length>0,j=h.icon;return(0,b.jsxs)("div",{className:`relative flex flex-col gap-1 px-3 ${e?"pt-2":"pt-1"} ${f?"pb-2":"pb-1"}`,children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:`relative z-10 flex h-5 w-5 shrink-0 items-center justify-center rounded-full ${h.bgClass}`,children:(0,b.jsx)(j,{className:`h-3 w-3 ${h.colorClass}`})}),(0,b.jsx)("span",{className:`text-sm font-medium ${h.colorClass}`,children:h.label}),a.startedAt&&!("string"==typeof a.startedAt&&a.startedAt.startsWith("synthetic"))?(0,b.jsx)("span",{className:"text-muted-foreground/60 ml-auto text-xs tabular-nums",children:bC(String(a.startedAt))}):null]}),c?(g="run:failed"===a.phase||"run:crashed"===a.phase||"run:stopped"===a.phase,(0,b.jsxs)("div",{className:`ml-[26px] flex items-start gap-1.5 rounded-md px-2 py-1.5 ${g?"bg-red-50/50 dark:bg-red-950/20":"bg-orange-50/50 dark:bg-orange-950/20"}`,children:[g?(0,b.jsx)(L.CircleAlert,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-red-400"}):(0,b.jsx)(Y.MessageSquare,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-orange-400"}),(0,b.jsxs)("span",{"data-testid":g?"error-message-text":"rejection-feedback-text",className:"text-muted-foreground text-xs leading-relaxed italic",children:["— ",c]})]})):null,i?(0,b.jsx)("div",{"data-testid":"rejection-feedback-attachments",className:"ml-[26px]",children:(0,b.jsx)(bh,{text:"",attachmentPaths:d})}):null]})}function bK({timing:a,maxDurationMs:d,now:f}){let{t:g}=(0,e.useTranslation)("web"),h=a.phase.includes(":")?a.phase.split(":")[0]:a.phase,i=a.phase.includes(":")?a.phase.split(":")[1]:null,j=null!==i,k=i?.startsWith("phase-")??!1,n=bE[h]??h,o=k?`Phase ${i.replace("phase-","")}`:null!==i?`${n} #${i}`:n,p=bA(a,f),q=!a.completedAt&&!!a.startedAt,r=q?15:2,s=d>0?Math.max(r,p/d*100):r,t=a.completedAt?k?"bg-emerald-400":j?"bg-amber-500":"bg-emerald-500":"bg-blue-500",u=null!=a.inputTokens||null!=a.outputTokens?(a.inputTokens??0)+(a.outputTokens??0):null,[v,w]=(0,c.useState)(!1),x=(0,c.useCallback)(()=>{a.prompt&&navigator.clipboard.writeText(a.prompt).then(()=>{w(!0),setTimeout(()=>w(!1),1500)})},[a.prompt]);return(0,b.jsxs)("div",{className:`group/phase relative flex flex-col gap-0.5 px-3 py-1.5 ${j?"ms-4":""}`,children:[(0,b.jsxs)("div",{"data-testid":`timing-bar-${a.phase}`,className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"relative z-10 flex h-5 w-5 shrink-0 items-center justify-center",children:(0,b.jsx)("div",{className:`rounded-full ${q?"h-3 w-3 animate-pulse":"h-2.5 w-2.5"} ${q?"bg-blue-500":a.completedAt?"bg-emerald-500":"bg-muted-foreground/30"}`})}),(0,b.jsx)("span",{className:`w-28 shrink-0 truncate text-sm font-medium ${j?"text-muted-foreground":"text-foreground/80"}`,children:o}),a.prompt?(0,b.jsx)("button",{type:"button",onClick:x,className:"text-muted-foreground/50 hover:text-foreground/70 -ms-1 shrink-0 opacity-0 transition-opacity group-hover/phase:opacity-100",title:g("activityTab.copyPromptToClipboard"),children:v?(0,b.jsx)(m.Check,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,b.jsx)(l.Copy,{className:"h-3.5 w-3.5"})}):null,(0,b.jsx)("div",{className:`bg-muted relative min-w-0 flex-1 overflow-hidden rounded-full ${j?"h-1.5":"h-2"}`,children:q?(0,b.jsx)("div",{className:"absolute inset-0 rounded-full bg-blue-500/30",style:{backgroundImage:"linear-gradient(90deg, transparent 0%, rgb(59 130 246) 50%, transparent 100%)",backgroundSize:"200% 100%",animation:"shimmer 1.5s ease-in-out infinite"}}):(0,b.jsx)("div",{className:`h-full rounded-full transition-all duration-300 ${t}`,style:{width:`${Math.min(s,100)}%`}})}),(0,b.jsx)("span",{className:"text-muted-foreground w-14 shrink-0 text-end text-sm font-medium tabular-nums",children:bm(p)})]}),(0,b.jsxs)("div",{className:"ml-[28px] flex items-center gap-3 text-xs",children:[a.startedAt?(0,b.jsx)("span",{className:"text-muted-foreground/60 tabular-nums",children:bC(a.startedAt)}):null,null!=u&&u>0?(0,b.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5",children:[(0,b.jsx)($.Zap,{className:"h-3 w-3 opacity-50"}),bB(u)]}):null,null!=a.costUsd&&a.costUsd>0?(0,b.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5",children:[(0,b.jsx)(bv,{className:"h-3 w-3 opacity-50"}),bD(a.costUsd)]}):null]}),null!=a.approvalWaitMs&&a.approvalWaitMs>0?(0,b.jsx)(bL,{timing:a,maxDurationMs:d}):null]})}function bL({timing:a,maxDurationMs:c}){let d=a.approvalWaitMs??0,e=c>0?Math.max(2,d/c*100):2;return(0,b.jsxs)("div",{"data-testid":`approval-wait-${a.phase}`,className:"ml-[26px] flex items-center gap-2 rounded-md bg-amber-50/50 px-1.5 py-1 dark:bg-amber-950/20",children:[(0,b.jsx)(bx.Timer,{className:"h-3.5 w-3.5 shrink-0 text-amber-500"}),(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 text-xs",children:"approval"}),(0,b.jsx)("div",{className:"bg-muted h-1.5 min-w-0 flex-1 overflow-hidden rounded-full",children:(0,b.jsx)("div",{className:"h-full rounded-full bg-amber-500",style:{width:`${Math.min(e,100)}%`}})}),(0,b.jsx)("span",{className:"text-muted-foreground w-14 shrink-0 text-end text-xs tabular-nums",children:bm(d)})]})}function bM({totalExecMs:a,totalWaitMs:c,totalInputTokens:d,totalOutputTokens:f,totalCostUsd:g}){let{t:h}=(0,e.useTranslation)("web"),i=d+f;return(0,b.jsxs)("div",{"data-testid":"activity-summary",className:"border-border bg-card/30 flex flex-col gap-2 rounded-lg border p-3",children:[(0,b.jsx)("div",{className:"text-muted-foreground mb-1 text-xs font-semibold tracking-wider uppercase",children:"Summary"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-3",children:[(0,b.jsx)(bN,{icon:a2.Clock,label:h("activityTab.execution"),value:bm(a)}),(0,b.jsx)(bN,{icon:bx.Timer,label:h("activityTab.wait"),value:c>0?bm(c):"n/a"}),(0,b.jsx)(bN,{icon:a2.Clock,label:"Wall-clock",value:c>0?bm(a+c):bm(a)}),(0,b.jsx)(bN,{icon:bv,label:h("activityTab.cost"),value:g>0?bD(g):"n/a"}),(0,b.jsxs)("div",{className:"col-span-2 flex flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[(0,b.jsx)($.Zap,{className:"h-3 w-3 opacity-40"}),"Tokens"]}),i>0?(0,b.jsxs)("span",{className:"flex items-center gap-2.5 text-sm tabular-nums",children:[(0,b.jsx)("span",{children:bB(i)}),(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-3 text-xs",title:"Input tokens / Output tokens",children:[(0,b.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,b.jsx)(by,{className:"h-3 w-3 text-blue-500 opacity-60"}),bB(d)]}),(0,b.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,b.jsx)(bz,{className:"h-3 w-3 text-emerald-500 opacity-60"}),bB(f)]})]})]}):(0,b.jsx)("span",{className:"text-muted-foreground/40 text-sm italic tabular-nums",children:"n/a"})]})]})]})}function bN({icon:a,label:c,value:d,className:e=""}){let f="n/a"===d;return(0,b.jsxs)("div",{className:`flex flex-col gap-0.5 ${e}`,children:[(0,b.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[(0,b.jsx)(a,{className:"h-3 w-3 opacity-40"}),c]}),(0,b.jsx)("span",{className:`text-sm tabular-nums ${f?"text-muted-foreground/40 italic":""}`,children:d})]})}var bO=a.i(74407),bP=a.i(11036);let bQ=(0,R.default)("coins",[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]]),bR=(0,R.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),bS=(0,R.default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),bT=/^\[(\d{4}-\d{2}-\d{2}T[\d:.]+Z?)\]\s+(?:\[([^\]]+)\]\s+)?(?:\[([^\]|]+)(?:\|([^\]]+))?\]\s+)?(.*)$/,bU=/^\[(tool-result|tool|text|delta|result|tokens|cmd|file|turn|thread|error|event|raw|WORKER)\]\s*(.*)/;function bV(a){let b=a.match(bT);if(!b)return{timestamp:null,phase:null,agent:null,model:null,tag:"raw",message:a,raw:a};let[,c,d,e,f,g]=b,h=null,i=null,j=null,k=g??"";if(null!=e&&null!=d)if(d.includes("|")){let[a,b]=d.split("|");i=a,j=b??null,k=`[${e}] ${g??""}`}else h=d,i=e,j=f??null;else if(null!=d)if(d.includes("|")){let[a,b]=d.split("|");i=a,j=b??null}else h=d;let l=k.match(bU),m="info";return l&&(m=l[1].toLowerCase(),k=l[2]),{timestamp:c??null,phase:h,agent:i,model:j,tag:m,message:k.trim(),raw:a}}function bW({content:a}){let d=(0,c.useMemo)(()=>a?a.split("\n").filter(a=>a.trim().length>0).map(bV):[],[a]);return 0===d.length?null:(0,b.jsx)("div",{className:"flex flex-col",children:d.map((a,c)=>(0,b.jsx)(bX,{line:a},c))})}function bX({line:a}){switch(a.tag){case"tool":return(0,b.jsx)(b$,{line:a});case"tool-result":return(0,b.jsx)(b4,{line:a});case"text":case"delta":return(0,b.jsx)(b0,{line:a});case"result":return(0,b.jsx)(b1,{line:a});case"tokens":case"turn":return(0,b.jsx)(b2,{line:a});case"cmd":return(0,b.jsx)(b5,{line:a});case"file":return(0,b.jsx)(b6,{line:a});case"thread":case"event":case"info":return(0,b.jsx)(b8,{line:a});case"error":return(0,b.jsx)(b7,{line:a});case"worker":return(0,b.jsx)(b3,{line:a});default:return(0,b.jsx)(b9,{line:a})}}function bY({value:a}){if(!a)return null;let c=a.replace(/^.*T/,"").replace("Z",""),d=c.split(":"),e=d.length>=3?`${d[1]}:${d[2].split(".")[0]}`:c;return(0,b.jsx)("span",{className:"text-muted-foreground/60 w-11 shrink-0 font-mono text-[10px]",children:e})}function bZ({phase:a}){return a?(0,b.jsx)("span",{className:"bg-muted text-muted-foreground w-20 shrink-0 truncate rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",title:a,children:a}):(0,b.jsx)("span",{className:"w-20 shrink-0"})}function b$({line:a}){var c;let d,{toolName:e,args:f}=-1===(d=(c=a.message).indexOf(" "))?{toolName:c,args:""}:{toolName:c.slice(0,d),args:c.slice(d+1)},g=function(a,b){try{let c=JSON.parse(b);if("Read"===a&&c.file_path||"Write"===a&&c.file_path||"Edit"===a&&c.file_path)return c.file_path;if("Glob"===a&&c.pattern||"Grep"===a&&c.pattern)return c.pattern;if("Bash"===a&&c.command)return c.command;if("Task"===a&&c.description)return c.description}catch{if(b.length>0)return b}return null}(e,f);return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 border-b border-transparent px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(b_,{toolName:e}),(0,b.jsx)("span",{className:"text-xs font-semibold text-violet-600 dark:text-violet-400",children:e}),g?(0,b.jsx)("span",{className:"text-muted-foreground min-w-0 font-mono text-xs break-all",children:g}):null]})]})}function b_({toolName:a}){let c=a.toLowerCase();return"bash"===c?(0,b.jsx)(I.Terminal,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):"read"===c||"glob"===c||"grep"===c?(0,b.jsx)(K.FileText,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):"write"===c||"edit"===c?(0,b.jsx)(bS,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):(0,b.jsx)(I.Terminal,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"})}function b0({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(Y.MessageSquare,{className:"mt-0.5 h-3 w-3 shrink-0 text-blue-500"}),(0,b.jsx)("span",{className:"text-foreground/80 min-w-0 text-xs leading-relaxed",children:a.message})]})]})}function b1({line:a}){var c;let d,e,{chars:f}=(d=(c=a.message).match(/^(\d+)\s+chars/),e=c.match(/session=(\S+)/),{chars:d?parseInt(d[1],10):0,sessionId:e?e[1]:null});return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(aL.CircleCheck,{className:"mt-0.5 h-3 w-3 shrink-0 text-emerald-500"}),(0,b.jsxs)("span",{className:"text-xs font-medium text-emerald-600 dark:text-emerald-400",children:["Result: ",f.toLocaleString()," chars"]})]})]})}function b2({line:a}){let c,{inputTokens:d,outputTokens:e}=(c=a.message.match(/^(\d+)\s+in\s*\/\s*(\d+)\s+out/))?{inputTokens:parseInt(c[1],10),outputTokens:parseInt(c[2],10)}:{inputTokens:0,outputTokens:0};return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(bQ,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-500"}),(0,b.jsxs)("span",{className:"text-muted-foreground text-xs",children:[(0,b.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:d.toLocaleString()})," in / ",(0,b.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:e.toLocaleString()})," out"]})]})]})}function b3({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 bg-zinc-50 px-3 py-1.5 transition-colors dark:bg-zinc-900/50",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(bR,{className:"mt-0.5 h-3 w-3 shrink-0 text-zinc-500"}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium break-all",children:a.message})]})]})}function b4({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(aG,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-400"}),(0,b.jsx)("span",{className:"text-muted-foreground min-w-0 font-mono text-[11px] break-all",children:a.message})]})]})}function b5({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(j.Play,{className:"mt-0.5 h-3 w-3 shrink-0 text-cyan-500"}),(0,b.jsx)("span",{className:"min-w-0 font-mono text-xs break-all text-cyan-700 dark:text-cyan-400",children:a.message})]})]})}function b6({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(bS,{className:"mt-0.5 h-3 w-3 shrink-0 text-orange-500"}),(0,b.jsx)("span",{className:"min-w-0 text-xs break-all text-orange-700 dark:text-orange-400",children:a.message})]})]})}function b7({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 bg-red-50 px-3 py-1.5 transition-colors dark:bg-red-950/30",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,b.jsx)(L.CircleAlert,{className:"mt-0.5 h-3 w-3 shrink-0 text-red-500"}),(0,b.jsx)("span",{className:"min-w-0 text-xs font-medium break-all text-red-700 dark:text-red-400",children:a.message})]})]})}function b8({line:a}){return(0,b.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,b.jsx)(bY,{value:a.timestamp}),(0,b.jsx)(bZ,{phase:a.phase}),(0,b.jsx)("span",{className:"text-muted-foreground min-w-0 text-xs break-all",children:a.message})]})}function b9({line:a}){return(0,b.jsx)("div",{className:"px-3 py-0.5",children:(0,b.jsx)("span",{className:"text-muted-foreground/70 font-mono text-[11px] break-all whitespace-pre-wrap",children:a.raw})})}function ca({content:a,isConnected:d,error:f}){let{t:g}=(0,e.useTranslation)("web"),h=(0,c.useRef)(null),[i,j]=(0,c.useState)(!0),[k,l]=(0,c.useState)("structured"),m=(0,c.useCallback)(()=>{let a=h.current;a&&j(a.scrollHeight-a.scrollTop-a.clientHeight<40)},[]),n=(0,c.useCallback)(()=>{let a=h.current;a&&(a.scrollTop=a.scrollHeight,j(!0))},[]);return((0,c.useEffect)(()=>{i&&h.current&&(h.current.scrollTop=h.current.scrollHeight)},[a,i]),f)?(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 text-sm text-red-600",children:[(0,b.jsx)(L.CircleAlert,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:f})]}):a?(0,b.jsxs)("div",{className:"flex h-full flex-col","data-testid":"log-tab",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 border-b px-3 py-1.5",children:[(0,b.jsx)("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-500":"bg-zinc-400"}`}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:d?"Live":"Disconnected"}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,b.jsx)("button",{type:"button",onClick:()=>l("structured"),className:`rounded p-1 transition-colors ${"structured"===k?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,title:g("logTab.structuredView"),children:(0,b.jsx)(K.FileText,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{type:"button",onClick:()=>l("raw"),className:`rounded p-1 transition-colors ${"raw"===k?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,title:g("logTab.rawView"),children:(0,b.jsx)(bP.Code,{className:"h-3.5 w-3.5"})}),i?null:(0,b.jsxs)("button",{type:"button",onClick:n,className:"text-muted-foreground hover:text-foreground ms-1 flex items-center gap-1 text-xs",children:[(0,b.jsx)(bO.ArrowDown,{className:"h-3 w-3"}),"Jump to bottom"]})]})]}),(0,b.jsx)("div",{ref:h,onScroll:m,className:`flex-1 overflow-y-auto ${"raw"===k?"bg-zinc-950 p-3 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap text-zinc-300":"bg-background"}`,children:"structured"===k?(0,b.jsx)(bW,{content:a}):a})]}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,b.jsx)(I.Terminal,{className:"text-muted-foreground h-8 w-8"}),(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:g("logTab.noLogOutput")}),d?(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:"Waiting for log data..."}):null]})}let cb=(0,R.default)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var cc=a.i(86139),cd=a.i(14355);let ce=(0,R.default)("circle-dashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]),cf={Todo:{icon:cc.Circle,colorClass:"text-muted-foreground",borderClass:"border-border",label:"Todo"},"Work in Progress":{icon:h.LoaderCircle,colorClass:"text-blue-600",borderClass:"border-blue-200",spinning:!0,label:"In Progress"},Done:{icon:m.Check,colorClass:"text-emerald-600",borderClass:"border-emerald-200",label:"Done"},Review:{icon:cd.Eye,colorClass:"text-amber-600",borderClass:"border-amber-200",label:"Review"}},cg={icon:cc.Circle,colorClass:"text-muted-foreground",borderClass:"border-border",label:"Unknown"};function ch({tasks:a}){let{t:c}=(0,e.useTranslation)("web");return 0===a.length?(0,b.jsx)("div",{className:"flex flex-col items-center justify-center gap-2 py-4",children:(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:c("taskProgress.noTasksDefined")})}):(0,b.jsxs)("div",{"data-testid":"task-progress-view",className:"flex flex-col gap-3",children:[(0,b.jsx)(ci,{tasks:a}),(0,b.jsx)("div",{"data-testid":"task-progress-list",className:"flex flex-col gap-2",children:a.map((a,c)=>(0,b.jsx)(ck,{task:a,index:c},a.title||`task-${c}`))})]})}function ci({tasks:a}){let{t:d}=(0,e.useTranslation)("web"),f=(0,c.useMemo)(()=>{let b=a.filter(a=>"Done"===a.state).length,c=a.filter(a=>"Work in Progress"===a.state).length,d=a.filter(a=>"Review"===a.state).length,e=a.filter(a=>"Done"!==a.state&&"Work in Progress"!==a.state&&"Review"!==a.state).length,f=a.length,g=f>0?Math.round(b/f*100):0;return{done:b,wip:c,review:d,todo:e,total:f,percent:g}},[a]);return(0,b.jsxs)("div",{"data-testid":"task-progress-summary",className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Task Progress"}),(0,b.jsxs)("span",{className:"text-muted-foreground text-xs",children:[f.done," of ",f.total," done"]})]}),(0,b.jsx)("div",{className:"bg-muted h-2 w-full overflow-hidden rounded-full",children:(0,b.jsx)("div",{"data-testid":"task-progress-bar",className:"h-full rounded-full bg-emerald-500 transition-all",style:{width:`${f.percent}%`}})}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-3",children:[f.done>0?(0,b.jsx)(cj,{icon:m.Check,label:d("taskProgress.done"),count:f.done,className:"text-emerald-600"}):null,f.wip>0?(0,b.jsx)(cj,{icon:h.LoaderCircle,label:d("taskProgress.inProgress"),count:f.wip,className:"text-blue-600"}):null,f.review>0?(0,b.jsx)(cj,{icon:cd.Eye,label:d("taskProgress.review"),count:f.review,className:"text-amber-600"}):null,f.todo>0?(0,b.jsx)(cj,{icon:cc.Circle,label:d("taskProgress.todo"),count:f.todo,className:"text-muted-foreground"}):null]})]})}function cj({icon:a,label:c,count:e,className:f}){return(0,b.jsxs)("span",{className:(0,d.cn)("flex items-center gap-1 text-xs",f),children:[(0,b.jsx)(a,{className:"h-3 w-3"}),e," ",c]})}function ck({task:a,index:e}){let[f,g]=(0,c.useState)(!1),h=cf[a.state]??cg,i=h.icon,j=a.actionItems.length>0,k=(0,c.useCallback)(()=>{j&&g(a=>!a)},[j]);return(0,b.jsxs)("div",{"data-testid":`task-card-${e}`,className:(0,d.cn)("rounded-lg border",h.borderClass),children:[(0,b.jsxs)("button",{type:"button",onClick:k,disabled:!j,className:(0,d.cn)("flex w-full items-start gap-2 px-3 py-2.5 text-start",j&&"hover:bg-muted/50 cursor-pointer transition-colors"),children:[(0,b.jsx)(i,{className:(0,d.cn)("mt-0.5 h-4 w-4 shrink-0",h.colorClass,h.spinning&&"animate-spin")}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,b.jsx)("span",{className:(0,d.cn)("text-sm font-medium",h.colorClass),children:a.title}),a.description?(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:a.description}):null]}),j?(0,b.jsx)(ai.ChevronRight,{className:(0,d.cn)("text-muted-foreground mt-0.5 h-4 w-4 shrink-0 transition-transform",f&&"rotate-90")}):null]}),f&&j?(0,b.jsx)("div",{className:"border-t px-3 py-2.5",children:(0,b.jsx)("div",{className:"flex flex-col gap-2",children:a.actionItems.map((a,c)=>(0,b.jsx)(cl,{item:a},a.name||`ai-${c}`))})}):null]})}function cl({item:a}){let c=a.acceptanceCriteria.length,d=a.acceptanceCriteria.filter(a=>a.verified).length,e=c>0&&d===c;return(0,b.jsxs)("div",{"data-testid":"action-item",className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[e?(0,b.jsx)(aL.CircleCheck,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-600"}):(0,b.jsx)(ce,{className:"text-muted-foreground mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.name}),a.description?(0,b.jsx)("span",{className:"text-muted-foreground text-[11px]",children:a.description}):null]}),c>0?(0,b.jsxs)("span",{className:"text-muted-foreground ml-auto shrink-0 text-[11px]",children:[d,"/",c]}):null]}),c>0?(0,b.jsx)("div",{className:"ms-5.5 flex flex-col gap-1",children:a.acceptanceCriteria.map((a,c)=>(0,b.jsx)(cm,{criterion:a},a.description||`ac-${c}`))}):null]})}function cm({criterion:a}){return(0,b.jsxs)("div",{"data-testid":"acceptance-criterion",className:"flex items-start gap-1.5",children:[a.verified?(0,b.jsx)(m.Check,{className:"mt-0.5 h-3 w-3 shrink-0 text-emerald-600"}):(0,b.jsx)(cc.Circle,{className:"text-muted-foreground mt-0.5 h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:(0,d.cn)("text-[11px]",a.verified?"text-muted-foreground line-through":"text-foreground"),children:a.description})]})}let cn={Requirements:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",ClarificationRequired:"border-transparent bg-amber-50 text-amber-700 hover:bg-amber-50",Ready:"border-transparent bg-green-50 text-green-700 hover:bg-green-50"};function co({plan:a,loading:c,error:d}){return c?(0,b.jsx)("div",{"data-testid":"plan-tab-loading",className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.LoaderCircle,{className:"text-muted-foreground h-6 w-6 animate-spin"})}):d?(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 text-sm text-red-600",children:[(0,b.jsx)(L.CircleAlert,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{children:d})]}):a?(0,b.jsxs)("div",{className:"flex flex-col gap-4 p-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Plan State"}),(0,b.jsx)(ak.Badge,{className:cn[a.state]??"border-transparent bg-gray-50 text-gray-700",children:a.state})]}),a.overview?(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Overview"}),(0,b.jsx)("p",{className:"text-sm leading-relaxed",children:a.overview})]}):null,(0,b.jsx)(ch,{tasks:a.tasks})]}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,b.jsx)(cb,{className:"text-muted-foreground h-8 w-8"}),(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:"No plan created yet"})]})}var cp=a.i(61544);function cq(){return{data:null,loading:!1,error:null}}let cr=[{key:"overview",label:"Overview",icon:P.LayoutDashboard},{key:"activity",label:"Activity",icon:Q.Activity},{key:"log",label:"Log",icon:S},{key:"plan",label:"Plan",icon:T},{key:"prd-review",label:"PRD Review",icon:U},{key:"tech-decisions",label:"Tech Decisions",icon:V.Cpu},{key:"product-decisions",label:"Product",icon:W.Package},{key:"merge-review",label:"Merge Review",icon:X},{key:"chat",label:"Chat",icon:Y.MessageSquare}],cs={activity:async function(a){let b=await ab(a);if("error"in b)throw Error(b.error);return{timings:b.timings,rejectionFeedback:b.rejectionFeedback}},plan:async function(a){let b=await ac(a);if("error"in b)throw Error(b.error);return b.plan}};function ct({featureName:a,headerContent:e,featureNode:g,featureId:i,initialTab:l,urlTab:m,prdData:n,prdSelections:o,onPrdSelect:p,onPrdApprove:q,onPrdReject:r,isPrdLoading:s,techData:t,onTechApprove:u,onTechReject:v,isTechLoading:w,productData:x,mergeData:y,onMergeApprove:z,onMergeReject:A,isMergeLoading:B,syncStatus:C,syncLoading:D,syncError:E,onRefreshSync:G,onRebaseOnMain:H,rebaseLoading:I,rebaseError:J,isRejecting:K,chatInput:M,onChatInputChange:N,sseEvents:O,interactiveAgentEnabled:P=!0,onRetry:Q,onStop:R,onStart:S}){let T,U=(0,f.usePathname)(),V=(0,c.useMemo)(()=>(function(a,b=!0){let c=["overview","activity"];return a.hasAgentRun&&c.push("log"),a.hasPlan&&c.push("plan"),"requirements"===a.lifecycle&&"action-required"===a.state&&c.push("prd-review"),"implementation"===a.lifecycle&&"action-required"===a.state&&c.push("tech-decisions","product-decisions"),"review"===a.lifecycle&&("action-required"===a.state||"error"===a.state)&&c.push("merge-review"),"maintain"===a.lifecycle&&a.pr&&c.push("merge-review"),b&&c.push("chat"),c})(g,P),[g,P]),W=(0,c.useMemo)(()=>cr.filter(a=>V.includes(a.key)).map(a=>"merge-review"===a.key&&"maintain"===g.lifecycle?{...a,label:"Merge History"}:a),[V,g.lifecycle]),X=(0,c.useMemo)(()=>{let a=U.match(/^(\/feature\/[^/]+)/);return a?a[1]:U},[U]),Y=(0,c.useMemo)(()=>m&&V.includes(m)?m:l&&V.includes(l)?l:"overview",[]),[ab,ac]=(0,c.useState)(Y),ae=function(a){let[b,d]=(0,c.useState)(""),[e,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),i=(0,c.useRef)(null),j=(0,c.useCallback)(()=>{i.current&&(i.current.close(),i.current=null),f(!1)},[]);return(0,c.useEffect)(()=>{if(!a){d(""),f(!1),h(null);return}d(""),h(null);let b=new EventSource(`/api/feature-logs?featureId=${a}`);return i.current=b,b.onopen=()=>{f(!0)},b.addEventListener("initial",a=>{d(JSON.parse(a.data).content)}),b.addEventListener("log",a=>{let b=JSON.parse(a.data);d(a=>a+b.content)}),b.addEventListener("error",a=>{try{let b=JSON.parse(a.data);h(b.error)}catch{h(a.data?String(a.data):"Log stream unavailable")}}),b.onerror=()=>{f(!1)},()=>{b.close(),i.current=null}},[a,j]),{content:b,isConnected:e,error:g}}("log"===ab?i:null),{tabs:af,fetchTab:ah,refreshTab:ai}=function(a,b){let d=Object.keys(b),[e,f]=(0,c.useState)(()=>{let a={};for(let b of d)a[b]=cq();return a}),g=(0,c.useRef)(b);g.current=b;let h=(0,c.useRef)(a);h.current=a;let i=(0,c.useRef)(!0);(0,c.useEffect)(()=>(i.current=!0,()=>{i.current=!1}),[]);let j=(0,c.useRef)(a);(0,c.useEffect)(()=>{j.current!==a&&(j.current=a,f(a=>{let b={};for(let c of Object.keys(a))b[c]=cq();return b}))},[a]);let k=(0,c.useCallback)(async a=>{let b=g.current[a],c=h.current;if(b){i.current&&f(b=>b[a]?.data!==null?b:{...b,[a]:{...b[a],loading:!0,error:null}});try{let d=await b(c);i.current&&f(b=>({...b,[a]:{data:d,loading:!1,error:null}}))}catch(b){i.current&&f(c=>{let d=b instanceof Error?b.message:"Failed to fetch tab data",e=c[a]?.data??null;return{...c,[a]:{data:e,loading:!1,error:e?null:d}}})}}},[]),l=(0,c.useCallback)(async a=>{let b=e[a];b&&null!==b.data||b&&b.loading||await k(a)},[e,k]);return{tabs:e,fetchTab:l,refreshTab:(0,c.useCallback)(async a=>{await k(a)},[k])}}(i,cs),aj=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(!aj.current)return;aj.current=!1;let a="overview"===ab?X:`${X}/${ab}`;a!==U&&window.history.pushState(null,"",a)},[ab,X,U]);let ak=(0,c.useRef)(U);(0,c.useEffect)(()=>{if(ak.current===U||(ak.current=U,aj.current))return;let a=U.split("/"),b=a.length>=4?a[3]:void 0,c=b&&V.includes(b)?b:"overview";c!==ab&&(ac(c),("activity"===c||"plan"===c)&&ah(c))},[U]);let al=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(!al.current&&(al.current=!0,!m&&"overview"!==Y)){let a=`${X}/${Y}`;a!==U&&window.history.replaceState(null,"",a)}},[]);let am=(0,c.useRef)(!1);(0,c.useEffect)(()=>{am.current||(am.current=!0,("activity"===ab||"plan"===ab)&&ah(ab))},[ab,ah]);let an=(0,c.useRef)(i);(0,c.useEffect)(()=>{an.current!==i&&(an.current=i,ac("overview"))},[i]);let ao=(0,c.useRef)(l);(0,c.useEffect)(()=>{if(ao.current!==l&&l&&V.includes(l)){ao.current=l,ac(l),("activity"===l||"plan"===l)&&ah(l);let a="overview"===l?X:`${X}/${l}`;a!==window.location.pathname&&window.history.replaceState(null,"",a)}},[l,V,X,ah]),(0,c.useEffect)(()=>{V.includes(ab)||(ac("overview"),window.location.pathname!==X&&window.history.replaceState(null,"",X))},[V,ab,X]);let ap=(0,c.useRef)(ab);ap.current=ab;let aq=(0,c.useRef)(0);(0,c.useEffect)(()=>{if(!O||0===O.length||(aq.current>O.length&&(aq.current=0),O.length<=aq.current))return;let a=O.slice(aq.current);if(aq.current=O.length,!a.some(a=>a.featureId===i))return;ai("activity");let b=ap.current;"plan"===b&&ai(b)},[O,i,ai]);let ar="running"===g.state||"creating"===g.state;(0,c.useEffect)(()=>{if(!ar)return;let a=setInterval(()=>{ai("activity")},5e3);return()=>clearInterval(a)},[ar,ai]);let as=(0,c.useCallback)(a=>{aj.current=!0,ac(a),("activity"===a||"plan"===a)&&ah(a)},[ah]);return(0,b.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,b.jsxs)(aa.Tabs,{value:ab,onValueChange:as,className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsx)(aa.TabsList,{className:"bg-muted/50 h-auto w-full shrink-0 justify-start gap-0 rounded-none border-b p-0",children:W.map(a=>{let c=a.icon;return(0,b.jsxs)(aa.TabsTrigger,{value:a.key,className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,b.jsx)(c,{className:"mr-1.5 size-4"}),a.label]},a.key)})}),(0,b.jsxs)("div",{className:"bg-muted/40 shrink-0 border-b",children:[a?(0,b.jsxs)("div",{className:"flex h-12 items-stretch gap-2 pr-0 pl-4","data-testid":"feature-drawer-header",children:[(0,b.jsx)("div",{className:"flex items-center",children:g.fastMode?(0,b.jsx)($.Zap,{className:"size-4 shrink-0 text-amber-500"}):(0,b.jsx)(_,{className:"text-muted-foreground/50 size-4 shrink-0"})}),(0,b.jsx)("h2",{className:"text-foreground flex min-w-0 items-center truncate text-base font-semibold tracking-tight",children:a}),g.repositoryName?(0,b.jsxs)("span",{className:"animate-in fade-in flex shrink-0 items-center gap-1.5 self-center duration-200",children:[(0,b.jsx)("span",{className:"text-muted-foreground/30 text-sm",children:"/"}),g.remoteUrl?(0,b.jsx)("a",{href:g.remoteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground text-sm",children:g.repositoryName}):(0,b.jsx)("span",{className:"text-muted-foreground text-sm",children:g.repositoryName})]}):(0,b.jsxs)("span",{className:"flex items-center gap-1.5 self-center",children:[(0,b.jsx)("span",{className:"text-muted-foreground/30 text-sm",children:"/"}),(0,b.jsx)("span",{className:"bg-muted h-4 w-16 animate-pulse rounded"})]}),(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"ml-auto flex shrink-0 cursor-default items-center self-stretch text-xs font-medium",children:[(0,b.jsxs)("div",{className:(0,d.cn)("flex items-center gap-1.5 self-stretch px-3",ad.featureNodeStateConfig[g.state].labelClass),children:["running"===g.state?(0,b.jsx)(ag,{size:"sm",className:"shrink-0"}):(T=ad.featureNodeStateConfig[g.state].icon,(0,b.jsx)(T,{className:"size-3.5 shrink-0"})),ad.featureNodeStateConfig[g.state].label]}),"pending"===g.state&&S?(0,b.jsxs)("button",{type:"button",onClick:()=>S(g.featureId),className:"text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-green-500/10 hover:text-green-600 dark:hover:text-green-400","data-testid":"feature-drawer-start-button",children:[(0,b.jsx)(j.Play,{className:"size-3.5"})," Start"]}):"error"===g.state&&Q?(0,b.jsxs)("button",{type:"button",onClick:()=>Q(g.featureId),className:"text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-red-500/10 hover:text-red-500 dark:hover:text-red-400","data-testid":"feature-drawer-retry-button",children:[(0,b.jsx)(Z.RotateCcw,{className:"size-3.5"})," Retry"]}):"running"===g.state&&R?(0,b.jsxs)("button",{type:"button",onClick:()=>R(g.featureId),className:"text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-red-500/10 hover:text-red-500 dark:hover:text-red-400","data-testid":"feature-drawer-stop-button",children:[(0,b.jsx)(k.Square,{className:"size-3.5"})," Stop"]}):null]})}),g.errorMessage?(0,b.jsxs)(F.TooltipContent,{side:"bottom",align:"end",sideOffset:4,className:"z-[100] max-w-xs cursor-pointer text-xs leading-relaxed select-text",onClick:()=>{navigator.clipboard.writeText(g.errorMessage)},children:[g.errorMessage,(0,b.jsx)("span",{className:"text-muted-foreground ml-1 text-[10px] italic",children:"(click to copy)"})]}):null]})})]}):null,e]}),(0,b.jsx)(aa.TabsContent,{value:"overview",className:"mt-0 flex-1 overflow-y-auto",children:(0,b.jsx)(bs,{data:g,syncStatus:C,syncLoading:D,syncError:E,onRefreshSync:G,onRebaseOnMain:H,rebaseLoading:I,rebaseError:J})}),(0,b.jsx)(aa.TabsContent,{value:"activity",className:"mt-0 flex-1 overflow-y-auto",children:(0,b.jsx)(bH,{timings:af.activity.data?.timings??null,loading:af.activity.loading,error:af.activity.error,rejectionFeedback:af.activity.data?.rejectionFeedback})}),(0,b.jsx)(aa.TabsContent,{value:"log",className:"mt-0 flex-1 overflow-hidden",children:(0,b.jsx)(ca,{content:ae.content,isConnected:ae.isConnected,error:ae.error})}),(0,b.jsx)(aa.TabsContent,{value:"plan",className:"mt-0 flex-1 overflow-y-auto",children:(0,b.jsx)(co,{plan:af.plan.data,loading:af.plan.loading,error:af.plan.error})}),V.includes("prd-review")?(0,b.jsx)(aa.TabsContent,{value:"prd-review",className:"mt-0 flex min-h-0 flex-1 flex-col",children:n?(0,b.jsx)(at,{data:n,selections:o??{},onSelect:p??(()=>void 0),onApprove:q??(()=>void 0),onReject:r,isProcessing:s,isRejecting:K,chatInput:M,onChatInputChange:N}):(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.LoaderCircle,{className:"text-muted-foreground h-6 w-6 animate-spin"})})}):null,V.includes("tech-decisions")?(0,b.jsx)(aa.TabsContent,{value:"tech-decisions",className:"mt-0 flex min-h-0 flex-1 flex-col",children:t?(0,b.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,b.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,b.jsx)(ay,{data:t})}),(0,b.jsx)(cu,{onApprove:u??(()=>void 0),onReject:v,isProcessing:w,isRejecting:K,chatInput:M,onChatInputChange:N})]}):(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.LoaderCircle,{className:"text-muted-foreground h-6 w-6 animate-spin"})})}):null,V.includes("product-decisions")?(0,b.jsx)(aa.TabsContent,{value:"product-decisions",className:"mt-0 flex-1 overflow-y-auto",children:null===x?(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,b.jsx)(h.LoaderCircle,{className:"text-muted-foreground h-6 w-6 animate-spin"})}):x?(0,b.jsx)(aB,{data:x}):(0,b.jsx)("p",{className:"text-muted-foreground p-4 text-center text-sm",children:"No product decisions available."})}):null,V.includes("merge-review")?(0,b.jsx)(aa.TabsContent,{value:"merge-review",className:"mt-0 flex min-h-0 flex-1 flex-col",children:y?(0,b.jsx)(a1,{data:y,readOnly:"maintain"===g.lifecycle,onApprove:z??(()=>void 0),onReject:A,isProcessing:B,isRejecting:K,chatInput:M,onChatInputChange:N}):(0,b.jsx)("div",{className:"flex items-center justify-center p-8",children:B?(0,b.jsx)(h.LoaderCircle,{className:"text-muted-foreground h-6 w-6 animate-spin"}):(0,b.jsxs)("div",{className:"text-muted-foreground flex flex-col items-center gap-2 text-sm",children:[(0,b.jsx)(L.CircleAlert,{className:"h-6 w-6"}),(0,b.jsx)("span",{children:"Merge review data unavailable"})]})})}):null,V.includes("chat")?(0,b.jsx)(aa.TabsContent,{value:"chat",className:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,b.jsx)(cp.ChatTab,{featureId:i,worktreePath:g.worktreePath})}):null]})})}function cu({onApprove:a,onReject:c,isProcessing:d,isRejecting:f,chatInput:g,onChatInputChange:h}){let{t:i}=(0,e.useTranslation)("web");return(0,b.jsx)(as,{onReject:c,onApprove:a,approveLabel:i("featureDrawer.approvePlan"),revisionPlaceholder:"Ask AI to revise the plan...",isProcessing:d,isRejecting:f,chatInput:g,onChatInputChange:h})}var cv=a.i(34171),cw=a.i(71455),cx=a.i(18165);let cy=(0,p.createServerReference)("402e5be57701f7720ba9fb3026491832c7298ed7d6",p.callServer,void 0,p.findSourceMapURL,"rebaseFeature");var cz=a.i(74146);function cA(a){return"requirements"===a.lifecycle&&"action-required"===a.state?"prd-review":"implementation"===a.lifecycle&&"action-required"===a.state?"tech-decisions":"review"===a.lifecycle&&("action-required"===a.state||"error"===a.state)?"merge-review":"overview"}function cB(a,b,d,e,f,h){let[i,j]=(0,c.useState)(!1),k=(0,c.useRef)(d),l=(0,c.useRef)(e);return k.current=d,l.current=e,(0,c.useEffect)(()=>{if(l.current(),!a)return;let c=!1;return j(!0),b(a).then(a=>{c||k.current(a)}).catch(()=>{!c&&f&&g.toast.error(f)}).finally(()=>{c||j(!1)}),()=>{c=!0}},[a,b,f,h]),i}let cC=(0,p.createServerReference)("40b24aee2aecf831a00d0a5cc3cb639362e7914961",p.callServer,void 0,p.findSourceMapURL,"getFeatureDrawerData"),cD=(0,p.createServerReference)("404c80909fee0ae12d955f56f803a63997ac9936b1",p.callServer,void 0,p.findSourceMapURL,"getBranchSyncStatus"),cE=new Map;a.s(["FeatureDrawerClient",0,function({view:a,urlTab:p,interactiveAgentEnabled:H=!0}){var I;let J,K,L,M,N,P,Q=(0,y.useFeatureFlags)(),{t:R}=(0,e.useTranslation)("web"),S=(0,f.useRouter)(),T=(0,z.useSoundAction)("reject"),[U,V]=(0,c.useState)(a);(0,c.useEffect)(()=>{V(b=>"feature"===b.type&&"feature"===a.type&&b.node.featureId===a.node.featureId?{...a,node:{...b.node,...a.node}}:a)},[a]);let W="feature"===U.type?U.node:null,{events:X}=(0,C.useAgentEventsContext)(),Y=(0,c.useRef)(0);(0,c.useEffect)(()=>{if(Y.current>X.length&&(Y.current=0),!W||X.length<=Y.current)return;let a=X.slice(Y.current);for(let b of(Y.current=X.length,(0,cz.resolveSseEventUpdates)(a)))b.featureId===W.featureId&&"deleting"!==W.state&&(void 0!==b.state||void 0!==b.lifecycle)&&V(a=>{if("feature"!==a.type)return a;let c={...a.node,...void 0!==b.state&&{state:b.state},...void 0!==b.lifecycle&&{lifecycle:b.lifecycle}};return{...a,node:c,initialTab:cA(c)}})},[X,W]);let Z=(0,f.usePathname)().startsWith("/feature/");I=W?.featureId??null,J=(0,c.useRef)(Z),K=(0,c.useRef)(!1),L=(0,c.useRef)(0),M=(0,c.useCallback)(async()=>{if(!I||K.current)return;K.current=!0;let a=L.current;try{let b=await cC(I);if(!b||a!==L.current)return;V(a=>(function(a,b){if("feature"!==a.type)return a;let c={...a.node,...b},d=c.state!==a.node.state||c.lifecycle!==a.node.lifecycle;return{...a,node:c,initialTab:d?cA(c):a.initialTab}})(a,b))}catch{}finally{K.current=!1}},[I,V]),N=(0,c.useRef)(!1),(0,c.useEffect)(()=>{!Z||J.current&&N.current||(N.current=!0,L.current+=1,K.current=!1,M()),J.current=Z},[Z,M]),(0,c.useEffect)(()=>{if(!Z||!I)return;let a=setInterval(()=>{M()},15e3);return()=>clearInterval(a)},[Z,I,M]);let $=(0,c.useCallback)(()=>{S.push("/")},[S]),[_,aa]=(0,c.useState)(""),[ab,ac]=(0,c.useState)(null),[ad,ae]=(0,c.useState)({}),[af,ag]=(0,c.useState)({}),[ah,ai]=(0,c.useState)(null),[aj,ak]=(0,c.useState)(void 0),[al,am]=(0,c.useState)(null),[an,ao]=(0,c.useState)(!1),[ap,aq]=(0,c.useState)(!1),[ar,as]=(0,c.useState)(!1),at=`${W?.featureId}:${W?.state}`,au=(0,c.useRef)(at);(0,c.useEffect)(()=>{at!==au.current&&(au.current=at,as(!1))},[at]);let[av,aw]=(0,c.useState)(!1),ax=(0,c.useRef)(!1),ay="feature"===U.type?U.initialTab:void 0;(0,c.useEffect)(()=>{aa("")},[ay]);let az=(0,c.useRef)(0),aA=(0,c.useRef)(W?.state),aB=(0,c.useRef)(W?.lifecycle);(W?.state!==aA.current||W?.lifecycle!==aB.current)&&(aA.current=W?.state,aB.current=W?.lifecycle,az.current+=1);let aC=az.current,aD=cB(W?.lifecycle==="requirements"&&W?.state==="action-required"?W.featureId:null,v,a=>{if(a.error)return void g.toast.error(a.error);if(a.questionnaire){ac(a.questionnaire);let b={};for(let c of a.questionnaire.questions){let a=c.options.find(a=>a.recommended);a&&(b[c.id]=a.id)}ae(b),ag(b)}},()=>{ae({}),ag({}),ac(null)},"Failed to load questionnaire",aC),aE=W?.lifecycle==="implementation"&&W?.state==="action-required"?W.featureId:null,aF=cB(aE,w,a=>{a.error?g.toast.error(a.error):a.techDecisions&&ai(a.techDecisions)},()=>ai(null),"Failed to load tech decisions",aC),aG=cB(aE,v,a=>{a.productDecisions&&ak(a.productDecisions)},()=>ak(void 0),void 0,aC),aH=cB(W?.lifecycle==="review"&&(W?.state==="action-required"||W?.state==="error")||W?.lifecycle==="maintain"&&W?.pr?W.featureId:null,x,a=>{"error"in a?g.toast.error(a.error):am(a)},()=>am(null),"Failed to load merge review data",aC),aI=_.trim().length>0,aJ=W?.lifecycle==="requirements"&&W?.state==="action-required"&&Object.keys(af).some(a=>af[a]!==ad[a]),aK=(0,c.useCallback)(()=>{aa(""),ae({...af})},[af]),{attemptClose:aL}=(0,A.useGuardedDrawerClose)({open:Z,isDirty:aI||aJ,onClose:$,onReset:aK}),aM=(0,c.useCallback)(async(a,b,c=[],d)=>{if(W?.featureId){ax.current=!0,aw(!0);try{let e=c.map(a=>a.path).filter(Boolean),f=c.filter(a=>a.notes?.trim()),h=f.length>0?`${a}
3
3
 
4
4
  Image notes:
5
- ${f.map(a=>`- @${a.path}: ${a.notes.trim()}`).join("\n")}`:a,i=await u(W.featureId,h,e);if(!i.rejected)return void g.toast.error(i.error??`Failed to reject ${b.toLowerCase()}`);T.play(),aa(""),g.toast.success(`${b} rejected — agent re-iterating (iteration ${i.iteration})`),i.iterationWarning&&g.toast.warning(`Iteration ${i.iteration} — consider approving or adjusting feedback to avoid excessive iterations`),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:W.featureId}})),$(),d?.()}finally{ax.current=!1,aw(!1)}}},[W,$,T]),aN=(0,c.useCallback)((a,b)=>aM(a,"Requirements",b,()=>ae({})),[aM]),aO=(0,c.useCallback)((a,b)=>aM(a,"Plan",b),[aM]),aP=(0,c.useCallback)((a,b)=>aM(a,"Merge",b),[aM]),aQ=(0,c.useCallback)(async a=>{if(!W?.featureId)return;let b=await q(W.featureId);b.approved?(aa(""),g.toast.success(`${a} approved — agent resuming`),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:W.featureId}})),$()):g.toast.error(b.error??`Failed to approve ${a.toLowerCase()}`)},[W,$]),aR=(0,c.useCallback)(async a=>{let b;if("feature"!==U.type||!W)return;if(ab){let a=[];for(let[b,c]of Object.entries(ad)){let d=ab.questions.find(a=>a.id===b),e=d?.options.find(a=>a.id===c);d&&e&&a.push({questionId:d.question,selectedOption:e.label})}b={approved:!0,changedSelections:a}}let c=await q(W.featureId,b);c.approved?(aa(""),g.toast.success("Requirements approved — agent resuming"),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:W.featureId}})),ae({}),$()):g.toast.error(c.error??"Failed to approve requirements")},[U,W,ab,ad,$]),aS=(0,c.useCallback)(()=>aQ("Plan"),[aQ]),aT=(0,c.useCallback)(()=>aQ("Merge"),[aQ]),aU=(0,c.useCallback)(async(a,b,c,d)=>{ao(!0),aq(!1),window.dispatchEvent(new CustomEvent("shipit-ai:feature-delete-requested",{detail:{featureId:a,cleanup:b,cascadeDelete:c,closePr:d}})),S.push("/")},[S]),aV=(0,c.useCallback)(a=>{as(!0),window.dispatchEvent(new CustomEvent("shipit-ai:feature-archive-requested",{detail:{featureId:a}})),S.push("/")},[S]),aW=(0,c.useCallback)(a=>{as(!0),window.dispatchEvent(new CustomEvent("shipit-ai:feature-unarchive-requested",{detail:{featureId:a}})),S.push("/")},[S]),aX=(0,c.useCallback)(async a=>{let b=await (0,r.resumeFeature)(a);b.error?g.toast.error(b.error):(g.toast.success("Feature resumed — agent restarting"),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:a}})),V(a=>"feature"!==a.type?a:{...a,node:{...a.node,state:"running"}}))},[]),aY=(0,c.useCallback)(async a=>{let b=await (0,t.stopFeature)(a);b.stopped?(g.toast.success("Agent stopped"),V(a=>"feature"!==a.type?a:{...a,node:{...a.node,state:"error"}})):g.toast.error(b.error??"Failed to stop")},[]),aZ=(0,c.useCallback)(async a=>{let b=await (0,s.startFeature)(a);b.error?g.toast.error(b.error):(g.toast.success("Feature started"),V(a=>"feature"!==a.type?a:{...a,node:{...a.node,state:"running"}}))},[]),a$=W?.repositoryPath&&W?.branch?{featureId:W.featureId,repositoryPath:W.repositoryPath,branch:W.branch,worktreePath:W.worktreePath,specPath:W.specPath}:null,a_=function(a){let[b,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(null),w=(0,c.useRef)(null),x=(0,c.useRef)(null),y=(0,c.useRef)(null),z=(0,c.useRef)(null),A=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=[w,x,y,z,A];return()=>{for(let b of a)b.current&&clearTimeout(b.current)}},[]);let B=(0,c.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let c=await b({repositoryPath:a.repositoryPath,branch:a.branch});if(!c.success){let a=c.error??"An unexpected error occurred";d(a),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,c.useCallback)(()=>B(cw.openIde,d,n,w,b),[B,b]),openInShell:(0,c.useCallback)(()=>B(cx.openShell,f,p,x,e),[B,e]),openFolder:(0,c.useCallback)(async()=>{if(a&&!g){y.current&&clearTimeout(y.current),h(!0),r(null);try{let b=a.worktreePath??a.repositoryPath,c=await (0,cy.openFolder)(b);if(!c.success){let a=c.error??"An unexpected error occurred";r(a),y.current=setTimeout(()=>r(null),5e3)}}catch(a){r(a instanceof Error?a.message:"An unexpected error occurred"),y.current=setTimeout(()=>r(null),5e3)}finally{h(!1)}}},[a,g]),openSpecsFolder:(0,c.useCallback)(async()=>{if(a?.specPath&&!i){z.current&&clearTimeout(z.current),j(!0),t(null);try{let b=await (0,cy.openFolder)(a.specPath);if(!b.success){let a=b.error??"An unexpected error occurred";t(a),z.current=setTimeout(()=>t(null),5e3)}}catch(a){t(a instanceof Error?a.message:"An unexpected error occurred"),z.current=setTimeout(()=>t(null),5e3)}finally{j(!1)}}},[a,i]),rebaseOnMain:(0,c.useCallback)(async()=>{if(a?.featureId&&!k){A.current&&clearTimeout(A.current),l(!0),v(null);try{let b=await cz(a.featureId);if(!b.success){let a=b.error??"An unexpected error occurred";v(a),A.current=setTimeout(()=>v(null),5e3)}}catch(a){v(a instanceof Error?a.message:"An unexpected error occurred"),A.current=setTimeout(()=>v(null),5e3)}finally{l(!1)}}},[a,k]),ideLoading:b,shellLoading:e,folderLoading:g,specsLoading:i,rebaseLoading:k,ideError:m,shellError:o,folderError:q,specsError:s,rebaseError:u}}(a$),a0=Q.gitRebaseSync&&W?.branch&&W?.remoteUrl?W.featureId:null,{data:a1,loading:a2,error:a3,refresh:a4}=function(a){let[b,d]=(0,c.useState)(()=>{if(!a)return null;let b=cF.get(a);return b?b.data:null}),[e,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),i=(0,c.useRef)(a);i.current=a;let j=(0,c.useCallback)(async a=>{f(!0),h(null);try{let b=await cE(a);if(i.current!==a)return;if(b.success&&b.data){let c=b.data;cF.set(a,{data:c,timestamp:Date.now()}),d(c)}else h(b.error??"Failed to check sync status")}catch{if(i.current!==a)return;h("Failed to check sync status")}finally{i.current===a&&f(!1)}},[]);return(0,c.useEffect)(()=>{if(!a){d(null),h(null);return}let b=cF.get(a);b&&(d(b.data),Date.now()-b.timestamp<3e4)||j(a)},[a,j]),{data:b,loading:e,error:g,refresh:(0,c.useCallback)(()=>{a&&j(a)},[a,j])}}(a0),a5=(0,c.useRef)(a_.rebaseLoading);(0,c.useEffect)(()=>{!a5.current||a_.rebaseLoading||a_.rebaseError||a4(),a5.current=a_.rebaseLoading},[a_.rebaseLoading,a_.rebaseError,a4]);let a6=W?.repositoryPath&&W.branch?{targetId:W.featureId,targetType:"feature",repositoryPath:W.repositoryPath,branch:W.branch}:null,a7=(0,B.useDeployAction)(a6),a8="Booting"===a7.status||"Ready"===a7.status,[a9,ba]=(0,c.useState)(!1),bb=(0,c.useCallback)(()=>{W?.featureId&&(navigator.clipboard.writeText(W.featureId),ba(!0),setTimeout(()=>ba(!1),2e3))},[W?.featureId]);if(W){let a=W.featureId.slice(0,8),c="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40",e="bg-border/60 mx-1.5 h-5 w-px shrink-0";P=(0,b.jsx)("div",{"data-testid":"feature-drawer-toolbar",children:(0,b.jsxs)("div",{className:"flex h-10 items-center px-2","data-testid":"feature-drawer-actions",children:[a$&&W?.state!=="done"?(0,b.jsx)(O,{actions:a_,repositoryPath:a$.repositoryPath,worktreePath:a$.worktreePath,showSpecs:!!a$.specPath}):null,a$&&W?.state!=="done"&&Q.envDeploy&&a6?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:e}),(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:a7.deployLoading||a7.stopLoading,onClick:a8?a7.stop:a7.deploy,className:(0,d.cn)("inline-flex size-7 items-center justify-center rounded-[3px] disabled:opacity-40",a8?"text-red-500 hover:bg-red-500/10 hover:text-red-400":"text-green-600 hover:bg-green-500/10 dark:text-green-500"),"aria-label":R(a8?"featureDrawer.stopDevServer":"featureDrawer.startDevServer"),children:a7.deployLoading||a7.stopLoading?(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}):a8?(0,b.jsx)(k.Square,{className:"size-4"}):(0,b.jsx)(j.Play,{className:"size-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R(a8?"featureDrawer.stopDevServer":"featureDrawer.startDevServer")})]})}),a8?(0,b.jsx)(E.DeploymentStatusBadge,{status:a7.status,url:a7.url,targetId:a6?.targetId}):null]}):null,(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsx)("code",{className:"text-muted-foreground/70 font-mono text-[10px] tracking-wide select-none",children:a}),(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:bb,className:c,"aria-label":R("featureDrawer.copyFeatureId"),"data-testid":"feature-drawer-copy-id",children:a9?(0,b.jsx)(m.Check,{className:"size-4 text-green-500"}):(0,b.jsx)(l.Copy,{className:"size-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.copyFeatureId")})]})}),W.featureId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:e}),(0,b.jsxs)(F.TooltipProvider,{delayDuration:300,children:["archived"===W.state?(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:ar,className:c,"aria-label":R("featureDrawer.unarchiveFeature"),"data-testid":"feature-drawer-unarchive",onClick:()=>aW(W.featureId),children:ar?(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(o.ArchiveRestore,{className:"size-3"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.unarchiveFeature")})]}):"deleting"!==W.state?(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:ar,className:c,"aria-label":R("featureDrawer.archiveFeature"),"data-testid":"feature-drawer-archive",onClick:()=>aV(W.featureId),children:ar?(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(n.Archive,{className:"size-3"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.archiveFeature")})]}):null,(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:an,className:(0,d.cn)(c,"hover:bg-destructive/10 hover:text-destructive"),"aria-label":R("featureDrawer.deleteFeature"),"data-testid":"feature-drawer-delete",onClick:()=>aq(!0),children:an?(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(i.Trash2,{className:"size-3"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.deleteFeature")})]})]}),(0,b.jsx)(G.DeleteFeatureDialog,{open:ap,onOpenChange:aq,onConfirm:(a,b,c)=>aU(W.featureId,a,b,c),isDeleting:an,featureName:W.name,featureId:W.featureId,hasChildren:W.hasChildren,hasOpenPr:!!W.pr&&"Open"===W.pr.status})]}):null]})]})})}let bc=null;if("feature"===U.type&&W){let a={...W,..."error"===W.state&&{onRetry:aX},..."pending"===W.state&&{onStart:aZ}};bc=(0,b.jsx)(cu,{featureName:W.name,headerContent:P,featureNode:a,featureId:W.featureId,initialTab:U.initialTab,urlTab:p,sseEvents:X,prdData:ab,prdSelections:ad,onPrdSelect:(a,b)=>ae(c=>({...c,[a]:b})),onPrdApprove:aR,onPrdReject:aN,isPrdLoading:aD,techData:ah,onTechApprove:aS,onTechReject:aO,isTechLoading:aF,productData:aG?null:aj,mergeData:al,onMergeApprove:aT,onMergeReject:aP,isMergeLoading:aH,syncStatus:a0?a1:void 0,syncLoading:a2,syncError:a3,onRefreshSync:a0?a4:void 0,onRebaseOnMain:a0?a_.rebaseOnMain:void 0,rebaseLoading:a_.rebaseLoading,rebaseError:a_.rebaseError,isRejecting:av,chatInput:_,onChatInputChange:aa,interactiveAgentEnabled:H,onRetry:aX,onStop:aY,onStart:aZ})}return(0,b.jsx)(D.BaseDrawer,{open:Z,onClose:aL,size:"lg",modal:!1,"data-testid":"feature"===U.type?"feature-drawer":"repository-drawer",children:bc})}],64885)}];
5
+ ${f.map(a=>`- @${a.path}: ${a.notes.trim()}`).join("\n")}`:a,i=await u(W.featureId,h,e);if(!i.rejected)return void g.toast.error(i.error??`Failed to reject ${b.toLowerCase()}`);T.play(),aa(""),g.toast.success(`${b} rejected — agent re-iterating (iteration ${i.iteration})`),i.iterationWarning&&g.toast.warning(`Iteration ${i.iteration} — consider approving or adjusting feedback to avoid excessive iterations`),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:W.featureId}})),$(),d?.()}finally{ax.current=!1,aw(!1)}}},[W,$,T]),aN=(0,c.useCallback)((a,b)=>aM(a,"Requirements",b,()=>ae({})),[aM]),aO=(0,c.useCallback)((a,b)=>aM(a,"Plan",b),[aM]),aP=(0,c.useCallback)((a,b)=>aM(a,"Merge",b),[aM]),aQ=(0,c.useCallback)(async a=>{if(!W?.featureId)return;let b=await q(W.featureId);b.approved?(aa(""),g.toast.success(`${a} approved — agent resuming`),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:W.featureId}})),$()):g.toast.error(b.error??`Failed to approve ${a.toLowerCase()}`)},[W,$]),aR=(0,c.useCallback)(async a=>{let b;if("feature"!==U.type||!W)return;if(ab){let a=[];for(let[b,c]of Object.entries(ad)){let d=ab.questions.find(a=>a.id===b),e=d?.options.find(a=>a.id===c);d&&e&&a.push({questionId:d.question,selectedOption:e.label})}b={approved:!0,changedSelections:a}}let c=await q(W.featureId,b);c.approved?(aa(""),g.toast.success("Requirements approved — agent resuming"),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:W.featureId}})),ae({}),$()):g.toast.error(c.error??"Failed to approve requirements")},[U,W,ab,ad,$]),aS=(0,c.useCallback)(()=>aQ("Plan"),[aQ]),aT=(0,c.useCallback)(()=>aQ("Merge"),[aQ]),aU=(0,c.useCallback)(async(a,b,c,d)=>{ao(!0),aq(!1),window.dispatchEvent(new CustomEvent("shipit-ai:feature-delete-requested",{detail:{featureId:a,cleanup:b,cascadeDelete:c,closePr:d}})),S.push("/")},[S]),aV=(0,c.useCallback)(a=>{as(!0),window.dispatchEvent(new CustomEvent("shipit-ai:feature-archive-requested",{detail:{featureId:a}})),S.push("/")},[S]),aW=(0,c.useCallback)(a=>{as(!0),window.dispatchEvent(new CustomEvent("shipit-ai:feature-unarchive-requested",{detail:{featureId:a}})),S.push("/")},[S]),aX=(0,c.useCallback)(async a=>{let b=await (0,r.resumeFeature)(a);b.error?g.toast.error(b.error):(g.toast.success("Feature resumed — agent restarting"),window.dispatchEvent(new CustomEvent("shipit-ai:feature-approved",{detail:{featureId:a}})),V(a=>"feature"!==a.type?a:{...a,node:{...a.node,state:"running"}}))},[]),aY=(0,c.useCallback)(async a=>{let b=await (0,t.stopFeature)(a);b.stopped?(g.toast.success("Agent stopped"),V(a=>"feature"!==a.type?a:{...a,node:{...a.node,state:"error"}})):g.toast.error(b.error??"Failed to stop")},[]),aZ=(0,c.useCallback)(async a=>{let b=await (0,s.startFeature)(a);b.error?g.toast.error(b.error):(g.toast.success("Feature started"),V(a=>"feature"!==a.type?a:{...a,node:{...a.node,state:"running"}}))},[]),a$=W?.repositoryPath&&W?.branch?{featureId:W.featureId,repositoryPath:W.repositoryPath,branch:W.branch,worktreePath:W.worktreePath,specPath:W.specPath}:null,a_=function(a){let[b,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(null),w=(0,c.useRef)(null),x=(0,c.useRef)(null),y=(0,c.useRef)(null),z=(0,c.useRef)(null),A=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=[w,x,y,z,A];return()=>{for(let b of a)b.current&&clearTimeout(b.current)}},[]);let B=(0,c.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let c=await b({repositoryPath:a.repositoryPath,branch:a.branch});if(!c.success){let a=c.error??"An unexpected error occurred";d(a),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,c.useCallback)(()=>B(cv.openIde,d,n,w,b),[B,b]),openInShell:(0,c.useCallback)(()=>B(cw.openShell,f,p,x,e),[B,e]),openFolder:(0,c.useCallback)(async()=>{if(a&&!g){y.current&&clearTimeout(y.current),h(!0),r(null);try{let b=a.worktreePath??a.repositoryPath,c=await (0,cx.openFolder)(b);if(!c.success){let a=c.error??"An unexpected error occurred";r(a),y.current=setTimeout(()=>r(null),5e3)}}catch(a){r(a instanceof Error?a.message:"An unexpected error occurred"),y.current=setTimeout(()=>r(null),5e3)}finally{h(!1)}}},[a,g]),openSpecsFolder:(0,c.useCallback)(async()=>{if(a?.specPath&&!i){z.current&&clearTimeout(z.current),j(!0),t(null);try{let b=await (0,cx.openFolder)(a.specPath);if(!b.success){let a=b.error??"An unexpected error occurred";t(a),z.current=setTimeout(()=>t(null),5e3)}}catch(a){t(a instanceof Error?a.message:"An unexpected error occurred"),z.current=setTimeout(()=>t(null),5e3)}finally{j(!1)}}},[a,i]),rebaseOnMain:(0,c.useCallback)(async()=>{if(a?.featureId&&!k){A.current&&clearTimeout(A.current),l(!0),v(null);try{let b=await cy(a.featureId);if(!b.success){let a=b.error??"An unexpected error occurred";v(a),A.current=setTimeout(()=>v(null),5e3)}}catch(a){v(a instanceof Error?a.message:"An unexpected error occurred"),A.current=setTimeout(()=>v(null),5e3)}finally{l(!1)}}},[a,k]),ideLoading:b,shellLoading:e,folderLoading:g,specsLoading:i,rebaseLoading:k,ideError:m,shellError:o,folderError:q,specsError:s,rebaseError:u}}(a$),a0=Q.gitRebaseSync&&W?.branch&&W?.remoteUrl?W.featureId:null,{data:a1,loading:a2,error:a3,refresh:a4}=function(a){let[b,d]=(0,c.useState)(()=>{if(!a)return null;let b=cE.get(a);return b?b.data:null}),[e,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),i=(0,c.useRef)(a);i.current=a;let j=(0,c.useCallback)(async a=>{f(!0),h(null);try{let b=await cD(a);if(i.current!==a)return;if(b.success&&b.data){let c=b.data;cE.set(a,{data:c,timestamp:Date.now()}),d(c)}else h(b.error??"Failed to check sync status")}catch{if(i.current!==a)return;h("Failed to check sync status")}finally{i.current===a&&f(!1)}},[]);return(0,c.useEffect)(()=>{if(!a){d(null),h(null);return}let b=cE.get(a);b&&(d(b.data),Date.now()-b.timestamp<3e4)||j(a)},[a,j]),{data:b,loading:e,error:g,refresh:(0,c.useCallback)(()=>{a&&j(a)},[a,j])}}(a0),a5=(0,c.useRef)(a_.rebaseLoading);(0,c.useEffect)(()=>{!a5.current||a_.rebaseLoading||a_.rebaseError||a4(),a5.current=a_.rebaseLoading},[a_.rebaseLoading,a_.rebaseError,a4]);let a6=W?.repositoryPath&&W.branch?{targetId:W.featureId,targetType:"feature",repositoryPath:W.repositoryPath,branch:W.branch}:null,a7=(0,B.useDeployAction)(a6),a8="Booting"===a7.status||"Ready"===a7.status,[a9,ba]=(0,c.useState)(!1),bb=(0,c.useCallback)(()=>{W?.featureId&&(navigator.clipboard.writeText(W.featureId),ba(!0),setTimeout(()=>ba(!1),2e3))},[W?.featureId]);if(W){let a=W.featureId.slice(0,8),c="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40",e="bg-border/60 mx-1.5 h-5 w-px shrink-0";P=(0,b.jsx)("div",{"data-testid":"feature-drawer-toolbar",children:(0,b.jsxs)("div",{className:"flex h-10 items-center px-2","data-testid":"feature-drawer-actions",children:[a$&&W?.state!=="done"?(0,b.jsx)(O,{actions:a_,repositoryPath:a$.repositoryPath,worktreePath:a$.worktreePath,showSpecs:!!a$.specPath}):null,a$&&W?.state!=="done"&&Q.envDeploy&&a6?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:e}),(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:a7.deployLoading||a7.stopLoading,onClick:a8?a7.stop:a7.deploy,className:(0,d.cn)("inline-flex size-7 items-center justify-center rounded-[3px] disabled:opacity-40",a8?"text-red-500 hover:bg-red-500/10 hover:text-red-400":"text-green-600 hover:bg-green-500/10 dark:text-green-500"),"aria-label":R(a8?"featureDrawer.stopDevServer":"featureDrawer.startDevServer"),children:a7.deployLoading||a7.stopLoading?(0,b.jsx)(h.LoaderCircle,{className:"size-4 animate-spin"}):a8?(0,b.jsx)(k.Square,{className:"size-4"}):(0,b.jsx)(j.Play,{className:"size-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R(a8?"featureDrawer.stopDevServer":"featureDrawer.startDevServer")})]})}),a8?(0,b.jsx)(E.DeploymentStatusBadge,{status:a7.status,url:a7.url,targetId:a6?.targetId}):null]}):null,(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsx)("code",{className:"text-muted-foreground/70 font-mono text-[10px] tracking-wide select-none",children:a}),(0,b.jsx)(F.TooltipProvider,{delayDuration:300,children:(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:bb,className:c,"aria-label":R("featureDrawer.copyFeatureId"),"data-testid":"feature-drawer-copy-id",children:a9?(0,b.jsx)(m.Check,{className:"size-4 text-green-500"}):(0,b.jsx)(l.Copy,{className:"size-4"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.copyFeatureId")})]})}),W.featureId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:e}),(0,b.jsxs)(F.TooltipProvider,{delayDuration:300,children:["archived"===W.state?(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:ar,className:c,"aria-label":R("featureDrawer.unarchiveFeature"),"data-testid":"feature-drawer-unarchive",onClick:()=>aW(W.featureId),children:ar?(0,b.jsx)(h.LoaderCircle,{className:"size-4 animate-spin"}):(0,b.jsx)(o.ArchiveRestore,{className:"size-3"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.unarchiveFeature")})]}):"deleting"!==W.state?(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:ar,className:c,"aria-label":R("featureDrawer.archiveFeature"),"data-testid":"feature-drawer-archive",onClick:()=>aV(W.featureId),children:ar?(0,b.jsx)(h.LoaderCircle,{className:"size-4 animate-spin"}):(0,b.jsx)(n.Archive,{className:"size-3"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.archiveFeature")})]}):null,(0,b.jsxs)(F.Tooltip,{children:[(0,b.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",disabled:an,className:(0,d.cn)(c,"hover:bg-destructive/10 hover:text-destructive"),"aria-label":R("featureDrawer.deleteFeature"),"data-testid":"feature-drawer-delete",onClick:()=>aq(!0),children:an?(0,b.jsx)(h.LoaderCircle,{className:"size-4 animate-spin"}):(0,b.jsx)(i.Trash2,{className:"size-3"})})}),(0,b.jsx)(F.TooltipContent,{side:"bottom",className:"text-xs",children:R("featureDrawer.deleteFeature")})]})]}),(0,b.jsx)(G.DeleteFeatureDialog,{open:ap,onOpenChange:aq,onConfirm:(a,b,c)=>aU(W.featureId,a,b,c),isDeleting:an,featureName:W.name,featureId:W.featureId,hasChildren:W.hasChildren,hasOpenPr:!!W.pr&&"Open"===W.pr.status})]}):null]})]})})}let bc=null;if("feature"===U.type&&W){let a={...W,..."error"===W.state&&{onRetry:aX},..."pending"===W.state&&{onStart:aZ}};bc=(0,b.jsx)(ct,{featureName:W.name,headerContent:P,featureNode:a,featureId:W.featureId,initialTab:U.initialTab,urlTab:p,sseEvents:X,prdData:ab,prdSelections:ad,onPrdSelect:(a,b)=>ae(c=>({...c,[a]:b})),onPrdApprove:aR,onPrdReject:aN,isPrdLoading:aD,techData:ah,onTechApprove:aS,onTechReject:aO,isTechLoading:aF,productData:aG?null:aj,mergeData:al,onMergeApprove:aT,onMergeReject:aP,isMergeLoading:aH,syncStatus:a0?a1:void 0,syncLoading:a2,syncError:a3,onRefreshSync:a0?a4:void 0,onRebaseOnMain:a0?a_.rebaseOnMain:void 0,rebaseLoading:a_.rebaseLoading,rebaseError:a_.rebaseError,isRejecting:av,chatInput:_,onChatInputChange:aa,interactiveAgentEnabled:H,onRetry:aX,onStop:aY,onStart:aZ})}return(0,b.jsx)(D.BaseDrawer,{open:Z,onClose:aL,size:"lg",modal:!1,"data-testid":"feature"===U.type?"feature-drawer":"repository-drawer",children:bc})}],64885)}];
6
6
 
7
7
  //# sourceMappingURL=0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map