@cerbur/clutch-dsh-worktree 0.1.8 → 0.1.10

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 (508) hide show
  1. package/README.md +117 -46
  2. package/README.zh.md +92 -40
  3. package/lib/client/WorktreeSurface.d.ts +4 -7
  4. package/lib/client/WorktreeSurface.d.ts.map +1 -1
  5. package/lib/client/WorktreeSurface.js +44 -1243
  6. package/lib/client/WorktreeSurface.js.map +1 -1
  7. package/lib/client/{WorktreeContext.d.ts → context/WorktreeContext.d.ts} +2 -2
  8. package/lib/client/context/WorktreeContext.d.ts.map +1 -0
  9. package/lib/client/{WorktreeContext.js → context/WorktreeContext.js} +1 -1
  10. package/lib/client/context/WorktreeContext.js.map +1 -0
  11. package/lib/client/{WorktreeHeroContext.d.ts → context/WorktreeHeroContext.d.ts} +1 -1
  12. package/lib/client/context/WorktreeHeroContext.d.ts.map +1 -0
  13. package/lib/client/{WorktreeHeroContext.js → context/WorktreeHeroContext.js} +1 -1
  14. package/lib/client/context/WorktreeHeroContext.js.map +1 -0
  15. package/lib/client/{worktree-context-store.d.ts → context/worktree-context-store.d.ts} +7 -15
  16. package/lib/client/context/worktree-context-store.d.ts.map +1 -0
  17. package/lib/client/{worktree-context-store.js → context/worktree-context-store.js} +20 -13
  18. package/lib/client/context/worktree-context-store.js.map +1 -0
  19. package/lib/client/{worktree-context.d.ts → context/worktree-context.d.ts} +1 -1
  20. package/lib/client/context/worktree-context.d.ts.map +1 -0
  21. package/lib/client/{worktree-context.js → context/worktree-context.js} +5 -3
  22. package/lib/client/context/worktree-context.js.map +1 -0
  23. package/lib/client/dsh-slot-contract.d.ts +43 -0
  24. package/lib/client/dsh-slot-contract.d.ts.map +1 -0
  25. package/lib/client/dsh-slot-contract.js +2 -0
  26. package/lib/client/dsh-slot-contract.js.map +1 -0
  27. package/lib/client/entry.d.ts +3 -3
  28. package/lib/client/entry.d.ts.map +1 -1
  29. package/lib/client/entry.js +168 -38
  30. package/lib/client/entry.js.map +1 -1
  31. package/lib/client/index.d.ts +3 -3
  32. package/lib/client/index.d.ts.map +1 -1
  33. package/lib/client/index.js +2 -2
  34. package/lib/client/index.js.map +1 -1
  35. package/lib/client/locales.d.ts +66 -0
  36. package/lib/client/locales.d.ts.map +1 -1
  37. package/lib/client/locales.js +76 -10
  38. package/lib/client/locales.js.map +1 -1
  39. package/lib/client/{WorktreeOverlay.d.ts → overlay/WorktreeOverlay.d.ts} +2 -2
  40. package/lib/client/overlay/WorktreeOverlay.d.ts.map +1 -0
  41. package/lib/client/{WorktreeOverlay.js → overlay/WorktreeOverlay.js} +2 -2
  42. package/lib/client/overlay/WorktreeOverlay.js.map +1 -0
  43. package/lib/client/overlay/overlay-bounds.d.ts.map +1 -0
  44. package/lib/client/overlay/overlay-bounds.js.map +1 -0
  45. package/lib/client/overlay/sidebar-overlay-geometry.d.ts.map +1 -0
  46. package/lib/client/overlay/sidebar-overlay-geometry.js.map +1 -0
  47. package/lib/client/permission/worktree-permission-icon.d.ts.map +1 -0
  48. package/lib/client/permission/worktree-permission-icon.js.map +1 -0
  49. package/lib/client/permission/worktree-permission.d.ts.map +1 -0
  50. package/lib/client/permission/worktree-permission.js.map +1 -0
  51. package/lib/client/session/session-view.d.ts.map +1 -0
  52. package/lib/client/session/session-view.js.map +1 -0
  53. package/lib/client/session/virtual-workspace-membership.d.ts +29 -0
  54. package/lib/client/session/virtual-workspace-membership.d.ts.map +1 -0
  55. package/lib/client/session/virtual-workspace-membership.js +131 -0
  56. package/lib/client/session/virtual-workspace-membership.js.map +1 -0
  57. package/lib/client/{worktree-session-fork.d.ts → session/worktree-session-fork.d.ts} +25 -4
  58. package/lib/client/session/worktree-session-fork.d.ts.map +1 -0
  59. package/lib/client/session/worktree-session-fork.js +309 -0
  60. package/lib/client/session/worktree-session-fork.js.map +1 -0
  61. package/lib/client/{worktree-session-order.d.ts → session/worktree-session-order.d.ts} +2 -2
  62. package/lib/client/session/worktree-session-order.d.ts.map +1 -0
  63. package/lib/client/session/worktree-session-order.js.map +1 -0
  64. package/lib/client/session/worktree-session-position.d.ts.map +1 -0
  65. package/lib/client/session/worktree-session-position.js.map +1 -0
  66. package/lib/client/{worktree-session.d.ts → session/worktree-session.d.ts} +3 -3
  67. package/lib/client/session/worktree-session.d.ts.map +1 -0
  68. package/lib/client/{worktree-session.js → session/worktree-session.js} +3 -3
  69. package/lib/client/session/worktree-session.js.map +1 -0
  70. package/lib/client/surface/actions/lifecycle-commands.d.ts +9 -0
  71. package/lib/client/surface/actions/lifecycle-commands.d.ts.map +1 -0
  72. package/lib/client/surface/actions/lifecycle-commands.js +243 -0
  73. package/lib/client/surface/actions/lifecycle-commands.js.map +1 -0
  74. package/lib/client/surface/actions/useDragActions.d.ts +26 -0
  75. package/lib/client/surface/actions/useDragActions.d.ts.map +1 -0
  76. package/lib/client/surface/actions/useDragActions.js +125 -0
  77. package/lib/client/surface/actions/useDragActions.js.map +1 -0
  78. package/lib/client/surface/actions/useLifecycleActions.d.ts +30 -0
  79. package/lib/client/surface/actions/useLifecycleActions.d.ts.map +1 -0
  80. package/lib/client/surface/actions/useLifecycleActions.js +140 -0
  81. package/lib/client/surface/actions/useLifecycleActions.js.map +1 -0
  82. package/lib/client/surface/actions/useNativeActions.d.ts +48 -0
  83. package/lib/client/surface/actions/useNativeActions.d.ts.map +1 -0
  84. package/lib/client/surface/actions/useNativeActions.js +182 -0
  85. package/lib/client/surface/actions/useNativeActions.js.map +1 -0
  86. package/lib/client/surface/actions/useSessionActions.d.ts +24 -0
  87. package/lib/client/surface/actions/useSessionActions.d.ts.map +1 -0
  88. package/lib/client/surface/actions/useSessionActions.js +116 -0
  89. package/lib/client/surface/actions/useSessionActions.js.map +1 -0
  90. package/lib/client/surface/actions/useSurfaceMutation.d.ts +15 -0
  91. package/lib/client/surface/actions/useSurfaceMutation.d.ts.map +1 -0
  92. package/lib/client/surface/actions/useSurfaceMutation.js +24 -0
  93. package/lib/client/surface/actions/useSurfaceMutation.js.map +1 -0
  94. package/lib/client/surface/actions/useWorktreeRegistration.d.ts +31 -0
  95. package/lib/client/surface/actions/useWorktreeRegistration.d.ts.map +1 -0
  96. package/lib/client/surface/actions/useWorktreeRegistration.js +203 -0
  97. package/lib/client/surface/actions/useWorktreeRegistration.js.map +1 -0
  98. package/lib/client/surface/actions/worktree-cleanup-flow.d.ts +10 -0
  99. package/lib/client/surface/actions/worktree-cleanup-flow.d.ts.map +1 -0
  100. package/lib/client/surface/actions/worktree-cleanup-flow.js +19 -0
  101. package/lib/client/surface/actions/worktree-cleanup-flow.js.map +1 -0
  102. package/lib/client/surface/components/AccessConfirmation.d.ts +9 -0
  103. package/lib/client/surface/components/AccessConfirmation.d.ts.map +1 -0
  104. package/lib/client/surface/components/AccessConfirmation.js +18 -0
  105. package/lib/client/surface/components/AccessConfirmation.js.map +1 -0
  106. package/lib/client/surface/components/ActiveWorktree.d.ts +28 -0
  107. package/lib/client/surface/components/ActiveWorktree.d.ts.map +1 -0
  108. package/lib/client/surface/components/ActiveWorktree.js +154 -0
  109. package/lib/client/surface/components/ActiveWorktree.js.map +1 -0
  110. package/lib/client/surface/components/ArchivedWorktree.d.ts +24 -0
  111. package/lib/client/surface/components/ArchivedWorktree.d.ts.map +1 -0
  112. package/lib/client/surface/components/ArchivedWorktree.js +145 -0
  113. package/lib/client/surface/components/ArchivedWorktree.js.map +1 -0
  114. package/lib/client/surface/components/ArchivedWorktrees.d.ts +25 -0
  115. package/lib/client/surface/components/ArchivedWorktrees.d.ts.map +1 -0
  116. package/lib/client/surface/components/ArchivedWorktrees.js +20 -0
  117. package/lib/client/surface/components/ArchivedWorktrees.js.map +1 -0
  118. package/lib/client/surface/components/LifecycleDialogs.d.ts +20 -0
  119. package/lib/client/surface/components/LifecycleDialogs.d.ts.map +1 -0
  120. package/lib/client/surface/components/LifecycleDialogs.js +31 -0
  121. package/lib/client/surface/components/LifecycleDialogs.js.map +1 -0
  122. package/lib/client/surface/components/NativeDialogs.d.ts +9 -0
  123. package/lib/client/surface/components/NativeDialogs.d.ts.map +1 -0
  124. package/lib/client/surface/components/NativeDialogs.js +14 -0
  125. package/lib/client/surface/components/NativeDialogs.js.map +1 -0
  126. package/lib/client/surface/components/NotificationToasts.d.ts +7 -0
  127. package/lib/client/surface/components/NotificationToasts.d.ts.map +1 -0
  128. package/lib/client/surface/components/NotificationToasts.js +24 -0
  129. package/lib/client/surface/components/NotificationToasts.js.map +1 -0
  130. package/lib/client/surface/components/RegistrationDialog.d.ts +15 -0
  131. package/lib/client/surface/components/RegistrationDialog.d.ts.map +1 -0
  132. package/lib/client/surface/components/RegistrationDialog.js +22 -0
  133. package/lib/client/surface/components/RegistrationDialog.js.map +1 -0
  134. package/lib/client/surface/components/SurfaceContent.d.ts +31 -0
  135. package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -0
  136. package/lib/client/surface/components/SurfaceContent.js +65 -0
  137. package/lib/client/surface/components/SurfaceContent.js.map +1 -0
  138. package/lib/client/surface/components/SurfaceHeader.d.ts +15 -0
  139. package/lib/client/surface/components/SurfaceHeader.d.ts.map +1 -0
  140. package/lib/client/surface/components/SurfaceHeader.js +42 -0
  141. package/lib/client/surface/components/SurfaceHeader.js.map +1 -0
  142. package/lib/client/surface/components/WorkspaceTree.d.ts +32 -0
  143. package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -0
  144. package/lib/client/surface/components/WorkspaceTree.js +145 -0
  145. package/lib/client/surface/components/WorkspaceTree.js.map +1 -0
  146. package/lib/client/{worktree-surface-dialogs.d.ts → surface/components/dialogs.d.ts} +5 -2
  147. package/lib/client/surface/components/dialogs.d.ts.map +1 -0
  148. package/lib/client/{worktree-surface-dialogs.js → surface/components/dialogs.js} +67 -24
  149. package/lib/client/surface/components/dialogs.js.map +1 -0
  150. package/lib/client/{worktree-surface-rows.d.ts → surface/components/rows.d.ts} +3 -3
  151. package/lib/client/surface/components/rows.d.ts.map +1 -0
  152. package/lib/client/{worktree-surface-rows.js → surface/components/rows.js} +79 -17
  153. package/lib/client/surface/components/rows.js.map +1 -0
  154. package/lib/client/surface/notification-queue.d.ts +11 -0
  155. package/lib/client/surface/notification-queue.d.ts.map +1 -0
  156. package/lib/client/surface/notification-queue.js +19 -0
  157. package/lib/client/surface/notification-queue.js.map +1 -0
  158. package/lib/client/{worktree-surface-selectors.d.ts → surface/selectors.d.ts} +10 -5
  159. package/lib/client/surface/selectors.d.ts.map +1 -0
  160. package/lib/client/{worktree-surface-selectors.js → surface/selectors.js} +23 -6
  161. package/lib/client/surface/selectors.js.map +1 -0
  162. package/lib/client/surface/shared.d.ts +40 -0
  163. package/lib/client/surface/shared.d.ts.map +1 -0
  164. package/lib/client/surface/shared.js +53 -0
  165. package/lib/client/surface/shared.js.map +1 -0
  166. package/lib/client/surface/state/useLifecycleState.d.ts +34 -0
  167. package/lib/client/surface/state/useLifecycleState.d.ts.map +1 -0
  168. package/lib/client/surface/state/useLifecycleState.js +39 -0
  169. package/lib/client/surface/state/useLifecycleState.js.map +1 -0
  170. package/lib/client/surface/state/useRegistrationState.d.ts +34 -0
  171. package/lib/client/surface/state/useRegistrationState.d.ts.map +1 -0
  172. package/lib/client/surface/state/useRegistrationState.js +44 -0
  173. package/lib/client/surface/state/useRegistrationState.js.map +1 -0
  174. package/lib/client/surface/state/useSessionExpansion.d.ts +39 -0
  175. package/lib/client/surface/state/useSessionExpansion.d.ts.map +1 -0
  176. package/lib/client/surface/state/useSessionExpansion.js +230 -0
  177. package/lib/client/surface/state/useSessionExpansion.js.map +1 -0
  178. package/lib/client/surface/state/useSessionOrdering.d.ts +15 -0
  179. package/lib/client/surface/state/useSessionOrdering.d.ts.map +1 -0
  180. package/lib/client/surface/state/useSessionOrdering.js +68 -0
  181. package/lib/client/surface/state/useSessionOrdering.js.map +1 -0
  182. package/lib/client/surface/state/useSurfaceMenus.d.ts +9 -0
  183. package/lib/client/surface/state/useSurfaceMenus.d.ts.map +1 -0
  184. package/lib/client/surface/state/useSurfaceMenus.js +15 -0
  185. package/lib/client/surface/state/useSurfaceMenus.js.map +1 -0
  186. package/lib/client/surface/state/useSurfaceRefresh.d.ts +39 -0
  187. package/lib/client/surface/state/useSurfaceRefresh.d.ts.map +1 -0
  188. package/lib/client/surface/state/useSurfaceRefresh.js +274 -0
  189. package/lib/client/surface/state/useSurfaceRefresh.js.map +1 -0
  190. package/lib/client/surface/state/useSurfaceSources.d.ts +31 -0
  191. package/lib/client/surface/state/useSurfaceSources.d.ts.map +1 -0
  192. package/lib/client/surface/state/useSurfaceSources.js +63 -0
  193. package/lib/client/surface/state/useSurfaceSources.js.map +1 -0
  194. package/lib/client/{worktree-surface-types.d.ts → surface/types.d.ts} +68 -13
  195. package/lib/client/surface/types.d.ts.map +1 -0
  196. package/lib/client/surface/types.js +2 -0
  197. package/lib/client/surface/types.js.map +1 -0
  198. package/lib/client/{WorktreeModeAction.d.ts → view/WorktreeModeAction.d.ts} +1 -1
  199. package/lib/client/view/WorktreeModeAction.d.ts.map +1 -0
  200. package/lib/client/{WorktreeModeAction.js → view/WorktreeModeAction.js} +1 -1
  201. package/lib/client/view/WorktreeModeAction.js.map +1 -0
  202. package/lib/client/view/navigation.d.ts.map +1 -0
  203. package/lib/client/view/navigation.js.map +1 -0
  204. package/lib/client/{view-mode-store.d.ts → view/view-mode-store.d.ts} +1 -1
  205. package/lib/client/view/view-mode-store.d.ts.map +1 -0
  206. package/lib/client/{view-mode-store.js → view/view-mode-store.js} +1 -1
  207. package/lib/client/view/view-mode-store.js.map +1 -0
  208. package/lib/client/{view-mode.d.ts → view/view-mode.d.ts} +20 -6
  209. package/lib/client/view/view-mode.d.ts.map +1 -0
  210. package/lib/client/{view-mode.js → view/view-mode.js} +35 -10
  211. package/lib/client/view/view-mode.js.map +1 -0
  212. package/lib/client/{worktree-error-copy.d.ts → view/worktree-error-copy.d.ts} +2 -2
  213. package/lib/client/view/worktree-error-copy.d.ts.map +1 -0
  214. package/lib/client/view/worktree-error-copy.js.map +1 -0
  215. package/lib/client/{worktree-expand-state.d.ts → view/worktree-expand-state.d.ts} +6 -4
  216. package/lib/client/view/worktree-expand-state.d.ts.map +1 -0
  217. package/lib/client/{worktree-expand-state.js → view/worktree-expand-state.js} +11 -0
  218. package/lib/client/view/worktree-expand-state.js.map +1 -0
  219. package/lib/client/{worktree-view-actions.d.ts → view/worktree-view-actions.d.ts} +11 -5
  220. package/lib/client/view/worktree-view-actions.d.ts.map +1 -0
  221. package/lib/client/{worktree-view-actions.js → view/worktree-view-actions.js} +13 -11
  222. package/lib/client/view/worktree-view-actions.js.map +1 -0
  223. package/lib/client/view/worktree-view-errors.d.ts.map +1 -0
  224. package/lib/client/view/worktree-view-errors.js.map +1 -0
  225. package/lib/client/{worktree-view-read.d.ts → view/worktree-view-read.d.ts} +21 -9
  226. package/lib/client/view/worktree-view-read.d.ts.map +1 -0
  227. package/lib/client/{worktree-view-read.js → view/worktree-view-read.js} +78 -10
  228. package/lib/client/view/worktree-view-read.js.map +1 -0
  229. package/lib/client/view/worktree-view.d.ts.map +1 -0
  230. package/lib/client/view/worktree-view.js.map +1 -0
  231. package/lib/client/worktree-connection.d.ts +5 -0
  232. package/lib/client/worktree-connection.d.ts.map +1 -1
  233. package/lib/client/worktree-connection.js +16 -0
  234. package/lib/client/worktree-connection.js.map +1 -1
  235. package/lib/client.js +5990 -3139
  236. package/lib/client.js.map +1 -1
  237. package/lib/contract/index.contract.js +10 -0
  238. package/lib/contract/index.contract.js.map +1 -1
  239. package/lib/contract/index.d.ts +46 -3
  240. package/lib/contract/index.d.ts.map +1 -1
  241. package/lib/contract/index.js +7 -0
  242. package/lib/contract/index.js.map +1 -1
  243. package/lib/host/dsh-read-adapter.d.ts +10 -1
  244. package/lib/host/dsh-read-adapter.d.ts.map +1 -1
  245. package/lib/host/dsh-read-adapter.js +18 -1
  246. package/lib/host/dsh-read-adapter.js.map +1 -1
  247. package/lib/host/remote.d.ts.map +1 -1
  248. package/lib/host/remote.js +14 -0
  249. package/lib/host/remote.js.map +1 -1
  250. package/lib/host/service.d.ts +24 -0
  251. package/lib/host/service.d.ts.map +1 -1
  252. package/lib/host/service.js +39 -1
  253. package/lib/host/service.js.map +1 -1
  254. package/lib/host/worktree-activity.d.ts +13 -0
  255. package/lib/host/worktree-activity.d.ts.map +1 -0
  256. package/lib/host/worktree-activity.js +23 -0
  257. package/lib/host/worktree-activity.js.map +1 -0
  258. package/lib/host/worktree-permission-manager.js +2 -2
  259. package/lib/host/worktree-permission-manager.js.map +1 -1
  260. package/lib/host/worktree-permission.d.ts +3 -2
  261. package/lib/host/worktree-permission.d.ts.map +1 -1
  262. package/lib/host/worktree-permission.js +29 -5
  263. package/lib/host/worktree-permission.js.map +1 -1
  264. package/lib/index.d.ts +3 -3
  265. package/lib/index.d.ts.map +1 -1
  266. package/lib/index.js +2 -2
  267. package/lib/index.js.map +1 -1
  268. package/lib/manage/manager-context.d.ts +2 -1
  269. package/lib/manage/manager-context.d.ts.map +1 -1
  270. package/lib/manage/manager-sessions.js +4 -4
  271. package/lib/manage/manager-sessions.js.map +1 -1
  272. package/lib/manage/manager-worktree-lifecycle.d.ts +23 -0
  273. package/lib/manage/manager-worktree-lifecycle.d.ts.map +1 -0
  274. package/lib/manage/manager-worktree-lifecycle.js +165 -0
  275. package/lib/manage/manager-worktree-lifecycle.js.map +1 -0
  276. package/lib/manage/manager-worktrees.d.ts +1 -6
  277. package/lib/manage/manager-worktrees.d.ts.map +1 -1
  278. package/lib/manage/manager-worktrees.js +83 -114
  279. package/lib/manage/manager-worktrees.js.map +1 -1
  280. package/lib/manage/manager.d.ts +17 -1
  281. package/lib/manage/manager.d.ts.map +1 -1
  282. package/lib/manage/manager.js +25 -6
  283. package/lib/manage/manager.js.map +1 -1
  284. package/lib/provider/generated-name.d.ts +8 -0
  285. package/lib/provider/generated-name.d.ts.map +1 -0
  286. package/lib/provider/generated-name.js +29 -0
  287. package/lib/provider/generated-name.js.map +1 -0
  288. package/lib/provider/{git.d.ts → git/adapter.d.ts} +2 -2
  289. package/lib/provider/git/adapter.d.ts.map +1 -0
  290. package/lib/provider/{git.js → git/adapter.js} +15 -2
  291. package/lib/provider/git/adapter.js.map +1 -0
  292. package/lib/provider/{repository-fingerprint.d.ts → git/repository-fingerprint.d.ts} +1 -1
  293. package/lib/provider/git/repository-fingerprint.d.ts.map +1 -0
  294. package/lib/provider/git/repository-fingerprint.js.map +1 -0
  295. package/lib/provider/{subprocess.d.ts → git/subprocess.d.ts} +1 -1
  296. package/lib/provider/git/subprocess.d.ts.map +1 -0
  297. package/lib/provider/{subprocess.js → git/subprocess.js} +8 -0
  298. package/lib/provider/git/subprocess.js.map +1 -0
  299. package/lib/provider/git/worktree-status.d.ts +5 -0
  300. package/lib/provider/git/worktree-status.d.ts.map +1 -0
  301. package/lib/provider/git/worktree-status.js +23 -0
  302. package/lib/provider/git/worktree-status.js.map +1 -0
  303. package/lib/provider/index.d.ts +5 -5
  304. package/lib/provider/index.d.ts.map +1 -1
  305. package/lib/provider/index.js +5 -5
  306. package/lib/provider/index.js.map +1 -1
  307. package/lib/provider/mutation-token.d.ts +1 -1
  308. package/lib/provider/mutation-token.d.ts.map +1 -1
  309. package/lib/provider/mutation-token.js +1 -0
  310. package/lib/provider/mutation-token.js.map +1 -1
  311. package/lib/provider/sidecar/mutation-lock.d.ts.map +1 -0
  312. package/lib/provider/{mutation-lock.js → sidecar/mutation-lock.js} +1 -1
  313. package/lib/provider/sidecar/mutation-lock.js.map +1 -0
  314. package/lib/provider/{sidecar.d.ts → sidecar/repository.d.ts} +3 -3
  315. package/lib/provider/sidecar/repository.d.ts.map +1 -0
  316. package/lib/provider/{sidecar.js → sidecar/repository.js} +13 -6
  317. package/lib/provider/sidecar/repository.js.map +1 -0
  318. package/lib/provider/{sidecar-persistence.d.ts → sidecar/sidecar-persistence.d.ts} +1 -1
  319. package/lib/provider/sidecar/sidecar-persistence.d.ts.map +1 -0
  320. package/lib/provider/{sidecar-persistence.js → sidecar/sidecar-persistence.js} +29 -2
  321. package/lib/provider/sidecar/sidecar-persistence.js.map +1 -0
  322. package/lib/provider/{sidecar-schema.d.ts → sidecar/sidecar-schema.d.ts} +1 -1
  323. package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -0
  324. package/lib/provider/{sidecar-schema.js → sidecar/sidecar-schema.js} +52 -16
  325. package/lib/provider/sidecar/sidecar-schema.js.map +1 -0
  326. package/lib/provider/transaction/dependencies.d.ts +10 -0
  327. package/lib/provider/transaction/dependencies.d.ts.map +1 -0
  328. package/lib/provider/transaction/dependencies.js +2 -0
  329. package/lib/provider/transaction/dependencies.js.map +1 -0
  330. package/lib/provider/transaction/index.d.ts +17 -0
  331. package/lib/provider/transaction/index.d.ts.map +1 -0
  332. package/lib/provider/transaction/index.js +44 -0
  333. package/lib/provider/transaction/index.js.map +1 -0
  334. package/lib/provider/transaction/operations/adopt-branch.d.ts +6 -0
  335. package/lib/provider/transaction/operations/adopt-branch.d.ts.map +1 -0
  336. package/lib/provider/transaction/operations/adopt-branch.js +59 -0
  337. package/lib/provider/transaction/operations/adopt-branch.js.map +1 -0
  338. package/lib/provider/transaction/operations/clean.d.ts +4 -0
  339. package/lib/provider/transaction/operations/clean.d.ts.map +1 -0
  340. package/lib/provider/transaction/operations/clean.js +168 -0
  341. package/lib/provider/transaction/operations/clean.js.map +1 -0
  342. package/lib/provider/transaction/operations/create.d.ts +5 -0
  343. package/lib/provider/transaction/operations/create.d.ts.map +1 -0
  344. package/lib/provider/transaction/operations/create.js +136 -0
  345. package/lib/provider/transaction/operations/create.js.map +1 -0
  346. package/lib/provider/transaction/operations/import.d.ts +5 -0
  347. package/lib/provider/transaction/operations/import.d.ts.map +1 -0
  348. package/lib/provider/transaction/operations/import.js +92 -0
  349. package/lib/provider/transaction/operations/import.js.map +1 -0
  350. package/lib/provider/transaction/operations/remove.d.ts +4 -0
  351. package/lib/provider/transaction/operations/remove.d.ts.map +1 -0
  352. package/lib/provider/transaction/operations/remove.js +164 -0
  353. package/lib/provider/transaction/operations/remove.js.map +1 -0
  354. package/lib/provider/transaction/recovery/failure-recovery.d.ts +32 -0
  355. package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -0
  356. package/lib/provider/transaction/recovery/failure-recovery.js +147 -0
  357. package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -0
  358. package/lib/provider/transaction/recovery/recover.d.ts +4 -0
  359. package/lib/provider/transaction/recovery/recover.d.ts.map +1 -0
  360. package/lib/provider/transaction/recovery/recover.js +162 -0
  361. package/lib/provider/transaction/recovery/recover.js.map +1 -0
  362. package/lib/provider/transaction/support/admission.d.ts +7 -0
  363. package/lib/provider/transaction/support/admission.d.ts.map +1 -0
  364. package/lib/provider/transaction/support/admission.js +90 -0
  365. package/lib/provider/transaction/support/admission.js.map +1 -0
  366. package/lib/provider/transaction/support/inspection.d.ts +11 -0
  367. package/lib/provider/transaction/support/inspection.d.ts.map +1 -0
  368. package/lib/provider/transaction/support/inspection.js +51 -0
  369. package/lib/provider/transaction/support/inspection.js.map +1 -0
  370. package/lib/provider/transaction/support/journal.d.ts +12 -0
  371. package/lib/provider/transaction/support/journal.d.ts.map +1 -0
  372. package/lib/provider/transaction/support/journal.js +72 -0
  373. package/lib/provider/transaction/support/journal.js.map +1 -0
  374. package/lib/provider/transaction/support/locking.d.ts +4 -0
  375. package/lib/provider/transaction/support/locking.d.ts.map +1 -0
  376. package/lib/provider/transaction/support/locking.js +11 -0
  377. package/lib/provider/transaction/support/locking.js.map +1 -0
  378. package/lib/provider/transaction/support/path-safety.d.ts +11 -0
  379. package/lib/provider/transaction/support/path-safety.d.ts.map +1 -0
  380. package/lib/provider/transaction/support/path-safety.js +82 -0
  381. package/lib/provider/transaction/support/path-safety.js.map +1 -0
  382. package/lib/provider/transaction/support/paths.d.ts +10 -0
  383. package/lib/provider/transaction/support/paths.d.ts.map +1 -0
  384. package/lib/provider/transaction/support/paths.js +68 -0
  385. package/lib/provider/transaction/support/paths.js.map +1 -0
  386. package/lib/provider/transaction/support/publication.d.ts +9 -0
  387. package/lib/provider/transaction/support/publication.d.ts.map +1 -0
  388. package/lib/provider/transaction/support/publication.js +92 -0
  389. package/lib/provider/transaction/support/publication.js.map +1 -0
  390. package/lib/provider/transaction/types.d.ts +38 -0
  391. package/lib/provider/transaction/types.d.ts.map +1 -0
  392. package/lib/provider/transaction/types.js +2 -0
  393. package/lib/provider/transaction/types.js.map +1 -0
  394. package/lib/provider/types.d.ts +22 -3
  395. package/lib/provider/types.d.ts.map +1 -1
  396. package/lib/provider/types.js +1 -1
  397. package/lib/provider/types.js.map +1 -1
  398. package/lib/provider/worktree-lifecycle.d.ts +19 -0
  399. package/lib/provider/worktree-lifecycle.d.ts.map +1 -0
  400. package/lib/provider/worktree-lifecycle.js +44 -0
  401. package/lib/provider/worktree-lifecycle.js.map +1 -0
  402. package/lib/typert.host.js +269 -30
  403. package/lib/typert.remote-client.d.ts +10 -0
  404. package/lib/typert.remote-client.d.ts.map +1 -1
  405. package/lib/typert.remote-client.js +269 -30
  406. package/package.json +48 -34
  407. package/lib/client/WorktreeContext.d.ts.map +0 -1
  408. package/lib/client/WorktreeContext.js.map +0 -1
  409. package/lib/client/WorktreeHeroContext.d.ts.map +0 -1
  410. package/lib/client/WorktreeHeroContext.js.map +0 -1
  411. package/lib/client/WorktreeModeAction.d.ts.map +0 -1
  412. package/lib/client/WorktreeModeAction.js.map +0 -1
  413. package/lib/client/WorktreeOverlay.d.ts.map +0 -1
  414. package/lib/client/WorktreeOverlay.js.map +0 -1
  415. package/lib/client/navigation.d.ts.map +0 -1
  416. package/lib/client/navigation.js.map +0 -1
  417. package/lib/client/overlay-bounds.d.ts.map +0 -1
  418. package/lib/client/overlay-bounds.js.map +0 -1
  419. package/lib/client/session-view.d.ts.map +0 -1
  420. package/lib/client/session-view.js.map +0 -1
  421. package/lib/client/sidebar-overlay-geometry.d.ts.map +0 -1
  422. package/lib/client/sidebar-overlay-geometry.js.map +0 -1
  423. package/lib/client/view-mode-store.d.ts.map +0 -1
  424. package/lib/client/view-mode-store.js.map +0 -1
  425. package/lib/client/view-mode.d.ts.map +0 -1
  426. package/lib/client/view-mode.js.map +0 -1
  427. package/lib/client/virtual-workspace-membership.d.ts +0 -27
  428. package/lib/client/virtual-workspace-membership.d.ts.map +0 -1
  429. package/lib/client/virtual-workspace-membership.js +0 -106
  430. package/lib/client/virtual-workspace-membership.js.map +0 -1
  431. package/lib/client/worktree-context-store.d.ts.map +0 -1
  432. package/lib/client/worktree-context-store.js.map +0 -1
  433. package/lib/client/worktree-context.d.ts.map +0 -1
  434. package/lib/client/worktree-context.js.map +0 -1
  435. package/lib/client/worktree-error-copy.d.ts.map +0 -1
  436. package/lib/client/worktree-error-copy.js.map +0 -1
  437. package/lib/client/worktree-expand-state.d.ts.map +0 -1
  438. package/lib/client/worktree-expand-state.js.map +0 -1
  439. package/lib/client/worktree-permission-icon.d.ts.map +0 -1
  440. package/lib/client/worktree-permission-icon.js.map +0 -1
  441. package/lib/client/worktree-permission.d.ts.map +0 -1
  442. package/lib/client/worktree-permission.js.map +0 -1
  443. package/lib/client/worktree-session-fork.d.ts.map +0 -1
  444. package/lib/client/worktree-session-fork.js +0 -174
  445. package/lib/client/worktree-session-fork.js.map +0 -1
  446. package/lib/client/worktree-session-order.d.ts.map +0 -1
  447. package/lib/client/worktree-session-order.js.map +0 -1
  448. package/lib/client/worktree-session-position.d.ts.map +0 -1
  449. package/lib/client/worktree-session-position.js.map +0 -1
  450. package/lib/client/worktree-session.d.ts.map +0 -1
  451. package/lib/client/worktree-session.js.map +0 -1
  452. package/lib/client/worktree-surface-dialogs.d.ts.map +0 -1
  453. package/lib/client/worktree-surface-dialogs.js.map +0 -1
  454. package/lib/client/worktree-surface-rows.d.ts.map +0 -1
  455. package/lib/client/worktree-surface-rows.js.map +0 -1
  456. package/lib/client/worktree-surface-selectors.d.ts.map +0 -1
  457. package/lib/client/worktree-surface-selectors.js.map +0 -1
  458. package/lib/client/worktree-surface-types.d.ts.map +0 -1
  459. package/lib/client/worktree-surface-types.js +0 -2
  460. package/lib/client/worktree-surface-types.js.map +0 -1
  461. package/lib/client/worktree-view-actions.d.ts.map +0 -1
  462. package/lib/client/worktree-view-actions.js.map +0 -1
  463. package/lib/client/worktree-view-errors.d.ts.map +0 -1
  464. package/lib/client/worktree-view-errors.js.map +0 -1
  465. package/lib/client/worktree-view-read.d.ts.map +0 -1
  466. package/lib/client/worktree-view-read.js.map +0 -1
  467. package/lib/client/worktree-view.d.ts.map +0 -1
  468. package/lib/client/worktree-view.js.map +0 -1
  469. package/lib/provider/git.d.ts.map +0 -1
  470. package/lib/provider/git.js.map +0 -1
  471. package/lib/provider/mutation-lock.d.ts.map +0 -1
  472. package/lib/provider/mutation-lock.js.map +0 -1
  473. package/lib/provider/repository-fingerprint.d.ts.map +0 -1
  474. package/lib/provider/repository-fingerprint.js.map +0 -1
  475. package/lib/provider/sidecar-persistence.d.ts.map +0 -1
  476. package/lib/provider/sidecar-persistence.js.map +0 -1
  477. package/lib/provider/sidecar-schema.d.ts.map +0 -1
  478. package/lib/provider/sidecar-schema.js.map +0 -1
  479. package/lib/provider/sidecar.d.ts.map +0 -1
  480. package/lib/provider/sidecar.js.map +0 -1
  481. package/lib/provider/subprocess.d.ts.map +0 -1
  482. package/lib/provider/subprocess.js.map +0 -1
  483. package/lib/provider/transaction.d.ts +0 -65
  484. package/lib/provider/transaction.d.ts.map +0 -1
  485. package/lib/provider/transaction.js +0 -1011
  486. package/lib/provider/transaction.js.map +0 -1
  487. /package/lib/client/{overlay-bounds.d.ts → overlay/overlay-bounds.d.ts} +0 -0
  488. /package/lib/client/{overlay-bounds.js → overlay/overlay-bounds.js} +0 -0
  489. /package/lib/client/{sidebar-overlay-geometry.d.ts → overlay/sidebar-overlay-geometry.d.ts} +0 -0
  490. /package/lib/client/{sidebar-overlay-geometry.js → overlay/sidebar-overlay-geometry.js} +0 -0
  491. /package/lib/client/{worktree-permission-icon.d.ts → permission/worktree-permission-icon.d.ts} +0 -0
  492. /package/lib/client/{worktree-permission-icon.js → permission/worktree-permission-icon.js} +0 -0
  493. /package/lib/client/{worktree-permission.d.ts → permission/worktree-permission.d.ts} +0 -0
  494. /package/lib/client/{worktree-permission.js → permission/worktree-permission.js} +0 -0
  495. /package/lib/client/{session-view.d.ts → session/session-view.d.ts} +0 -0
  496. /package/lib/client/{session-view.js → session/session-view.js} +0 -0
  497. /package/lib/client/{worktree-session-order.js → session/worktree-session-order.js} +0 -0
  498. /package/lib/client/{worktree-session-position.d.ts → session/worktree-session-position.d.ts} +0 -0
  499. /package/lib/client/{worktree-session-position.js → session/worktree-session-position.js} +0 -0
  500. /package/lib/client/{navigation.d.ts → view/navigation.d.ts} +0 -0
  501. /package/lib/client/{navigation.js → view/navigation.js} +0 -0
  502. /package/lib/client/{worktree-error-copy.js → view/worktree-error-copy.js} +0 -0
  503. /package/lib/client/{worktree-view-errors.d.ts → view/worktree-view-errors.d.ts} +0 -0
  504. /package/lib/client/{worktree-view-errors.js → view/worktree-view-errors.js} +0 -0
  505. /package/lib/client/{worktree-view.d.ts → view/worktree-view.d.ts} +0 -0
  506. /package/lib/client/{worktree-view.js → view/worktree-view.js} +0 -0
  507. /package/lib/provider/{repository-fingerprint.js → git/repository-fingerprint.js} +0 -0
  508. /package/lib/provider/{mutation-lock.d.ts → sidecar/mutation-lock.d.ts} +0 -0
