@akiojin/gwt 4.12.1 → 6.0.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 (860) hide show
  1. package/README.ja.md +173 -203
  2. package/README.md +170 -212
  3. package/bin/gwt +0 -0
  4. package/bin/gwt.js +42 -33
  5. package/package.json +20 -107
  6. package/scripts/postinstall.js +152 -0
  7. package/dist/claude-history.d.ts +0 -60
  8. package/dist/claude-history.d.ts.map +0 -1
  9. package/dist/claude-history.js +0 -606
  10. package/dist/claude-history.js.map +0 -1
  11. package/dist/claude.d.ts +0 -42
  12. package/dist/claude.d.ts.map +0 -1
  13. package/dist/claude.js +0 -429
  14. package/dist/claude.js.map +0 -1
  15. package/dist/cli/ui/App.solid.d.ts +0 -29
  16. package/dist/cli/ui/App.solid.d.ts.map +0 -1
  17. package/dist/cli/ui/App.solid.js +0 -1427
  18. package/dist/cli/ui/App.solid.js.map +0 -1
  19. package/dist/cli/ui/components/solid/Footer.d.ts +0 -10
  20. package/dist/cli/ui/components/solid/Footer.d.ts.map +0 -1
  21. package/dist/cli/ui/components/solid/Footer.js +0 -10
  22. package/dist/cli/ui/components/solid/Footer.js.map +0 -1
  23. package/dist/cli/ui/components/solid/Header.d.ts +0 -32
  24. package/dist/cli/ui/components/solid/Header.d.ts.map +0 -1
  25. package/dist/cli/ui/components/solid/Header.js +0 -13
  26. package/dist/cli/ui/components/solid/Header.js.map +0 -1
  27. package/dist/cli/ui/components/solid/HelpOverlay.d.ts +0 -8
  28. package/dist/cli/ui/components/solid/HelpOverlay.d.ts.map +0 -1
  29. package/dist/cli/ui/components/solid/HelpOverlay.js +0 -118
  30. package/dist/cli/ui/components/solid/HelpOverlay.js.map +0 -1
  31. package/dist/cli/ui/components/solid/QuickStartStep.d.ts +0 -17
  32. package/dist/cli/ui/components/solid/QuickStartStep.d.ts.map +0 -1
  33. package/dist/cli/ui/components/solid/QuickStartStep.js +0 -152
  34. package/dist/cli/ui/components/solid/QuickStartStep.js.map +0 -1
  35. package/dist/cli/ui/components/solid/SelectInput.d.ts +0 -22
  36. package/dist/cli/ui/components/solid/SelectInput.d.ts.map +0 -1
  37. package/dist/cli/ui/components/solid/SelectInput.js +0 -45
  38. package/dist/cli/ui/components/solid/SelectInput.js.map +0 -1
  39. package/dist/cli/ui/components/solid/TextInput.d.ts +0 -12
  40. package/dist/cli/ui/components/solid/TextInput.d.ts.map +0 -1
  41. package/dist/cli/ui/components/solid/TextInput.js +0 -9
  42. package/dist/cli/ui/components/solid/TextInput.js.map +0 -1
  43. package/dist/cli/ui/components/solid/WizardController.d.ts +0 -34
  44. package/dist/cli/ui/components/solid/WizardController.d.ts.map +0 -1
  45. package/dist/cli/ui/components/solid/WizardController.js +0 -269
  46. package/dist/cli/ui/components/solid/WizardController.js.map +0 -1
  47. package/dist/cli/ui/components/solid/WizardPopup.d.ts +0 -26
  48. package/dist/cli/ui/components/solid/WizardPopup.d.ts.map +0 -1
  49. package/dist/cli/ui/components/solid/WizardPopup.js +0 -68
  50. package/dist/cli/ui/components/solid/WizardPopup.js.map +0 -1
  51. package/dist/cli/ui/components/solid/WizardSteps.d.ts +0 -57
  52. package/dist/cli/ui/components/solid/WizardSteps.d.ts.map +0 -1
  53. package/dist/cli/ui/components/solid/WizardSteps.js +0 -442
  54. package/dist/cli/ui/components/solid/WizardSteps.js.map +0 -1
  55. package/dist/cli/ui/core/index.d.ts +0 -12
  56. package/dist/cli/ui/core/index.d.ts.map +0 -1
  57. package/dist/cli/ui/core/index.js +0 -15
  58. package/dist/cli/ui/core/index.js.map +0 -1
  59. package/dist/cli/ui/core/keybindings.d.ts +0 -106
  60. package/dist/cli/ui/core/keybindings.d.ts.map +0 -1
  61. package/dist/cli/ui/core/keybindings.js +0 -270
  62. package/dist/cli/ui/core/keybindings.js.map +0 -1
  63. package/dist/cli/ui/core/theme.d.ts +0 -123
  64. package/dist/cli/ui/core/theme.d.ts.map +0 -1
  65. package/dist/cli/ui/core/theme.js +0 -191
  66. package/dist/cli/ui/core/theme.js.map +0 -1
  67. package/dist/cli/ui/core/types.d.ts +0 -156
  68. package/dist/cli/ui/core/types.d.ts.map +0 -1
  69. package/dist/cli/ui/core/types.js +0 -10
  70. package/dist/cli/ui/core/types.js.map +0 -1
  71. package/dist/cli/ui/hooks/solid/useScrollableList.d.ts +0 -26
  72. package/dist/cli/ui/hooks/solid/useScrollableList.d.ts.map +0 -1
  73. package/dist/cli/ui/hooks/solid/useScrollableList.js +0 -89
  74. package/dist/cli/ui/hooks/solid/useScrollableList.js.map +0 -1
  75. package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts +0 -10
  76. package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts.map +0 -1
  77. package/dist/cli/ui/hooks/solid/useTerminalSize.js +0 -16
  78. package/dist/cli/ui/hooks/solid/useTerminalSize.js.map +0 -1
  79. package/dist/cli/ui/index.solid.d.ts +0 -5
  80. package/dist/cli/ui/index.solid.d.ts.map +0 -1
  81. package/dist/cli/ui/index.solid.js +0 -21
  82. package/dist/cli/ui/index.solid.js.map +0 -1
  83. package/dist/cli/ui/screens/solid/BranchListScreen.d.ts +0 -53
  84. package/dist/cli/ui/screens/solid/BranchListScreen.d.ts.map +0 -1
  85. package/dist/cli/ui/screens/solid/BranchListScreen.js +0 -829
  86. package/dist/cli/ui/screens/solid/BranchListScreen.js.map +0 -1
  87. package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts +0 -11
  88. package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts.map +0 -1
  89. package/dist/cli/ui/screens/solid/ConfirmScreen.js +0 -45
  90. package/dist/cli/ui/screens/solid/ConfirmScreen.js.map +0 -1
  91. package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts +0 -14
  92. package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts.map +0 -1
  93. package/dist/cli/ui/screens/solid/EnvironmentScreen.js +0 -90
  94. package/dist/cli/ui/screens/solid/EnvironmentScreen.js.map +0 -1
  95. package/dist/cli/ui/screens/solid/ErrorScreen.d.ts +0 -8
  96. package/dist/cli/ui/screens/solid/ErrorScreen.d.ts.map +0 -1
  97. package/dist/cli/ui/screens/solid/ErrorScreen.js +0 -18
  98. package/dist/cli/ui/screens/solid/ErrorScreen.js.map +0 -1
  99. package/dist/cli/ui/screens/solid/InputScreen.d.ts +0 -13
  100. package/dist/cli/ui/screens/solid/InputScreen.d.ts.map +0 -1
  101. package/dist/cli/ui/screens/solid/InputScreen.js +0 -17
  102. package/dist/cli/ui/screens/solid/InputScreen.js.map +0 -1
  103. package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts +0 -9
  104. package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts.map +0 -1
  105. package/dist/cli/ui/screens/solid/LoadingIndicator.js +0 -43
  106. package/dist/cli/ui/screens/solid/LoadingIndicator.js.map +0 -1
  107. package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts +0 -14
  108. package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts.map +0 -1
  109. package/dist/cli/ui/screens/solid/LogDetailScreen.js +0 -34
  110. package/dist/cli/ui/screens/solid/LogDetailScreen.js.map +0 -1
  111. package/dist/cli/ui/screens/solid/LogScreen.d.ts +0 -25
  112. package/dist/cli/ui/screens/solid/LogScreen.d.ts.map +0 -1
  113. package/dist/cli/ui/screens/solid/LogScreen.js +0 -333
  114. package/dist/cli/ui/screens/solid/LogScreen.js.map +0 -1
  115. package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts +0 -17
  116. package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts.map +0 -1
  117. package/dist/cli/ui/screens/solid/ProfileEnvScreen.js +0 -115
  118. package/dist/cli/ui/screens/solid/ProfileEnvScreen.js.map +0 -1
  119. package/dist/cli/ui/screens/solid/ProfileScreen.d.ts +0 -17
  120. package/dist/cli/ui/screens/solid/ProfileScreen.d.ts.map +0 -1
  121. package/dist/cli/ui/screens/solid/ProfileScreen.js +0 -50
  122. package/dist/cli/ui/screens/solid/ProfileScreen.js.map +0 -1
  123. package/dist/cli/ui/screens/solid/SelectorScreen.d.ts +0 -20
  124. package/dist/cli/ui/screens/solid/SelectorScreen.d.ts.map +0 -1
  125. package/dist/cli/ui/screens/solid/SelectorScreen.js +0 -98
  126. package/dist/cli/ui/screens/solid/SelectorScreen.js.map +0 -1
  127. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts +0 -13
  128. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts.map +0 -1
  129. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js +0 -59
  130. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js.map +0 -1
  131. package/dist/cli/ui/stores/appStore.d.ts +0 -143
  132. package/dist/cli/ui/stores/appStore.d.ts.map +0 -1
  133. package/dist/cli/ui/stores/appStore.js +0 -158
  134. package/dist/cli/ui/stores/appStore.js.map +0 -1
  135. package/dist/cli/ui/stores/branchStore.d.ts +0 -159
  136. package/dist/cli/ui/stores/branchStore.d.ts.map +0 -1
  137. package/dist/cli/ui/stores/branchStore.js +0 -275
  138. package/dist/cli/ui/stores/branchStore.js.map +0 -1
  139. package/dist/cli/ui/stores/index.d.ts +0 -11
  140. package/dist/cli/ui/stores/index.d.ts.map +0 -1
  141. package/dist/cli/ui/stores/index.js +0 -14
  142. package/dist/cli/ui/stores/index.js.map +0 -1
  143. package/dist/cli/ui/stores/uiStore.d.ts +0 -146
  144. package/dist/cli/ui/stores/uiStore.d.ts.map +0 -1
  145. package/dist/cli/ui/stores/uiStore.js +0 -166
  146. package/dist/cli/ui/stores/uiStore.js.map +0 -1
  147. package/dist/cli/ui/types.d.ts +0 -293
  148. package/dist/cli/ui/types.d.ts.map +0 -1
  149. package/dist/cli/ui/types.js +0 -2
  150. package/dist/cli/ui/types.js.map +0 -1
  151. package/dist/cli/ui/utils/baseBranch.d.ts +0 -4
  152. package/dist/cli/ui/utils/baseBranch.d.ts.map +0 -1
  153. package/dist/cli/ui/utils/baseBranch.js +0 -17
  154. package/dist/cli/ui/utils/baseBranch.js.map +0 -1
  155. package/dist/cli/ui/utils/branchFormatter.d.ts +0 -19
  156. package/dist/cli/ui/utils/branchFormatter.d.ts.map +0 -1
  157. package/dist/cli/ui/utils/branchFormatter.js +0 -199
  158. package/dist/cli/ui/utils/branchFormatter.js.map +0 -1
  159. package/dist/cli/ui/utils/clipboard.d.ts +0 -7
  160. package/dist/cli/ui/utils/clipboard.d.ts.map +0 -1
  161. package/dist/cli/ui/utils/clipboard.js +0 -21
  162. package/dist/cli/ui/utils/clipboard.js.map +0 -1
  163. package/dist/cli/ui/utils/continueSession.d.ts +0 -36
  164. package/dist/cli/ui/utils/continueSession.d.ts.map +0 -1
  165. package/dist/cli/ui/utils/continueSession.js +0 -155
  166. package/dist/cli/ui/utils/continueSession.js.map +0 -1
  167. package/dist/cli/ui/utils/installedVersionCache.d.ts +0 -33
  168. package/dist/cli/ui/utils/installedVersionCache.d.ts.map +0 -1
  169. package/dist/cli/ui/utils/installedVersionCache.js +0 -59
  170. package/dist/cli/ui/utils/installedVersionCache.js.map +0 -1
  171. package/dist/cli/ui/utils/modelOptions.d.ts +0 -10
  172. package/dist/cli/ui/utils/modelOptions.d.ts.map +0 -1
  173. package/dist/cli/ui/utils/modelOptions.js +0 -155
  174. package/dist/cli/ui/utils/modelOptions.js.map +0 -1
  175. package/dist/cli/ui/utils/statisticsCalculator.d.ts +0 -9
  176. package/dist/cli/ui/utils/statisticsCalculator.d.ts.map +0 -1
  177. package/dist/cli/ui/utils/statisticsCalculator.js +0 -37
  178. package/dist/cli/ui/utils/statisticsCalculator.js.map +0 -1
  179. package/dist/cli/ui/utils/versionCache.d.ts +0 -37
  180. package/dist/cli/ui/utils/versionCache.d.ts.map +0 -1
  181. package/dist/cli/ui/utils/versionCache.js +0 -70
  182. package/dist/cli/ui/utils/versionCache.js.map +0 -1
  183. package/dist/cli/ui/utils/versionFetcher.d.ts +0 -41
  184. package/dist/cli/ui/utils/versionFetcher.d.ts.map +0 -1
  185. package/dist/cli/ui/utils/versionFetcher.js +0 -89
  186. package/dist/cli/ui/utils/versionFetcher.js.map +0 -1
  187. package/dist/client/assets/index-BbfV7Wuj.css +0 -1
  188. package/dist/client/assets/index-CoAyq5x1.js +0 -78
  189. package/dist/client/index.html +0 -13
  190. package/dist/codex.d.ts +0 -55
  191. package/dist/codex.d.ts.map +0 -1
  192. package/dist/codex.js +0 -329
  193. package/dist/codex.js.map +0 -1
  194. package/dist/config/builtin-coding-agents.d.ts +0 -27
  195. package/dist/config/builtin-coding-agents.d.ts.map +0 -1
  196. package/dist/config/builtin-coding-agents.js +0 -78
  197. package/dist/config/builtin-coding-agents.js.map +0 -1
  198. package/dist/config/constants.d.ts +0 -76
  199. package/dist/config/constants.d.ts.map +0 -1
  200. package/dist/config/constants.js +0 -92
  201. package/dist/config/constants.js.map +0 -1
  202. package/dist/config/env-history.d.ts +0 -4
  203. package/dist/config/env-history.d.ts.map +0 -1
  204. package/dist/config/env-history.js +0 -34
  205. package/dist/config/env-history.js.map +0 -1
  206. package/dist/config/index.d.ts +0 -51
  207. package/dist/config/index.d.ts.map +0 -1
  208. package/dist/config/index.js +0 -225
  209. package/dist/config/index.js.map +0 -1
  210. package/dist/config/profiles.d.ts +0 -94
  211. package/dist/config/profiles.d.ts.map +0 -1
  212. package/dist/config/profiles.js +0 -284
  213. package/dist/config/profiles.js.map +0 -1
  214. package/dist/config/shared-env.d.ts +0 -41
  215. package/dist/config/shared-env.d.ts.map +0 -1
  216. package/dist/config/shared-env.js +0 -114
  217. package/dist/config/shared-env.js.map +0 -1
  218. package/dist/config/tools.d.ts +0 -50
  219. package/dist/config/tools.d.ts.map +0 -1
  220. package/dist/config/tools.js +0 -239
  221. package/dist/config/tools.js.map +0 -1
  222. package/dist/gemini.d.ts +0 -35
  223. package/dist/gemini.d.ts.map +0 -1
  224. package/dist/gemini.js +0 -299
  225. package/dist/gemini.js.map +0 -1
  226. package/dist/git.d.ts +0 -154
  227. package/dist/git.d.ts.map +0 -1
  228. package/dist/git.js +0 -1012
  229. package/dist/git.js.map +0 -1
  230. package/dist/github.d.ts +0 -14
  231. package/dist/github.d.ts.map +0 -1
  232. package/dist/github.js +0 -123
  233. package/dist/github.js.map +0 -1
  234. package/dist/index.d.ts +0 -16
  235. package/dist/index.d.ts.map +0 -1
  236. package/dist/index.js +0 -782
  237. package/dist/index.js.map +0 -1
  238. package/dist/launcher.d.ts +0 -30
  239. package/dist/launcher.d.ts.map +0 -1
  240. package/dist/launcher.js +0 -185
  241. package/dist/launcher.js.map +0 -1
  242. package/dist/logging/agentOutput.d.ts +0 -21
  243. package/dist/logging/agentOutput.d.ts.map +0 -1
  244. package/dist/logging/agentOutput.js +0 -164
  245. package/dist/logging/agentOutput.js.map +0 -1
  246. package/dist/logging/formatter.d.ts +0 -15
  247. package/dist/logging/formatter.d.ts.map +0 -1
  248. package/dist/logging/formatter.js +0 -95
  249. package/dist/logging/formatter.js.map +0 -1
  250. package/dist/logging/logger.d.ts +0 -24
  251. package/dist/logging/logger.d.ts.map +0 -1
  252. package/dist/logging/logger.js +0 -79
  253. package/dist/logging/logger.js.map +0 -1
  254. package/dist/logging/reader.d.ts +0 -34
  255. package/dist/logging/reader.d.ts.map +0 -1
  256. package/dist/logging/reader.js +0 -178
  257. package/dist/logging/reader.js.map +0 -1
  258. package/dist/logging/rotation.d.ts +0 -6
  259. package/dist/logging/rotation.d.ts.map +0 -1
  260. package/dist/logging/rotation.js +0 -26
  261. package/dist/logging/rotation.js.map +0 -1
  262. package/dist/opentui/highlights-eq9cgrbb.scm +0 -604
  263. package/dist/opentui/highlights-ghv9g403.scm +0 -205
  264. package/dist/opentui/highlights-hk7bwhj4.scm +0 -284
  265. package/dist/opentui/highlights-r812a2qc.scm +0 -150
  266. package/dist/opentui/highlights-x6tmsnaa.scm +0 -115
  267. package/dist/opentui/index.solid.d.ts +0 -2
  268. package/dist/opentui/index.solid.d.ts.map +0 -1
  269. package/dist/opentui/index.solid.js +0 -53721
  270. package/dist/opentui/index.solid.js.map +0 -1
  271. package/dist/opentui/injections-73j83es3.scm +0 -27
  272. package/dist/opentui/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  273. package/dist/opentui/tree-sitter-markdown-411r6y9b.wasm +0 -0
  274. package/dist/opentui/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  275. package/dist/opentui/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  276. package/dist/opentui/tree-sitter-zig-e78zbjpm.wasm +0 -0
  277. package/dist/repositories/git.repository.d.ts +0 -38
  278. package/dist/repositories/git.repository.d.ts.map +0 -1
  279. package/dist/repositories/git.repository.js +0 -117
  280. package/dist/repositories/git.repository.js.map +0 -1
  281. package/dist/repositories/github.repository.d.ts +0 -16
  282. package/dist/repositories/github.repository.d.ts.map +0 -1
  283. package/dist/repositories/github.repository.js +0 -61
  284. package/dist/repositories/github.repository.js.map +0 -1
  285. package/dist/repositories/worktree.repository.d.ts +0 -19
  286. package/dist/repositories/worktree.repository.d.ts.map +0 -1
  287. package/dist/repositories/worktree.repository.js +0 -64
  288. package/dist/repositories/worktree.repository.js.map +0 -1
  289. package/dist/services/BatchMergeService.d.ts +0 -45
  290. package/dist/services/BatchMergeService.d.ts.map +0 -1
  291. package/dist/services/BatchMergeService.js +0 -197
  292. package/dist/services/BatchMergeService.js.map +0 -1
  293. package/dist/services/WorktreeOrchestrator.d.ts +0 -37
  294. package/dist/services/WorktreeOrchestrator.d.ts.map +0 -1
  295. package/dist/services/WorktreeOrchestrator.js +0 -74
  296. package/dist/services/WorktreeOrchestrator.js.map +0 -1
  297. package/dist/services/codingAgentCommandResolver.d.ts +0 -10
  298. package/dist/services/codingAgentCommandResolver.d.ts.map +0 -1
  299. package/dist/services/codingAgentCommandResolver.js +0 -81
  300. package/dist/services/codingAgentCommandResolver.js.map +0 -1
  301. package/dist/services/codingAgentResolver.d.ts +0 -43
  302. package/dist/services/codingAgentResolver.d.ts.map +0 -1
  303. package/dist/services/codingAgentResolver.js +0 -269
  304. package/dist/services/codingAgentResolver.js.map +0 -1
  305. package/dist/services/dependency-installer.d.ts +0 -26
  306. package/dist/services/dependency-installer.d.ts.map +0 -1
  307. package/dist/services/dependency-installer.js +0 -134
  308. package/dist/services/dependency-installer.js.map +0 -1
  309. package/dist/services/git.service.d.ts +0 -27
  310. package/dist/services/git.service.d.ts.map +0 -1
  311. package/dist/services/git.service.js +0 -97
  312. package/dist/services/git.service.js.map +0 -1
  313. package/dist/services/github.service.d.ts +0 -14
  314. package/dist/services/github.service.d.ts.map +0 -1
  315. package/dist/services/github.service.js +0 -52
  316. package/dist/services/github.service.js.map +0 -1
  317. package/dist/services/worktree.service.d.ts +0 -20
  318. package/dist/services/worktree.service.d.ts.map +0 -1
  319. package/dist/services/worktree.service.js +0 -52
  320. package/dist/services/worktree.service.js.map +0 -1
  321. package/dist/shared/codingAgentConstants.d.ts +0 -12
  322. package/dist/shared/codingAgentConstants.d.ts.map +0 -1
  323. package/dist/shared/codingAgentConstants.js +0 -95
  324. package/dist/shared/codingAgentConstants.js.map +0 -1
  325. package/dist/types/api.d.ts +0 -225
  326. package/dist/types/api.d.ts.map +0 -1
  327. package/dist/types/api.js +0 -8
  328. package/dist/types/api.js.map +0 -1
  329. package/dist/types/coding-agent.d.ts +0 -62
  330. package/dist/types/coding-agent.d.ts.map +0 -1
  331. package/dist/types/coding-agent.js +0 -29
  332. package/dist/types/coding-agent.js.map +0 -1
  333. package/dist/types/profiles.d.ts +0 -54
  334. package/dist/types/profiles.d.ts.map +0 -1
  335. package/dist/types/profiles.js +0 -33
  336. package/dist/types/profiles.js.map +0 -1
  337. package/dist/types/tools.d.ts +0 -230
  338. package/dist/types/tools.d.ts.map +0 -1
  339. package/dist/types/tools.js +0 -8
  340. package/dist/types/tools.js.map +0 -1
  341. package/dist/utils/bun-runtime.d.ts +0 -12
  342. package/dist/utils/bun-runtime.d.ts.map +0 -1
  343. package/dist/utils/bun-runtime.js +0 -13
  344. package/dist/utils/bun-runtime.js.map +0 -1
  345. package/dist/utils/coding-agent-colors.d.ts +0 -88
  346. package/dist/utils/coding-agent-colors.d.ts.map +0 -1
  347. package/dist/utils/coding-agent-colors.js +0 -137
  348. package/dist/utils/coding-agent-colors.js.map +0 -1
  349. package/dist/utils/command.d.ts +0 -62
  350. package/dist/utils/command.d.ts.map +0 -1
  351. package/dist/utils/command.js +0 -186
  352. package/dist/utils/command.js.map +0 -1
  353. package/dist/utils/error-utils.d.ts +0 -27
  354. package/dist/utils/error-utils.d.ts.map +0 -1
  355. package/dist/utils/error-utils.js +0 -98
  356. package/dist/utils/error-utils.js.map +0 -1
  357. package/dist/utils/npmRegistry.d.ts +0 -61
  358. package/dist/utils/npmRegistry.d.ts.map +0 -1
  359. package/dist/utils/npmRegistry.js +0 -180
  360. package/dist/utils/npmRegistry.js.map +0 -1
  361. package/dist/utils/prompt.d.ts +0 -18
  362. package/dist/utils/prompt.d.ts.map +0 -1
  363. package/dist/utils/prompt.js +0 -107
  364. package/dist/utils/prompt.js.map +0 -1
  365. package/dist/utils/session/common.d.ts +0 -108
  366. package/dist/utils/session/common.d.ts.map +0 -1
  367. package/dist/utils/session/common.js +0 -439
  368. package/dist/utils/session/common.js.map +0 -1
  369. package/dist/utils/session/index.d.ts +0 -16
  370. package/dist/utils/session/index.d.ts.map +0 -1
  371. package/dist/utils/session/index.js +0 -20
  372. package/dist/utils/session/index.js.map +0 -1
  373. package/dist/utils/session/parsers/claude.d.ts +0 -62
  374. package/dist/utils/session/parsers/claude.d.ts.map +0 -1
  375. package/dist/utils/session/parsers/claude.js +0 -224
  376. package/dist/utils/session/parsers/claude.js.map +0 -1
  377. package/dist/utils/session/parsers/codex.d.ts +0 -37
  378. package/dist/utils/session/parsers/codex.d.ts.map +0 -1
  379. package/dist/utils/session/parsers/codex.js +0 -139
  380. package/dist/utils/session/parsers/codex.js.map +0 -1
  381. package/dist/utils/session/parsers/gemini.d.ts +0 -22
  382. package/dist/utils/session/parsers/gemini.d.ts.map +0 -1
  383. package/dist/utils/session/parsers/gemini.js +0 -118
  384. package/dist/utils/session/parsers/gemini.js.map +0 -1
  385. package/dist/utils/session/parsers/index.d.ts +0 -8
  386. package/dist/utils/session/parsers/index.d.ts.map +0 -1
  387. package/dist/utils/session/parsers/index.js +0 -12
  388. package/dist/utils/session/parsers/index.js.map +0 -1
  389. package/dist/utils/session/parsers/opencode.d.ts +0 -23
  390. package/dist/utils/session/parsers/opencode.d.ts.map +0 -1
  391. package/dist/utils/session/parsers/opencode.js +0 -126
  392. package/dist/utils/session/parsers/opencode.js.map +0 -1
  393. package/dist/utils/session/types.d.ts +0 -49
  394. package/dist/utils/session/types.d.ts.map +0 -1
  395. package/dist/utils/session/types.js +0 -5
  396. package/dist/utils/session/types.js.map +0 -1
  397. package/dist/utils/session.d.ts +0 -16
  398. package/dist/utils/session.d.ts.map +0 -1
  399. package/dist/utils/session.js +0 -16
  400. package/dist/utils/session.js.map +0 -1
  401. package/dist/utils/spinner.d.ts +0 -6
  402. package/dist/utils/spinner.d.ts.map +0 -1
  403. package/dist/utils/spinner.js +0 -47
  404. package/dist/utils/spinner.js.map +0 -1
  405. package/dist/utils/terminal.d.ts +0 -64
  406. package/dist/utils/terminal.d.ts.map +0 -1
  407. package/dist/utils/terminal.js +0 -270
  408. package/dist/utils/terminal.js.map +0 -1
  409. package/dist/utils/webui.d.ts +0 -8
  410. package/dist/utils/webui.d.ts.map +0 -1
  411. package/dist/utils/webui.js +0 -35
  412. package/dist/utils/webui.js.map +0 -1
  413. package/dist/utils.d.ts +0 -18
  414. package/dist/utils.d.ts.map +0 -1
  415. package/dist/utils.js +0 -79
  416. package/dist/utils.js.map +0 -1
  417. package/dist/web/client/src/components/BranchGraph.d.ts +0 -13
  418. package/dist/web/client/src/components/BranchGraph.d.ts.map +0 -1
  419. package/dist/web/client/src/components/BranchGraph.js +0 -49
  420. package/dist/web/client/src/components/BranchGraph.js.map +0 -1
  421. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts +0 -9
  422. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +0 -1
  423. package/dist/web/client/src/components/CodingAgentLaunchModal.js +0 -354
  424. package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +0 -1
  425. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts +0 -23
  426. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts.map +0 -1
  427. package/dist/web/client/src/components/CustomCodingAgentForm.js +0 -209
  428. package/dist/web/client/src/components/CustomCodingAgentForm.js.map +0 -1
  429. package/dist/web/client/src/components/CustomCodingAgentList.d.ts +0 -10
  430. package/dist/web/client/src/components/CustomCodingAgentList.d.ts.map +0 -1
  431. package/dist/web/client/src/components/CustomCodingAgentList.js +0 -57
  432. package/dist/web/client/src/components/CustomCodingAgentList.js.map +0 -1
  433. package/dist/web/client/src/components/EnvEditor.d.ts +0 -20
  434. package/dist/web/client/src/components/EnvEditor.d.ts.map +0 -1
  435. package/dist/web/client/src/components/EnvEditor.js +0 -75
  436. package/dist/web/client/src/components/EnvEditor.js.map +0 -1
  437. package/dist/web/client/src/components/EnvironmentEditor.d.ts +0 -17
  438. package/dist/web/client/src/components/EnvironmentEditor.d.ts.map +0 -1
  439. package/dist/web/client/src/components/EnvironmentEditor.js +0 -22
  440. package/dist/web/client/src/components/EnvironmentEditor.js.map +0 -1
  441. package/dist/web/client/src/components/Terminal.d.ts +0 -15
  442. package/dist/web/client/src/components/Terminal.d.ts.map +0 -1
  443. package/dist/web/client/src/components/Terminal.js +0 -119
  444. package/dist/web/client/src/components/Terminal.js.map +0 -1
  445. package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts +0 -10
  446. package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +0 -1
  447. package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +0 -107
  448. package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +0 -1
  449. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts +0 -22
  450. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +0 -1
  451. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +0 -80
  452. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +0 -1
  453. package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts +0 -11
  454. package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts.map +0 -1
  455. package/dist/web/client/src/components/branch-detail/TerminalPanel.js +0 -32
  456. package/dist/web/client/src/components/branch-detail/TerminalPanel.js.map +0 -1
  457. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +0 -40
  458. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +0 -1
  459. package/dist/web/client/src/components/branch-detail/ToolLauncher.js +0 -147
  460. package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +0 -1
  461. package/dist/web/client/src/components/branch-detail/index.d.ts +0 -5
  462. package/dist/web/client/src/components/branch-detail/index.d.ts.map +0 -1
  463. package/dist/web/client/src/components/branch-detail/index.js +0 -5
  464. package/dist/web/client/src/components/branch-detail/index.js.map +0 -1
  465. package/dist/web/client/src/components/common/BranchCard.d.ts +0 -17
  466. package/dist/web/client/src/components/common/BranchCard.d.ts.map +0 -1
  467. package/dist/web/client/src/components/common/BranchCard.js +0 -36
  468. package/dist/web/client/src/components/common/BranchCard.js.map +0 -1
  469. package/dist/web/client/src/components/common/MetricCard.d.ts +0 -10
  470. package/dist/web/client/src/components/common/MetricCard.d.ts.map +0 -1
  471. package/dist/web/client/src/components/common/MetricCard.js +0 -10
  472. package/dist/web/client/src/components/common/MetricCard.js.map +0 -1
  473. package/dist/web/client/src/components/common/PageHeader.d.ts +0 -12
  474. package/dist/web/client/src/components/common/PageHeader.d.ts.map +0 -1
  475. package/dist/web/client/src/components/common/PageHeader.js +0 -14
  476. package/dist/web/client/src/components/common/PageHeader.js.map +0 -1
  477. package/dist/web/client/src/components/common/SearchInput.d.ts +0 -14
  478. package/dist/web/client/src/components/common/SearchInput.d.ts.map +0 -1
  479. package/dist/web/client/src/components/common/SearchInput.js +0 -15
  480. package/dist/web/client/src/components/common/SearchInput.js.map +0 -1
  481. package/dist/web/client/src/components/common/StatusBadge.d.ts +0 -10
  482. package/dist/web/client/src/components/common/StatusBadge.d.ts.map +0 -1
  483. package/dist/web/client/src/components/common/StatusBadge.js +0 -15
  484. package/dist/web/client/src/components/common/StatusBadge.js.map +0 -1
  485. package/dist/web/client/src/components/common/index.d.ts +0 -6
  486. package/dist/web/client/src/components/common/index.d.ts.map +0 -1
  487. package/dist/web/client/src/components/common/index.js +0 -6
  488. package/dist/web/client/src/components/common/index.js.map +0 -1
  489. package/dist/web/client/src/components/graph/BranchDetailPanel.d.ts +0 -15
  490. package/dist/web/client/src/components/graph/BranchDetailPanel.d.ts.map +0 -1
  491. package/dist/web/client/src/components/graph/BranchDetailPanel.js +0 -57
  492. package/dist/web/client/src/components/graph/BranchDetailPanel.js.map +0 -1
  493. package/dist/web/client/src/components/graph/BranchNode.d.ts +0 -13
  494. package/dist/web/client/src/components/graph/BranchNode.d.ts.map +0 -1
  495. package/dist/web/client/src/components/graph/BranchNode.js +0 -103
  496. package/dist/web/client/src/components/graph/BranchNode.js.map +0 -1
  497. package/dist/web/client/src/components/graph/ClusterNode.d.ts +0 -13
  498. package/dist/web/client/src/components/graph/ClusterNode.d.ts.map +0 -1
  499. package/dist/web/client/src/components/graph/ClusterNode.js +0 -109
  500. package/dist/web/client/src/components/graph/ClusterNode.js.map +0 -1
  501. package/dist/web/client/src/components/graph/SynapticCanvas.d.ts +0 -17
  502. package/dist/web/client/src/components/graph/SynapticCanvas.d.ts.map +0 -1
  503. package/dist/web/client/src/components/graph/SynapticCanvas.js +0 -94
  504. package/dist/web/client/src/components/graph/SynapticCanvas.js.map +0 -1
  505. package/dist/web/client/src/components/graph/SynapticEdge.d.ts +0 -13
  506. package/dist/web/client/src/components/graph/SynapticEdge.d.ts.map +0 -1
  507. package/dist/web/client/src/components/graph/SynapticEdge.js +0 -113
  508. package/dist/web/client/src/components/graph/SynapticEdge.js.map +0 -1
  509. package/dist/web/client/src/components/graph/graphUtils.d.ts +0 -67
  510. package/dist/web/client/src/components/graph/graphUtils.d.ts.map +0 -1
  511. package/dist/web/client/src/components/graph/graphUtils.js +0 -175
  512. package/dist/web/client/src/components/graph/graphUtils.js.map +0 -1
  513. package/dist/web/client/src/components/graph/index.d.ts +0 -10
  514. package/dist/web/client/src/components/graph/index.d.ts.map +0 -1
  515. package/dist/web/client/src/components/graph/index.js +0 -10
  516. package/dist/web/client/src/components/graph/index.js.map +0 -1
  517. package/dist/web/client/src/components/ui/alert.d.ts +0 -9
  518. package/dist/web/client/src/components/ui/alert.d.ts.map +0 -1
  519. package/dist/web/client/src/components/ui/alert.js +0 -25
  520. package/dist/web/client/src/components/ui/alert.js.map +0 -1
  521. package/dist/web/client/src/components/ui/badge.d.ts +0 -10
  522. package/dist/web/client/src/components/ui/badge.d.ts.map +0 -1
  523. package/dist/web/client/src/components/ui/badge.js +0 -25
  524. package/dist/web/client/src/components/ui/badge.js.map +0 -1
  525. package/dist/web/client/src/components/ui/button.d.ts +0 -12
  526. package/dist/web/client/src/components/ui/button.d.ts.map +0 -1
  527. package/dist/web/client/src/components/ui/button.js +0 -33
  528. package/dist/web/client/src/components/ui/button.js.map +0 -1
  529. package/dist/web/client/src/components/ui/card.d.ts +0 -9
  530. package/dist/web/client/src/components/ui/card.d.ts.map +0 -1
  531. package/dist/web/client/src/components/ui/card.js +0 -16
  532. package/dist/web/client/src/components/ui/card.js.map +0 -1
  533. package/dist/web/client/src/components/ui/index.d.ts +0 -8
  534. package/dist/web/client/src/components/ui/index.d.ts.map +0 -1
  535. package/dist/web/client/src/components/ui/index.js +0 -8
  536. package/dist/web/client/src/components/ui/index.js.map +0 -1
  537. package/dist/web/client/src/components/ui/input.d.ts +0 -4
  538. package/dist/web/client/src/components/ui/input.d.ts.map +0 -1
  539. package/dist/web/client/src/components/ui/input.js +0 -8
  540. package/dist/web/client/src/components/ui/input.js.map +0 -1
  541. package/dist/web/client/src/components/ui/select.d.ts +0 -14
  542. package/dist/web/client/src/components/ui/select.d.ts.map +0 -1
  543. package/dist/web/client/src/components/ui/select.js +0 -39
  544. package/dist/web/client/src/components/ui/select.js.map +0 -1
  545. package/dist/web/client/src/components/ui/table.d.ts +0 -11
  546. package/dist/web/client/src/components/ui/table.d.ts.map +0 -1
  547. package/dist/web/client/src/components/ui/table.js +0 -21
  548. package/dist/web/client/src/components/ui/table.js.map +0 -1
  549. package/dist/web/client/src/hooks/useBranches.d.ts +0 -16
  550. package/dist/web/client/src/hooks/useBranches.d.ts.map +0 -1
  551. package/dist/web/client/src/hooks/useBranches.js +0 -35
  552. package/dist/web/client/src/hooks/useBranches.js.map +0 -1
  553. package/dist/web/client/src/hooks/useConfig.d.ts +0 -13
  554. package/dist/web/client/src/hooks/useConfig.d.ts.map +0 -1
  555. package/dist/web/client/src/hooks/useConfig.js +0 -27
  556. package/dist/web/client/src/hooks/useConfig.js.map +0 -1
  557. package/dist/web/client/src/hooks/useSessions.d.ts +0 -21
  558. package/dist/web/client/src/hooks/useSessions.d.ts.map +0 -1
  559. package/dist/web/client/src/hooks/useSessions.js +0 -54
  560. package/dist/web/client/src/hooks/useSessions.js.map +0 -1
  561. package/dist/web/client/src/hooks/useWorktrees.d.ts +0 -17
  562. package/dist/web/client/src/hooks/useWorktrees.d.ts.map +0 -1
  563. package/dist/web/client/src/hooks/useWorktrees.js +0 -41
  564. package/dist/web/client/src/hooks/useWorktrees.js.map +0 -1
  565. package/dist/web/client/src/lib/api.d.ts +0 -82
  566. package/dist/web/client/src/lib/api.d.ts.map +0 -1
  567. package/dist/web/client/src/lib/api.js +0 -147
  568. package/dist/web/client/src/lib/api.js.map +0 -1
  569. package/dist/web/client/src/lib/coding-agent-colors.d.ts +0 -86
  570. package/dist/web/client/src/lib/coding-agent-colors.d.ts.map +0 -1
  571. package/dist/web/client/src/lib/coding-agent-colors.js +0 -135
  572. package/dist/web/client/src/lib/coding-agent-colors.js.map +0 -1
  573. package/dist/web/client/src/lib/utils.d.ts +0 -7
  574. package/dist/web/client/src/lib/utils.d.ts.map +0 -1
  575. package/dist/web/client/src/lib/utils.js +0 -10
  576. package/dist/web/client/src/lib/utils.js.map +0 -1
  577. package/dist/web/client/src/lib/websocket.d.ts +0 -59
  578. package/dist/web/client/src/lib/websocket.d.ts.map +0 -1
  579. package/dist/web/client/src/lib/websocket.js +0 -182
  580. package/dist/web/client/src/lib/websocket.js.map +0 -1
  581. package/dist/web/client/src/main.d.ts +0 -2
  582. package/dist/web/client/src/main.d.ts.map +0 -1
  583. package/dist/web/client/src/main.js +0 -23
  584. package/dist/web/client/src/main.js.map +0 -1
  585. package/dist/web/client/src/pages/BranchDetailPage.d.ts +0 -3
  586. package/dist/web/client/src/pages/BranchDetailPage.d.ts.map +0 -1
  587. package/dist/web/client/src/pages/BranchDetailPage.js +0 -365
  588. package/dist/web/client/src/pages/BranchDetailPage.js.map +0 -1
  589. package/dist/web/client/src/pages/BranchListPage.d.ts +0 -3
  590. package/dist/web/client/src/pages/BranchListPage.d.ts.map +0 -1
  591. package/dist/web/client/src/pages/BranchListPage.js +0 -118
  592. package/dist/web/client/src/pages/BranchListPage.js.map +0 -1
  593. package/dist/web/client/src/pages/ConfigManagementPage.d.ts +0 -3
  594. package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +0 -1
  595. package/dist/web/client/src/pages/ConfigManagementPage.js +0 -132
  596. package/dist/web/client/src/pages/ConfigManagementPage.js.map +0 -1
  597. package/dist/web/client/src/pages/ConfigPage.d.ts +0 -3
  598. package/dist/web/client/src/pages/ConfigPage.d.ts.map +0 -1
  599. package/dist/web/client/src/pages/ConfigPage.js +0 -220
  600. package/dist/web/client/src/pages/ConfigPage.js.map +0 -1
  601. package/dist/web/client/src/router.d.ts +0 -9
  602. package/dist/web/client/src/router.d.ts.map +0 -1
  603. package/dist/web/client/src/router.js +0 -27
  604. package/dist/web/client/src/router.js.map +0 -1
  605. package/dist/web/client/vite.config.d.ts +0 -3
  606. package/dist/web/client/vite.config.d.ts.map +0 -1
  607. package/dist/web/client/vite.config.js +0 -28
  608. package/dist/web/client/vite.config.js.map +0 -1
  609. package/dist/web/server/env/importer.d.ts +0 -3
  610. package/dist/web/server/env/importer.d.ts.map +0 -1
  611. package/dist/web/server/env/importer.js +0 -51
  612. package/dist/web/server/env/importer.js.map +0 -1
  613. package/dist/web/server/index.d.ts +0 -33
  614. package/dist/web/server/index.d.ts.map +0 -1
  615. package/dist/web/server/index.js +0 -102
  616. package/dist/web/server/index.js.map +0 -1
  617. package/dist/web/server/pty/manager.d.ts +0 -54
  618. package/dist/web/server/pty/manager.d.ts.map +0 -1
  619. package/dist/web/server/pty/manager.js +0 -303
  620. package/dist/web/server/pty/manager.js.map +0 -1
  621. package/dist/web/server/routes/branches.d.ts +0 -11
  622. package/dist/web/server/routes/branches.d.ts.map +0 -1
  623. package/dist/web/server/routes/branches.js +0 -97
  624. package/dist/web/server/routes/branches.js.map +0 -1
  625. package/dist/web/server/routes/config.d.ts +0 -6
  626. package/dist/web/server/routes/config.d.ts.map +0 -1
  627. package/dist/web/server/routes/config.js +0 -162
  628. package/dist/web/server/routes/config.js.map +0 -1
  629. package/dist/web/server/routes/index.d.ts +0 -13
  630. package/dist/web/server/routes/index.d.ts.map +0 -1
  631. package/dist/web/server/routes/index.js +0 -29
  632. package/dist/web/server/routes/index.js.map +0 -1
  633. package/dist/web/server/routes/sessions.d.ts +0 -12
  634. package/dist/web/server/routes/sessions.d.ts.map +0 -1
  635. package/dist/web/server/routes/sessions.js +0 -176
  636. package/dist/web/server/routes/sessions.js.map +0 -1
  637. package/dist/web/server/routes/worktrees.d.ts +0 -11
  638. package/dist/web/server/routes/worktrees.d.ts.map +0 -1
  639. package/dist/web/server/routes/worktrees.js +0 -80
  640. package/dist/web/server/routes/worktrees.js.map +0 -1
  641. package/dist/web/server/services/branches.d.ts +0 -17
  642. package/dist/web/server/services/branches.d.ts.map +0 -1
  643. package/dist/web/server/services/branches.js +0 -275
  644. package/dist/web/server/services/branches.js.map +0 -1
  645. package/dist/web/server/services/worktrees.d.ts +0 -24
  646. package/dist/web/server/services/worktrees.d.ts.map +0 -1
  647. package/dist/web/server/services/worktrees.js +0 -66
  648. package/dist/web/server/services/worktrees.js.map +0 -1
  649. package/dist/web/server/tray.d.ts +0 -25
  650. package/dist/web/server/tray.d.ts.map +0 -1
  651. package/dist/web/server/tray.js +0 -116
  652. package/dist/web/server/tray.js.map +0 -1
  653. package/dist/web/server/types.d.ts +0 -4
  654. package/dist/web/server/types.d.ts.map +0 -1
  655. package/dist/web/server/types.js +0 -2
  656. package/dist/web/server/types.js.map +0 -1
  657. package/dist/web/server/websocket/handler.d.ts +0 -57
  658. package/dist/web/server/websocket/handler.d.ts.map +0 -1
  659. package/dist/web/server/websocket/handler.js +0 -220
  660. package/dist/web/server/websocket/handler.js.map +0 -1
  661. package/dist/worktree.d.ts +0 -117
  662. package/dist/worktree.d.ts.map +0 -1
  663. package/dist/worktree.js +0 -788
  664. package/dist/worktree.js.map +0 -1
  665. package/src/claude-history.ts +0 -717
  666. package/src/claude.ts +0 -557
  667. package/src/cli/ui/App.solid.tsx +0 -2145
  668. package/src/cli/ui/__tests__/solid/AppSolid.cleanup.test.tsx +0 -1175
  669. package/src/cli/ui/__tests__/solid/BranchListScreen.test.tsx +0 -343
  670. package/src/cli/ui/__tests__/solid/ConfirmScreen.test.tsx +0 -77
  671. package/src/cli/ui/__tests__/solid/LogScreen.test.tsx +0 -351
  672. package/src/cli/ui/__tests__/solid/components/QuickStartStep.test.tsx +0 -308
  673. package/src/cli/ui/__tests__/solid/components/WizardController.test.tsx +0 -71
  674. package/src/cli/ui/__tests__/solid/components/WizardPopup.test.tsx +0 -231
  675. package/src/cli/ui/__tests__/solid/components/WizardSteps.test.tsx +0 -331
  676. package/src/cli/ui/__tests__/utils/branchFormatter.test.ts +0 -702
  677. package/src/cli/ui/__tests__/utils/clipboard.test.ts +0 -65
  678. package/src/cli/ui/__tests__/utils/statisticsCalculator.test.ts +0 -243
  679. package/src/cli/ui/components/solid/Footer.tsx +0 -36
  680. package/src/cli/ui/components/solid/Header.tsx +0 -67
  681. package/src/cli/ui/components/solid/HelpOverlay.tsx +0 -194
  682. package/src/cli/ui/components/solid/QuickStartStep.tsx +0 -209
  683. package/src/cli/ui/components/solid/ScrollableList.tsx +0 -23
  684. package/src/cli/ui/components/solid/SearchInput.tsx +0 -42
  685. package/src/cli/ui/components/solid/SelectInput.tsx +0 -88
  686. package/src/cli/ui/components/solid/Stats.tsx +0 -92
  687. package/src/cli/ui/components/solid/TextInput.tsx +0 -49
  688. package/src/cli/ui/components/solid/WizardController.tsx +0 -457
  689. package/src/cli/ui/components/solid/WizardPopup.tsx +0 -135
  690. package/src/cli/ui/components/solid/WizardSteps.tsx +0 -781
  691. package/src/cli/ui/core/index.ts +0 -17
  692. package/src/cli/ui/core/keybindings.ts +0 -367
  693. package/src/cli/ui/core/theme.ts +0 -266
  694. package/src/cli/ui/core/types.ts +0 -235
  695. package/src/cli/ui/hooks/solid/useAsyncOperation.ts +0 -78
  696. package/src/cli/ui/hooks/solid/useFilter.ts +0 -86
  697. package/src/cli/ui/hooks/solid/useGitOperations.ts +0 -81
  698. package/src/cli/ui/hooks/solid/useKeyHandler.ts +0 -103
  699. package/src/cli/ui/hooks/solid/useScrollableList.ts +0 -149
  700. package/src/cli/ui/hooks/solid/useSelection.ts +0 -77
  701. package/src/cli/ui/hooks/solid/useTerminalSize.ts +0 -22
  702. package/src/cli/ui/index.solid.ts +0 -28
  703. package/src/cli/ui/screens/solid/BranchListScreen.tsx +0 -1153
  704. package/src/cli/ui/screens/solid/ConfirmScreen.tsx +0 -86
  705. package/src/cli/ui/screens/solid/EnvironmentScreen.tsx +0 -161
  706. package/src/cli/ui/screens/solid/ErrorScreen.tsx +0 -42
  707. package/src/cli/ui/screens/solid/InputScreen.tsx +0 -55
  708. package/src/cli/ui/screens/solid/LoadingIndicator.tsx +0 -77
  709. package/src/cli/ui/screens/solid/LogDetailScreen.tsx +0 -75
  710. package/src/cli/ui/screens/solid/LogScreen.tsx +0 -504
  711. package/src/cli/ui/screens/solid/ProfileEnvScreen.tsx +0 -196
  712. package/src/cli/ui/screens/solid/ProfileScreen.tsx +0 -98
  713. package/src/cli/ui/screens/solid/SelectorScreen.tsx +0 -181
  714. package/src/cli/ui/screens/solid/SettingsScreen.tsx +0 -52
  715. package/src/cli/ui/screens/solid/WorktreeCreateScreen.tsx +0 -136
  716. package/src/cli/ui/screens/solid/WorktreeDeleteScreen.tsx +0 -40
  717. package/src/cli/ui/stores/appStore.ts +0 -208
  718. package/src/cli/ui/stores/branchStore.ts +0 -357
  719. package/src/cli/ui/stores/index.ts +0 -31
  720. package/src/cli/ui/stores/uiStore.ts +0 -226
  721. package/src/cli/ui/types.ts +0 -371
  722. package/src/cli/ui/utils/__tests__/branchFormatter.test.ts +0 -227
  723. package/src/cli/ui/utils/__tests__/installedVersionCache.test.ts +0 -46
  724. package/src/cli/ui/utils/baseBranch.ts +0 -34
  725. package/src/cli/ui/utils/branchFormatter.ts +0 -222
  726. package/src/cli/ui/utils/clipboard.ts +0 -31
  727. package/src/cli/ui/utils/continueSession.ts +0 -231
  728. package/src/cli/ui/utils/installedVersionCache.ts +0 -84
  729. package/src/cli/ui/utils/modelOptions.test.ts +0 -98
  730. package/src/cli/ui/utils/modelOptions.ts +0 -169
  731. package/src/cli/ui/utils/statisticsCalculator.ts +0 -44
  732. package/src/cli/ui/utils/versionCache.ts +0 -93
  733. package/src/cli/ui/utils/versionFetcher.ts +0 -120
  734. package/src/codex.ts +0 -445
  735. package/src/config/__tests__/saveSession.test.ts +0 -143
  736. package/src/config/builtin-coding-agents.ts +0 -87
  737. package/src/config/constants.ts +0 -102
  738. package/src/config/env-history.ts +0 -45
  739. package/src/config/index.ts +0 -311
  740. package/src/config/profiles.ts +0 -359
  741. package/src/config/shared-env.ts +0 -139
  742. package/src/config/tools.ts +0 -319
  743. package/src/gemini.ts +0 -405
  744. package/src/git.ts +0 -1263
  745. package/src/github.ts +0 -158
  746. package/src/index.test.ts +0 -93
  747. package/src/index.ts +0 -1024
  748. package/src/launcher.ts +0 -235
  749. package/src/logging/agentOutput.ts +0 -216
  750. package/src/logging/formatter.ts +0 -125
  751. package/src/logging/logger.ts +0 -106
  752. package/src/logging/reader.ts +0 -240
  753. package/src/logging/rotation.ts +0 -25
  754. package/src/opentui/index.solid.ts +0 -1
  755. package/src/repositories/git.repository.ts +0 -129
  756. package/src/repositories/github.repository.ts +0 -83
  757. package/src/repositories/worktree.repository.ts +0 -77
  758. package/src/services/BatchMergeService.ts +0 -251
  759. package/src/services/WorktreeOrchestrator.ts +0 -115
  760. package/src/services/__tests__/BatchMergeService.test.ts +0 -534
  761. package/src/services/__tests__/WorktreeOrchestrator.test.ts +0 -259
  762. package/src/services/codingAgentCommandResolver.ts +0 -118
  763. package/src/services/codingAgentResolver.ts +0 -375
  764. package/src/services/dependency-installer.ts +0 -192
  765. package/src/services/git.service.ts +0 -115
  766. package/src/services/github.service.ts +0 -61
  767. package/src/services/worktree.service.ts +0 -66
  768. package/src/shared/codingAgentConstants.ts +0 -103
  769. package/src/trayicon.d.ts +0 -30
  770. package/src/types/api.ts +0 -256
  771. package/src/types/coding-agent.ts +0 -85
  772. package/src/types/profiles.ts +0 -64
  773. package/src/types/tools.ts +0 -269
  774. package/src/utils/__tests__/npmRegistry.test.ts +0 -250
  775. package/src/utils/__tests__/prompt.test.ts +0 -125
  776. package/src/utils/bun-runtime.ts +0 -29
  777. package/src/utils/coding-agent-colors.ts +0 -165
  778. package/src/utils/command.ts +0 -234
  779. package/src/utils/error-utils.ts +0 -133
  780. package/src/utils/npmRegistry.ts +0 -249
  781. package/src/utils/prompt.ts +0 -149
  782. package/src/utils/session/common.ts +0 -474
  783. package/src/utils/session/index.ts +0 -50
  784. package/src/utils/session/parsers/claude.ts +0 -283
  785. package/src/utils/session/parsers/codex.ts +0 -166
  786. package/src/utils/session/parsers/gemini.ts +0 -135
  787. package/src/utils/session/parsers/index.ts +0 -31
  788. package/src/utils/session/parsers/opencode.ts +0 -151
  789. package/src/utils/session/types.ts +0 -51
  790. package/src/utils/session.ts +0 -16
  791. package/src/utils/spinner.ts +0 -54
  792. package/src/utils/terminal.ts +0 -327
  793. package/src/utils/webui.ts +0 -43
  794. package/src/utils.test.ts +0 -43
  795. package/src/utils.ts +0 -93
  796. package/src/web/client/components.json +0 -21
  797. package/src/web/client/index.html +0 -12
  798. package/src/web/client/src/components/BranchGraph.tsx +0 -95
  799. package/src/web/client/src/components/CodingAgentLaunchModal.tsx +0 -570
  800. package/src/web/client/src/components/CustomCodingAgentForm.tsx +0 -386
  801. package/src/web/client/src/components/CustomCodingAgentList.tsx +0 -119
  802. package/src/web/client/src/components/EnvEditor.tsx +0 -188
  803. package/src/web/client/src/components/EnvironmentEditor.tsx +0 -97
  804. package/src/web/client/src/components/Terminal.tsx +0 -145
  805. package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +0 -193
  806. package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +0 -187
  807. package/src/web/client/src/components/branch-detail/TerminalPanel.tsx +0 -92
  808. package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +0 -332
  809. package/src/web/client/src/components/branch-detail/index.ts +0 -4
  810. package/src/web/client/src/components/common/BranchCard.tsx +0 -117
  811. package/src/web/client/src/components/common/MetricCard.tsx +0 -22
  812. package/src/web/client/src/components/common/PageHeader.tsx +0 -44
  813. package/src/web/client/src/components/common/SearchInput.tsx +0 -40
  814. package/src/web/client/src/components/common/StatusBadge.tsx +0 -37
  815. package/src/web/client/src/components/common/index.ts +0 -5
  816. package/src/web/client/src/components/graph/BranchDetailPanel.tsx +0 -152
  817. package/src/web/client/src/components/graph/BranchNode.tsx +0 -200
  818. package/src/web/client/src/components/graph/ClusterNode.tsx +0 -211
  819. package/src/web/client/src/components/graph/SynapticCanvas.tsx +0 -171
  820. package/src/web/client/src/components/graph/SynapticEdge.tsx +0 -311
  821. package/src/web/client/src/components/graph/graphUtils.ts +0 -265
  822. package/src/web/client/src/components/graph/index.ts +0 -10
  823. package/src/web/client/src/components/ui/alert.tsx +0 -63
  824. package/src/web/client/src/components/ui/badge.tsx +0 -44
  825. package/src/web/client/src/components/ui/button.tsx +0 -57
  826. package/src/web/client/src/components/ui/card.tsx +0 -82
  827. package/src/web/client/src/components/ui/index.ts +0 -32
  828. package/src/web/client/src/components/ui/input.tsx +0 -21
  829. package/src/web/client/src/components/ui/select.tsx +0 -156
  830. package/src/web/client/src/components/ui/table.tsx +0 -119
  831. package/src/web/client/src/hooks/useBranches.ts +0 -41
  832. package/src/web/client/src/hooks/useConfig.ts +0 -31
  833. package/src/web/client/src/hooks/useSessions.ts +0 -68
  834. package/src/web/client/src/hooks/useWorktrees.ts +0 -47
  835. package/src/web/client/src/index.css +0 -349
  836. package/src/web/client/src/lib/api.ts +0 -184
  837. package/src/web/client/src/lib/coding-agent-colors.ts +0 -149
  838. package/src/web/client/src/lib/utils.ts +0 -10
  839. package/src/web/client/src/lib/websocket.ts +0 -222
  840. package/src/web/client/src/main.tsx +0 -29
  841. package/src/web/client/src/pages/BranchDetailPage.tsx +0 -555
  842. package/src/web/client/src/pages/BranchListPage.tsx +0 -242
  843. package/src/web/client/src/pages/ConfigManagementPage.tsx +0 -248
  844. package/src/web/client/src/pages/ConfigPage.tsx +0 -368
  845. package/src/web/client/src/router.tsx +0 -27
  846. package/src/web/client/vite.config.ts +0 -28
  847. package/src/web/server/env/importer.ts +0 -62
  848. package/src/web/server/index.ts +0 -143
  849. package/src/web/server/pty/manager.ts +0 -443
  850. package/src/web/server/routes/branches.ts +0 -126
  851. package/src/web/server/routes/config.ts +0 -226
  852. package/src/web/server/routes/index.ts +0 -37
  853. package/src/web/server/routes/sessions.ts +0 -252
  854. package/src/web/server/routes/worktrees.ts +0 -108
  855. package/src/web/server/services/branches.ts +0 -387
  856. package/src/web/server/services/worktrees.ts +0 -93
  857. package/src/web/server/tray.ts +0 -136
  858. package/src/web/server/types.ts +0 -14
  859. package/src/web/server/websocket/handler.ts +0 -299
  860. package/src/worktree.ts +0 -1109
