@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,154 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconBranchOutline16 } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
3
|
+
import { filterVisibleSessionIds, hasOngoingSession, sessionMatchesQuery, } from '../../session/session-view.js';
|
|
4
|
+
import { isWorktreeExpanded } from '../../view/worktree-expand-state.js';
|
|
5
|
+
import { createNumberedWorktreeName, filterArchivedSessionIds } from '../../view/worktree-view.js';
|
|
6
|
+
import styles from '../../worktree.css';
|
|
7
|
+
import { WorktreeGroupRow, WorktreeSessionGroup } from './rows.js';
|
|
8
|
+
import { bindingIdsFor, includesText, isSessionGroupAutoExpanded } from '../selectors.js';
|
|
9
|
+
export function ActiveWorktree({ record, source, expansion, ordering, props, lifecycle, session, menus, mutation, read, registration, lifecycleState, drag, native, bindings, workspaceMatchesQuery, workspace, workspaceWorktreeNames, sameWorkspaceWorktreeDrag, activeWorktrees, }) {
|
|
10
|
+
const { sessions, archivedSessionIds, currentSessionId, expandSnapshot, sessionPresentations } = source;
|
|
11
|
+
const { query, isCurrentSessionReveal, expandedSessionGroups, toggleWorktree, toggleSessionGroup, } = expansion;
|
|
12
|
+
const { orderedSessionIdsByAccount } = ordering;
|
|
13
|
+
const { t, renameSession, forkSession, archiveSession } = props;
|
|
14
|
+
const { branchLabel, branchActions } = lifecycle;
|
|
15
|
+
const { createSession, openWorkspaceSession } = session;
|
|
16
|
+
const { openWorktreeMenuId, setOpenWorktreeMenuId } = menus;
|
|
17
|
+
const { actionPending, setActionError } = mutation;
|
|
18
|
+
const { refresh } = read;
|
|
19
|
+
const { openWorktreeCreator } = registration;
|
|
20
|
+
const { setWorktreeRemoval } = lifecycleState;
|
|
21
|
+
const { worktreeDrag, worktreeDropCommitted, setWorktreeDrag, commitWorktreeDrag, sessionDrag, sessionDropCommitted, setSessionDrag, commitSessionDrag, } = drag;
|
|
22
|
+
const { openSessionRename, archiveWorktreeSession } = native;
|
|
23
|
+
const worktreeSessionIds = filterVisibleSessionIds(filterArchivedSessionIds(bindingIdsFor(bindings, record.worktreeId).filter((sessionId) => sessions.ids.includes(sessionId)), archivedSessionIds), sessions);
|
|
24
|
+
const worktreeMatchesQuery = workspaceMatchesQuery ||
|
|
25
|
+
includesText(record.branch, query) ||
|
|
26
|
+
includesText(record.absolutePath, query);
|
|
27
|
+
if (query.length > 0 &&
|
|
28
|
+
!worktreeMatchesQuery &&
|
|
29
|
+
!worktreeSessionIds.some((sessionId) => sessionMatchesQuery(sessionId, sessions, query))) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const visibleWorktreeSessionIds = worktreeSessionIds.filter((sessionId) => worktreeMatchesQuery || sessionMatchesQuery(sessionId, sessions, query));
|
|
33
|
+
const worktreeGroupKey = `worktree:${record.worktreeId}`;
|
|
34
|
+
const orderedWorktreeSessionIds = orderedSessionIdsByAccount.get(worktreeGroupKey) ?? worktreeSessionIds;
|
|
35
|
+
const orderedVisibleWorktreeSessionIds = orderedWorktreeSessionIds.filter((sessionId) => worktreeMatchesQuery || sessionMatchesQuery(sessionId, sessions, query));
|
|
36
|
+
const sessionIds = orderedVisibleWorktreeSessionIds.length === visibleWorktreeSessionIds.length
|
|
37
|
+
? orderedVisibleWorktreeSessionIds
|
|
38
|
+
: visibleWorktreeSessionIds;
|
|
39
|
+
const sessionGroupAutoExpanded = isSessionGroupAutoExpanded(sessionIds, currentSessionId, isCurrentSessionReveal('session-group:' + worktreeGroupKey));
|
|
40
|
+
const sessionGroupExpanded = expandedSessionGroups[worktreeGroupKey] === true || sessionGroupAutoExpanded;
|
|
41
|
+
const state = record.health === 'repair' || record.health === 'recovery-needed'
|
|
42
|
+
? 'error'
|
|
43
|
+
: record.health === 'branch-drift'
|
|
44
|
+
? 'warning'
|
|
45
|
+
: 'done';
|
|
46
|
+
const stateLabel = record.health === 'recovery-needed'
|
|
47
|
+
? t('worktree.recovery')
|
|
48
|
+
: record.health === 'repair'
|
|
49
|
+
? t('worktree.repair')
|
|
50
|
+
: record.health === 'branch-drift'
|
|
51
|
+
? t('worktree.branchDrift')
|
|
52
|
+
: t('worktree.ready');
|
|
53
|
+
const worktreeExpanded = isWorktreeExpanded(expandSnapshot, record.worktreeId) ||
|
|
54
|
+
isCurrentSessionReveal('worktree:' + record.worktreeId);
|
|
55
|
+
return (_jsxs("div", { className: styles.worktreeGroup, "data-worktree-id": record.worktreeId, children: [_jsx(WorktreeGroupRow, { t: t, kind: "worktree", label: branchLabel(record), worktreeId: record.worktreeId, expanded: worktreeExpanded, hasOngoingSession: hasOngoingSession(worktreeSessionIds, sessionPresentations), icon: _jsx(IconBranchOutline16, {}), workspaceTitle: workspace.title, state: state, stateLabel: stateLabel, repairGuidance: record.health === 'repair'
|
|
56
|
+
? t('worktree.repairGuidance')
|
|
57
|
+
: record.health === 'recovery-needed'
|
|
58
|
+
? t('worktree.recoveryGuidance')
|
|
59
|
+
: record.health === 'branch-drift'
|
|
60
|
+
? t(record.currentBranch === null ? 'worktree.detachedGuidance' : 'worktree.branchDriftGuidance')
|
|
61
|
+
: undefined, onToggle: () => {
|
|
62
|
+
toggleWorktree(record.worktreeId);
|
|
63
|
+
}, onCreateSession: record.status === 'active' &&
|
|
64
|
+
record.health !== 'repair' &&
|
|
65
|
+
record.health !== 'recovery-needed'
|
|
66
|
+
? () => {
|
|
67
|
+
void createSession({
|
|
68
|
+
workspaceId: record.workspaceId,
|
|
69
|
+
worktreeId: record.worktreeId,
|
|
70
|
+
cwd: record.absolutePath,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
: undefined, menu: {
|
|
74
|
+
...branchActions(record),
|
|
75
|
+
open: openWorktreeMenuId === record.worktreeId,
|
|
76
|
+
label: record.branch,
|
|
77
|
+
copyPath: record.absolutePath,
|
|
78
|
+
showCreate: record.status === 'active' &&
|
|
79
|
+
record.health !== 'repair' &&
|
|
80
|
+
record.health !== 'recovery-needed' &&
|
|
81
|
+
record.currentBranch !== null,
|
|
82
|
+
showRemove: record.status === 'active' && record.health !== 'recovery-needed',
|
|
83
|
+
disabled: actionPending,
|
|
84
|
+
onOpenChange: (open) => {
|
|
85
|
+
setOpenWorktreeMenuId(open ? record.worktreeId : undefined);
|
|
86
|
+
if (open)
|
|
87
|
+
void refresh({
|
|
88
|
+
scope: { kind: 'workspace', workspaceId: record.workspaceId },
|
|
89
|
+
preserveCurrent: true,
|
|
90
|
+
reuseInFlight: true,
|
|
91
|
+
invalidateContext: false,
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
onCreateWorktree: record.status === 'active' &&
|
|
95
|
+
record.health !== 'repair' &&
|
|
96
|
+
record.health !== 'recovery-needed' &&
|
|
97
|
+
record.currentBranch !== null
|
|
98
|
+
? () => {
|
|
99
|
+
openWorktreeCreator(workspace, {
|
|
100
|
+
baseBranch: record.currentBranch ?? record.branch,
|
|
101
|
+
newBranch: createNumberedWorktreeName(record.currentBranch ?? record.branch, workspaceWorktreeNames),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
: undefined,
|
|
105
|
+
onRemove: record.status === 'active'
|
|
106
|
+
? () => {
|
|
107
|
+
setWorktreeRemoval(record);
|
|
108
|
+
setActionError(undefined);
|
|
109
|
+
}
|
|
110
|
+
: undefined,
|
|
111
|
+
}, drag: {
|
|
112
|
+
active: sameWorkspaceWorktreeDrag,
|
|
113
|
+
marker: worktreeDrag?.over?.worktreeId === record.worktreeId ? worktreeDrag.over.half : null,
|
|
114
|
+
start: () => {
|
|
115
|
+
worktreeDropCommitted.current = false;
|
|
116
|
+
setWorktreeDrag({
|
|
117
|
+
workspaceId: workspace.workspaceId,
|
|
118
|
+
worktreeId: record.worktreeId,
|
|
119
|
+
over: null,
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
hover: (half) => {
|
|
123
|
+
setWorktreeDrag((current) => current === undefined || current.workspaceId !== workspace.workspaceId
|
|
124
|
+
? current
|
|
125
|
+
: {
|
|
126
|
+
...current,
|
|
127
|
+
over: { worktreeId: record.worktreeId, half },
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
drop: (half) => {
|
|
131
|
+
if (worktreeDrag === undefined)
|
|
132
|
+
return;
|
|
133
|
+
commitWorktreeDrag(worktreeDrag, { worktreeId: record.worktreeId, half }, activeWorktrees.map((candidate) => candidate.worktreeId), workspace.workspaceId);
|
|
134
|
+
},
|
|
135
|
+
end: () => {
|
|
136
|
+
setWorktreeDrag(undefined);
|
|
137
|
+
worktreeDropCommitted.current = false;
|
|
138
|
+
},
|
|
139
|
+
} }), worktreeExpanded && (_jsx(WorktreeSessionGroup, { t: t, groupKey: worktreeGroupKey, sessionIds: sessionIds, workspaceId: workspace.workspaceId, currentSessionId: currentSessionId, expanded: sessionGroupExpanded, actionPending: actionPending, sessions: sessions, sessionPresentations: sessionPresentations, dragState: sessionDrag, onToggleExpanded: () => {
|
|
140
|
+
toggleSessionGroup(worktreeGroupKey, sessionGroupAutoExpanded);
|
|
141
|
+
}, onStartDrag: (groupKey, sessionId) => {
|
|
142
|
+
sessionDropCommitted.current = false;
|
|
143
|
+
setSessionDrag({ groupKey, sessionId, over: null });
|
|
144
|
+
}, onHoverDrag: (sessionId, half) => {
|
|
145
|
+
setSessionDrag((current) => current === undefined ? current : { ...current, over: { sessionId, half } });
|
|
146
|
+
}, onClearDrag: () => {
|
|
147
|
+
setSessionDrag(undefined);
|
|
148
|
+
}, onFinishDrag: () => {
|
|
149
|
+
sessionDropCommitted.current = false;
|
|
150
|
+
}, onCommitDrag: commitSessionDrag, onOpen: (sessionId) => {
|
|
151
|
+
openWorkspaceSession(workspace.workspaceId, sessionId);
|
|
152
|
+
}, onRename: renameSession === undefined ? undefined : openSessionRename, onFork: forkSession, onArchive: archiveSession === undefined ? undefined : archiveWorktreeSession }))] }, record.worktreeId));
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=ActiveWorktree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActiveWorktree.js","sourceRoot":"","sources":["../../../../src/client/surface/components/ActiveWorktree.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACnG,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAuD1F,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,MAAM,EACN,SAAS,E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S,CAAC,CAAC,CAAC,sBAAsB,GAC5E,CACH,KAhKI,MAAM,CAAC,UAAU,CAiKlB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SessionBinding, WorktreeRecord } from '../../../contract/index.js';
|
|
2
|
+
import type { ArchivedWorktreesInput } from './ArchivedWorktrees.js';
|
|
3
|
+
import type { WorkspaceLike } from '../types.js';
|
|
4
|
+
type Input = {
|
|
5
|
+
record: WorktreeRecord;
|
|
6
|
+
source: Pick<ArchivedWorktreesInput['source'], 'sessions' | 'archivedSessionIds' | 'currentSessionId' | 'expandSnapshot' | 'sessionPresentations'>;
|
|
7
|
+
expansion: Pick<ArchivedWorktreesInput['expansion'], 'query' | 'isCurrentSessionReveal' | 'expandedSessionGroups' | 'toggleWorktree' | 'toggleSessionGroup'>;
|
|
8
|
+
ordering: Pick<ArchivedWorktreesInput['ordering'], 'orderedSessionIdsByAccount'>;
|
|
9
|
+
props: Pick<ArchivedWorktreesInput['props'], 't' | 'manager' | 'renameSession' | 'forkSession' | 'archiveSession'>;
|
|
10
|
+
lifecycle: Pick<ArchivedWorktreesInput['lifecycle'], 'branchLabel' | 'branchActions'>;
|
|
11
|
+
mutation: Pick<ArchivedWorktreesInput['mutation'], 'actionPending' | 'setActionError' | 'runMutation'>;
|
|
12
|
+
menus: Pick<ArchivedWorktreesInput['menus'], 'openWorktreeMenuId' | 'setOpenWorktreeMenuId'>;
|
|
13
|
+
read: Pick<ArchivedWorktreesInput['read'], 'refresh'>;
|
|
14
|
+
lifecycleState: Pick<ArchivedWorktreesInput['lifecycleState'], 'setWorktreeCleanDisk' | 'setWorktreeForget'>;
|
|
15
|
+
drag: Pick<ArchivedWorktreesInput['drag'], 'sessionDrag' | 'sessionDropCommitted' | 'setSessionDrag' | 'commitSessionDrag'>;
|
|
16
|
+
session: Pick<ArchivedWorktreesInput['session'], 'openWorkspaceSession'>;
|
|
17
|
+
native: Pick<ArchivedWorktreesInput['native'], 'openSessionRename' | 'archiveWorktreeSession'>;
|
|
18
|
+
bindings: readonly SessionBinding[];
|
|
19
|
+
workspaceMatchesQuery: boolean;
|
|
20
|
+
workspace: WorkspaceLike;
|
|
21
|
+
};
|
|
22
|
+
export declare function ArchivedWorktree({ record, source, expansion, ordering, props, lifecycle, mutation, menus, read, lifecycleState, drag, session, native, bindings, workspaceMatchesQuery, workspace, }: Input): import("react").JSX.Element | null;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=ArchivedWorktree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchivedWorktree.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/components/ArchivedWorktree.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAQrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,IAAI,CACV,sBAAsB,CAAC,QAAQ,CAAC,EAC9B,UAAU,GACV,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,sBAAsB,CACzB,CAAC;IACF,SAAS,EAAE,IAAI,CACb,sBAAsB,CAAC,WAAW,CAAC,EACjC,OAAO,GACP,wBAAwB,GACxB,uBAAuB,GACvB,gBAAgB,GAChB,oBAAoB,CACvB,CAAC;IACF,QAAQ,EAAE,IAAI,CAAC,sBAAsB,CAAC,UAAU,CAAC,EAAE,4BAA4B,CAAC,CAAC;IACjF,KAAK,EAAE,IAAI,CACT,sBAAsB,CAAC,OAAO,CAAC,EAC/B,GAAG,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,CACrE,CAAC;IACF,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,WAAW,CA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
|
3
|
+
import { filterVisibleSessionIds, hasOngoingSession, sessionMatchesQuery, } from '../../session/session-view.js';
|
|
4
|
+
import { isWorktreeExpanded } from '../../view/worktree-expand-state.js';
|
|
5
|
+
import { executeWorktreeAction, filterArchivedSessionIds } from '../../view/worktree-view.js';
|
|
6
|
+
import styles from '../../worktree.css';
|
|
7
|
+
import { WorktreeGroupRow, WorktreeSessionGroup } from './rows.js';
|
|
8
|
+
import { bindingIdsFor, includesText, isSessionGroupAutoExpanded, worktreeLifecycleBlockReason, } from '../selectors.js';
|
|
9
|
+
export function ArchivedWorktree({ record, source, expansion, ordering, props, lifecycle, mutation, menus, read, lifecycleState, drag, session, native, bindings, workspaceMatchesQuery, workspace, }) {
|
|
10
|
+
const { sessions, archivedSessionIds, currentSessionId, expandSnapshot, sessionPresentations } = source;
|
|
11
|
+
const { query, isCurrentSessionReveal, expandedSessionGroups, toggleWorktree, toggleSessionGroup, } = expansion;
|
|
12
|
+
const { orderedSessionIdsByAccount } = ordering;
|
|
13
|
+
const { t, manager, renameSession, forkSession, archiveSession } = props;
|
|
14
|
+
const { branchLabel, branchActions } = lifecycle;
|
|
15
|
+
const { actionPending, setActionError, runMutation } = mutation;
|
|
16
|
+
const { openWorktreeMenuId, setOpenWorktreeMenuId } = menus;
|
|
17
|
+
const { refresh } = read;
|
|
18
|
+
const { setWorktreeCleanDisk, setWorktreeForget } = lifecycleState;
|
|
19
|
+
const { sessionDrag, sessionDropCommitted, setSessionDrag, commitSessionDrag } = drag;
|
|
20
|
+
const { openWorkspaceSession } = session;
|
|
21
|
+
const { openSessionRename, archiveWorktreeSession } = native;
|
|
22
|
+
const worktreeSessionIds = filterVisibleSessionIds(filterArchivedSessionIds(bindingIdsFor(bindings, record.worktreeId).filter((sessionId) => sessions.ids.includes(sessionId)), archivedSessionIds), sessions);
|
|
23
|
+
const worktreeMatchesQuery = workspaceMatchesQuery ||
|
|
24
|
+
includesText(record.branch, query) ||
|
|
25
|
+
includesText(record.absolutePath, query);
|
|
26
|
+
if (query.length > 0 &&
|
|
27
|
+
!worktreeMatchesQuery &&
|
|
28
|
+
!worktreeSessionIds.some((sessionId) => sessionMatchesQuery(sessionId, sessions, query))) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const visibleWorktreeSessionIds = worktreeSessionIds.filter((sessionId) => worktreeMatchesQuery || sessionMatchesQuery(sessionId, sessions, query));
|
|
32
|
+
const worktreeGroupKey = 'worktree:' + record.worktreeId;
|
|
33
|
+
const orderedWorktreeSessionIds = orderedSessionIdsByAccount.get(worktreeGroupKey) ?? worktreeSessionIds;
|
|
34
|
+
const orderedVisibleWorktreeSessionIds = orderedWorktreeSessionIds.filter((sessionId) => worktreeMatchesQuery || sessionMatchesQuery(sessionId, sessions, query));
|
|
35
|
+
const sessionIds = orderedVisibleWorktreeSessionIds.length === visibleWorktreeSessionIds.length
|
|
36
|
+
? orderedVisibleWorktreeSessionIds
|
|
37
|
+
: visibleWorktreeSessionIds;
|
|
38
|
+
const sessionGroupAutoExpanded = isSessionGroupAutoExpanded(sessionIds, currentSessionId, isCurrentSessionReveal('session-group:' + worktreeGroupKey));
|
|
39
|
+
const sessionGroupExpanded = expandedSessionGroups[worktreeGroupKey] === true || sessionGroupAutoExpanded;
|
|
40
|
+
const state = record.health === 'recovery-needed'
|
|
41
|
+
? 'error'
|
|
42
|
+
: record.diskCleanup === 'completed'
|
|
43
|
+
? undefined
|
|
44
|
+
: record.health === 'repair'
|
|
45
|
+
? 'error'
|
|
46
|
+
: 'warning';
|
|
47
|
+
const stateLabel = record.health === 'recovery-needed'
|
|
48
|
+
? t('worktree.recovery')
|
|
49
|
+
: record.diskCleanup === 'completed'
|
|
50
|
+
? t('worktree.cleaned')
|
|
51
|
+
: record.health === 'repair'
|
|
52
|
+
? t('worktree.repair')
|
|
53
|
+
: record.health === 'branch-drift'
|
|
54
|
+
? t('worktree.branchDrift')
|
|
55
|
+
: t('worktree.detached');
|
|
56
|
+
const worktreeExpanded = isWorktreeExpanded(expandSnapshot, record.worktreeId) ||
|
|
57
|
+
isCurrentSessionReveal('worktree:' + record.worktreeId);
|
|
58
|
+
return (_jsxs("div", { className: styles.worktreeGroup, "data-worktree-id": record.worktreeId, children: [_jsx(WorktreeGroupRow, { t: t, kind: "worktree", label: branchLabel(record), worktreeId: record.worktreeId, expanded: worktreeExpanded, hasOngoingSession: hasOngoingSession(worktreeSessionIds, sessionPresentations), icon: _jsx(IconBranchOutline16, {}), workspaceTitle: workspace.title, state: state, stateLabel: stateLabel, onToggle: () => {
|
|
59
|
+
toggleWorktree(record.worktreeId);
|
|
60
|
+
}, menu: (() => {
|
|
61
|
+
const activityBlocked = worktreeLifecycleBlockReason(actionPending, record.health);
|
|
62
|
+
const blockedReasonText = activityBlocked === 'recovery' ? t('worktree.recovery') : undefined;
|
|
63
|
+
return {
|
|
64
|
+
...branchActions(record),
|
|
65
|
+
open: openWorktreeMenuId === record.worktreeId,
|
|
66
|
+
label: record.branch,
|
|
67
|
+
copyPath: record.absolutePath,
|
|
68
|
+
showCreate: false,
|
|
69
|
+
showRemove: false,
|
|
70
|
+
showUnarchive: record.diskCleanup !== 'completed',
|
|
71
|
+
showCleanDisk: record.diskCleanup !== 'completed',
|
|
72
|
+
showForget: true,
|
|
73
|
+
disabled: actionPending,
|
|
74
|
+
unarchiveDisabled: activityBlocked !== undefined || record.health === 'repair',
|
|
75
|
+
cleanDiskDisabled: activityBlocked !== undefined || record.health === 'branch-drift',
|
|
76
|
+
forgetDisabled: activityBlocked !== undefined,
|
|
77
|
+
unarchiveDisabledReason: record.health === 'repair'
|
|
78
|
+
? t('worktree.unarchiveDisabledRepair')
|
|
79
|
+
: blockedReasonText,
|
|
80
|
+
cleanDiskDisabledReason: record.health === 'branch-drift' ? t('worktree.adoptBeforeClean') : blockedReasonText,
|
|
81
|
+
forgetDisabledReason: blockedReasonText,
|
|
82
|
+
onOpenChange: (open) => {
|
|
83
|
+
setOpenWorktreeMenuId(open ? record.worktreeId : undefined);
|
|
84
|
+
if (open)
|
|
85
|
+
void refresh({
|
|
86
|
+
scope: { kind: 'workspace', workspaceId: record.workspaceId },
|
|
87
|
+
preserveCurrent: true,
|
|
88
|
+
reuseInFlight: true,
|
|
89
|
+
invalidateContext: false,
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
onUnarchive: () => {
|
|
93
|
+
if (!manager)
|
|
94
|
+
return;
|
|
95
|
+
if (!record.mutationToken) {
|
|
96
|
+
setActionError({
|
|
97
|
+
code: 'WORKTREE_STATE_CONFLICT',
|
|
98
|
+
message: '',
|
|
99
|
+
retryable: true,
|
|
100
|
+
details: {
|
|
101
|
+
workspaceId: record.workspaceId,
|
|
102
|
+
worktreeId: record.worktreeId,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
void runMutation(async () => {
|
|
108
|
+
await executeWorktreeAction(manager, {
|
|
109
|
+
type: 'unarchiveWorktree',
|
|
110
|
+
input: {
|
|
111
|
+
workspaceId: record.workspaceId,
|
|
112
|
+
worktreeId: record.worktreeId,
|
|
113
|
+
mutationToken: record.mutationToken,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
}, {
|
|
117
|
+
scope: { kind: 'workspace', workspaceId: record.workspaceId },
|
|
118
|
+
preserveCurrent: true,
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
onCleanDisk: () => {
|
|
122
|
+
setWorktreeCleanDisk(record);
|
|
123
|
+
setActionError(undefined);
|
|
124
|
+
},
|
|
125
|
+
onForget: () => {
|
|
126
|
+
setWorktreeForget(record);
|
|
127
|
+
setActionError(undefined);
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
})() }), worktreeExpanded && (_jsx(WorktreeSessionGroup, { t: t, groupKey: worktreeGroupKey, sessionIds: sessionIds, workspaceId: workspace.workspaceId, currentSessionId: currentSessionId, expanded: sessionGroupExpanded, actionPending: actionPending, sessions: sessions, sessionPresentations: sessionPresentations, dragState: sessionDrag, onToggleExpanded: () => {
|
|
131
|
+
toggleSessionGroup(worktreeGroupKey, sessionGroupAutoExpanded);
|
|
132
|
+
}, onStartDrag: (groupKey, sessionId) => {
|
|
133
|
+
sessionDropCommitted.current = false;
|
|
134
|
+
setSessionDrag({ groupKey, sessionId, over: null });
|
|
135
|
+
}, onHoverDrag: (sessionId, half) => {
|
|
136
|
+
setSessionDrag((current) => current === undefined ? current : { ...current, over: { sessionId, half } });
|
|
137
|
+
}, onClearDrag: () => {
|
|
138
|
+
setSessionDrag(undefined);
|
|
139
|
+
}, onFinishDrag: () => {
|
|
140
|
+
sessionDropCommitted.current = false;
|
|
141
|
+
}, onCommitDrag: commitSessionDrag, onOpen: (sessionId) => {
|
|
142
|
+
openWorkspaceSession(workspace.workspaceId, sessionId);
|
|
143
|
+
}, onRename: renameSession === undefined ? undefined : openSessionRename, onFork: forkSession, onArchive: archiveSession === undefined ? undefined : archiveWorktreeSession }))] }, record.worktreeId));
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=ArchivedWorktree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchivedWorktree.js","sourceRoot":"","sources":["../../../../src/client/surface/components/ArchivedWorktree.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AA+C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;gBAC5B,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;oBACjB,oBAAoB,CAAC,OAAO,GAAG,KAAK,CAAC;gBACvC,CAAC,EACD,YAAY,EAAE,iBAAiB,EAC/B,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE;oBACpB,oBAAoB,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;gBACzD,CAAC,EACD,QAAQ,EAAE,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,EACrE,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB,GAC5E,CACH,KArII,MAAM,CAAC,UAAU,CAsIlB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { WorkspaceTreeInput } from './WorkspaceTree.js';
|
|
2
|
+
import type { SessionBinding, WorktreeRecord } from '../../../contract/index.js';
|
|
3
|
+
import type { WorkspaceLike } from '../types.js';
|
|
4
|
+
export type ArchivedWorktreesInput = {
|
|
5
|
+
expansion: Pick<WorkspaceTreeInput['expansion'], 'isCurrentSessionReveal' | 'expandedArchivedWorkspaces' | 'toggleArchivedWorkspace' | 'query' | 'expandedSessionGroups' | 'toggleWorktree' | 'toggleSessionGroup'>;
|
|
6
|
+
props: Pick<WorkspaceTreeInput['props'], 't' | 'manager' | 'renameSession' | 'forkSession' | 'archiveSession'>;
|
|
7
|
+
source: Pick<WorkspaceTreeInput['source'], 'sessions' | 'archivedSessionIds' | 'sessionPresentations' | 'currentSessionId' | 'expandSnapshot'>;
|
|
8
|
+
ordering: Pick<WorkspaceTreeInput['ordering'], 'orderedSessionIdsByAccount'>;
|
|
9
|
+
lifecycle: Pick<WorkspaceTreeInput['lifecycle'], 'branchLabel' | 'branchActions'>;
|
|
10
|
+
mutation: Pick<WorkspaceTreeInput['mutation'], 'actionPending' | 'setActionError' | 'runMutation'>;
|
|
11
|
+
menus: Pick<WorkspaceTreeInput['menus'], 'openWorktreeMenuId' | 'setOpenWorktreeMenuId'>;
|
|
12
|
+
read: Pick<WorkspaceTreeInput['read'], 'refresh'>;
|
|
13
|
+
lifecycleState: Pick<WorkspaceTreeInput['lifecycleState'], 'setWorktreeCleanDisk' | 'setWorktreeForget'>;
|
|
14
|
+
drag: Pick<WorkspaceTreeInput['drag'], 'sessionDrag' | 'sessionDropCommitted' | 'setSessionDrag' | 'commitSessionDrag'>;
|
|
15
|
+
session: Pick<WorkspaceTreeInput['session'], 'openWorkspaceSession'>;
|
|
16
|
+
native: Pick<WorkspaceTreeInput['native'], 'openSessionRename' | 'archiveWorktreeSession'>;
|
|
17
|
+
workspace: WorkspaceLike;
|
|
18
|
+
archivedWorktrees: WorktreeRecord[];
|
|
19
|
+
bindings: readonly SessionBinding[];
|
|
20
|
+
workspaceMatchesQuery: boolean;
|
|
21
|
+
};
|
|
22
|
+
type Input = ArchivedWorktreesInput;
|
|
23
|
+
export declare function ArchivedWorktrees({ expansion, props, source, ordering, lifecycle, mutation, menus, read, lifecycleState, drag, session, native, workspace, archivedWorktrees, bindings, workspaceMatchesQuery, }: Input): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=ArchivedWorktrees.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchivedWorktrees.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/components/ArchivedWorktrees.tsx"],"names":[],"mappings":"AAOA,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,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,IAAI,CACb,kBAAkB,CAAC,WAAW,CAAC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wB,CAAC,CAAC;IAC3F,SAAS,EAAE,aAAa,CAAC;IACzB,iBAAiB,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;CAChC,CAAC;AACF,KAAK,KAAK,GAAG,sBAAsB,CAAC;AACpC,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,qBAAqB,GACtB,EAAE,KAAK,+BA4DP"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconArchiveOutline20 } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
3
|
+
import { hasOngoingSession } from '../../session/session-view.js';
|
|
4
|
+
import { filterArchivedSessionIds } from '../../view/worktree-view.js';
|
|
5
|
+
import styles from '../../worktree.css';
|
|
6
|
+
import { ArchivedWorktree } from './ArchivedWorktree.js';
|
|
7
|
+
import { WorktreeGroupRow } from './rows.js';
|
|
8
|
+
import { bindingIdsFor } from '../selectors.js';
|
|
9
|
+
export function ArchivedWorktrees({ expansion, props, source, ordering, lifecycle, mutation, menus, read, lifecycleState, drag, session, native, workspace, archivedWorktrees, bindings, workspaceMatchesQuery, }) {
|
|
10
|
+
const { isCurrentSessionReveal, expandedArchivedWorkspaces, toggleArchivedWorkspace } = expansion;
|
|
11
|
+
const { t } = props;
|
|
12
|
+
const { sessions, archivedSessionIds, sessionPresentations } = source;
|
|
13
|
+
const archivedKey = 'archived:' + workspace.workspaceId;
|
|
14
|
+
const isArchivedAutoExpanded = isCurrentSessionReveal(archivedKey);
|
|
15
|
+
const isArchivedExpanded = expandedArchivedWorkspaces[workspace.workspaceId] === true || isArchivedAutoExpanded;
|
|
16
|
+
return (_jsxs("div", { className: styles.archivedGroup, "data-archived-group": true, children: [_jsx(WorktreeGroupRow, { t: t, kind: "archived-group", label: `${t('worktree.archivedGroup')} (${archivedWorktrees.length})`, expanded: isArchivedExpanded, hasOngoingSession: hasOngoingSession(filterArchivedSessionIds(archivedWorktrees.flatMap((record) => bindingIdsFor(bindings, record.worktreeId).filter((sessionId) => sessions.ids.includes(sessionId))), archivedSessionIds), sessionPresentations), icon: _jsx(IconArchiveOutline20, { size: 16 }), workspaceTitle: workspace.title, onToggle: () => {
|
|
17
|
+
toggleArchivedWorkspace(workspace.workspaceId);
|
|
18
|
+
} }), isArchivedExpanded && (_jsx("div", { className: styles.treeChildren, children: archivedWorktrees.map((record) => (_jsx(ArchivedWorktree, { record: record, source: source, expansion: expansion, ordering: ordering, props: props, lifecycle: lifecycle, mutation: mutation, menus: menus, read: read, lifecycleState: lifecycleState, drag: drag, session: session, native: native, bindings: bindings, workspaceMatchesQuery: workspaceMatchesQuery, workspace: workspace }, record.worktreeId))) }))] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ArchivedWorktrees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchivedWorktrees.js","sourceRoot":"","sources":["../../../../src/client/surface/components/ArchivedWorktrees.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqDhD,MAAM,UAAU,iBAAiB,C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EAAE,SAAS,CAAC,KAAK,EAC/B,QAAQ,EAAE,GAAG,EAAE;oBACb,uBAAuB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;gBACjD,CAAC,GACD,EACD,kBAAkB,IAAI,CACrB,cAAK,SAAS,EAAE,MAAM,CAAC,YAAY,YAChC,iBAAiB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACjC,KAAC,gBAAgB,IAEf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,qBAAqB,EAC5C,SAAS,EAAE,SAAS,IAhBf,MAAM,CAAC,UAAU,CAiBtB,CACH,CAAC,GACE,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorktreeSurfaceProps } from '../types.js';
|
|
2
|
+
import type { useLifecycleActions } from '../actions/useLifecycleActions.js';
|
|
3
|
+
import type { useLifecycleState } from '../state/useLifecycleState.js';
|
|
4
|
+
import type { useSessionActions } from '../actions/useSessionActions.js';
|
|
5
|
+
import type { useSessionExpansion } from '../state/useSessionExpansion.js';
|
|
6
|
+
import type { useSurfaceMutation } from '../actions/useSurfaceMutation.js';
|
|
7
|
+
import type { useSurfaceRefresh } from '../state/useSurfaceRefresh.js';
|
|
8
|
+
export type LifecycleDialogInput = {
|
|
9
|
+
props: Pick<WorktreeSurfaceProps, 't' | 'manager' | 'permission' | 'onPermissionNotice' | 'onWorktreeForgotten'>;
|
|
10
|
+
lifecycleState: Pick<ReturnType<typeof useLifecycleState>, 'worktreeBranchAdoption' | 'branchAdoptionGuard' | 'setWorktreeBranchAdoption' | 'worktreeRemoval' | 'setWorktreeRemoval' | 'setWorktreeCleanDisk' | 'cleanupGuard' | 'setWorktreeForget'>;
|
|
11
|
+
mutation: Pick<ReturnType<typeof useSurfaceMutation>, 'actionPending' | 'actionError' | 'runMutation' | 'setActionError' | 'setActionPending'>;
|
|
12
|
+
lifecycle: Pick<ReturnType<typeof useLifecycleActions>, 'refreshBranchAdoption' | 'cleanDiskTarget' | 'forgetTarget'>;
|
|
13
|
+
expansion: Pick<ReturnType<typeof useSessionExpansion>, 'suppressCurrentSessionReveal' | 'clearSessionGroups'>;
|
|
14
|
+
read: Pick<ReturnType<typeof useSurfaceRefresh>, 'readStateRef' | 'setReadState' | 'refresh' | 'readState'>;
|
|
15
|
+
session: Pick<ReturnType<typeof useSessionActions>, 'pendingSessionBinding' | 'setPendingSessionBinding'>;
|
|
16
|
+
};
|
|
17
|
+
type Input = LifecycleDialogInput;
|
|
18
|
+
export declare function LifecycleDialogs({ props, lifecycleState, mutation, lifecycle, expansion, read, session, }: Input): import("react").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=LifecycleDialogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LifecycleDialogs.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/components/LifecycleDialogs.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,E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|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { WorktreeAdoptBranchDialog, WorktreeCleanDiskDialog, WorktreeForgetDialog, WorktreeRemovalDialog, } from './dialogs.js';
|
|
3
|
+
import { createLifecycleCommands } from '../actions/lifecycle-commands.js';
|
|
4
|
+
export function LifecycleDialogs({ props, lifecycleState, mutation, lifecycle, expansion, read, session, }) {
|
|
5
|
+
const { t } = props;
|
|
6
|
+
const { worktreeBranchAdoption, branchAdoptionGuard, setWorktreeBranchAdoption, worktreeRemoval, setWorktreeRemoval, setWorktreeCleanDisk, setWorktreeForget, } = lifecycleState;
|
|
7
|
+
const { actionPending, actionError } = mutation;
|
|
8
|
+
const { refreshBranchAdoption, cleanDiskTarget, forgetTarget } = lifecycle;
|
|
9
|
+
const { confirmBranchAdoption, confirmArchive, confirmDiskCleanup, confirmForget } = createLifecycleCommands({
|
|
10
|
+
props,
|
|
11
|
+
lifecycleState,
|
|
12
|
+
mutation,
|
|
13
|
+
lifecycle,
|
|
14
|
+
expansion,
|
|
15
|
+
read,
|
|
16
|
+
session,
|
|
17
|
+
});
|
|
18
|
+
return (_jsxs(_Fragment, { children: [_jsx(WorktreeAdoptBranchDialog, { t: t, worktree: worktreeBranchAdoption, actionPending: actionPending, error: actionError, onRetry: () => {
|
|
19
|
+
void refreshBranchAdoption();
|
|
20
|
+
}, onClose: () => {
|
|
21
|
+
branchAdoptionGuard.current.invalidate();
|
|
22
|
+
setWorktreeBranchAdoption(undefined);
|
|
23
|
+
}, onSubmit: confirmBranchAdoption }), _jsx(WorktreeRemovalDialog, { t: t, worktree: worktreeRemoval, actionPending: actionPending, onClose: () => {
|
|
24
|
+
setWorktreeRemoval(undefined);
|
|
25
|
+
}, onSubmit: confirmArchive }), _jsx(WorktreeCleanDiskDialog, { t: t, worktree: cleanDiskTarget, actionPending: actionPending, onClose: () => {
|
|
26
|
+
setWorktreeCleanDisk(undefined);
|
|
27
|
+
}, onSubmit: confirmDiskCleanup }), _jsx(WorktreeForgetDialog, { t: t, worktree: forgetTarget, actionPending: actionPending, onClose: () => {
|
|
28
|
+
setWorktreeForget(undefined);
|
|
29
|
+
}, onSubmit: confirmForget })] }));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=LifecycleDialogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LifecycleDialogs.js","sourceRoot":"","sources":["../../../../src/client/surface/components/LifecycleDialogs.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAgD3E,MAAM,UAAU,gBAAgB,CAAC,EAC/B,KAAK,EACL,cAAc,EACd,QAAQ,EACR,SAAS,EACT,SAAS,EACT,IAAI,EACJ,OAAO,GACD;IACN,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;IACpB,MAAM,EACJ,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,GAClB,GAAG,cAAc,CAAC;IACnB,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;IAChD,MAAM,EAAE,qBAAqB,EAAE,eAAe,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAE3E,MAAM,EAAE,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,GAChF,uBAAuB,CAAC;QACtB,KAAK;QACL,cAAc;QACd,QAAQ;QACR,SAAS;QACT,SAAS;QACT,IAAI;QACJ,OAAO;KACR,CAAC,CAAC;IAEL,OAAO,CACL,8BACE,KAAC,yBAAyB,IACxB,CAAC,EAAE,CAAC,EACJ,QAAQ,EAAE,sBAAsB,EAChC,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,qBAAqB,EAAE,CAAC;gBAC/B,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;oBACZ,mBAAmB,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;oBACzC,yBAAyB,CAAC,SAAS,CAAC,CAAC;gBACvC,CAAC,EACD,QAAQ,EAAE,qBAAqB,GAC/B,EACF,KAAC,qBAAqB,IACpB,CAAC,EAAE,CAAC,EACJ,QAAQ,EAAE,eAAe,EACzB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,GAAG,EAAE;oBACZ,kBAAkB,CAAC,SAAS,CAAC,CAAC;gBAChC,CAAC,EACD,QAAQ,EAAE,cAAc,GACxB,EACF,KAAC,uBAAuB,IACtB,CAAC,EAAE,CAAC,EACJ,QAAQ,EAAE,eAAe,EACzB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,GAAG,EAAE;oBACZ,oBAAoB,CAAC,SAAS,CAAC,CAAC;gBAClC,CAAC,EACD,QAAQ,EAAE,kBAAkB,GAC5B,EACF,KAAC,oBAAoB,IACnB,CAAC,EAAE,CAAC,EACJ,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,GAAG,EAAE;oBACZ,iBAAiB,CAAC,SAAS,CAAC,CAAC;gBAC/B,CAAC,EACD,QAAQ,EAAE,aAAa,GACvB,IACD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorktreeSurfaceProps } from '../types.js';
|
|
2
|
+
import type { useNativeActions } from '../actions/useNativeActions.js';
|
|
3
|
+
type Input = {
|
|
4
|
+
props: Pick<WorktreeSurfaceProps, 't'>;
|
|
5
|
+
native: Pick<ReturnType<typeof useNativeActions>, 'sessionRenameTarget' | 'sessionRenameDraft' | 'sessionRenamePending' | 'sessionRenameError' | 'closeSessionRename' | 'setSessionRenameDraft' | 'setSessionRenameError' | 'confirmSessionRename' | 'workspaceRenameTarget' | 'workspaceRenameDraft' | 'workspaceRenamePending' | 'workspaceRenameDuplicate' | 'workspaceRenameError' | 'closeWorkspaceRename' | 'setWorkspaceRenameDraft' | 'setWorkspaceRenameError' | 'confirmWorkspaceRename' | 'workspaceDeleteTarget' | 'workspaceDeletePending' | 'workspaceDeleteError' | 'closeWorkspaceDelete' | 'confirmWorkspaceDelete'>;
|
|
6
|
+
};
|
|
7
|
+
export declare function NativeDialogs({ props, native }: Input): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=NativeDialogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeDialogs.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/components/NativeDialogs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACvC,MAAM,EAAE,IAAI,CACV,UAAU,CAAC,OAAO,gBAAgB,CAAC,EACjC,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,oBAAoB,GACpB,oBAAoB,GACpB,uBAAuB,GACvB,uBAAuB,GACvB,sBAAsB,GACtB,uBAAuB,GACvB,sBAAsB,GACtB,wBAAwB,GACxB,0BAA0B,GAC1B,sBAAsB,GACtB,sBAAsB,GACtB,yBAAyB,GACzB,yBAAyB,GACzB,wBAAwB,GACxB,uBAAuB,GACvB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,GACtB,wBAAwB,CAC3B,CAAC;CACH,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,+BAkErD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { WorktreeSessionRenameDialog, WorktreeWorkspaceDeleteDialog, WorktreeWorkspaceRenameDialog, } from './dialogs.js';
|
|
3
|
+
export function NativeDialogs({ props, native }) {
|
|
4
|
+
const { t } = props;
|
|
5
|
+
const { sessionRenameTarget, sessionRenameDraft, sessionRenamePending, sessionRenameError, closeSessionRename, setSessionRenameDraft, setSessionRenameError, confirmSessionRename, workspaceRenameTarget, workspaceRenameDraft, workspaceRenamePending, workspaceRenameDuplicate, workspaceRenameError, closeWorkspaceRename, setWorkspaceRenameDraft, setWorkspaceRenameError, confirmWorkspaceRename, workspaceDeleteTarget, workspaceDeletePending, workspaceDeleteError, closeWorkspaceDelete, confirmWorkspaceDelete, } = native;
|
|
6
|
+
return (_jsxs(_Fragment, { children: [_jsx(WorktreeSessionRenameDialog, { t: t, target: sessionRenameTarget, draft: sessionRenameDraft, pending: sessionRenamePending, error: sessionRenameError, onClose: closeSessionRename, onDraftChange: (draft) => {
|
|
7
|
+
setSessionRenameDraft(draft);
|
|
8
|
+
setSessionRenameError(undefined);
|
|
9
|
+
}, onSubmit: confirmSessionRename }), _jsx(WorktreeWorkspaceRenameDialog, { t: t, target: workspaceRenameTarget, draft: workspaceRenameDraft, pending: workspaceRenamePending, duplicate: workspaceRenameDuplicate, error: workspaceRenameError, onClose: closeWorkspaceRename, onDraftChange: (draft) => {
|
|
10
|
+
setWorkspaceRenameDraft(draft);
|
|
11
|
+
setWorkspaceRenameError(undefined);
|
|
12
|
+
}, onSubmit: confirmWorkspaceRename }), _jsx(WorktreeWorkspaceDeleteDialog, { t: t, target: workspaceDeleteTarget, pending: workspaceDeletePending, error: workspaceDeleteError, onClose: closeWorkspaceDelete, onSubmit: confirmWorkspaceDelete })] }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=NativeDialogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeDialogs.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vB,uBAAuB,CAAC,KAAK,CAAC,CAAC;oBAC/B,uBAAuB,CAAC,SAAS,CAAC,CAAC;gBACrC,CAAC,EACD,QAAQ,EAAE,sBAAsB,GAChC,EACF,KAAC,6BAA6B,IAC5B,CAAC,EAAE,CAAC,EACJ,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,sBAAsB,EAC/B,KAAK,EAAE,oBAAoB,EAC3B,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,sBAAsB,GAChC,IACD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type WorktreeNotification } from '../notification-queue.js';
|
|
2
|
+
/** One native toast at a time; recovery controls remain available after it fades. */
|
|
3
|
+
export declare function NotificationToasts({ notices, detailsLabel, }: {
|
|
4
|
+
notices: readonly WorktreeNotification[];
|
|
5
|
+
detailsLabel: string;
|
|
6
|
+
}): import("react").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=NotificationToasts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationToasts.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/components/NotificationToasts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,YAAY,GACb,EAAE;IACD,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;CACtB,sCAkBA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Toast } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
3
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
4
|
+
import { reconcileNotifications, } from '../notification-queue.js';
|
|
5
|
+
/** One native toast at a time; recovery controls remain available after it fades. */
|
|
6
|
+
export function NotificationToasts({ notices, detailsLabel, }) {
|
|
7
|
+
const [queue, setQueue] = useState({ seen: [], pending: [] });
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setQueue((current) => reconcileNotifications(current, notices));
|
|
10
|
+
}, [notices]);
|
|
11
|
+
const current = queue.pending[0];
|
|
12
|
+
const key = current?.key;
|
|
13
|
+
const onDone = useCallback(() => {
|
|
14
|
+
setQueue((state) => ({
|
|
15
|
+
...state,
|
|
16
|
+
pending: state.pending.filter((notice) => notice.key !== key),
|
|
17
|
+
}));
|
|
18
|
+
}, [key]);
|
|
19
|
+
if (current === undefined)
|
|
20
|
+
return null;
|
|
21
|
+
const text = current.text.length > 240 ? current.text.slice(0, 240) + '…' : current.text;
|
|
22
|
+
return (_jsx(Toast, { text: text + ' · ' + detailsLabel, holdMs: 6000, onDone: onDone }, current.key));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=NotificationToasts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationToasts.js","sourceRoot":"","sources":["../../../../src/client/surface/components/NotificationToasts.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uCAAuC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,sBAAsB,GAGvB,MAAM,0BAA0B,CAAC;AAElC,qFAAqF;AACrF,MAAM,UAAU,kBAAkB,CAAC,EACjC,OAAO,EACP,YAAY,GAIb;IACC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAoB,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;IACjF,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACd,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,CAAC;IACzB,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnB,GAAG,KAAK;YACR,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,CAAC;SAC9D,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACV,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACvC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACzF,OAAO,CACL,KAAC,KAAK,IAAmB,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,IAA5E,OAAO,CAAC,GAAG,CAAqE,CAC7F,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WorktreeSurfaceProps } from '../types.js';
|
|
2
|
+
import type { useRegistrationState } from '../state/useRegistrationState.js';
|
|
3
|
+
import type { useSurfaceMutation } from '../actions/useSurfaceMutation.js';
|
|
4
|
+
import type { useSurfaceRefresh } from '../state/useSurfaceRefresh.js';
|
|
5
|
+
import type { useWorktreeRegistration } from '../actions/useWorktreeRegistration.js';
|
|
6
|
+
type Input = {
|
|
7
|
+
props: Pick<WorktreeSurfaceProps, 't'>;
|
|
8
|
+
registration: Pick<ReturnType<typeof useWorktreeRegistration>, 'modalWorkspace' | 'modalView' | 'modalSetupStatus' | 'modalCanCreate' | 'closeWorktreeCreator' | 'changeWorktreeModalMode' | 'loadImportCandidates' | 'submitWorktree'>;
|
|
9
|
+
registrationState: Pick<ReturnType<typeof useRegistrationState>, 'modalReadError' | 'worktreeModalMode' | 'importCandidates' | 'selectedImportPath' | 'selectedBranch' | 'newBranch' | 'worktreeModalWorkspaceId' | 'modalReadViewRef' | 'setSelectedBranch' | 'setNewBranch' | 'setSelectedImportPath'>;
|
|
10
|
+
mutation: Pick<ReturnType<typeof useSurfaceMutation>, 'actionPending'>;
|
|
11
|
+
read: Pick<ReturnType<typeof useSurfaceRefresh>, 'loadModalWorktreeView'>;
|
|
12
|
+
};
|
|
13
|
+
export declare function RegistrationDialog({ props, registration, registrationState, mutation, read, }: Input): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=RegistrationDialog.d.ts.map
|