@@ -0,0 +1,44 @@
1
+ import { useRef, useState } from 'react';
2
+ import { createWorktreeModalViewLoader, createWorktreeRefreshGuard, } from '../../view/worktree-view.js';
3
+ export function useRegistrationState({ props }) {
4
+ const { viewReader } = props;
5
+ const [worktreeModalWorkspaceId, setWorktreeModalWorkspaceId] = useState();
6
+ const [modalReadError, setModalReadError] = useState();
7
+ const [modalReadLoading, setModalReadLoading] = useState(false);
8
+ const [worktreeModalMode, setWorktreeModalMode] = useState('create');
9
+ const [importCandidates, setImportCandidates] = useState({
10
+ status: 'idle',
11
+ candidates: [],
12
+ });
13
+ const [selectedImportPath, setSelectedImportPath] = useState();
14
+ const [selectedBranch, setSelectedBranch] = useState('');
15
+ const [newBranch, setNewBranch] = useState('');
16
+ const modalReadLoader = useRef(createWorktreeModalViewLoader(viewReader));
17
+ const modalReadViewRef = useRef();
18
+ const importCandidatesGuard = useRef(createWorktreeRefreshGuard());
19
+ const modalWorkspaceIdRef = useRef(worktreeModalWorkspaceId);
20
+ modalWorkspaceIdRef.current = worktreeModalWorkspaceId;
21
+ return {
22
+ worktreeModalWorkspaceId,
23
+ setWorktreeModalWorkspaceId,
24
+ modalReadError,
25
+ setModalReadError,
26
+ modalReadLoading,
27
+ setModalReadLoading,
28
+ worktreeModalMode,
29
+ setWorktreeModalMode,
30
+ importCandidates,
31
+ setImportCandidates,
32
+ selectedImportPath,
33
+ setSelectedImportPath,
34
+ selectedBranch,
35
+ setSelectedBranch,
36
+ newBranch,
37
+ setNewBranch,
38
+ modalReadLoader,
39
+ modalReadViewRef,
40
+ importCandidatesGuard,
41
+ modalWorkspaceIdRef,
42
+ };
43
+ }
44
+ //# sourceMappingURL=useRegistrationState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRegistrationState.js","sourceRoot":"","sources":["../../../../src/client/surface/state/useRegistrationState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,GAG3B,MAAM,6BAA6B,CAAC;AASrC,MAAM,UAAU,oBAAoB,CAAC,EAAE,KAAK,EAAS;IACnD,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,GAAG,QAAQ,EAAU,CAAC;IACnF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,EAAqB,CAAC;IAC1E,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAA2B,QAAQ,CAAC,CAAC;IAC/F,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAwB;QAC9E,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,EAAE;KACf,CAAC,CAAC;IACH,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,EAAsB,CAAC;IACnF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,MAAM,eAAe,GAAG,MAAM,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1E,MAAM,gBAAgB,GAAG,MAAM,EAAyB,CAAC;IACzD,MAAM,qBAAqB,GAAG,MAAM,CAAC,0BAA0B,EAAE,CAAC,CAAC;IACnE,MAAM,mBAAmB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAC7D,mBAAmB,CAAC,OAAO,GAAG,wBAAwB,CAAC;IACvD,OAAO;QACL,wBAAwB;QACxB,2BAA2B;QAC3B,cAAc;QACd,iBAAiB;QACjB,gBAAgB;QAChB,mBAAmB;QACnB,iBAAiB;QACjB,oBAAoB;QACpB,gBAAgB;QAChB,mBAAmB;QACnB,kBAAkB;QAClB,qBAAqB;QACrB,cAAc;QACd,iBAAiB;QACjB,SAAS;QACT,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,qBAAqB;QACrB,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { CurrentSessionRevealState, ExpandedSessionGroups } from '../shared.js';
2
+ import type { WorktreeSurfaceProps } from '../types.js';
3
+ import type { useSurfaceRefresh } from './useSurfaceRefresh.js';
4
+ import type { useSurfaceSources } from './useSurfaceSources.js';
5
+ type Input = {
6
+ read: Pick<ReturnType<typeof useSurfaceRefresh>, 'readState' | 'viewByWorkspace'>;
7
+ source: Pick<ReturnType<typeof useSurfaceSources>, 'currentSessionId' | 'workspaces' | 'mode' | 'ref' | 'expandSnapshot' | 'workspaceIds'>;
8
+ props: Pick<WorktreeSurfaceProps, 'expandState'>;
9
+ };
10
+ export declare function useSessionExpansion({ read, source, props }: Input): {
11
+ searchQuery: string;
12
+ setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
13
+ searchExpanded: boolean;
14
+ setSearchExpanded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
15
+ searchRoot: import("react").MutableRefObject<HTMLDivElement | null>;
16
+ searchInput: import("react").MutableRefObject<HTMLInputElement | null>;
17
+ currentSessionReveal: CurrentSessionRevealState | undefined;
18
+ setCurrentSessionReveal: import("react").Dispatch<import("react").SetStateAction<CurrentSessionRevealState | undefined>>;
19
+ searchQueryRef: import("react").MutableRefObject<string>;
20
+ locateGenerationRef: import("react").MutableRefObject<number>;
21
+ positionedLocateGenerationRef: import("react").MutableRefObject<number | undefined>;
22
+ expandedArchivedWorkspaces: Readonly<Record<string, boolean>>;
23
+ setExpandedArchivedWorkspaces: import("react").Dispatch<import("react").SetStateAction<Readonly<Record<string, boolean>>>>;
24
+ expandedSessionGroups: ExpandedSessionGroups;
25
+ setExpandedSessionGroups: import("react").Dispatch<import("react").SetStateAction<ExpandedSessionGroups>>;
26
+ query: string;
27
+ currentSessionLocation: import("../selectors.js").CurrentSessionLocation | undefined;
28
+ currentRevealKeys: Set<string>;
29
+ isCurrentSessionReveal: (key: string) => boolean;
30
+ clearSessionGroups: (groupKeys: readonly string[]) => void;
31
+ suppressCurrentSessionReveal: (key: string) => boolean;
32
+ toggleWorkspace: (workspaceId: string) => void;
33
+ toggleMain: (workspaceId: string) => void;
34
+ toggleWorktree: (worktreeId: string) => void;
35
+ toggleArchivedWorkspace: (workspaceId: string) => void;
36
+ toggleSessionGroup: (groupKey: string, autoExpanded: boolean) => void;
37
+ };
38
+ export {};
39
+ //# sourceMappingURL=useSessionExpansion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSessionExpansion.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/state/useSessionExpansion.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAC;IAClF,MAAM,EAAE,IAAI,CACV,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpC,kBAAkB,GAAG,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,gBAAgB,GAAG,cAAc,CACvF,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;;;kCAgD3B,MAAM,KAAG,OAAO;oCA+Dd,SAAS,MAAM,EAAE,KAAG,IAAI;wCAIpB,MAAM,KAAG,OAAO;mCAWrB,MAAM,KAAG,IAAI;8BA0BlB,MAAM,KAAG,IAAI;iCAcV,MAAM,KAAG,IAAI;2CAcH,MAAM,KAAG,IAAI;mCAarB,MAAM,gBAAgB,OAAO,KAAG,IAAI;EA4C3E"}
@@ -0,0 +1,230 @@
1
+ import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2
+ import { isMainExpanded, isWorkspaceExpanded, isWorktreeExpanded, } from '../../view/worktree-expand-state.js';
3
+ import { scrollCurrentSessionIntoView } from '../../session/worktree-session-position.js';
4
+ import { clearSessionGroupExpansion, currentSessionRevealKeys, isCompleteWorktreeWorkspaceSnapshot, resolveCurrentSessionLocation, } from '../selectors.js';
5
+ export function useSessionExpansion({ read, source, props }) {
6
+ const { readState, viewByWorkspace } = read;
7
+ const { currentSessionId, workspaces, mode, ref, expandSnapshot, workspaceIds } = source;
8
+ const { expandState } = props;
9
+ const [searchQuery, setSearchQuery] = useState('');
10
+ const [searchExpanded, setSearchExpanded] = useState(false);
11
+ const searchRoot = useRef(null);
12
+ const searchInput = useRef(null);
13
+ const [currentSessionReveal, setCurrentSessionReveal] = useState();
14
+ const searchQueryRef = useRef(searchQuery);
15
+ searchQueryRef.current = searchQuery;
16
+ useEffect(() => {
17
+ if (!searchExpanded)
18
+ return;
19
+ const onClick = (event) => {
20
+ if (!(event.target instanceof Node) || searchRoot.current?.contains(event.target) === true)
21
+ return;
22
+ searchInput.current?.blur();
23
+ if (searchQuery.trim() !== '')
24
+ return;
25
+ setSearchExpanded(false);
26
+ };
27
+ document.addEventListener('click', onClick);
28
+ return () => {
29
+ document.removeEventListener('click', onClick);
30
+ };
31
+ }, [searchExpanded, searchQuery]);
32
+ useEffect(() => {
33
+ if (searchExpanded) {
34
+ searchInput.current?.focus({ preventScroll: true });
35
+ }
36
+ }, [searchExpanded]);
37
+ const locateGenerationRef = useRef(0);
38
+ const positionedLocateGenerationRef = useRef();
39
+ const [expandedArchivedWorkspaces, setExpandedArchivedWorkspaces] = useState({});
40
+ const [expandedSessionGroups, setExpandedSessionGroups] = useState({});
41
+ const query = searchQuery.trim().toLocaleLowerCase();
42
+ const currentSessionLocation = useMemo(() => readState.status === 'ready'
43
+ ? resolveCurrentSessionLocation(currentSessionId, workspaces.items, readState.views)
44
+ : undefined, [currentSessionId, readState.status, readState.views, workspaces.items]);
45
+ const currentRevealKeys = useMemo(() => new Set(currentSessionRevealKeys(currentSessionLocation)), [currentSessionLocation]);
46
+ const isCurrentSessionReveal = (key) => currentSessionReveal !== undefined &&
47
+ currentSessionReveal.sessionId === currentSessionId &&
48
+ currentRevealKeys.has(key) &&
49
+ currentSessionReveal.suppressedKeys[key] !== true;
50
+ useLayoutEffect(() => {
51
+ locateGenerationRef.current += 1;
52
+ positionedLocateGenerationRef.current = undefined;
53
+ if (mode !== 'worktree') {
54
+ setCurrentSessionReveal(undefined);
55
+ setSearchExpanded(false);
56
+ return;
57
+ }
58
+ if (searchQueryRef.current.trim().length > 0) {
59
+ setSearchQuery('');
60
+ setSearchExpanded(false);
61
+ }
62
+ setCurrentSessionReveal(currentSessionId === undefined
63
+ ? undefined
64
+ : { sessionId: currentSessionId, suppressedKeys: {} });
65
+ }, [currentSessionId, mode]);
66
+ useLayoutEffect(() => {
67
+ if (mode !== 'worktree' ||
68
+ currentSessionId === undefined ||
69
+ currentSessionLocation === undefined) {
70
+ return;
71
+ }
72
+ const generation = locateGenerationRef.current;
73
+ if (positionedLocateGenerationRef.current === generation)
74
+ return;
75
+ let cancelled = false;
76
+ const frame = requestAnimationFrame(() => {
77
+ if (cancelled || generation !== locateGenerationRef.current)
78
+ return;
79
+ if (!scrollCurrentSessionIntoView(ref.current, currentSessionId))
80
+ return;
81
+ positionedLocateGenerationRef.current = generation;
82
+ });
83
+ return () => {
84
+ cancelled = true;
85
+ cancelAnimationFrame(frame);
86
+ };
87
+ }, [
88
+ currentSessionId,
89
+ currentSessionLocation,
90
+ currentSessionReveal,
91
+ expandSnapshot,
92
+ mode,
93
+ query,
94
+ readState.status,
95
+ ]);
96
+ useEffect(() => {
97
+ if (readState.status !== 'ready' ||
98
+ !isCompleteWorktreeWorkspaceSnapshot(workspaceIds, readState.views))
99
+ return;
100
+ expandState.actions.retain(workspaceIds, readState.views.flatMap((view) => view.worktrees.map((record) => record.worktreeId)));
101
+ }, [expandState, readState.status, readState.views, workspaceIds]);
102
+ const clearSessionGroups = (groupKeys) => {
103
+ if (groupKeys.length === 0)
104
+ return;
105
+ setExpandedSessionGroups((current) => clearSessionGroupExpansion(current, groupKeys));
106
+ };
107
+ const suppressCurrentSessionReveal = (key) => {
108
+ if (!isCurrentSessionReveal(key))
109
+ return false;
110
+ setCurrentSessionReveal((current) => {
111
+ if (current === undefined || current.sessionId !== currentSessionId)
112
+ return current;
113
+ return {
114
+ ...current,
115
+ suppressedKeys: { ...current.suppressedKeys, [key]: true },
116
+ };
117
+ });
118
+ return true;
119
+ };
120
+ const toggleWorkspace = (workspaceId) => {
121
+ const persistedExpanded = isWorkspaceExpanded(expandSnapshot, workspaceId);
122
+ const autoExpanded = isCurrentSessionReveal('workspace:' + workspaceId);
123
+ const visuallyExpanded = persistedExpanded || autoExpanded;
124
+ if (visuallyExpanded && autoExpanded) {
125
+ suppressCurrentSessionReveal('workspace:' + workspaceId);
126
+ }
127
+ if (visuallyExpanded && !persistedExpanded) {
128
+ clearSessionGroups([
129
+ 'main:' + workspaceId,
130
+ ...(viewByWorkspace.get(workspaceId)?.worktrees.map((record) => record.worktreeId) ?? []).map((worktreeId) => 'worktree:' + worktreeId),
131
+ ]);
132
+ return;
133
+ }
134
+ expandState.actions.toggleWorkspace(workspaceId);
135
+ if (visuallyExpanded) {
136
+ clearSessionGroups([
137
+ 'main:' + workspaceId,
138
+ ...(viewByWorkspace.get(workspaceId)?.worktrees.map((record) => record.worktreeId) ?? []).map((worktreeId) => 'worktree:' + worktreeId),
139
+ ]);
140
+ }
141
+ };
142
+ const toggleMain = (workspaceId) => {
143
+ const persistedExpanded = isMainExpanded(expandSnapshot, workspaceId);
144
+ const autoExpanded = isCurrentSessionReveal('main:' + workspaceId);
145
+ const visuallyExpanded = persistedExpanded || autoExpanded;
146
+ if (visuallyExpanded && autoExpanded) {
147
+ suppressCurrentSessionReveal('main:' + workspaceId);
148
+ }
149
+ if (visuallyExpanded && !persistedExpanded) {
150
+ clearSessionGroups(['main:' + workspaceId]);
151
+ return;
152
+ }
153
+ expandState.actions.toggleMain(workspaceId);
154
+ if (visuallyExpanded)
155
+ clearSessionGroups(['main:' + workspaceId]);
156
+ };
157
+ const toggleWorktree = (worktreeId) => {
158
+ const persistedExpanded = isWorktreeExpanded(expandSnapshot, worktreeId);
159
+ const autoExpanded = isCurrentSessionReveal('worktree:' + worktreeId);
160
+ const visuallyExpanded = persistedExpanded || autoExpanded;
161
+ if (visuallyExpanded && autoExpanded) {
162
+ suppressCurrentSessionReveal('worktree:' + worktreeId);
163
+ }
164
+ if (visuallyExpanded && !persistedExpanded) {
165
+ clearSessionGroups(['worktree:' + worktreeId]);
166
+ return;
167
+ }
168
+ expandState.actions.toggleWorktree(worktreeId);
169
+ if (visuallyExpanded)
170
+ clearSessionGroups(['worktree:' + worktreeId]);
171
+ };
172
+ const toggleArchivedWorkspace = (workspaceId) => {
173
+ const archivedKey = 'archived:' + workspaceId;
174
+ const autoExpanded = isCurrentSessionReveal(archivedKey);
175
+ const persistedExpanded = expandedArchivedWorkspaces[workspaceId] === true;
176
+ const visuallyExpanded = persistedExpanded || autoExpanded;
177
+ if (visuallyExpanded && autoExpanded) {
178
+ suppressCurrentSessionReveal(archivedKey);
179
+ }
180
+ setExpandedArchivedWorkspaces((current) => ({
181
+ ...current,
182
+ [workspaceId]: !visuallyExpanded,
183
+ }));
184
+ };
185
+ const toggleSessionGroup = (groupKey, autoExpanded) => {
186
+ const transientExpanded = expandedSessionGroups[groupKey] === true;
187
+ if (autoExpanded) {
188
+ suppressCurrentSessionReveal('session-group:' + groupKey);
189
+ setExpandedSessionGroups((current) => {
190
+ const next = { ...current };
191
+ delete next[groupKey];
192
+ return next;
193
+ });
194
+ return;
195
+ }
196
+ setExpandedSessionGroups((current) => ({
197
+ ...current,
198
+ [groupKey]: !transientExpanded,
199
+ }));
200
+ };
201
+ return {
202
+ searchQuery,
203
+ setSearchQuery,
204
+ searchExpanded,
205
+ setSearchExpanded,
206
+ searchRoot,
207
+ searchInput,
208
+ currentSessionReveal,
209
+ setCurrentSessionReveal,
210
+ searchQueryRef,
211
+ locateGenerationRef,
212
+ positionedLocateGenerationRef,
213
+ expandedArchivedWorkspaces,
214
+ setExpandedArchivedWorkspaces,
215
+ expandedSessionGroups,
216
+ setExpandedSessionGroups,
217
+ query,
218
+ currentSessionLocation,
219
+ currentRevealKeys,
220
+ isCurrentSessionReveal,
221
+ clearSessionGroups,
222
+ suppressCurrentSessionReveal,
223
+ toggleWorkspace,
224
+ toggleMain,
225
+ toggleWorktree,
226
+ toggleArchivedWorkspace,
227
+ toggleSessionGroup,
228
+ };
229
+ }
230
+ //# sourceMappingURL=useSessionExpansion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSessionExpansion.js","sourceRoot":"","sources":["../../../../src/client/surface/state/useSessionExpansion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,mCAAmC,EACnC,6BAA6B,GAC9B,MAAM,iBAAiB,CAAC;AAezB,MAAM,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAS;IAChE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAC5C,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IACzF,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,MAAM,CAAwB,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4BAA4B;QAC5B,eAAe;QACf,UAAU;QACV,cAAc;QACd,uBAAuB;QACvB,kBAAkB;KACnB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { SessionOrderInput } from '../shared.js';
2
+ import type { WorktreeSurfaceProps } from '../types.js';
3
+ import type { useSurfaceRefresh } from './useSurfaceRefresh.js';
4
+ import type { useSurfaceSources } from './useSurfaceSources.js';
5
+ type Input = {
6
+ read: Pick<ReturnType<typeof useSurfaceRefresh>, 'readState' | 'viewByWorkspace'>;
7
+ source: Pick<ReturnType<typeof useSurfaceSources>, 'workspaces' | 'sessions' | 'archivedSessionIds' | 'sessionOrderSnapshot' | 'mode'>;
8
+ props: Pick<WorktreeSurfaceProps, 'sessionOrder'>;
9
+ };
10
+ export declare function useSessionOrdering({ read, source, props }: Input): {
11
+ sessionOrderInputs: readonly SessionOrderInput[];
12
+ orderedSessionIdsByAccount: Map<string, readonly string[]>;
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=useSessionOrdering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSessionOrdering.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/state/useSessionOrdering.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAC;IAClF,MAAM,EAAE,IAAI,CACV,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpC,YAAY,GAAG,UAAU,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,MAAM,CACnF,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;CACnD,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK;;;EA2EhE"}
@@ -0,0 +1,68 @@
1
+ import { useEffect, useMemo } from 'react';
2
+ import { filterVisibleSessionIds } from '../../session/session-view.js';
3
+ import { unboundSessionIds, workspaceSessionIds } from '../../view/view-mode.js';
4
+ import { nextSessionOrderAccount, } from '../../session/worktree-session-order.js';
5
+ import { filterArchivedSessionIds } from '../../view/worktree-view.js';
6
+ import { bindingIdsFor } from '../selectors.js';
7
+ import { updatedAtById } from '../shared.js';
8
+ export function useSessionOrdering({ read, source, props }) {
9
+ const { readState, viewByWorkspace } = read;
10
+ const { workspaces, sessions, archivedSessionIds, sessionOrderSnapshot, mode } = source;
11
+ const { sessionOrder } = props;
12
+ const sessionOrderInputs = useMemo(() => {
13
+ if (readState.status !== 'ready')
14
+ return [];
15
+ const inputs = [];
16
+ for (const workspace of workspaces.items) {
17
+ const view = viewByWorkspace.get(workspace.workspaceId);
18
+ const allWorkspaceSessionIds = filterArchivedSessionIds(workspaceSessionIds(workspaces, workspace.workspaceId, sessions.ids), archivedSessionIds);
19
+ const bindings = view?.bindings ?? [];
20
+ const boundSessionIds = new Set(bindings.map((binding) => binding.sessionId));
21
+ const mainSessionIds = filterVisibleSessionIds(unboundSessionIds(allWorkspaceSessionIds, [...boundSessionIds]), sessions);
22
+ inputs.push({
23
+ accountKey: `main:${workspace.workspaceId}`,
24
+ sessionIds: mainSessionIds,
25
+ updatedAtById: updatedAtById(mainSessionIds, sessions),
26
+ });
27
+ for (const record of view?.worktrees ?? []) {
28
+ const worktreeSessionIds = filterVisibleSessionIds(filterArchivedSessionIds(bindingIdsFor(bindings, record.worktreeId).filter((sessionId) => sessions.ids.includes(sessionId)), archivedSessionIds), sessions);
29
+ inputs.push({
30
+ accountKey: `worktree:${record.worktreeId}`,
31
+ sessionIds: worktreeSessionIds,
32
+ updatedAtById: updatedAtById(worktreeSessionIds, sessions),
33
+ });
34
+ }
35
+ }
36
+ return inputs;
37
+ }, [
38
+ archivedSessionIds,
39
+ readState.status,
40
+ sessions.byId,
41
+ sessions.ids,
42
+ viewByWorkspace,
43
+ workspaces,
44
+ workspaces.items,
45
+ ]);
46
+ const orderedSessionIdsByAccount = useMemo(() => {
47
+ const ordered = new Map();
48
+ for (const input of sessionOrderInputs) {
49
+ const previous = sessionOrderSnapshot.accounts[input.accountKey];
50
+ ordered.set(input.accountKey, nextSessionOrderAccount({
51
+ baseIds: input.sessionIds,
52
+ updatedAtById: input.updatedAtById,
53
+ previous,
54
+ }).order);
55
+ }
56
+ return ordered;
57
+ }, [sessionOrderInputs, sessionOrderSnapshot]);
58
+ useEffect(() => {
59
+ if (mode !== 'worktree' || readState.status !== 'ready')
60
+ return;
61
+ for (const input of sessionOrderInputs) {
62
+ sessionOrder.actions.reconcile(input.accountKey, input.sessionIds, input.updatedAtById);
63
+ }
64
+ sessionOrder.actions.retain(sessionOrderInputs.map((input) => input.accountKey));
65
+ }, [mode, readState.status, sessionOrder, sessionOrderInputs]);
66
+ return { sessionOrderInputs, orderedSessionIdsByAccount };
67
+ }
68
+ //# sourceMappingURL=useSessionOrdering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSessionOrdering.js","sourceRoot":"","sources":["../../../../src/client/surface/state/useSessionOrdering.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EACL,uBAAuB,GAExB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,aAAa,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;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAC/C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,IAAI,KAAK,UAAU,IAAI,SAAS,CAAC,MAAM,KAAK,OAAO;YAAE,OAAO;QAChE,KAAK,MAAM,KAAK,IAAI,kBAAkB,EAAE,CAAC;YACvC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;QAC1F,CAAC;QACD,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACnF,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC/D,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare function useSurfaceMenus(): {
2
+ openWorkspaceMenuId: string | undefined;
3
+ setOpenWorkspaceMenuId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
4
+ openMainMenuId: string | undefined;
5
+ setOpenMainMenuId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
6
+ openWorktreeMenuId: string | undefined;
7
+ setOpenWorktreeMenuId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
8
+ };
9
+ //# sourceMappingURL=useSurfaceMenus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSurfaceMenus.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/state/useSurfaceMenus.tsx"],"names":[],"mappings":"AAEA,wBAAgB,eAAe;;;;;;;EAY9B"}
@@ -0,0 +1,15 @@
1
+ import { useState } from 'react';
2
+ export function useSurfaceMenus() {
3
+ const [openWorkspaceMenuId, setOpenWorkspaceMenuId] = useState();
4
+ const [openMainMenuId, setOpenMainMenuId] = useState();
5
+ const [openWorktreeMenuId, setOpenWorktreeMenuId] = useState();
6
+ return {
7
+ openWorkspaceMenuId,
8
+ setOpenWorkspaceMenuId,
9
+ openMainMenuId,
10
+ setOpenMainMenuId,
11
+ openWorktreeMenuId,
12
+ setOpenWorktreeMenuId,
13
+ };
14
+ }
15
+ //# sourceMappingURL=useSurfaceMenus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSurfaceMenus.js","sourceRoot":"","sources":["../../../../src/client/surface/state/useSurfaceMenus.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,UAAU,eAAe;IAC7B,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,EAAU,CAAC;IACzE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,EAAU,CAAC;IAC/D,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,EAAU,CAAC;IACvE,OAAO;QACL,mBAAmB;QACnB,sBAAsB;QACtB,cAAc;QACd,iBAAiB;QACjB,kBAAkB;QAClB,qBAAqB;KACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { ReadState, RefreshOptions, WorktreeSurfaceProps } from '../types.js';
2
+ import type { useRegistrationState } from './useRegistrationState.js';
3
+ import type { useSurfaceSources } from './useSurfaceSources.js';
4
+ type Input = {
5
+ source: Pick<ReturnType<typeof useSurfaceSources>, 'forkRecoverySnapshot' | 'workspaceIdsRef' | 'mode' | 'workspaceIds' | 'sessionPresentations'>;
6
+ props: Pick<WorktreeSurfaceProps, 'manager' | 'viewReader' | 'invalidateWorktreeContext' | 'syncSessionWorkspaces'>;
7
+ registrationState: Pick<ReturnType<typeof useRegistrationState>, 'modalReadViewRef' | 'setModalReadError' | 'setModalReadLoading' | 'modalReadLoader' | 'setWorktreeModalWorkspaceId'>;
8
+ };
9
+ export declare function useSurfaceRefresh({ source, props, registrationState }: Input): {
10
+ readState: ReadState;
11
+ setReadState: import("react").Dispatch<import("react").SetStateAction<ReadState>>;
12
+ readStateRef: import("react").MutableRefObject<ReadState>;
13
+ refreshGuard: import("react").MutableRefObject<{
14
+ begin: () => number;
15
+ isCurrent: (generation: number) => boolean;
16
+ invalidate: () => void;
17
+ run<T>(load: () => Promise<T>, onSuccess: (value: T) => void, onError: (error: unknown) => void): Promise<void>;
18
+ }>;
19
+ targetRefreshGuards: import("react").MutableRefObject<Map<string, {
20
+ begin: () => number;
21
+ isCurrent: (generation: number) => boolean;
22
+ invalidate: () => void;
23
+ run<T>(load: () => Promise<T>, onSuccess: (value: T) => void, onError: (error: unknown) => void): Promise<void>;
24
+ }>>;
25
+ forkRecoveryRevisionRef: import("react").MutableRefObject<number>;
26
+ guardFor: (workspaceId: string) => {
27
+ begin: () => number;
28
+ isCurrent: (generation: number) => boolean;
29
+ invalidate: () => void;
30
+ run<T>(load: () => Promise<T>, onSuccess: (value: T) => void, onError: (error: unknown) => void): Promise<void>;
31
+ };
32
+ refresh: (options?: RefreshOptions) => Promise<void>;
33
+ loadModalWorktreeView: (workspaceId: string) => void;
34
+ previousWorkspaceIdsRef: import("react").MutableRefObject<readonly string[]>;
35
+ viewByWorkspace: Map<string, import("../../view/worktree-view-read.js").WorktreeWorkspaceView>;
36
+ previousActivityRef: import("react").MutableRefObject<Readonly<Record<string, import("../../session/session-view.js").SessionPresentation>>>;
37
+ };
38
+ export {};
39
+ //# sourceMappingURL=useSurfaceRefresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSurfaceRefresh.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/state/useSurfaceRefresh.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,IAAI,CACV,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpC,sBAAsB,GAAG,iBAAiB,GAAG,MAAM,GAAG,cAAc,GAAG,sBAAsB,CAC9F,CAAC;IACF,KAAK,EAAE,IAAI,CACT,oBAAoB,EACpB,SAAS,GAAG,YAAY,GAAG,2BAA2B,GAAG,uBAAuB,CACjF,CAAC;IACF,iBAAiB,EAAE,IAAI,CACrB,UAAU,CAAC,OAAO,oBAAoB,CAAC,EACrC,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GACrB,iBAAiB,GACjB,6BAA6B,CAChC,CAAC;CACH,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;4BAmB5C,MAAM;;;;;;wBAQnB,cAAc,KAAQ,OAAO,CAAC,IAAI,CAAC;yCA6HrC,MAAM,KAAG,IAAI;;;;EA0J9B"}