@@ -1,1175 +0,0 @@
1
- /** @jsxImportSource @opentui/solid */
2
- import { describe, expect, it, mock, afterEach } from "bun:test";
3
- import { testRender } from "@opentui/solid";
4
- import type { BranchItem, Statistics } from "../../types.js";
5
-
6
- if (!mock.module) {
7
- mock.module = mock.module.bind(vi);
8
- }
9
-
10
- const makeStats = (overrides: Partial<Statistics> = {}): Statistics => ({
11
- localCount: 0,
12
- remoteCount: 0,
13
- worktreeCount: 0,
14
- changesCount: 0,
15
- lastUpdated: new Date("2025-01-01T00:00:00Z"),
16
- ...overrides,
17
- });
18
-
19
- const createBranch = (overrides: Partial<BranchItem> = {}): BranchItem => {
20
- const base: BranchItem = {
21
- name: "feature/cleanup-target",
22
- type: "local",
23
- branchType: "feature",
24
- isCurrent: false,
25
- icons: [],
26
- hasChanges: false,
27
- label: "feature/cleanup-target",
28
- value: "feature/cleanup-target",
29
- worktreeStatus: "active",
30
- worktree: {
31
- path: "/tmp/worktree",
32
- locked: false,
33
- prunable: false,
34
- isAccessible: true,
35
- },
36
- mergedPR: { number: 1, mergedAt: "2025-01-01T00:00:00Z" },
37
- hasUnpushedCommits: false,
38
- syncStatus: "no-upstream",
39
- };
40
- return {
41
- ...base,
42
- ...overrides,
43
- worktreeStatus: overrides.worktreeStatus ?? base.worktreeStatus,
44
- };
45
- };
46
-
47
- afterEach(() => {
48
- mock.restore();
49
- mock.restore();
50
- });
51
-
52
- describe("AppSolid cleanup command", () => {
53
- it("runs cleanup for selected branches when pressing c", async () => {
54
- const deleteBranchMock = mock(async () => {});
55
- const removeWorktreeMock = mock(async () => {});
56
- const getCleanupStatusMock = mock(async () => [
57
- {
58
- worktreePath: "/tmp/worktree",
59
- branch: "feature/cleanup-target",
60
- hasUncommittedChanges: false,
61
- hasUnpushedCommits: false,
62
- cleanupType: "worktree-and-branch",
63
- hasRemoteBranch: true,
64
- hasUniqueCommits: false,
65
- hasUpstream: true,
66
- upstream: "origin/feature/cleanup-target",
67
- isAccessible: true,
68
- reasons: ["no-diff-with-base"],
69
- },
70
- ]);
71
-
72
- mock.module?.("../../../../worktree.js", () => ({
73
- listAdditionalWorktrees: mock(async () => []),
74
- repairWorktrees: mock(async () => ({
75
- repairedCount: 0,
76
- failedCount: 0,
77
- failures: [],
78
- })),
79
- removeWorktree: removeWorktreeMock,
80
- getCleanupStatus: getCleanupStatusMock,
81
- isProtectedBranchName: mock(() => false),
82
- }));
83
-
84
- mock.module?.("../../../../git.js", () => ({
85
- getRepositoryRoot: mock(async () => "/repo"),
86
- getAllBranches: mock(async () => []),
87
- getLocalBranches: mock(async () => []),
88
- getCurrentBranch: mock(async () => "main"),
89
- deleteBranch: deleteBranchMock,
90
- }));
91
-
92
- mock.module?.("../../../../config/index.js", () => ({
93
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
94
- getLastToolUsageMap: mock(async () => new Map()),
95
- loadSession: mock(async () => null),
96
- }));
97
-
98
- mock.module?.("../../../../config/tools.js", () => ({
99
- getAllCodingAgents: mock(async () => [
100
- { id: "codex-cli", displayName: "Codex CLI" },
101
- ]),
102
- }));
103
-
104
- mock.module?.("../../../../config/profiles.js", () => ({
105
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
106
- createProfile: mock(async () => {}),
107
- updateProfile: mock(async () => {}),
108
- deleteProfile: mock(async () => {}),
109
- setActiveProfile: mock(async () => {}),
110
- }));
111
-
112
- const { AppSolid } = await import("../../App.solid.js");
113
-
114
- const branch = createBranch();
115
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
116
-
117
- const testSetup = await testRender(
118
- () => (
119
- <AppSolid
120
- branches={[branch]}
121
- stats={stats}
122
- version={null}
123
- toolStatuses={[]}
124
- />
125
- ),
126
- { width: 80, height: 24 },
127
- );
128
- await testSetup.renderOnce();
129
-
130
- try {
131
- await testSetup.mockInput.typeText(" ");
132
- await testSetup.renderOnce();
133
-
134
- await testSetup.mockInput.typeText("c");
135
- await testSetup.renderOnce();
136
- await new Promise((resolve) => setTimeout(resolve, 0));
137
-
138
- expect(removeWorktreeMock).toHaveBeenCalledWith("/tmp/worktree", false);
139
- expect(deleteBranchMock).toHaveBeenCalledWith(
140
- "feature/cleanup-target",
141
- true,
142
- );
143
- } finally {
144
- testSetup.renderer.destroy();
145
- }
146
- });
147
-
148
- it("maps cleanup safety indicators from cleanup candidates", async () => {
149
- const getCleanupStatusMock = mock(async () => [
150
- {
151
- worktreePath: "/tmp/safe",
152
- branch: "feature/safe",
153
- hasUncommittedChanges: false,
154
- hasUnpushedCommits: false,
155
- cleanupType: "worktree-and-branch",
156
- hasRemoteBranch: true,
157
- hasUniqueCommits: false,
158
- hasUpstream: true,
159
- upstream: "origin/feature/safe",
160
- isAccessible: true,
161
- reasons: ["no-diff-with-base"],
162
- },
163
- {
164
- worktreePath: null,
165
- branch: "feature/unsafe",
166
- hasUncommittedChanges: false,
167
- hasUnpushedCommits: false,
168
- cleanupType: "branch-only",
169
- hasRemoteBranch: false,
170
- hasUniqueCommits: false,
171
- hasUpstream: false,
172
- upstream: null,
173
- reasons: [],
174
- },
175
- ]);
176
-
177
- mock.module?.("../../../../worktree.js", () => ({
178
- listAdditionalWorktrees: mock(async () => []),
179
- repairWorktrees: mock(async () => ({
180
- repairedCount: 0,
181
- failedCount: 0,
182
- failures: [],
183
- })),
184
- removeWorktree: mock(async () => {}),
185
- getCleanupStatus: getCleanupStatusMock,
186
- isProtectedBranchName: mock(() => false),
187
- }));
188
-
189
- mock.module?.("../../../../git.js", () => ({
190
- getRepositoryRoot: mock(async () => "/repo"),
191
- getAllBranches: mock(async () => []),
192
- getLocalBranches: mock(async () => []),
193
- getCurrentBranch: mock(async () => "main"),
194
- deleteBranch: mock(async () => {}),
195
- }));
196
-
197
- mock.module?.("../../../../config/index.js", () => ({
198
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
199
- getLastToolUsageMap: mock(async () => new Map()),
200
- loadSession: mock(async () => null),
201
- }));
202
-
203
- mock.module?.("../../../../config/tools.js", () => ({
204
- getAllCodingAgents: mock(async () => [
205
- { id: "codex-cli", displayName: "Codex CLI" },
206
- ]),
207
- }));
208
-
209
- mock.module?.("../../../../config/profiles.js", () => ({
210
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
211
- createProfile: mock(async () => {}),
212
- updateProfile: mock(async () => {}),
213
- deleteProfile: mock(async () => {}),
214
- setActiveProfile: mock(async () => {}),
215
- }));
216
-
217
- const { AppSolid } = await import("../../App.solid.js");
218
-
219
- const safeBranch = createBranch({
220
- name: "feature/safe",
221
- label: "feature/safe",
222
- value: "feature/safe",
223
- });
224
- const unsafeBranch = createBranch({
225
- name: "feature/unsafe",
226
- label: "feature/unsafe",
227
- value: "feature/unsafe",
228
- worktree: undefined,
229
- worktreeStatus: undefined,
230
- });
231
-
232
- const testSetup = await testRender(
233
- () => (
234
- <AppSolid
235
- branches={[safeBranch, unsafeBranch]}
236
- stats={makeStats({ localCount: 2, worktreeCount: 1 })}
237
- version={null}
238
- toolStatuses={[]}
239
- />
240
- ),
241
- { width: 80, height: 24 },
242
- );
243
- await testSetup.renderOnce();
244
- await new Promise((resolve) => setTimeout(resolve, 0));
245
- await testSetup.renderOnce();
246
-
247
- try {
248
- const frame = testSetup.captureCharFrame();
249
- expect(frame).toMatch(/\[ \] w o feature\/safe/);
250
- expect(frame).toContain("[ ] w ! feature/unsafe");
251
- } finally {
252
- testSetup.renderer.destroy();
253
- }
254
- });
255
-
256
- it("updates safety icons as each branch check completes", async () => {
257
- let releaseSecond: (() => void) | null = null;
258
- const progressGate = new Promise<void>((resolve) => {
259
- releaseSecond = resolve;
260
- });
261
- const getCleanupStatusMock = mock(
262
- async ({
263
- onProgress,
264
- }: { onProgress?: (status: { branch: string }) => void } = {}) => {
265
- const firstStatus = {
266
- worktreePath: "/tmp/first",
267
- branch: "feature/first",
268
- hasUncommittedChanges: false,
269
- hasUnpushedCommits: false,
270
- cleanupType: "worktree-and-branch",
271
- hasRemoteBranch: true,
272
- hasUniqueCommits: false,
273
- hasUpstream: true,
274
- upstream: "origin/feature/first",
275
- isAccessible: true,
276
- reasons: ["no-diff-with-base"],
277
- };
278
- const secondStatus = {
279
- worktreePath: "/tmp/second",
280
- branch: "feature/second",
281
- hasUncommittedChanges: false,
282
- hasUnpushedCommits: false,
283
- cleanupType: "worktree-and-branch",
284
- hasRemoteBranch: true,
285
- hasUniqueCommits: true,
286
- hasUpstream: true,
287
- upstream: "origin/feature/second",
288
- isAccessible: true,
289
- reasons: ["remote-synced"],
290
- };
291
-
292
- onProgress?.(firstStatus);
293
- await progressGate;
294
- onProgress?.(secondStatus);
295
- return [firstStatus, secondStatus];
296
- },
297
- );
298
-
299
- mock.module?.("../../../../worktree.js", () => ({
300
- listAdditionalWorktrees: mock(async () => []),
301
- repairWorktrees: mock(async () => ({
302
- repairedCount: 0,
303
- failedCount: 0,
304
- failures: [],
305
- })),
306
- removeWorktree: mock(async () => {}),
307
- getCleanupStatus: getCleanupStatusMock,
308
- isProtectedBranchName: mock(() => false),
309
- }));
310
-
311
- mock.module?.("../../../../git.js", () => ({
312
- getRepositoryRoot: mock(async () => "/repo"),
313
- getAllBranches: mock(async () => []),
314
- getLocalBranches: mock(async () => []),
315
- getCurrentBranch: mock(async () => "main"),
316
- deleteBranch: mock(async () => {}),
317
- }));
318
-
319
- mock.module?.("../../../../config/index.js", () => ({
320
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
321
- getLastToolUsageMap: mock(async () => new Map()),
322
- loadSession: mock(async () => null),
323
- }));
324
-
325
- mock.module?.("../../../../config/tools.js", () => ({
326
- getAllCodingAgents: mock(async () => [
327
- { id: "codex-cli", displayName: "Codex CLI" },
328
- ]),
329
- }));
330
-
331
- mock.module?.("../../../../config/profiles.js", () => ({
332
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
333
- createProfile: mock(async () => {}),
334
- updateProfile: mock(async () => {}),
335
- deleteProfile: mock(async () => {}),
336
- setActiveProfile: mock(async () => {}),
337
- }));
338
-
339
- const { AppSolid } = await import("../../App.solid.js");
340
-
341
- const firstBranch = createBranch({
342
- name: "feature/first",
343
- label: "feature/first",
344
- value: "feature/first",
345
- worktree: { path: "/tmp/first", locked: false, prunable: false },
346
- });
347
- const secondBranch = createBranch({
348
- name: "feature/second",
349
- label: "feature/second",
350
- value: "feature/second",
351
- worktree: { path: "/tmp/second", locked: false, prunable: false },
352
- });
353
-
354
- const testSetup = await testRender(
355
- () => (
356
- <AppSolid
357
- branches={[firstBranch, secondBranch]}
358
- stats={makeStats({ localCount: 2, worktreeCount: 2 })}
359
- version={null}
360
- toolStatuses={[]}
361
- />
362
- ),
363
- { width: 80, height: 24 },
364
- );
365
- await testSetup.renderOnce();
366
- await new Promise((resolve) => setTimeout(resolve, 0));
367
- await testSetup.renderOnce();
368
-
369
- try {
370
- let frame = testSetup.captureCharFrame();
371
- expect(frame).toMatch(/\[ \] w o feature\/first/);
372
- expect(frame).toMatch(/\[ \] w [-\\|/] feature\/second/);
373
-
374
- releaseSecond?.();
375
- await new Promise((resolve) => setTimeout(resolve, 0));
376
- await testSetup.renderOnce();
377
-
378
- frame = testSetup.captureCharFrame();
379
- expect(frame).toMatch(/\[ \] w \* feature\/second/);
380
- } finally {
381
- testSetup.renderer.destroy();
382
- }
383
- });
384
- });
385
-
386
- describe("AppSolid unsafe selection confirm", () => {
387
- it("shows confirm and cancels selection on Cancel", async () => {
388
- const getCleanupStatusMock = mock(async () => [
389
- {
390
- worktreePath: "/tmp/worktree",
391
- branch: "feature/unsafe",
392
- hasUncommittedChanges: false,
393
- hasUnpushedCommits: true,
394
- cleanupType: "worktree-and-branch",
395
- hasRemoteBranch: true,
396
- hasUniqueCommits: false,
397
- hasUpstream: true,
398
- upstream: "origin/feature/unsafe",
399
- isAccessible: true,
400
- reasons: ["no-diff-with-base"],
401
- },
402
- ]);
403
-
404
- mock.module?.("../../../../worktree.js", () => ({
405
- listAdditionalWorktrees: mock(async () => []),
406
- repairWorktrees: mock(async () => ({
407
- repairedCount: 0,
408
- failedCount: 0,
409
- failures: [],
410
- })),
411
- removeWorktree: mock(async () => {}),
412
- getCleanupStatus: getCleanupStatusMock,
413
- isProtectedBranchName: mock(() => false),
414
- }));
415
-
416
- mock.module?.("../../../../git.js", () => ({
417
- getRepositoryRoot: mock(async () => "/repo"),
418
- getAllBranches: mock(async () => []),
419
- getLocalBranches: mock(async () => []),
420
- getCurrentBranch: mock(async () => "main"),
421
- deleteBranch: mock(async () => {}),
422
- }));
423
-
424
- mock.module?.("../../../../config/index.js", () => ({
425
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
426
- getLastToolUsageMap: mock(async () => new Map()),
427
- loadSession: mock(async () => null),
428
- }));
429
-
430
- mock.module?.("../../../../config/tools.js", () => ({
431
- getAllCodingAgents: mock(async () => [
432
- { id: "codex-cli", displayName: "Codex CLI" },
433
- ]),
434
- }));
435
-
436
- mock.module?.("../../../../config/profiles.js", () => ({
437
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
438
- createProfile: mock(async () => {}),
439
- updateProfile: mock(async () => {}),
440
- deleteProfile: mock(async () => {}),
441
- setActiveProfile: mock(async () => {}),
442
- }));
443
-
444
- const { AppSolid } = await import("../../App.solid.js");
445
-
446
- const branch = createBranch({
447
- name: "feature/unsafe",
448
- label: "feature/unsafe",
449
- value: "feature/unsafe",
450
- });
451
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
452
-
453
- const testSetup = await testRender(
454
- () => (
455
- <AppSolid
456
- branches={[branch]}
457
- stats={stats}
458
- version={null}
459
- toolStatuses={[]}
460
- />
461
- ),
462
- { width: 80, height: 24 },
463
- );
464
- await testSetup.renderOnce();
465
- await new Promise((resolve) => setTimeout(resolve, 0));
466
- await testSetup.renderOnce();
467
-
468
- try {
469
- await testSetup.mockInput.typeText(" ");
470
- await testSetup.renderOnce();
471
-
472
- let frame = testSetup.captureCharFrame();
473
- expect(frame).toContain("Unsafe branch selected. Select anyway?");
474
- expect(frame).toContain("OK");
475
- expect(frame).toContain("Cancel");
476
-
477
- await testSetup.mockInput.typeText("n");
478
- await testSetup.renderOnce();
479
-
480
- frame = testSetup.captureCharFrame();
481
- expect(frame).toContain("[ ] w");
482
- expect(frame).toContain("feature/unsafe");
483
- expect(frame).not.toContain("Unsafe branch selected. Select anyway?");
484
- } finally {
485
- testSetup.renderer.destroy();
486
- }
487
- });
488
-
489
- it("shows confirm when safety check is pending", async () => {
490
- let resolveStatus: ((value: unknown[]) => void) | null = null;
491
- const pendingPromise = new Promise<unknown[]>((resolve) => {
492
- resolveStatus = resolve;
493
- });
494
- const getCleanupStatusMock = mock(async () => pendingPromise);
495
-
496
- mock.module?.("../../../../worktree.js", () => ({
497
- listAdditionalWorktrees: mock(async () => []),
498
- repairWorktrees: mock(async () => ({
499
- repairedCount: 0,
500
- failedCount: 0,
501
- failures: [],
502
- })),
503
- removeWorktree: mock(async () => {}),
504
- getCleanupStatus: getCleanupStatusMock,
505
- isProtectedBranchName: mock(() => false),
506
- }));
507
-
508
- mock.module?.("../../../../git.js", () => ({
509
- getRepositoryRoot: mock(async () => "/repo"),
510
- getAllBranches: mock(async () => []),
511
- getLocalBranches: mock(async () => []),
512
- getCurrentBranch: mock(async () => "main"),
513
- deleteBranch: mock(async () => {}),
514
- }));
515
-
516
- mock.module?.("../../../../config/index.js", () => ({
517
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
518
- getLastToolUsageMap: mock(async () => new Map()),
519
- loadSession: mock(async () => null),
520
- }));
521
-
522
- mock.module?.("../../../../config/tools.js", () => ({
523
- getAllCodingAgents: mock(async () => [
524
- { id: "codex-cli", displayName: "Codex CLI" },
525
- ]),
526
- }));
527
-
528
- mock.module?.("../../../../config/profiles.js", () => ({
529
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
530
- createProfile: mock(async () => {}),
531
- updateProfile: mock(async () => {}),
532
- deleteProfile: mock(async () => {}),
533
- setActiveProfile: mock(async () => {}),
534
- }));
535
-
536
- const { AppSolid } = await import("../../App.solid.js");
537
-
538
- const branch = createBranch({
539
- name: "feature/pending",
540
- label: "feature/pending",
541
- value: "feature/pending",
542
- });
543
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
544
-
545
- const testSetup = await testRender(
546
- () => (
547
- <AppSolid
548
- branches={[branch]}
549
- stats={stats}
550
- version={null}
551
- toolStatuses={[]}
552
- />
553
- ),
554
- { width: 80, height: 24 },
555
- );
556
- await testSetup.renderOnce();
557
- await new Promise((resolve) => setTimeout(resolve, 0));
558
- await testSetup.renderOnce();
559
-
560
- try {
561
- await testSetup.mockInput.typeText(" ");
562
- await testSetup.renderOnce();
563
-
564
- let frame = testSetup.captureCharFrame();
565
- expect(frame).toContain("Safety check in progress. Select anyway?");
566
-
567
- await testSetup.mockInput.typeText("n");
568
- await testSetup.renderOnce();
569
-
570
- frame = testSetup.captureCharFrame();
571
- expect(frame).toContain("[ ] w");
572
- expect(frame).toContain("feature/pending");
573
- expect(frame).not.toContain("Safety check in progress. Select anyway?");
574
- } finally {
575
- resolveStatus?.([]);
576
- testSetup.renderer.destroy();
577
- }
578
- });
579
-
580
- it("does not propagate Enter from confirm to branch selection", async () => {
581
- const getCleanupStatusMock = mock(async () => [
582
- {
583
- worktreePath: "/tmp/worktree",
584
- branch: "feature/unsafe-enter",
585
- hasUncommittedChanges: false,
586
- hasUnpushedCommits: true,
587
- cleanupType: "worktree-and-branch",
588
- hasRemoteBranch: true,
589
- hasUniqueCommits: false,
590
- hasUpstream: true,
591
- upstream: "origin/feature/unsafe-enter",
592
- isAccessible: true,
593
- reasons: ["no-diff-with-base"],
594
- },
595
- ]);
596
-
597
- mock.module?.("../../../../worktree.js", () => ({
598
- listAdditionalWorktrees: mock(async () => []),
599
- repairWorktrees: mock(async () => ({
600
- repairedCount: 0,
601
- failedCount: 0,
602
- failures: [],
603
- })),
604
- removeWorktree: mock(async () => {}),
605
- getCleanupStatus: getCleanupStatusMock,
606
- isProtectedBranchName: mock(() => false),
607
- }));
608
-
609
- mock.module?.("../../../../git.js", () => ({
610
- getRepositoryRoot: mock(async () => "/repo"),
611
- getAllBranches: mock(async () => []),
612
- getLocalBranches: mock(async () => []),
613
- getCurrentBranch: mock(async () => "main"),
614
- deleteBranch: mock(async () => {}),
615
- }));
616
-
617
- mock.module?.("../../../../config/index.js", () => ({
618
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
619
- getLastToolUsageMap: mock(async () => new Map()),
620
- loadSession: mock(async () => null),
621
- }));
622
-
623
- mock.module?.("../../../../config/tools.js", () => ({
624
- getAllCodingAgents: mock(async () => [
625
- { id: "codex-cli", displayName: "Codex CLI" },
626
- ]),
627
- }));
628
-
629
- mock.module?.("../../../../config/profiles.js", () => ({
630
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
631
- createProfile: mock(async () => {}),
632
- updateProfile: mock(async () => {}),
633
- deleteProfile: mock(async () => {}),
634
- setActiveProfile: mock(async () => {}),
635
- }));
636
-
637
- const { AppSolid } = await import("../../App.solid.js");
638
-
639
- const branch = createBranch({
640
- name: "feature/unsafe-enter",
641
- label: "feature/unsafe-enter",
642
- value: "feature/unsafe-enter",
643
- });
644
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
645
-
646
- const testSetup = await testRender(
647
- () => (
648
- <AppSolid
649
- branches={[branch]}
650
- stats={stats}
651
- version={null}
652
- toolStatuses={[]}
653
- />
654
- ),
655
- { width: 80, height: 24 },
656
- );
657
- await testSetup.renderOnce();
658
- await new Promise((resolve) => setTimeout(resolve, 0));
659
- await testSetup.renderOnce();
660
-
661
- try {
662
- await testSetup.mockInput.typeText(" ");
663
- await testSetup.renderOnce();
664
-
665
- testSetup.mockInput.pressEnter();
666
- await testSetup.renderOnce();
667
-
668
- const frame = testSetup.captureCharFrame();
669
- expect(frame).not.toContain("Unsafe branch selected. Select anyway?");
670
- expect(frame).toContain("[ ] w");
671
- expect(frame).not.toContain("Open existing worktree");
672
- } finally {
673
- testSetup.renderer.destroy();
674
- }
675
- });
676
-
677
- it("selects unsafe branch on OK", async () => {
678
- const getCleanupStatusMock = mock(async () => [
679
- {
680
- worktreePath: "/tmp/worktree",
681
- branch: "feature/unsafe-ok",
682
- hasUncommittedChanges: false,
683
- hasUnpushedCommits: true,
684
- cleanupType: "worktree-and-branch",
685
- hasRemoteBranch: true,
686
- hasUniqueCommits: false,
687
- hasUpstream: true,
688
- upstream: "origin/feature/unsafe-ok",
689
- isAccessible: true,
690
- reasons: ["no-diff-with-base"],
691
- },
692
- ]);
693
-
694
- mock.module?.("../../../../worktree.js", () => ({
695
- listAdditionalWorktrees: mock(async () => []),
696
- repairWorktrees: mock(async () => ({
697
- repairedCount: 0,
698
- failedCount: 0,
699
- failures: [],
700
- })),
701
- removeWorktree: mock(async () => {}),
702
- getCleanupStatus: getCleanupStatusMock,
703
- isProtectedBranchName: mock(() => false),
704
- }));
705
-
706
- mock.module?.("../../../../git.js", () => ({
707
- getRepositoryRoot: mock(async () => "/repo"),
708
- getAllBranches: mock(async () => []),
709
- getLocalBranches: mock(async () => []),
710
- getCurrentBranch: mock(async () => "main"),
711
- deleteBranch: mock(async () => {}),
712
- }));
713
-
714
- mock.module?.("../../../../config/index.js", () => ({
715
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
716
- getLastToolUsageMap: mock(async () => new Map()),
717
- loadSession: mock(async () => null),
718
- }));
719
-
720
- mock.module?.("../../../../config/tools.js", () => ({
721
- getAllCodingAgents: mock(async () => [
722
- { id: "codex-cli", displayName: "Codex CLI" },
723
- ]),
724
- }));
725
-
726
- mock.module?.("../../../../config/profiles.js", () => ({
727
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
728
- createProfile: mock(async () => {}),
729
- updateProfile: mock(async () => {}),
730
- deleteProfile: mock(async () => {}),
731
- setActiveProfile: mock(async () => {}),
732
- }));
733
-
734
- const { AppSolid } = await import("../../App.solid.js");
735
-
736
- const branch = createBranch({
737
- name: "feature/unsafe-ok",
738
- label: "feature/unsafe-ok",
739
- value: "feature/unsafe-ok",
740
- });
741
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
742
-
743
- const testSetup = await testRender(
744
- () => (
745
- <AppSolid
746
- branches={[branch]}
747
- stats={stats}
748
- version={null}
749
- toolStatuses={[]}
750
- />
751
- ),
752
- { width: 80, height: 24 },
753
- );
754
- await testSetup.renderOnce();
755
- await new Promise((resolve) => setTimeout(resolve, 0));
756
- await testSetup.renderOnce();
757
-
758
- try {
759
- await testSetup.mockInput.typeText(" ");
760
- await testSetup.renderOnce();
761
-
762
- await testSetup.mockInput.typeText("y");
763
- await testSetup.renderOnce();
764
-
765
- const frame = testSetup.captureCharFrame();
766
- expect(frame).toContain("[*]");
767
- expect(frame).toContain("feature/unsafe-ok");
768
- expect(frame).not.toContain("Unsafe branch selected. Select anyway?");
769
- } finally {
770
- testSetup.renderer.destroy();
771
- }
772
- });
773
- });
774
-
775
- describe("AppSolid selected cleanup targets", () => {
776
- it("cleans unsafe branch when confirmed and selected", async () => {
777
- const deleteBranchMock = mock(async () => {});
778
- const removeWorktreeMock = mock(async () => {});
779
- const getCleanupStatusMock = mock(async () => [
780
- {
781
- worktreePath: "/tmp/worktree",
782
- branch: "feature/unsafe-clean",
783
- hasUncommittedChanges: false,
784
- hasUnpushedCommits: true,
785
- cleanupType: "worktree-and-branch",
786
- hasRemoteBranch: true,
787
- hasUniqueCommits: false,
788
- hasUpstream: true,
789
- upstream: "origin/feature/unsafe-clean",
790
- isAccessible: true,
791
- reasons: ["no-diff-with-base"],
792
- },
793
- ]);
794
-
795
- mock.module?.("../../../../worktree.js", () => ({
796
- listAdditionalWorktrees: mock(async () => []),
797
- repairWorktrees: mock(async () => ({
798
- repairedCount: 0,
799
- failedCount: 0,
800
- failures: [],
801
- })),
802
- removeWorktree: removeWorktreeMock,
803
- getCleanupStatus: getCleanupStatusMock,
804
- isProtectedBranchName: mock(() => false),
805
- }));
806
-
807
- mock.module?.("../../../../git.js", () => ({
808
- getRepositoryRoot: mock(async () => "/repo"),
809
- getAllBranches: mock(async () => []),
810
- getLocalBranches: mock(async () => []),
811
- getCurrentBranch: mock(async () => "main"),
812
- deleteBranch: deleteBranchMock,
813
- }));
814
-
815
- mock.module?.("../../../../config/index.js", () => ({
816
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
817
- getLastToolUsageMap: mock(async () => new Map()),
818
- loadSession: mock(async () => null),
819
- }));
820
-
821
- mock.module?.("../../../../config/tools.js", () => ({
822
- getAllCodingAgents: mock(async () => [
823
- { id: "codex-cli", displayName: "Codex CLI" },
824
- ]),
825
- }));
826
-
827
- mock.module?.("../../../../config/profiles.js", () => ({
828
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
829
- createProfile: mock(async () => {}),
830
- updateProfile: mock(async () => {}),
831
- deleteProfile: mock(async () => {}),
832
- setActiveProfile: mock(async () => {}),
833
- }));
834
-
835
- const { AppSolid } = await import("../../App.solid.js");
836
-
837
- const branch = createBranch({
838
- name: "feature/unsafe-clean",
839
- label: "feature/unsafe-clean",
840
- value: "feature/unsafe-clean",
841
- });
842
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
843
-
844
- const testSetup = await testRender(
845
- () => (
846
- <AppSolid
847
- branches={[branch]}
848
- stats={stats}
849
- version={null}
850
- toolStatuses={[]}
851
- />
852
- ),
853
- { width: 80, height: 24 },
854
- );
855
- await testSetup.renderOnce();
856
- await new Promise((resolve) => setTimeout(resolve, 0));
857
- await testSetup.renderOnce();
858
-
859
- try {
860
- await testSetup.mockInput.typeText(" ");
861
- await testSetup.renderOnce();
862
-
863
- await testSetup.mockInput.typeText("y");
864
- await testSetup.renderOnce();
865
-
866
- await testSetup.mockInput.typeText("c");
867
- await testSetup.renderOnce();
868
- await new Promise((resolve) => setTimeout(resolve, 0));
869
-
870
- expect(removeWorktreeMock).toHaveBeenCalledWith("/tmp/worktree", false);
871
- expect(deleteBranchMock).toHaveBeenCalledWith(
872
- "feature/unsafe-clean",
873
- true,
874
- );
875
- } finally {
876
- testSetup.renderer.destroy();
877
- }
878
- });
879
-
880
- it("includes protected branch when selected", async () => {
881
- const deleteBranchMock = mock(async () => {});
882
- const removeWorktreeMock = mock(async () => {});
883
- const getCleanupStatusMock = mock(async () => [
884
- {
885
- worktreePath: "/tmp/worktree",
886
- branch: "develop",
887
- hasUncommittedChanges: false,
888
- hasUnpushedCommits: false,
889
- cleanupType: "worktree-and-branch",
890
- hasRemoteBranch: true,
891
- hasUniqueCommits: false,
892
- hasUpstream: true,
893
- upstream: "origin/develop",
894
- isAccessible: true,
895
- reasons: ["no-diff-with-base"],
896
- },
897
- ]);
898
-
899
- mock.module?.("../../../../worktree.js", () => ({
900
- listAdditionalWorktrees: mock(async () => []),
901
- repairWorktrees: mock(async () => ({
902
- repairedCount: 0,
903
- failedCount: 0,
904
- failures: [],
905
- })),
906
- removeWorktree: removeWorktreeMock,
907
- getCleanupStatus: getCleanupStatusMock,
908
- isProtectedBranchName: mock(() => true),
909
- }));
910
-
911
- mock.module?.("../../../../git.js", () => ({
912
- getRepositoryRoot: mock(async () => "/repo"),
913
- getAllBranches: mock(async () => []),
914
- getLocalBranches: mock(async () => []),
915
- getCurrentBranch: mock(async () => "main"),
916
- deleteBranch: deleteBranchMock,
917
- }));
918
-
919
- mock.module?.("../../../../config/index.js", () => ({
920
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
921
- getLastToolUsageMap: mock(async () => new Map()),
922
- loadSession: mock(async () => null),
923
- }));
924
-
925
- mock.module?.("../../../../config/tools.js", () => ({
926
- getAllCodingAgents: mock(async () => [
927
- { id: "codex-cli", displayName: "Codex CLI" },
928
- ]),
929
- }));
930
-
931
- mock.module?.("../../../../config/profiles.js", () => ({
932
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
933
- createProfile: mock(async () => {}),
934
- updateProfile: mock(async () => {}),
935
- deleteProfile: mock(async () => {}),
936
- setActiveProfile: mock(async () => {}),
937
- }));
938
-
939
- const { AppSolid } = await import("../../App.solid.js");
940
-
941
- const branch = createBranch({
942
- name: "develop",
943
- label: "develop",
944
- value: "develop",
945
- });
946
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
947
-
948
- const testSetup = await testRender(
949
- () => (
950
- <AppSolid
951
- branches={[branch]}
952
- stats={stats}
953
- version={null}
954
- toolStatuses={[]}
955
- />
956
- ),
957
- { width: 80, height: 24 },
958
- );
959
- await testSetup.renderOnce();
960
- await new Promise((resolve) => setTimeout(resolve, 0));
961
- await testSetup.renderOnce();
962
-
963
- try {
964
- await testSetup.mockInput.typeText(" ");
965
- await testSetup.renderOnce();
966
-
967
- await testSetup.mockInput.typeText("c");
968
- await testSetup.renderOnce();
969
- await new Promise((resolve) => setTimeout(resolve, 0));
970
-
971
- expect(deleteBranchMock).toHaveBeenCalledWith("develop", true);
972
- expect(removeWorktreeMock).toHaveBeenCalledWith("/tmp/worktree", false);
973
- } finally {
974
- testSetup.renderer.destroy();
975
- }
976
- });
977
-
978
- it("excludes current branch even when selected", async () => {
979
- const deleteBranchMock = mock(async () => {});
980
- const removeWorktreeMock = mock(async () => {});
981
- const getCleanupStatusMock = mock(async () => [
982
- {
983
- worktreePath: "/tmp/worktree",
984
- branch: "main",
985
- hasUncommittedChanges: false,
986
- hasUnpushedCommits: false,
987
- cleanupType: "worktree-and-branch",
988
- hasRemoteBranch: true,
989
- hasUniqueCommits: false,
990
- hasUpstream: true,
991
- upstream: "origin/main",
992
- isAccessible: true,
993
- reasons: ["no-diff-with-base"],
994
- },
995
- ]);
996
-
997
- mock.module?.("../../../../worktree.js", () => ({
998
- listAdditionalWorktrees: mock(async () => []),
999
- repairWorktrees: mock(async () => ({
1000
- repairedCount: 0,
1001
- failedCount: 0,
1002
- failures: [],
1003
- })),
1004
- removeWorktree: removeWorktreeMock,
1005
- getCleanupStatus: getCleanupStatusMock,
1006
- isProtectedBranchName: mock(() => true),
1007
- }));
1008
-
1009
- mock.module?.("../../../../git.js", () => ({
1010
- getRepositoryRoot: mock(async () => "/repo"),
1011
- getAllBranches: mock(async () => []),
1012
- getLocalBranches: mock(async () => []),
1013
- getCurrentBranch: mock(async () => "main"),
1014
- deleteBranch: deleteBranchMock,
1015
- }));
1016
-
1017
- mock.module?.("../../../../config/index.js", () => ({
1018
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
1019
- getLastToolUsageMap: mock(async () => new Map()),
1020
- loadSession: mock(async () => null),
1021
- }));
1022
-
1023
- mock.module?.("../../../../config/tools.js", () => ({
1024
- getAllCodingAgents: mock(async () => [
1025
- { id: "codex-cli", displayName: "Codex CLI" },
1026
- ]),
1027
- }));
1028
-
1029
- mock.module?.("../../../../config/profiles.js", () => ({
1030
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
1031
- createProfile: mock(async () => {}),
1032
- updateProfile: mock(async () => {}),
1033
- deleteProfile: mock(async () => {}),
1034
- setActiveProfile: mock(async () => {}),
1035
- }));
1036
-
1037
- const { AppSolid } = await import("../../App.solid.js");
1038
-
1039
- const branch = createBranch({
1040
- name: "main",
1041
- label: "main",
1042
- value: "main",
1043
- isCurrent: true,
1044
- });
1045
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
1046
-
1047
- const testSetup = await testRender(
1048
- () => (
1049
- <AppSolid
1050
- branches={[branch]}
1051
- stats={stats}
1052
- version={null}
1053
- toolStatuses={[]}
1054
- />
1055
- ),
1056
- { width: 80, height: 24 },
1057
- );
1058
- await testSetup.renderOnce();
1059
- await new Promise((resolve) => setTimeout(resolve, 0));
1060
- await testSetup.renderOnce();
1061
-
1062
- try {
1063
- await testSetup.mockInput.typeText(" ");
1064
- await testSetup.renderOnce();
1065
-
1066
- await testSetup.mockInput.typeText("c");
1067
- await testSetup.renderOnce();
1068
- await new Promise((resolve) => setTimeout(resolve, 0));
1069
-
1070
- expect(deleteBranchMock).not.toHaveBeenCalled();
1071
- expect(removeWorktreeMock).not.toHaveBeenCalled();
1072
- } finally {
1073
- testSetup.renderer.destroy();
1074
- }
1075
- });
1076
-
1077
- it("repairs selected branch even when worktree is accessible", async () => {
1078
- const repairWorktreesMock = mock(async () => ({
1079
- repairedCount: 1,
1080
- failedCount: 0,
1081
- failures: [],
1082
- }));
1083
- const getCleanupStatusMock = mock(async () => [
1084
- {
1085
- worktreePath: "/tmp/worktree",
1086
- branch: "feature/repair-target",
1087
- hasUncommittedChanges: false,
1088
- hasUnpushedCommits: false,
1089
- cleanupType: "worktree-and-branch",
1090
- hasRemoteBranch: true,
1091
- hasUniqueCommits: false,
1092
- hasUpstream: true,
1093
- upstream: "origin/feature/repair-target",
1094
- isAccessible: true,
1095
- reasons: ["no-diff-with-base"],
1096
- },
1097
- ]);
1098
-
1099
- mock.module?.("../../../../worktree.js", () => ({
1100
- listAdditionalWorktrees: mock(async () => []),
1101
- repairWorktrees: repairWorktreesMock,
1102
- removeWorktree: mock(async () => {}),
1103
- getCleanupStatus: getCleanupStatusMock,
1104
- isProtectedBranchName: mock(() => false),
1105
- }));
1106
-
1107
- mock.module?.("../../../../git.js", () => ({
1108
- getRepositoryRoot: mock(async () => "/repo"),
1109
- getAllBranches: mock(async () => []),
1110
- getLocalBranches: mock(async () => []),
1111
- getCurrentBranch: mock(async () => "main"),
1112
- deleteBranch: mock(async () => {}),
1113
- }));
1114
-
1115
- mock.module?.("../../../../config/index.js", () => ({
1116
- getConfig: mock(async () => ({ defaultBaseBranch: "main" })),
1117
- getLastToolUsageMap: mock(async () => new Map()),
1118
- loadSession: mock(async () => null),
1119
- }));
1120
-
1121
- mock.module?.("../../../../config/tools.js", () => ({
1122
- getAllCodingAgents: mock(async () => [
1123
- { id: "codex-cli", displayName: "Codex CLI" },
1124
- ]),
1125
- }));
1126
-
1127
- mock.module?.("../../../../config/profiles.js", () => ({
1128
- loadProfiles: mock(async () => ({ profiles: {}, activeProfile: null })),
1129
- createProfile: mock(async () => {}),
1130
- updateProfile: mock(async () => {}),
1131
- deleteProfile: mock(async () => {}),
1132
- setActiveProfile: mock(async () => {}),
1133
- }));
1134
-
1135
- const { AppSolid } = await import("../../App.solid.js");
1136
-
1137
- const branch = createBranch({
1138
- name: "feature/repair-target",
1139
- label: "feature/repair-target",
1140
- value: "feature/repair-target",
1141
- worktreeStatus: "active",
1142
- });
1143
- const stats = makeStats({ localCount: 1, worktreeCount: 1 });
1144
-
1145
- const testSetup = await testRender(
1146
- () => (
1147
- <AppSolid
1148
- branches={[branch]}
1149
- stats={stats}
1150
- version={null}
1151
- toolStatuses={[]}
1152
- />
1153
- ),
1154
- { width: 80, height: 24 },
1155
- );
1156
- await testSetup.renderOnce();
1157
- await new Promise((resolve) => setTimeout(resolve, 0));
1158
- await testSetup.renderOnce();
1159
-
1160
- try {
1161
- await testSetup.mockInput.typeText(" ");
1162
- await testSetup.renderOnce();
1163
-
1164
- await testSetup.mockInput.typeText("x");
1165
- await testSetup.renderOnce();
1166
- await new Promise((resolve) => setTimeout(resolve, 0));
1167
-
1168
- expect(repairWorktreesMock).toHaveBeenCalledWith([
1169
- "feature/repair-target",
1170
- ]);
1171
- } finally {
1172
- testSetup.renderer.destroy();
1173
- }
1174
- });
1175
- });