@cerbur/clutch-dsh-worktree 0.1.9 → 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.
- package/README.md +99 -23
- package/README.zh.md +75 -19
- package/lib/client/WorktreeSurface.d.ts +4 -7
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +44 -1419
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/{WorktreeContext.d.ts → context/WorktreeContext.d.ts} +1 -1
- package/lib/client/context/WorktreeContext.d.ts.map +1 -0
- package/lib/client/context/WorktreeContext.js.map +1 -0
- package/lib/client/{WorktreeHeroContext.d.ts → context/WorktreeHeroContext.d.ts} +1 -1
- package/lib/client/context/WorktreeHeroContext.d.ts.map +1 -0
- package/lib/client/context/WorktreeHeroContext.js.map +1 -0
- package/lib/client/{worktree-context-store.d.ts → context/worktree-context-store.d.ts} +1 -1
- package/lib/client/context/worktree-context-store.d.ts.map +1 -0
- package/lib/client/{worktree-context-store.js → context/worktree-context-store.js} +2 -2
- package/lib/client/context/worktree-context-store.js.map +1 -0
- package/lib/client/{worktree-context.d.ts → context/worktree-context.d.ts} +1 -1
- package/lib/client/context/worktree-context.d.ts.map +1 -0
- package/lib/client/{worktree-context.js → context/worktree-context.js} +5 -3
- package/lib/client/context/worktree-context.js.map +1 -0
- package/lib/client/entry.d.ts +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +25 -13
- package/lib/client/entry.js.map +1 -1
- package/lib/client/index.d.ts +3 -3
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +2 -2
- package/lib/client/index.js.map +1 -1
- package/lib/client/locales.d.ts +66 -0
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +76 -10
- package/lib/client/locales.js.map +1 -1
- package/lib/client/{WorktreeOverlay.d.ts → overlay/WorktreeOverlay.d.ts} +2 -2
- package/lib/client/overlay/WorktreeOverlay.d.ts.map +1 -0
- package/lib/client/{WorktreeOverlay.js → overlay/WorktreeOverlay.js} +2 -2
- package/lib/client/overlay/WorktreeOverlay.js.map +1 -0
- package/lib/client/overlay/overlay-bounds.d.ts.map +1 -0
- package/lib/client/overlay/overlay-bounds.js.map +1 -0
- package/lib/client/overlay/sidebar-overlay-geometry.d.ts.map +1 -0
- package/lib/client/overlay/sidebar-overlay-geometry.js.map +1 -0
- package/lib/client/permission/worktree-permission-icon.d.ts.map +1 -0
- package/lib/client/permission/worktree-permission-icon.js.map +1 -0
- package/lib/client/permission/worktree-permission.d.ts.map +1 -0
- package/lib/client/permission/worktree-permission.js.map +1 -0
- package/lib/client/session/session-view.d.ts.map +1 -0
- package/lib/client/session/session-view.js.map +1 -0
- package/lib/client/{virtual-workspace-membership.d.ts → session/virtual-workspace-membership.d.ts} +1 -1
- package/lib/client/session/virtual-workspace-membership.d.ts.map +1 -0
- package/lib/client/{virtual-workspace-membership.js → session/virtual-workspace-membership.js} +1 -1
- package/lib/client/session/virtual-workspace-membership.js.map +1 -0
- package/lib/client/{worktree-session-fork.d.ts → session/worktree-session-fork.d.ts} +7 -1
- package/lib/client/session/worktree-session-fork.d.ts.map +1 -0
- package/lib/client/{worktree-session-fork.js → session/worktree-session-fork.js} +50 -4
- package/lib/client/session/worktree-session-fork.js.map +1 -0
- package/lib/client/session/worktree-session-order.d.ts.map +1 -0
- package/lib/client/session/worktree-session-order.js.map +1 -0
- package/lib/client/session/worktree-session-position.d.ts.map +1 -0
- package/lib/client/session/worktree-session-position.js.map +1 -0
- package/lib/client/{worktree-session.d.ts → session/worktree-session.d.ts} +3 -3
- package/lib/client/session/worktree-session.d.ts.map +1 -0
- package/lib/client/{worktree-session.js → session/worktree-session.js} +3 -3
- package/lib/client/session/worktree-session.js.map +1 -0
- package/lib/client/surface/actions/lifecycle-commands.d.ts +9 -0
- package/lib/client/surface/actions/lifecycle-commands.d.ts.map +1 -0
- package/lib/client/surface/actions/lifecycle-commands.js +243 -0
- package/lib/client/surface/actions/lifecycle-commands.js.map +1 -0
- package/lib/client/surface/actions/useDragActions.d.ts +26 -0
- package/lib/client/surface/actions/useDragActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useDragActions.js +125 -0
- package/lib/client/surface/actions/useDragActions.js.map +1 -0
- package/lib/client/surface/actions/useLifecycleActions.d.ts +30 -0
- package/lib/client/surface/actions/useLifecycleActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useLifecycleActions.js +140 -0
- package/lib/client/surface/actions/useLifecycleActions.js.map +1 -0
- package/lib/client/surface/actions/useNativeActions.d.ts +48 -0
- package/lib/client/surface/actions/useNativeActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useNativeActions.js +182 -0
- package/lib/client/surface/actions/useNativeActions.js.map +1 -0
- package/lib/client/surface/actions/useSessionActions.d.ts +24 -0
- package/lib/client/surface/actions/useSessionActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useSessionActions.js +116 -0
- package/lib/client/surface/actions/useSessionActions.js.map +1 -0
- package/lib/client/surface/actions/useSurfaceMutation.d.ts +15 -0
- package/lib/client/surface/actions/useSurfaceMutation.d.ts.map +1 -0
- package/lib/client/surface/actions/useSurfaceMutation.js +24 -0
- package/lib/client/surface/actions/useSurfaceMutation.js.map +1 -0
- package/lib/client/surface/actions/useWorktreeRegistration.d.ts +31 -0
- package/lib/client/surface/actions/useWorktreeRegistration.d.ts.map +1 -0
- package/lib/client/surface/actions/useWorktreeRegistration.js +203 -0
- package/lib/client/surface/actions/useWorktreeRegistration.js.map +1 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.d.ts +10 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.d.ts.map +1 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.js +19 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.js.map +1 -0
- package/lib/client/surface/components/AccessConfirmation.d.ts +9 -0
- package/lib/client/surface/components/AccessConfirmation.d.ts.map +1 -0
- package/lib/client/surface/components/AccessConfirmation.js +18 -0
- package/lib/client/surface/components/AccessConfirmation.js.map +1 -0
- package/lib/client/surface/components/ActiveWorktree.d.ts +28 -0
- package/lib/client/surface/components/ActiveWorktree.d.ts.map +1 -0
- package/lib/client/surface/components/ActiveWorktree.js +154 -0
- package/lib/client/surface/components/ActiveWorktree.js.map +1 -0
- package/lib/client/surface/components/ArchivedWorktree.d.ts +24 -0
- package/lib/client/surface/components/ArchivedWorktree.d.ts.map +1 -0
- package/lib/client/surface/components/ArchivedWorktree.js +145 -0
- package/lib/client/surface/components/ArchivedWorktree.js.map +1 -0
- package/lib/client/surface/components/ArchivedWorktrees.d.ts +25 -0
- package/lib/client/surface/components/ArchivedWorktrees.d.ts.map +1 -0
- package/lib/client/surface/components/ArchivedWorktrees.js +20 -0
- package/lib/client/surface/components/ArchivedWorktrees.js.map +1 -0
- package/lib/client/surface/components/LifecycleDialogs.d.ts +20 -0
- package/lib/client/surface/components/LifecycleDialogs.d.ts.map +1 -0
- package/lib/client/surface/components/LifecycleDialogs.js +31 -0
- package/lib/client/surface/components/LifecycleDialogs.js.map +1 -0
- package/lib/client/surface/components/NativeDialogs.d.ts +9 -0
- package/lib/client/surface/components/NativeDialogs.d.ts.map +1 -0
- package/lib/client/surface/components/NativeDialogs.js +14 -0
- package/lib/client/surface/components/NativeDialogs.js.map +1 -0
- package/lib/client/surface/components/NotificationToasts.d.ts +7 -0
- package/lib/client/surface/components/NotificationToasts.d.ts.map +1 -0
- package/lib/client/surface/components/NotificationToasts.js +24 -0
- package/lib/client/surface/components/NotificationToasts.js.map +1 -0
- package/lib/client/surface/components/RegistrationDialog.d.ts +15 -0
- package/lib/client/surface/components/RegistrationDialog.d.ts.map +1 -0
- package/lib/client/surface/components/RegistrationDialog.js +22 -0
- package/lib/client/surface/components/RegistrationDialog.js.map +1 -0
- package/lib/client/surface/components/SurfaceContent.d.ts +31 -0
- package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -0
- package/lib/client/surface/components/SurfaceContent.js +65 -0
- package/lib/client/surface/components/SurfaceContent.js.map +1 -0
- package/lib/client/surface/components/SurfaceHeader.d.ts +15 -0
- package/lib/client/surface/components/SurfaceHeader.d.ts.map +1 -0
- package/lib/client/surface/components/SurfaceHeader.js +42 -0
- package/lib/client/surface/components/SurfaceHeader.js.map +1 -0
- package/lib/client/surface/components/WorkspaceTree.d.ts +32 -0
- package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -0
- package/lib/client/surface/components/WorkspaceTree.js +145 -0
- package/lib/client/surface/components/WorkspaceTree.js.map +1 -0
- package/lib/client/{worktree-surface-dialogs.d.ts → surface/components/dialogs.d.ts} +5 -2
- package/lib/client/surface/components/dialogs.d.ts.map +1 -0
- package/lib/client/{worktree-surface-dialogs.js → surface/components/dialogs.js} +67 -24
- package/lib/client/surface/components/dialogs.js.map +1 -0
- package/lib/client/{worktree-surface-rows.d.ts → surface/components/rows.d.ts} +3 -3
- package/lib/client/surface/components/rows.d.ts.map +1 -0
- package/lib/client/{worktree-surface-rows.js → surface/components/rows.js} +79 -17
- package/lib/client/surface/components/rows.js.map +1 -0
- package/lib/client/surface/notification-queue.d.ts +11 -0
- package/lib/client/surface/notification-queue.d.ts.map +1 -0
- package/lib/client/surface/notification-queue.js +19 -0
- package/lib/client/surface/notification-queue.js.map +1 -0
- package/lib/client/{worktree-surface-selectors.d.ts → surface/selectors.d.ts} +10 -5
- package/lib/client/surface/selectors.d.ts.map +1 -0
- package/lib/client/{worktree-surface-selectors.js → surface/selectors.js} +23 -6
- package/lib/client/surface/selectors.js.map +1 -0
- package/lib/client/surface/shared.d.ts +40 -0
- package/lib/client/surface/shared.d.ts.map +1 -0
- package/lib/client/surface/shared.js +53 -0
- package/lib/client/surface/shared.js.map +1 -0
- package/lib/client/surface/state/useLifecycleState.d.ts +34 -0
- package/lib/client/surface/state/useLifecycleState.d.ts.map +1 -0
- package/lib/client/surface/state/useLifecycleState.js +39 -0
- package/lib/client/surface/state/useLifecycleState.js.map +1 -0
- package/lib/client/surface/state/useRegistrationState.d.ts +34 -0
- package/lib/client/surface/state/useRegistrationState.d.ts.map +1 -0
- package/lib/client/surface/state/useRegistrationState.js +44 -0
- package/lib/client/surface/state/useRegistrationState.js.map +1 -0
- package/lib/client/surface/state/useSessionExpansion.d.ts +39 -0
- package/lib/client/surface/state/useSessionExpansion.d.ts.map +1 -0
- package/lib/client/surface/state/useSessionExpansion.js +230 -0
- package/lib/client/surface/state/useSessionExpansion.js.map +1 -0
- package/lib/client/surface/state/useSessionOrdering.d.ts +15 -0
- package/lib/client/surface/state/useSessionOrdering.d.ts.map +1 -0
- package/lib/client/surface/state/useSessionOrdering.js +68 -0
- package/lib/client/surface/state/useSessionOrdering.js.map +1 -0
- package/lib/client/surface/state/useSurfaceMenus.d.ts +9 -0
- package/lib/client/surface/state/useSurfaceMenus.d.ts.map +1 -0
- package/lib/client/surface/state/useSurfaceMenus.js +15 -0
- package/lib/client/surface/state/useSurfaceMenus.js.map +1 -0
- package/lib/client/surface/state/useSurfaceRefresh.d.ts +39 -0
- package/lib/client/surface/state/useSurfaceRefresh.d.ts.map +1 -0
- package/lib/client/surface/state/useSurfaceRefresh.js +274 -0
- package/lib/client/surface/state/useSurfaceRefresh.js.map +1 -0
- package/lib/client/surface/state/useSurfaceSources.d.ts +31 -0
- package/lib/client/surface/state/useSurfaceSources.d.ts.map +1 -0
- package/lib/client/surface/state/useSurfaceSources.js +63 -0
- package/lib/client/surface/state/useSurfaceSources.js.map +1 -0
- package/lib/client/{worktree-surface-types.d.ts → surface/types.d.ts} +50 -13
- package/lib/client/surface/types.d.ts.map +1 -0
- package/lib/client/surface/types.js +2 -0
- package/lib/client/surface/types.js.map +1 -0
- package/lib/client/{WorktreeModeAction.d.ts → view/WorktreeModeAction.d.ts} +1 -1
- package/lib/client/view/WorktreeModeAction.d.ts.map +1 -0
- package/lib/client/{WorktreeModeAction.js → view/WorktreeModeAction.js} +1 -1
- package/lib/client/view/WorktreeModeAction.js.map +1 -0
- package/lib/client/view/navigation.d.ts.map +1 -0
- package/lib/client/view/navigation.js.map +1 -0
- package/lib/client/view/view-mode-store.d.ts.map +1 -0
- package/lib/client/view/view-mode-store.js.map +1 -0
- package/lib/client/view/view-mode.d.ts.map +1 -0
- package/lib/client/view/view-mode.js.map +1 -0
- package/lib/client/{worktree-error-copy.d.ts → view/worktree-error-copy.d.ts} +2 -2
- package/lib/client/view/worktree-error-copy.d.ts.map +1 -0
- package/lib/client/view/worktree-error-copy.js.map +1 -0
- package/lib/client/{worktree-expand-state.d.ts → view/worktree-expand-state.d.ts} +1 -0
- package/lib/client/view/worktree-expand-state.d.ts.map +1 -0
- package/lib/client/{worktree-expand-state.js → view/worktree-expand-state.js} +11 -0
- package/lib/client/view/worktree-expand-state.js.map +1 -0
- package/lib/client/{worktree-view-actions.d.ts → view/worktree-view-actions.d.ts} +11 -5
- package/lib/client/view/worktree-view-actions.d.ts.map +1 -0
- package/lib/client/{worktree-view-actions.js → view/worktree-view-actions.js} +13 -11
- package/lib/client/view/worktree-view-actions.js.map +1 -0
- package/lib/client/view/worktree-view-errors.d.ts.map +1 -0
- package/lib/client/view/worktree-view-errors.js.map +1 -0
- package/lib/client/{worktree-view-read.d.ts → view/worktree-view-read.d.ts} +4 -2
- package/lib/client/view/worktree-view-read.d.ts.map +1 -0
- package/lib/client/{worktree-view-read.js → view/worktree-view-read.js} +4 -1
- package/lib/client/view/worktree-view-read.js.map +1 -0
- package/lib/client/view/worktree-view.d.ts.map +1 -0
- package/lib/client/view/worktree-view.js.map +1 -0
- package/lib/client/worktree-connection.d.ts +5 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +16 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client.js +4295 -2634
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +10 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +46 -3
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +7 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/host/dsh-read-adapter.d.ts +10 -1
- package/lib/host/dsh-read-adapter.d.ts.map +1 -1
- package/lib/host/dsh-read-adapter.js +18 -1
- package/lib/host/dsh-read-adapter.js.map +1 -1
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +14 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +24 -0
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +39 -1
- package/lib/host/service.js.map +1 -1
- package/lib/host/worktree-activity.d.ts +13 -0
- package/lib/host/worktree-activity.d.ts.map +1 -0
- package/lib/host/worktree-activity.js +23 -0
- package/lib/host/worktree-activity.js.map +1 -0
- package/lib/host/worktree-permission-manager.js +2 -2
- package/lib/host/worktree-permission-manager.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/manage/manager-context.d.ts +2 -1
- package/lib/manage/manager-context.d.ts.map +1 -1
- package/lib/manage/manager-sessions.js +4 -4
- package/lib/manage/manager-sessions.js.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.d.ts +23 -0
- package/lib/manage/manager-worktree-lifecycle.d.ts.map +1 -0
- package/lib/manage/manager-worktree-lifecycle.js +165 -0
- package/lib/manage/manager-worktree-lifecycle.js.map +1 -0
- package/lib/manage/manager-worktrees.d.ts +1 -6
- package/lib/manage/manager-worktrees.d.ts.map +1 -1
- package/lib/manage/manager-worktrees.js +78 -112
- package/lib/manage/manager-worktrees.js.map +1 -1
- package/lib/manage/manager.d.ts +17 -1
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +23 -6
- package/lib/manage/manager.js.map +1 -1
- package/lib/provider/generated-name.d.ts +8 -0
- package/lib/provider/generated-name.d.ts.map +1 -0
- package/lib/provider/generated-name.js +29 -0
- package/lib/provider/generated-name.js.map +1 -0
- package/lib/provider/{git.d.ts → git/adapter.d.ts} +2 -2
- package/lib/provider/git/adapter.d.ts.map +1 -0
- package/lib/provider/{git.js → git/adapter.js} +11 -2
- package/lib/provider/git/adapter.js.map +1 -0
- package/lib/provider/{repository-fingerprint.d.ts → git/repository-fingerprint.d.ts} +1 -1
- package/lib/provider/git/repository-fingerprint.d.ts.map +1 -0
- package/lib/provider/git/repository-fingerprint.js.map +1 -0
- package/lib/provider/{subprocess.d.ts → git/subprocess.d.ts} +1 -1
- package/lib/provider/git/subprocess.d.ts.map +1 -0
- package/lib/provider/git/subprocess.js.map +1 -0
- package/lib/provider/git/worktree-status.d.ts +5 -0
- package/lib/provider/git/worktree-status.d.ts.map +1 -0
- package/lib/provider/git/worktree-status.js +23 -0
- package/lib/provider/git/worktree-status.js.map +1 -0
- package/lib/provider/index.d.ts +5 -5
- package/lib/provider/index.d.ts.map +1 -1
- package/lib/provider/index.js +5 -5
- package/lib/provider/index.js.map +1 -1
- package/lib/provider/mutation-token.d.ts +1 -1
- package/lib/provider/mutation-token.d.ts.map +1 -1
- package/lib/provider/mutation-token.js +1 -0
- package/lib/provider/mutation-token.js.map +1 -1
- package/lib/provider/sidecar/mutation-lock.d.ts.map +1 -0
- package/lib/provider/{mutation-lock.js → sidecar/mutation-lock.js} +1 -1
- package/lib/provider/sidecar/mutation-lock.js.map +1 -0
- package/lib/provider/{sidecar.d.ts → sidecar/repository.d.ts} +3 -3
- package/lib/provider/sidecar/repository.d.ts.map +1 -0
- package/lib/provider/{sidecar.js → sidecar/repository.js} +12 -5
- package/lib/provider/sidecar/repository.js.map +1 -0
- package/lib/provider/{sidecar-persistence.d.ts → sidecar/sidecar-persistence.d.ts} +1 -1
- package/lib/provider/sidecar/sidecar-persistence.d.ts.map +1 -0
- package/lib/provider/{sidecar-persistence.js → sidecar/sidecar-persistence.js} +29 -2
- package/lib/provider/sidecar/sidecar-persistence.js.map +1 -0
- package/lib/provider/{sidecar-schema.d.ts → sidecar/sidecar-schema.d.ts} +1 -1
- package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -0
- package/lib/provider/{sidecar-schema.js → sidecar/sidecar-schema.js} +52 -16
- package/lib/provider/sidecar/sidecar-schema.js.map +1 -0
- package/lib/provider/transaction/dependencies.d.ts +10 -0
- package/lib/provider/transaction/dependencies.d.ts.map +1 -0
- package/lib/provider/transaction/dependencies.js +2 -0
- package/lib/provider/transaction/dependencies.js.map +1 -0
- package/lib/provider/transaction/index.d.ts +17 -0
- package/lib/provider/transaction/index.d.ts.map +1 -0
- package/lib/provider/transaction/index.js +44 -0
- package/lib/provider/transaction/index.js.map +1 -0
- package/lib/provider/transaction/operations/adopt-branch.d.ts +6 -0
- package/lib/provider/transaction/operations/adopt-branch.d.ts.map +1 -0
- package/lib/provider/transaction/operations/adopt-branch.js +59 -0
- package/lib/provider/transaction/operations/adopt-branch.js.map +1 -0
- package/lib/provider/transaction/operations/clean.d.ts +4 -0
- package/lib/provider/transaction/operations/clean.d.ts.map +1 -0
- package/lib/provider/transaction/operations/clean.js +168 -0
- package/lib/provider/transaction/operations/clean.js.map +1 -0
- package/lib/provider/transaction/operations/create.d.ts +5 -0
- package/lib/provider/transaction/operations/create.d.ts.map +1 -0
- package/lib/provider/transaction/operations/create.js +136 -0
- package/lib/provider/transaction/operations/create.js.map +1 -0
- package/lib/provider/transaction/operations/import.d.ts +5 -0
- package/lib/provider/transaction/operations/import.d.ts.map +1 -0
- package/lib/provider/transaction/operations/import.js +92 -0
- package/lib/provider/transaction/operations/import.js.map +1 -0
- package/lib/provider/transaction/operations/remove.d.ts +4 -0
- package/lib/provider/transaction/operations/remove.d.ts.map +1 -0
- package/lib/provider/transaction/operations/remove.js +164 -0
- package/lib/provider/transaction/operations/remove.js.map +1 -0
- package/lib/provider/transaction/recovery/failure-recovery.d.ts +32 -0
- package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -0
- package/lib/provider/transaction/recovery/failure-recovery.js +147 -0
- package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -0
- package/lib/provider/transaction/recovery/recover.d.ts +4 -0
- package/lib/provider/transaction/recovery/recover.d.ts.map +1 -0
- package/lib/provider/transaction/recovery/recover.js +162 -0
- package/lib/provider/transaction/recovery/recover.js.map +1 -0
- package/lib/provider/transaction/support/admission.d.ts +7 -0
- package/lib/provider/transaction/support/admission.d.ts.map +1 -0
- package/lib/provider/transaction/support/admission.js +90 -0
- package/lib/provider/transaction/support/admission.js.map +1 -0
- package/lib/provider/transaction/support/inspection.d.ts +11 -0
- package/lib/provider/transaction/support/inspection.d.ts.map +1 -0
- package/lib/provider/transaction/support/inspection.js +51 -0
- package/lib/provider/transaction/support/inspection.js.map +1 -0
- package/lib/provider/transaction/support/journal.d.ts +12 -0
- package/lib/provider/transaction/support/journal.d.ts.map +1 -0
- package/lib/provider/transaction/support/journal.js +72 -0
- package/lib/provider/transaction/support/journal.js.map +1 -0
- package/lib/provider/transaction/support/locking.d.ts +4 -0
- package/lib/provider/transaction/support/locking.d.ts.map +1 -0
- package/lib/provider/transaction/support/locking.js +11 -0
- package/lib/provider/transaction/support/locking.js.map +1 -0
- package/lib/provider/transaction/support/path-safety.d.ts +11 -0
- package/lib/provider/transaction/support/path-safety.d.ts.map +1 -0
- package/lib/provider/transaction/support/path-safety.js +82 -0
- package/lib/provider/transaction/support/path-safety.js.map +1 -0
- package/lib/provider/transaction/support/paths.d.ts +10 -0
- package/lib/provider/transaction/support/paths.d.ts.map +1 -0
- package/lib/provider/transaction/support/paths.js +68 -0
- package/lib/provider/transaction/support/paths.js.map +1 -0
- package/lib/provider/transaction/support/publication.d.ts +9 -0
- package/lib/provider/transaction/support/publication.d.ts.map +1 -0
- package/lib/provider/transaction/support/publication.js +92 -0
- package/lib/provider/transaction/support/publication.js.map +1 -0
- package/lib/provider/transaction/types.d.ts +38 -0
- package/lib/provider/transaction/types.d.ts.map +1 -0
- package/lib/provider/transaction/types.js +2 -0
- package/lib/provider/transaction/types.js.map +1 -0
- package/lib/provider/types.d.ts +22 -3
- package/lib/provider/types.d.ts.map +1 -1
- package/lib/provider/types.js +1 -1
- package/lib/provider/types.js.map +1 -1
- package/lib/provider/worktree-lifecycle.d.ts +19 -0
- package/lib/provider/worktree-lifecycle.d.ts.map +1 -0
- package/lib/provider/worktree-lifecycle.js +44 -0
- package/lib/provider/worktree-lifecycle.js.map +1 -0
- package/lib/typert.host.js +269 -30
- package/lib/typert.remote-client.d.ts +10 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +269 -30
- package/package.json +1 -1
- package/lib/client/WorktreeContext.d.ts.map +0 -1
- package/lib/client/WorktreeContext.js.map +0 -1
- package/lib/client/WorktreeHeroContext.d.ts.map +0 -1
- package/lib/client/WorktreeHeroContext.js.map +0 -1
- package/lib/client/WorktreeModeAction.d.ts.map +0 -1
- package/lib/client/WorktreeModeAction.js.map +0 -1
- package/lib/client/WorktreeOverlay.d.ts.map +0 -1
- package/lib/client/WorktreeOverlay.js.map +0 -1
- package/lib/client/dsh-rc1-slot-contract.d.ts +0 -43
- package/lib/client/dsh-rc1-slot-contract.d.ts.map +0 -1
- package/lib/client/dsh-rc1-slot-contract.js +0 -2
- package/lib/client/dsh-rc1-slot-contract.js.map +0 -1
- package/lib/client/navigation.d.ts.map +0 -1
- package/lib/client/navigation.js.map +0 -1
- package/lib/client/overlay-bounds.d.ts.map +0 -1
- package/lib/client/overlay-bounds.js.map +0 -1
- package/lib/client/session-view.d.ts.map +0 -1
- package/lib/client/session-view.js.map +0 -1
- package/lib/client/sidebar-overlay-geometry.d.ts.map +0 -1
- package/lib/client/sidebar-overlay-geometry.js.map +0 -1
- package/lib/client/view-mode-store.d.ts.map +0 -1
- package/lib/client/view-mode-store.js.map +0 -1
- package/lib/client/view-mode.d.ts.map +0 -1
- package/lib/client/view-mode.js.map +0 -1
- package/lib/client/virtual-workspace-membership.d.ts.map +0 -1
- package/lib/client/virtual-workspace-membership.js.map +0 -1
- package/lib/client/worktree-context-store.d.ts.map +0 -1
- package/lib/client/worktree-context-store.js.map +0 -1
- package/lib/client/worktree-context.d.ts.map +0 -1
- package/lib/client/worktree-context.js.map +0 -1
- package/lib/client/worktree-error-copy.d.ts.map +0 -1
- package/lib/client/worktree-error-copy.js.map +0 -1
- package/lib/client/worktree-expand-state.d.ts.map +0 -1
- package/lib/client/worktree-expand-state.js.map +0 -1
- package/lib/client/worktree-permission-icon.d.ts.map +0 -1
- package/lib/client/worktree-permission-icon.js.map +0 -1
- package/lib/client/worktree-permission.d.ts.map +0 -1
- package/lib/client/worktree-permission.js.map +0 -1
- package/lib/client/worktree-session-fork.d.ts.map +0 -1
- package/lib/client/worktree-session-fork.js.map +0 -1
- package/lib/client/worktree-session-order.d.ts.map +0 -1
- package/lib/client/worktree-session-order.js.map +0 -1
- package/lib/client/worktree-session-position.d.ts.map +0 -1
- package/lib/client/worktree-session-position.js.map +0 -1
- package/lib/client/worktree-session.d.ts.map +0 -1
- package/lib/client/worktree-session.js.map +0 -1
- package/lib/client/worktree-surface-dialogs.d.ts.map +0 -1
- package/lib/client/worktree-surface-dialogs.js.map +0 -1
- package/lib/client/worktree-surface-rows.d.ts.map +0 -1
- package/lib/client/worktree-surface-rows.js.map +0 -1
- package/lib/client/worktree-surface-selectors.d.ts.map +0 -1
- package/lib/client/worktree-surface-selectors.js.map +0 -1
- package/lib/client/worktree-surface-types.d.ts.map +0 -1
- package/lib/client/worktree-surface-types.js +0 -2
- package/lib/client/worktree-surface-types.js.map +0 -1
- package/lib/client/worktree-view-actions.d.ts.map +0 -1
- package/lib/client/worktree-view-actions.js.map +0 -1
- package/lib/client/worktree-view-errors.d.ts.map +0 -1
- package/lib/client/worktree-view-errors.js.map +0 -1
- package/lib/client/worktree-view-read.d.ts.map +0 -1
- package/lib/client/worktree-view-read.js.map +0 -1
- package/lib/client/worktree-view.d.ts.map +0 -1
- package/lib/client/worktree-view.js.map +0 -1
- package/lib/provider/git.d.ts.map +0 -1
- package/lib/provider/git.js.map +0 -1
- package/lib/provider/mutation-lock.d.ts.map +0 -1
- package/lib/provider/mutation-lock.js.map +0 -1
- package/lib/provider/repository-fingerprint.d.ts.map +0 -1
- package/lib/provider/repository-fingerprint.js.map +0 -1
- package/lib/provider/sidecar-persistence.d.ts.map +0 -1
- package/lib/provider/sidecar-persistence.js.map +0 -1
- package/lib/provider/sidecar-schema.d.ts.map +0 -1
- package/lib/provider/sidecar-schema.js.map +0 -1
- package/lib/provider/sidecar.d.ts.map +0 -1
- package/lib/provider/sidecar.js.map +0 -1
- package/lib/provider/subprocess.d.ts.map +0 -1
- package/lib/provider/subprocess.js.map +0 -1
- package/lib/provider/transaction.d.ts +0 -65
- package/lib/provider/transaction.d.ts.map +0 -1
- package/lib/provider/transaction.js +0 -1011
- package/lib/provider/transaction.js.map +0 -1
- /package/lib/client/{WorktreeContext.js → context/WorktreeContext.js} +0 -0
- /package/lib/client/{WorktreeHeroContext.js → context/WorktreeHeroContext.js} +0 -0
- /package/lib/client/{overlay-bounds.d.ts → overlay/overlay-bounds.d.ts} +0 -0
- /package/lib/client/{overlay-bounds.js → overlay/overlay-bounds.js} +0 -0
- /package/lib/client/{sidebar-overlay-geometry.d.ts → overlay/sidebar-overlay-geometry.d.ts} +0 -0
- /package/lib/client/{sidebar-overlay-geometry.js → overlay/sidebar-overlay-geometry.js} +0 -0
- /package/lib/client/{worktree-permission-icon.d.ts → permission/worktree-permission-icon.d.ts} +0 -0
- /package/lib/client/{worktree-permission-icon.js → permission/worktree-permission-icon.js} +0 -0
- /package/lib/client/{worktree-permission.d.ts → permission/worktree-permission.d.ts} +0 -0
- /package/lib/client/{worktree-permission.js → permission/worktree-permission.js} +0 -0
- /package/lib/client/{session-view.d.ts → session/session-view.d.ts} +0 -0
- /package/lib/client/{session-view.js → session/session-view.js} +0 -0
- /package/lib/client/{worktree-session-order.d.ts → session/worktree-session-order.d.ts} +0 -0
- /package/lib/client/{worktree-session-order.js → session/worktree-session-order.js} +0 -0
- /package/lib/client/{worktree-session-position.d.ts → session/worktree-session-position.d.ts} +0 -0
- /package/lib/client/{worktree-session-position.js → session/worktree-session-position.js} +0 -0
- /package/lib/client/{navigation.d.ts → view/navigation.d.ts} +0 -0
- /package/lib/client/{navigation.js → view/navigation.js} +0 -0
- /package/lib/client/{view-mode-store.d.ts → view/view-mode-store.d.ts} +0 -0
- /package/lib/client/{view-mode-store.js → view/view-mode-store.js} +0 -0
- /package/lib/client/{view-mode.d.ts → view/view-mode.d.ts} +0 -0
- /package/lib/client/{view-mode.js → view/view-mode.js} +0 -0
- /package/lib/client/{worktree-error-copy.js → view/worktree-error-copy.js} +0 -0
- /package/lib/client/{worktree-view-errors.d.ts → view/worktree-view-errors.d.ts} +0 -0
- /package/lib/client/{worktree-view-errors.js → view/worktree-view-errors.js} +0 -0
- /package/lib/client/{worktree-view.d.ts → view/worktree-view.d.ts} +0 -0
- /package/lib/client/{worktree-view.js → view/worktree-view.js} +0 -0
- /package/lib/provider/{repository-fingerprint.js → git/repository-fingerprint.js} +0 -0
- /package/lib/provider/{subprocess.js → git/subprocess.js} +0 -0
- /package/lib/provider/{mutation-lock.d.ts → sidecar/mutation-lock.d.ts} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { openWorktreeSession } from '../../view/navigation.js';
|
|
3
|
+
import { retryWorktreeSessionBinding } from '../../session/worktree-session.js';
|
|
4
|
+
import { toWorktreeViewError, WorktreeSessionBindingError, WorktreeSessionPermissionError, } from '../../view/worktree-view.js';
|
|
5
|
+
import { toNativeWorktreeViewError } from '../shared.js';
|
|
6
|
+
export function useSessionActions({ source, props, mutation, read }) {
|
|
7
|
+
const { archivedSessionIds } = source;
|
|
8
|
+
const { createSessionForWorktree: createSessionCallback, manager, ensureSessionWorkspace, permission, confirmFullAccess, onPermissionResult, openSession, retryForkSession, } = props;
|
|
9
|
+
const { setActionError, setActionPending } = mutation;
|
|
10
|
+
const { refresh } = read;
|
|
11
|
+
const [pendingSessionBinding, setPendingSessionBinding] = useState();
|
|
12
|
+
const [forkRetryKey, setForkRetryKey] = useState();
|
|
13
|
+
const pendingSessionArchived = pendingSessionBinding !== undefined &&
|
|
14
|
+
archivedSessionIds.includes(pendingSessionBinding.sessionId);
|
|
15
|
+
const createSession = async (input) => {
|
|
16
|
+
if (createSessionCallback === undefined) {
|
|
17
|
+
setActionError({
|
|
18
|
+
code: 'SESSION_CREATE_UNAVAILABLE',
|
|
19
|
+
message: '',
|
|
20
|
+
retryable: true,
|
|
21
|
+
});
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
setActionPending(true);
|
|
25
|
+
setActionError(undefined);
|
|
26
|
+
setPendingSessionBinding(undefined);
|
|
27
|
+
try {
|
|
28
|
+
await createSessionCallback(input);
|
|
29
|
+
await refresh({
|
|
30
|
+
scope: { kind: 'workspace', workspaceId: input.workspaceId },
|
|
31
|
+
preserveCurrent: true,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (error instanceof WorktreeSessionBindingError && error.retryable) {
|
|
36
|
+
setPendingSessionBinding({ ...input, sessionId: error.sessionId });
|
|
37
|
+
}
|
|
38
|
+
if (error instanceof WorktreeSessionPermissionError && error.retryable) {
|
|
39
|
+
setPendingSessionBinding({
|
|
40
|
+
...input,
|
|
41
|
+
sessionId: error.sessionId,
|
|
42
|
+
permissionRequired: true,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
setActionError(toWorktreeViewError(error));
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
setActionPending(false);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const retrySessionBinding = async () => {
|
|
52
|
+
if (manager === undefined || pendingSessionBinding === undefined || pendingSessionArchived)
|
|
53
|
+
return;
|
|
54
|
+
const pending = pendingSessionBinding;
|
|
55
|
+
setActionPending(true);
|
|
56
|
+
setActionError(undefined);
|
|
57
|
+
try {
|
|
58
|
+
await retryWorktreeSessionBinding({
|
|
59
|
+
manager,
|
|
60
|
+
pending,
|
|
61
|
+
archived: false,
|
|
62
|
+
ensureSessionWorkspace: (workspaceId, sessionId) => {
|
|
63
|
+
ensureSessionWorkspace?.(workspaceId, sessionId);
|
|
64
|
+
},
|
|
65
|
+
permission,
|
|
66
|
+
confirmFullAccess,
|
|
67
|
+
onPermissionResult,
|
|
68
|
+
openSession,
|
|
69
|
+
});
|
|
70
|
+
setPendingSessionBinding(undefined);
|
|
71
|
+
await refresh({
|
|
72
|
+
scope: { kind: 'workspace', workspaceId: pending.workspaceId },
|
|
73
|
+
preserveCurrent: true,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if (error instanceof WorktreeSessionBindingError && !error.retryable) {
|
|
78
|
+
setPendingSessionBinding(undefined);
|
|
79
|
+
}
|
|
80
|
+
setActionError(toWorktreeViewError(error));
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
setActionPending(false);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const retryForkBinding = async (key) => {
|
|
87
|
+
if (retryForkSession === undefined || forkRetryKey !== undefined)
|
|
88
|
+
return;
|
|
89
|
+
setForkRetryKey(key);
|
|
90
|
+
try {
|
|
91
|
+
await retryForkSession(key);
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
setActionError(toNativeWorktreeViewError(error));
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
setForkRetryKey(undefined);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const openWorkspaceSession = (workspaceId, sessionId) => {
|
|
101
|
+
ensureSessionWorkspace?.(workspaceId, sessionId);
|
|
102
|
+
openWorktreeSession({ open: openSession }, sessionId);
|
|
103
|
+
};
|
|
104
|
+
return {
|
|
105
|
+
pendingSessionBinding,
|
|
106
|
+
setPendingSessionBinding,
|
|
107
|
+
forkRetryKey,
|
|
108
|
+
setForkRetryKey,
|
|
109
|
+
pendingSessionArchived,
|
|
110
|
+
createSession,
|
|
111
|
+
retrySessionBinding,
|
|
112
|
+
retryForkBinding,
|
|
113
|
+
openWorkspaceSession,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=useSessionActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSessionActions.js","sourceRoot":"","sources":["../../../../src/client/surface/actions/useSessionActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,8BAA8B,GAE/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAuBzD,MAAM,UAAU,iBAAiB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAS;IACxE,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IACtC,MAAM,EACJ,wBAAwB,EAAE,qBAAqB,EAC/C,OAAO,EACP,sBAAsB,EACtB,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GACjB,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,QAAQ,CAAC;IACtD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,EAAyB,CAAC;IAC5F,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,EAAU,CAAC;IAC3D,MAAM,sBAAsB,GAC1B,qBAAqB,KAAK,SAAS;QACnC,kBAAkB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC/D,MAAM,aAAa,GAAG,KAAK,EAAE,KAAoC,EAAiB,EAAE;QAClF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AAe,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC;IACF,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAE,SAAiB,EAAQ,EAAE;QAC5E,sBAAsB,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACjD,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC,CAAC;IACF,OAAO;QACL,qBAAqB;QACrB,wBAAwB;QACxB,YAAY;QACZ,eAAe;QACf,sBAAsB;QACtB,aAAa;QACb,mBAAmB;QACnB,gBAAgB;QAChB,oBAAoB;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type WorktreeViewError } from '../../view/worktree-view.js';
|
|
2
|
+
import type { RefreshOptions } from '../types.js';
|
|
3
|
+
import type { useSurfaceRefresh } from '../state/useSurfaceRefresh.js';
|
|
4
|
+
type Input = {
|
|
5
|
+
read: Pick<ReturnType<typeof useSurfaceRefresh>, 'refresh'>;
|
|
6
|
+
};
|
|
7
|
+
export declare function useSurfaceMutation({ read }: Input): {
|
|
8
|
+
actionError: WorktreeViewError | undefined;
|
|
9
|
+
setActionError: import("react").Dispatch<import("react").SetStateAction<WorktreeViewError | undefined>>;
|
|
10
|
+
actionPending: boolean;
|
|
11
|
+
setActionPending: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
12
|
+
runMutation: (operation: () => Promise<void>, refreshOptions?: RefreshOptions) => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useSurfaceMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceMutation.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/actions/useSurfaceMutation.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAAE,SAAS,CAAC,CAAA;CAAE,CAAC;AAE7E,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK;;;;;6BAKnC,MAAM,OAAO,CAAC,IAAI,CAAC,mBACb,cAAc,KAC9B,OAAO,CAAC,IAAI,CAAC;EAajB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { toWorktreeViewError } from '../../view/worktree-view.js';
|
|
3
|
+
export function useSurfaceMutation({ read }) {
|
|
4
|
+
const { refresh } = read;
|
|
5
|
+
const [actionError, setActionError] = useState();
|
|
6
|
+
const [actionPending, setActionPending] = useState(false);
|
|
7
|
+
const runMutation = async (operation, refreshOptions) => {
|
|
8
|
+
setActionPending(true);
|
|
9
|
+
setActionError(undefined);
|
|
10
|
+
try {
|
|
11
|
+
await operation();
|
|
12
|
+
if (refreshOptions !== undefined)
|
|
13
|
+
await refresh(refreshOptions);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
setActionError(toWorktreeViewError(error));
|
|
17
|
+
}
|
|
18
|
+
finally {
|
|
19
|
+
setActionPending(false);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return { actionError, setActionError, actionPending, setActionPending, runMutation };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=useSurfaceMutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceMutation.js","sourceRoot":"","sources":["../../../../src/client/surface/actions/useSurfaceMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAA0B,MAAM,6BAA6B,CAAC;AAM1F,MAAM,UAAU,kBAAkB,CAAC,EAAE,IAAI,EAAS;IAChD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,EAAqB,CAAC;IACpE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,KAAK,EACvB,SAA8B,EAC9B,cAA+B,EAChB,EAAE;QACjB,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACvB,cAAc,CAAC,SAAS,CAAC,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,SAAS,EAAE,CAAC;YAClB,IAAI,cAAc,KAAK,SAAS;gBAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;QAClE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,cAAc,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7C,CAAC;gBAAS,CAAC;YACT,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,CAAC;IACF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WorktreeRecord } from '../../../contract/index.js';
|
|
2
|
+
import { WorktreeCreateDefaults } from '../shared.js';
|
|
3
|
+
import type { WorkspaceLike, WorktreeRegistrationMode, WorktreeSetupStatus, WorktreeSurfaceProps } from '../types.js';
|
|
4
|
+
import type { useRegistrationState } from '../state/useRegistrationState.js';
|
|
5
|
+
import type { useSessionActions } from './useSessionActions.js';
|
|
6
|
+
import type { useSurfaceMutation } from './useSurfaceMutation.js';
|
|
7
|
+
import type { useSurfaceRefresh } from '../state/useSurfaceRefresh.js';
|
|
8
|
+
import type { useSurfaceSources } from '../state/useSurfaceSources.js';
|
|
9
|
+
type Input = {
|
|
10
|
+
source: Pick<ReturnType<typeof useSurfaceSources>, 'workspaces'>;
|
|
11
|
+
registrationState: Pick<ReturnType<typeof useRegistrationState>, 'worktreeModalWorkspaceId' | 'modalReadLoading' | 'setSelectedBranch' | 'setNewBranch' | 'setImportCandidates' | 'importCandidatesGuard' | 'modalWorkspaceIdRef' | 'modalReadLoader' | 'modalReadViewRef' | 'setWorktreeModalWorkspaceId' | 'setModalReadError' | 'setModalReadLoading' | 'setWorktreeModalMode' | 'setSelectedImportPath' | 'importCandidates' | 'newBranch' | 'selectedImportPath' | 'worktreeModalMode' | 'selectedBranch'>;
|
|
12
|
+
read: Pick<ReturnType<typeof useSurfaceRefresh>, 'viewByWorkspace' | 'loadModalWorktreeView' | 'refresh'>;
|
|
13
|
+
props: Pick<WorktreeSurfaceProps, 'manager' | 'createSessionForWorktree'>;
|
|
14
|
+
mutation: Pick<ReturnType<typeof useSurfaceMutation>, 'actionPending' | 'setActionError' | 'setActionPending'>;
|
|
15
|
+
session: Pick<ReturnType<typeof useSessionActions>, 'setPendingSessionBinding'>;
|
|
16
|
+
};
|
|
17
|
+
export declare function useWorktreeRegistration({ source, registrationState, read, props, mutation, session, }: Input): {
|
|
18
|
+
modalWorkspace: WorkspaceLike | undefined;
|
|
19
|
+
modalView: import("../../view/worktree-view-read.js").WorktreeWorkspaceView | undefined;
|
|
20
|
+
modalReadiness: import("../../view/worktree-view-read.js").WorktreeGitReadiness | undefined;
|
|
21
|
+
modalSetupStatus: WorktreeSetupStatus | undefined;
|
|
22
|
+
modalCanCreate: boolean;
|
|
23
|
+
loadImportCandidates: (workspaceId: string) => Promise<void>;
|
|
24
|
+
closeWorktreeCreator: (force?: boolean) => void;
|
|
25
|
+
openWorktreeCreator: (workspace: WorkspaceLike, defaults?: WorktreeCreateDefaults) => void;
|
|
26
|
+
changeWorktreeModalMode: (mode: WorktreeRegistrationMode) => void;
|
|
27
|
+
continueWorktreeRegistration: (registeredWorktree: WorktreeRecord) => Promise<void>;
|
|
28
|
+
submitWorktree: () => Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=useWorktreeRegistration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorktreeRegistration.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/actions/useWorktreeRegistration.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAWjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAAE,YAAY,CAAC,CAAC;IACjE,iBAAiB,EAAE,IAAI,CACrB,UAAU,CAAC,OAAO,oBAAoB,CAAC,EACrC,0BAA0B,GAC1B,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,qBAAqB,GACrB,uBAAuB,GACvB,qBAAqB,GACrB,iBAAiB,GACjB,kBAAkB,GAClB,6BAA6B,GAC7B,mBAAmB,GACnB,qBAAqB,GACrB,sBAAsB,GACtB,uBAAuB,GACvB,kBAAkB,GAClB,WAAW,GACX,oBAAoB,GACpB,mBAAmB,GACnB,gBAAgB,CACnB,CAAC;IACF,IAAI,EAAE,IAAI,CACR,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpC,iBAAiB,GAAG,uBAAuB,GAAG,SAAS,CACxD,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,0BAA0B,CAAC,CAAC;IAC1E,QAAQ,EAAE,IAAI,CACZ,UAAU,CAAC,OAAO,kBAAkB,CAAC,EACrC,eAAe,GAAG,gBAAgB,GAAG,kBAAkB,CACxD,CAAC;IACF,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAAE,0BAA0B,CAAC,CAAC;CACjF,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,iBAAiB,EACjB,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE,KAAK;;;;;;wCA+DgB,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;+CAqBE,IAAI;qCAUrC,aAAa,aACd,sBAAsB,KAC/B,IAAI;oCA2BgC,wBAAwB,KAAG,IAAI;uDAWhD,cAAc,KACjC,OAAO,CAAC,IAAI,CAAC;0BAwCiB,OAAO,CAAC,IAAI,CAAC;EA4D/C"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { useCallback, useEffect } from 'react';
|
|
2
|
+
import { createDefaultWorktreeName, executeWorktreeAction, reconcileBaseBranchSelection, selectDefaultBaseBranch, toWorktreeViewError, WorktreeSessionBindingError, WorktreeSessionPermissionError, } from '../../view/worktree-view.js';
|
|
3
|
+
export function useWorktreeRegistration({ source, registrationState, read, props, mutation, session, }) {
|
|
4
|
+
const { workspaces } = source;
|
|
5
|
+
const { worktreeModalWorkspaceId, modalReadLoading, setSelectedBranch, setNewBranch, setImportCandidates, importCandidatesGuard, modalWorkspaceIdRef, modalReadLoader, modalReadViewRef, setWorktreeModalWorkspaceId, setModalReadError, setModalReadLoading, setWorktreeModalMode, setSelectedImportPath, importCandidates, newBranch, selectedImportPath, worktreeModalMode, selectedBranch, } = registrationState;
|
|
6
|
+
const { viewByWorkspace, loadModalWorktreeView, refresh } = read;
|
|
7
|
+
const { manager, createSessionForWorktree: createSessionCallback } = props;
|
|
8
|
+
const { actionPending, setActionError, setActionPending } = mutation;
|
|
9
|
+
const { setPendingSessionBinding } = session;
|
|
10
|
+
const modalWorkspace = workspaces.items.find((workspace) => workspace.workspaceId === worktreeModalWorkspaceId);
|
|
11
|
+
const modalView = worktreeModalWorkspaceId === undefined
|
|
12
|
+
? undefined
|
|
13
|
+
: viewByWorkspace.get(worktreeModalWorkspaceId);
|
|
14
|
+
const modalReadiness = modalView?.readiness;
|
|
15
|
+
const modalSetupStatus = modalView === undefined
|
|
16
|
+
? undefined
|
|
17
|
+
: modalReadiness?.status === 'ready'
|
|
18
|
+
? modalView.branches.length === 0
|
|
19
|
+
? 'noLocalBranch'
|
|
20
|
+
: undefined
|
|
21
|
+
: modalReadiness?.status;
|
|
22
|
+
const modalCanCreate = !modalReadLoading && modalSetupStatus === undefined && modalReadiness?.status === 'ready';
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (worktreeModalWorkspaceId === undefined || modalView === undefined)
|
|
25
|
+
return;
|
|
26
|
+
if (modalView.readiness.status !== 'ready') {
|
|
27
|
+
setSelectedBranch('');
|
|
28
|
+
setNewBranch('');
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
setSelectedBranch((current) => reconcileBaseBranchSelection(current, modalView.branches));
|
|
32
|
+
setNewBranch((current) => {
|
|
33
|
+
if (current.length > 0)
|
|
34
|
+
return current;
|
|
35
|
+
const existingNames = [
|
|
36
|
+
...modalView.branches.map((branch) => branch.name),
|
|
37
|
+
...modalView.worktrees.map((worktree) => worktree.branch),
|
|
38
|
+
];
|
|
39
|
+
return createDefaultWorktreeName(existingNames);
|
|
40
|
+
});
|
|
41
|
+
}, [modalView, worktreeModalWorkspaceId]);
|
|
42
|
+
const loadImportCandidates = useCallback(async (workspaceId) => {
|
|
43
|
+
if (manager === undefined)
|
|
44
|
+
return;
|
|
45
|
+
setImportCandidates((current) => ({ status: 'loading', candidates: current.candidates }));
|
|
46
|
+
await importCandidatesGuard.current.run(() => manager.listImportCandidates({ workspaceId }), (candidates) => {
|
|
47
|
+
if (modalWorkspaceIdRef.current !== workspaceId)
|
|
48
|
+
return;
|
|
49
|
+
setImportCandidates({ status: 'ready', candidates });
|
|
50
|
+
}, (error) => {
|
|
51
|
+
if (modalWorkspaceIdRef.current !== workspaceId)
|
|
52
|
+
return;
|
|
53
|
+
setImportCandidates((current) => ({
|
|
54
|
+
status: 'error',
|
|
55
|
+
candidates: current.candidates,
|
|
56
|
+
error: toWorktreeViewError(error),
|
|
57
|
+
}));
|
|
58
|
+
});
|
|
59
|
+
}, [manager]);
|
|
60
|
+
const closeWorktreeCreator = (force = false) => {
|
|
61
|
+
if (actionPending && !force)
|
|
62
|
+
return;
|
|
63
|
+
modalReadLoader.current.invalidate();
|
|
64
|
+
modalReadViewRef.current = undefined;
|
|
65
|
+
importCandidatesGuard.current.invalidate();
|
|
66
|
+
setWorktreeModalWorkspaceId(undefined);
|
|
67
|
+
setModalReadError(undefined);
|
|
68
|
+
setModalReadLoading(false);
|
|
69
|
+
};
|
|
70
|
+
const openWorktreeCreator = (workspace, defaults = {}) => {
|
|
71
|
+
const view = viewByWorkspace.get(workspace.workspaceId);
|
|
72
|
+
modalReadLoader.current.invalidate();
|
|
73
|
+
modalReadViewRef.current = undefined;
|
|
74
|
+
importCandidatesGuard.current.invalidate();
|
|
75
|
+
setWorktreeModalWorkspaceId(workspace.workspaceId);
|
|
76
|
+
setWorktreeModalMode('create');
|
|
77
|
+
setImportCandidates({ status: 'idle', candidates: [] });
|
|
78
|
+
setSelectedImportPath(undefined);
|
|
79
|
+
setActionError(undefined);
|
|
80
|
+
setModalReadError(undefined);
|
|
81
|
+
setModalReadLoading(false);
|
|
82
|
+
if (view === undefined) {
|
|
83
|
+
setSelectedBranch(defaults.baseBranch ?? '');
|
|
84
|
+
setNewBranch(defaults.newBranch ?? '');
|
|
85
|
+
loadModalWorktreeView(workspace.workspaceId);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setSelectedBranch(defaults.baseBranch ?? selectDefaultBaseBranch(view.branches));
|
|
89
|
+
setNewBranch(defaults.newBranch ??
|
|
90
|
+
createDefaultWorktreeName([
|
|
91
|
+
...view.branches.map((branch) => branch.name),
|
|
92
|
+
...view.worktrees.map((worktree) => worktree.branch),
|
|
93
|
+
]));
|
|
94
|
+
};
|
|
95
|
+
const changeWorktreeModalMode = (mode) => {
|
|
96
|
+
setWorktreeModalMode(mode);
|
|
97
|
+
if (mode === 'import' &&
|
|
98
|
+
worktreeModalWorkspaceId !== undefined &&
|
|
99
|
+
importCandidates.status === 'idle') {
|
|
100
|
+
void loadImportCandidates(worktreeModalWorkspaceId);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const continueWorktreeRegistration = async (registeredWorktree) => {
|
|
104
|
+
closeWorktreeCreator(true);
|
|
105
|
+
if (createSessionCallback === undefined) {
|
|
106
|
+
await refresh({
|
|
107
|
+
scope: { kind: 'workspace', workspaceId: registeredWorktree.workspaceId },
|
|
108
|
+
preserveCurrent: true,
|
|
109
|
+
});
|
|
110
|
+
setActionError({
|
|
111
|
+
code: 'WORKTREE_REGISTRATION_SESSION_UNAVAILABLE',
|
|
112
|
+
message: '',
|
|
113
|
+
retryable: true,
|
|
114
|
+
});
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const sessionInput = {
|
|
118
|
+
workspaceId: registeredWorktree.workspaceId,
|
|
119
|
+
worktreeId: registeredWorktree.worktreeId,
|
|
120
|
+
cwd: registeredWorktree.absolutePath,
|
|
121
|
+
};
|
|
122
|
+
try {
|
|
123
|
+
await createSessionCallback(sessionInput);
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
if (error instanceof WorktreeSessionBindingError && error.retryable) {
|
|
127
|
+
setPendingSessionBinding({ ...sessionInput, sessionId: error.sessionId });
|
|
128
|
+
}
|
|
129
|
+
if (error instanceof WorktreeSessionPermissionError && error.retryable) {
|
|
130
|
+
setPendingSessionBinding({
|
|
131
|
+
...sessionInput,
|
|
132
|
+
sessionId: error.sessionId,
|
|
133
|
+
permissionRequired: true,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
await refresh({
|
|
139
|
+
scope: { kind: 'workspace', workspaceId: registeredWorktree.workspaceId },
|
|
140
|
+
preserveCurrent: true,
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
const submitWorktree = async () => {
|
|
144
|
+
const worktreeName = newBranch.trim();
|
|
145
|
+
const selectedImportCandidate = importCandidates.candidates.find((candidate) => candidate.absolutePath === selectedImportPath);
|
|
146
|
+
if (manager === undefined || modalWorkspace === undefined)
|
|
147
|
+
return;
|
|
148
|
+
if (worktreeModalMode === 'create' &&
|
|
149
|
+
(!modalCanCreate || selectedBranch.length === 0 || worktreeName.length === 0))
|
|
150
|
+
return;
|
|
151
|
+
if (worktreeModalMode === 'import' && selectedImportCandidate === undefined)
|
|
152
|
+
return;
|
|
153
|
+
setActionPending(true);
|
|
154
|
+
setActionError(undefined);
|
|
155
|
+
setPendingSessionBinding(undefined);
|
|
156
|
+
try {
|
|
157
|
+
const registeredWorktree = worktreeModalMode === 'create'
|
|
158
|
+
? await executeWorktreeAction(manager, {
|
|
159
|
+
type: 'createWorktree',
|
|
160
|
+
input: {
|
|
161
|
+
workspaceId: modalWorkspace.workspaceId,
|
|
162
|
+
branch: selectedBranch,
|
|
163
|
+
newBranch: worktreeName,
|
|
164
|
+
},
|
|
165
|
+
})
|
|
166
|
+
: await executeWorktreeAction(manager, {
|
|
167
|
+
type: 'importWorktree',
|
|
168
|
+
input: {
|
|
169
|
+
workspaceId: modalWorkspace.workspaceId,
|
|
170
|
+
absolutePath: selectedImportCandidate.absolutePath,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
if (registeredWorktree === undefined) {
|
|
174
|
+
throw {
|
|
175
|
+
code: 'WORKTREE_RECORD_MISSING',
|
|
176
|
+
message: '',
|
|
177
|
+
retryable: true,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
await continueWorktreeRegistration(registeredWorktree);
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
setActionError(toWorktreeViewError(error));
|
|
184
|
+
}
|
|
185
|
+
finally {
|
|
186
|
+
setActionPending(false);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
return {
|
|
190
|
+
modalWorkspace,
|
|
191
|
+
modalView,
|
|
192
|
+
modalReadiness,
|
|
193
|
+
modalSetupStatus,
|
|
194
|
+
modalCanCreate,
|
|
195
|
+
loadImportCandidates,
|
|
196
|
+
closeWorktreeCreator,
|
|
197
|
+
openWorktreeCreator,
|
|
198
|
+
changeWorktreeModalMode,
|
|
199
|
+
continueWorktreeRegistration,
|
|
200
|
+
submitWorktree,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=useWorktreeRegistration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorktreeRegistration.js","sourceRoot":"","sources":["../../../../src/client/surface/actions/useWorktreeRegistration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,8BAA8B,GAE/B,MAAM,6BAA6B,CAAC;AAkDrC,MAAM,UAAU,uBAAuB,CAAC,EACtC,MAAM,EACN,iBAAiB,EACjB,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,GACD;IACN,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EACJ,wBAAwB,EACxB,gBAAgB,EAChB,i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,EAAE,EAAE;oBACX,SAAS,EAAE,IAAI;iBAChB,CAAC;YACJ,CAAC;YACD,MAAM,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;QACzD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,cAAc,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7C,CAAC;gBAAS,CAAC;YACT,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,CAAC;IACF,OAAO;QACL,cAAc;QACd,SAAS;QACT,cAAc;QACd,gBAAgB;QAChB,cAAc;QACd,oBAAoB;QACpB,oBAAoB;QACpB,mBAAmB;QACnB,uBAAuB;QACvB,4BAA4B;QAC5B,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface WorktreeCleanupFlowInput {
|
|
2
|
+
readonly clean: () => Promise<void>;
|
|
3
|
+
readonly onCommitted: () => void;
|
|
4
|
+
readonly refresh: () => Promise<void>;
|
|
5
|
+
readonly normalize: () => Promise<void>;
|
|
6
|
+
readonly isCurrent: () => boolean;
|
|
7
|
+
readonly onFollowUpError: (stage: 'refresh' | 'permission', error: unknown) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function runWorktreeCleanupFlow(input: WorktreeCleanupFlowInput): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=worktree-cleanup-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree-cleanup-flow.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/actions/worktree-cleanup-flow.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,YAAY,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACrF;AAED,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAa3F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export async function runWorktreeCleanupFlow(input) {
|
|
2
|
+
await input.clean();
|
|
3
|
+
if (!input.isCurrent())
|
|
4
|
+
return;
|
|
5
|
+
input.onCommitted();
|
|
6
|
+
const follow = async (stage, operation) => {
|
|
7
|
+
if (!input.isCurrent())
|
|
8
|
+
return;
|
|
9
|
+
try {
|
|
10
|
+
await operation();
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
if (input.isCurrent())
|
|
14
|
+
input.onFollowUpError(stage, error);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
await Promise.all([follow('refresh', input.refresh), follow('permission', input.normalize)]);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=worktree-cleanup-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree-cleanup-flow.js","sourceRoot":"","sources":["../../../../src/client/surface/actions/worktree-cleanup-flow.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,KAA+B;IAC1E,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;IACpB,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;QAAE,OAAO;IAC/B,KAAK,CAAC,WAAW,EAAE,CAAC;IACpB,MAAM,MAAM,GAAG,KAAK,EAAE,KAA+B,EAAE,SAA8B,EAAiB,EAAE;QACtG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YAAE,OAAO;QAC/B,IAAI,CAAC;YACH,MAAM,SAAS,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,CAAC,SAAS,EAAE;gBAAE,KAAK,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC,CAAC;IACF,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorktreeSurfaceProps } from '../types.js';
|
|
2
|
+
import type { useSurfaceSources } from '../state/useSurfaceSources.js';
|
|
3
|
+
type Input = {
|
|
4
|
+
source: Pick<ReturnType<typeof useSurfaceSources>, 'fullAccessConfirmationSnapshot' | 'fullAccessAcknowledged' | 'setFullAccessAcknowledged'>;
|
|
5
|
+
props: Pick<WorktreeSurfaceProps, 't' | 'fullAccessConfirmation'>;
|
|
6
|
+
};
|
|
7
|
+
export declare function AccessConfirmation({ source, props }: Input): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=AccessConfirmation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessConfirmation.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/components/AccessConfirmation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,IAAI,CACV,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpC,gCAAgC,GAAG,wBAAwB,GAAG,2BAA2B,CAC1F,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,GAAG,GAAG,wBAAwB,CAAC,CAAC;CACnE,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,+BAkC1D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { RiskConfirmation } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
3
|
+
export function AccessConfirmation({ source, props }) {
|
|
4
|
+
const { fullAccessConfirmationSnapshot, fullAccessAcknowledged, setFullAccessAcknowledged } = source;
|
|
5
|
+
const { t, fullAccessConfirmation } = props;
|
|
6
|
+
return (_jsx(_Fragment, { children: _jsx(RiskConfirmation, { open: fullAccessConfirmationSnapshot !== undefined, title: t('permission.fullAccessTitle'), description: fullAccessConfirmationSnapshot === undefined
|
|
7
|
+
? ''
|
|
8
|
+
: t('permission.fullAccessDescription', {
|
|
9
|
+
cwd: fullAccessConfirmationSnapshot.cwd,
|
|
10
|
+
}), acknowledgeLabel: t('permission.fullAccessAcknowledge'), cancelLabel: t('dialog.cancel'), closeLabel: t('dialog.close'), confirmLabel: t('permission.fullAccessEnable'), acknowledged: fullAccessAcknowledged, onAcknowledgedChange: setFullAccessAcknowledged, onCancel: () => {
|
|
11
|
+
setFullAccessAcknowledged(false);
|
|
12
|
+
fullAccessConfirmation?.resolve(false);
|
|
13
|
+
}, onConfirm: () => {
|
|
14
|
+
setFullAccessAcknowledged(false);
|
|
15
|
+
fullAccessConfirmation?.resolve(true);
|
|
16
|
+
} }) }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=AccessConfirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessConfirmation.js","sourceRoot":"","sources":["../../../../src/client/surface/components/AccessConfirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAYzE,MAAM,UAAU,kBAAkB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAS;IACzD,MAAM,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,GACzF,MAAM,CAAC;IACT,MAAM,EAAE,CAAC,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC;IAE5C,OAAO,CACL,4BACE,KAAC,gBAAgB,IACf,IAAI,EAAE,8BAA8B,KAAK,SAAS,EAClD,KAAK,EAAE,CAAC,CAAC,4BAA4B,CAAC,EACtC,WAAW,EACT,8BAA8B,KAAK,SAAS;gBAC1C,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,CAAC,CAAC,kCAAkC,EAAE;oBACpC,GAAG,EAAE,8BAA8B,CAAC,GAAG;iBACxC,CAAC,EAER,gBAAgB,EAAE,CAAC,CAAC,kCAAkC,CAAC,EACvD,WAAW,EAAE,CAAC,CAAC,eAAe,CAAC,EAC/B,UAAU,EAAE,CAAC,CAAC,cAAc,CAAC,EAC7B,YAAY,EAAE,CAAC,CAAC,6BAA6B,CAAC,EAC9C,YAAY,EAAE,sBAAsB,EACpC,oBAAoB,EAAE,yBAAyB,EAC/C,QAAQ,EAAE,GAAG,EAAE;gBACb,yBAAyB,CAAC,KAAK,CAAC,CAAC;gBACjC,sBAAsB,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,yBAAyB,CAAC,KAAK,CAAC,CAAC;gBACjC,sBAAsB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YACxC,CAAC,GACD,GACD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WorkspaceTreeInput } from './WorkspaceTree.js';
|
|
2
|
+
import type { SessionBinding, WorktreeRecord } from '../../../contract/index.js';
|
|
3
|
+
import type { WorkspaceLike } from '../types.js';
|
|
4
|
+
type Input = {
|
|
5
|
+
record: WorktreeRecord;
|
|
6
|
+
source: Pick<WorkspaceTreeInput['source'], 'sessions' | 'archivedSessionIds' | 'currentSessionId' | 'expandSnapshot' | 'sessionPresentations'>;
|
|
7
|
+
expansion: Pick<WorkspaceTreeInput['expansion'], 'query' | 'isCurrentSessionReveal' | 'expandedSessionGroups' | 'toggleWorktree' | 'toggleSessionGroup'>;
|
|
8
|
+
ordering: Pick<WorkspaceTreeInput['ordering'], 'orderedSessionIdsByAccount'>;
|
|
9
|
+
props: Pick<WorkspaceTreeInput['props'], 't' | 'renameSession' | 'forkSession' | 'archiveSession'>;
|
|
10
|
+
lifecycle: Pick<WorkspaceTreeInput['lifecycle'], 'branchLabel' | 'branchActions'>;
|
|
11
|
+
session: Pick<WorkspaceTreeInput['session'], 'createSession' | 'openWorkspaceSession'>;
|
|
12
|
+
menus: Pick<WorkspaceTreeInput['menus'], 'openWorktreeMenuId' | 'setOpenWorktreeMenuId'>;
|
|
13
|
+
mutation: Pick<WorkspaceTreeInput['mutation'], 'actionPending' | 'setActionError'>;
|
|
14
|
+
read: Pick<WorkspaceTreeInput['read'], 'refresh'>;
|
|
15
|
+
registration: Pick<WorkspaceTreeInput['registration'], 'openWorktreeCreator'>;
|
|
16
|
+
lifecycleState: Pick<WorkspaceTreeInput['lifecycleState'], 'setWorktreeRemoval'>;
|
|
17
|
+
drag: Pick<WorkspaceTreeInput['drag'], 'worktreeDrag' | 'worktreeDropCommitted' | 'setWorktreeDrag' | 'commitWorktreeDrag' | 'sessionDrag' | 'sessionDropCommitted' | 'setSessionDrag' | 'commitSessionDrag'>;
|
|
18
|
+
native: Pick<WorkspaceTreeInput['native'], 'openSessionRename' | 'archiveWorktreeSession'>;
|
|
19
|
+
bindings: readonly SessionBinding[];
|
|
20
|
+
workspaceMatchesQuery: boolean;
|
|
21
|
+
workspace: WorkspaceLike;
|
|
22
|
+
workspaceWorktreeNames: string[];
|
|
23
|
+
sameWorkspaceWorktreeDrag: boolean;
|
|
24
|
+
activeWorktrees: WorktreeRecord[];
|
|
25
|
+
};
|
|
26
|
+
export declare function ActiveWorktree({ record, source, expansion, ordering, props, lifecycle, session, menus, mutation, read, registration, lifecycleState, drag, native, bindings, workspaceMatchesQuery, workspace, workspaceWorktreeNames, sameWorkspaceWorktreeDrag, activeWorktrees, }: Input): import("react").JSX.Element | null;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=ActiveWorktree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActiveWorktree.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/components/ActiveWorktree.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,IAAI,CACV,kBAAkB,CAAC,QAAQ,CAAC,EAC1B,UAAU,GACV,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,sBAAsB,CACzB,CAAC;IACF,SAAS,EAAE,IAAI,CACb,kBAAkB,CAAC,WAAW,CAAC,EAC7B,OAAO,GACP,wBAAwB,GACxB,uBAAuB,GACvB,gBAAgB,GAChB,oBAAoB,CACvB,CAAC;IACF,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,4BAA4B,CAAC,CAAC;IAC7E,KAAK,EAAE,IAAI,CACT,kBAAkB,CAAC,OAAO,CAAC,EAC3B,GAAG,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,CACzD,CAAC;IACF,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC;IAClF,OAAO,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,e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