@cerbur/clutch-dsh-worktree 0.1.9 → 0.1.12
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 +230 -231
- package/README.zh.md +184 -225
- package/assets/screenshots/screenshots-dashboard.webp +0 -0
- package/assets/screenshots/screenshots-en.png +0 -0
- package/assets/screenshots/screenshots-import.png +0 -0
- package/assets/screenshots/screenshots-zh.png +0 -0
- package/lib/client/WorktreeSurface.d.ts +4 -7
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +179 -1418
- 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/dashboard/DashboardHeaderAction.d.ts +20 -0
- package/lib/client/dashboard/DashboardHeaderAction.d.ts.map +1 -0
- package/lib/client/dashboard/DashboardHeaderAction.js +19 -0
- package/lib/client/dashboard/DashboardHeaderAction.js.map +1 -0
- package/lib/client/dashboard/OpenInAppButton.d.ts +9 -0
- package/lib/client/dashboard/OpenInAppButton.d.ts.map +1 -0
- package/lib/client/dashboard/OpenInAppButton.js +123 -0
- package/lib/client/dashboard/OpenInAppButton.js.map +1 -0
- package/lib/client/dashboard/WorktreeDashboard.d.ts +21 -0
- package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -0
- package/lib/client/dashboard/WorktreeDashboard.js +211 -0
- package/lib/client/dashboard/WorktreeDashboard.js.map +1 -0
- package/lib/client/dashboard/WorktreeInstructions.d.ts +8 -0
- package/lib/client/dashboard/WorktreeInstructions.d.ts.map +1 -0
- package/lib/client/dashboard/WorktreeInstructions.js +53 -0
- package/lib/client/dashboard/WorktreeInstructions.js.map +1 -0
- package/lib/client/dashboard/dashboard-icon.d.ts +7 -0
- package/lib/client/dashboard/dashboard-icon.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-icon.js +6 -0
- package/lib/client/dashboard/dashboard-icon.js.map +1 -0
- package/lib/client/dashboard/dashboard-overlay.d.ts +11 -0
- package/lib/client/dashboard/dashboard-overlay.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-overlay.js +120 -0
- package/lib/client/dashboard/dashboard-overlay.js.map +1 -0
- package/lib/client/dashboard/dashboard-selection.d.ts +32 -0
- package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-selection.js +31 -0
- package/lib/client/dashboard/dashboard-selection.js.map +1 -0
- package/lib/client/dashboard/dashboard-sessions.d.ts +6 -0
- package/lib/client/dashboard/dashboard-sessions.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-sessions.js +21 -0
- package/lib/client/dashboard/dashboard-sessions.js.map +1 -0
- package/lib/client/dashboard/open-in-app-controller.d.ts +30 -0
- package/lib/client/dashboard/open-in-app-controller.d.ts.map +1 -0
- package/lib/client/dashboard/open-in-app-controller.js +94 -0
- package/lib/client/dashboard/open-in-app-controller.js.map +1 -0
- package/lib/client/dashboard/vscode-url.d.ts +3 -0
- package/lib/client/dashboard/vscode-url.d.ts.map +1 -0
- package/lib/client/dashboard/vscode-url.js +9 -0
- package/lib/client/dashboard/vscode-url.js.map +1 -0
- package/lib/client/dashboard/worktree-acquisition-facts.d.ts +16 -0
- package/lib/client/dashboard/worktree-acquisition-facts.d.ts.map +1 -0
- package/lib/client/dashboard/worktree-acquisition-facts.js +14 -0
- package/lib/client/dashboard/worktree-acquisition-facts.js.map +1 -0
- package/lib/client/dsh-slot-contract.d.ts +5 -0
- package/lib/client/dsh-slot-contract.d.ts.map +1 -1
- package/lib/client/entry.d.ts +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +90 -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 +204 -0
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +214 -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-labels.d.ts +9 -0
- package/lib/client/session/session-labels.d.ts.map +1 -0
- package/lib/client/session/session-labels.js +44 -0
- package/lib/client/session/session-labels.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 +155 -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 +146 -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 +149 -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} +180 -20
- 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} +58 -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} +9 -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-dispatch.d.ts +7 -0
- package/lib/client/view/view-mode-dispatch.d.ts.map +1 -0
- package/lib/client/view/view-mode-dispatch.js +11 -0
- package/lib/client/view/view-mode-dispatch.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 +6 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +20 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client.js +5869 -2648
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +12 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +64 -3
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +8 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/host/dsh-read-adapter.d.ts +13 -2
- package/lib/host/dsh-read-adapter.d.ts.map +1 -1
- package/lib/host/dsh-read-adapter.js +23 -3
- package/lib/host/dsh-read-adapter.js.map +1 -1
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +15 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +30 -0
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +47 -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-instructions.d.ts +41 -0
- package/lib/host/worktree-instructions.d.ts.map +1 -0
- package/lib/host/worktree-instructions.js +65 -0
- package/lib/host/worktree-instructions.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 +81 -112
- package/lib/manage/manager-worktrees.js.map +1 -1
- package/lib/manage/manager.d.ts +24 -1
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +70 -6
- package/lib/manage/manager.js.map +1 -1
- package/lib/manage/types.d.ts +1 -0
- package/lib/manage/types.d.ts.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} +16 -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} +59 -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 +93 -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 +164 -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 +74 -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 +330 -36
- package/lib/typert.remote-client.d.ts +12 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +330 -36
- package/package.json +21 -20
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceRefresh.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/state/useSurfaceRefresh.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,IAAI,CACV,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpC,sBAAsB,GAAG,iBAAiB,GAAG,MAAM,GAAG,cAAc,GAAG,sBAAsB,CAC9F,CAAC;IACF,KAAK,EAAE,IAAI,CACT,oBAAoB,EACpB,SAAS,GAAG,YAAY,GAAG,2BAA2B,GAAG,uBAAuB,CACjF,CAAC;IACF,iBAAiB,EAAE,IAAI,CACrB,UAAU,CAAC,OAAO,oBAAoB,CAAC,EACrC,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GACrB,iBAAiB,GACjB,6BAA6B,CAChC,CAAC;CACH,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;4BAmB5C,MAAM;;;;;;wBAQnB,cAAc,KAAQ,OAAO,CAAC,IAAI,CAAC;yCA6HrC,MAAM,KAAG,IAAI;;;;EA0J9B"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { createWorktreeRefreshGuard, mergeWorktreeView, mergeWorktreeViews, toWorktreeViewError, } from '../../view/worktree-view.js';
|
|
3
|
+
import { worktreeActivityRefreshWorkspaceIds } from '../selectors.js';
|
|
4
|
+
import { EMPTY_READ_STATE } from '../shared.js';
|
|
5
|
+
export function useSurfaceRefresh({ source, props, registrationState }) {
|
|
6
|
+
const { forkRecoverySnapshot, workspaceIdsRef, mode, workspaceIds, sessionPresentations } = source;
|
|
7
|
+
const { manager, viewReader, invalidateWorktreeContext, syncSessionWorkspaces } = props;
|
|
8
|
+
const { modalReadViewRef, setModalReadError, setModalReadLoading, modalReadLoader, setWorktreeModalWorkspaceId, } = registrationState;
|
|
9
|
+
const [readState, setReadState] = useState(EMPTY_READ_STATE);
|
|
10
|
+
const readStateRef = useRef(readState);
|
|
11
|
+
readStateRef.current = readState;
|
|
12
|
+
const refreshGuard = useRef(createWorktreeRefreshGuard());
|
|
13
|
+
const targetRefreshGuards = useRef(new Map());
|
|
14
|
+
const forkRecoveryRevisionRef = useRef(forkRecoverySnapshot.revision);
|
|
15
|
+
const guardFor = (workspaceId) => {
|
|
16
|
+
const current = targetRefreshGuards.current.get(workspaceId);
|
|
17
|
+
if (current !== undefined)
|
|
18
|
+
return current;
|
|
19
|
+
const created = createWorktreeRefreshGuard();
|
|
20
|
+
targetRefreshGuards.current.set(workspaceId, created);
|
|
21
|
+
return created;
|
|
22
|
+
};
|
|
23
|
+
const refresh = useCallback(async (options = {}) => {
|
|
24
|
+
if (manager === undefined) {
|
|
25
|
+
refreshGuard.current.invalidate();
|
|
26
|
+
for (const guard of targetRefreshGuards.current.values())
|
|
27
|
+
guard.invalidate();
|
|
28
|
+
setReadState(EMPTY_READ_STATE);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const scope = options.scope ?? { kind: 'global' };
|
|
32
|
+
const preserveCurrent = options.preserveCurrent === true;
|
|
33
|
+
const currentWorkspaceIds = workspaceIdsRef.current;
|
|
34
|
+
if (scope.kind === 'global') {
|
|
35
|
+
if (!preserveCurrent) {
|
|
36
|
+
setReadState({ status: 'loading', views: [] });
|
|
37
|
+
}
|
|
38
|
+
const selectedWorkspaceIds = [...currentWorkspaceIds];
|
|
39
|
+
for (const workspaceId of selectedWorkspaceIds) {
|
|
40
|
+
viewReader.invalidate(workspaceId);
|
|
41
|
+
}
|
|
42
|
+
const contextRefresh = options.invalidateContext === false ? undefined : invalidateWorktreeContext?.();
|
|
43
|
+
await refreshGuard.current.run(async () => {
|
|
44
|
+
const [views] = await Promise.all([
|
|
45
|
+
viewReader.readMany(selectedWorkspaceIds),
|
|
46
|
+
contextRefresh ?? Promise.resolve(),
|
|
47
|
+
]);
|
|
48
|
+
return views;
|
|
49
|
+
}, (views) => {
|
|
50
|
+
setReadState((current) => {
|
|
51
|
+
const merged = mergeWorktreeViews(current.views, workspaceIdsRef.current, views);
|
|
52
|
+
return {
|
|
53
|
+
status: 'ready',
|
|
54
|
+
views: modalReadViewRef.current === undefined
|
|
55
|
+
? merged
|
|
56
|
+
: mergeWorktreeView(merged, modalReadViewRef.current),
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}, (error) => {
|
|
60
|
+
if (preserveCurrent)
|
|
61
|
+
throw error;
|
|
62
|
+
setReadState({
|
|
63
|
+
status: 'error',
|
|
64
|
+
views: modalReadViewRef.current === undefined ? [] : [modalReadViewRef.current],
|
|
65
|
+
error: toWorktreeViewError(error),
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const requestedWorkspaceIds = scope.kind === 'workspace' ? [scope.workspaceId] : scope.workspaceIds;
|
|
71
|
+
const selectedWorkspaceIds = [...new Set(requestedWorkspaceIds)].filter((workspaceId) => currentWorkspaceIds.includes(workspaceId));
|
|
72
|
+
if (selectedWorkspaceIds.length === 0)
|
|
73
|
+
return;
|
|
74
|
+
await Promise.allSettled(selectedWorkspaceIds.map(async (workspaceId) => {
|
|
75
|
+
const guard = guardFor(workspaceId);
|
|
76
|
+
viewReader.invalidate(workspaceId, { reuseInFlight: options.reuseInFlight });
|
|
77
|
+
const contextRefresh = options.invalidateContext === false
|
|
78
|
+
? undefined
|
|
79
|
+
: invalidateWorktreeContext?.(workspaceId);
|
|
80
|
+
const generation = guard.begin();
|
|
81
|
+
try {
|
|
82
|
+
const view = await viewReader.read(workspaceId);
|
|
83
|
+
if (!guard.isCurrent(generation))
|
|
84
|
+
return;
|
|
85
|
+
if (!workspaceIdsRef.current.includes(workspaceId))
|
|
86
|
+
return;
|
|
87
|
+
setReadState((current) => {
|
|
88
|
+
const remainingTargetError = current.targetError?.workspaceIds.filter((candidate) => candidate !== workspaceId) ?? [];
|
|
89
|
+
const next = {
|
|
90
|
+
...current,
|
|
91
|
+
status: 'ready',
|
|
92
|
+
views: mergeWorktreeViews(current.views, workspaceIdsRef.current, [view]),
|
|
93
|
+
error: undefined,
|
|
94
|
+
};
|
|
95
|
+
if (remainingTargetError.length === 0) {
|
|
96
|
+
const withoutTargetError = { ...next };
|
|
97
|
+
delete withoutTargetError.targetError;
|
|
98
|
+
return withoutTargetError;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
...next,
|
|
102
|
+
targetError: {
|
|
103
|
+
workspaceIds: remainingTargetError,
|
|
104
|
+
error: current.targetError.error,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
if (!guard.isCurrent(generation))
|
|
111
|
+
return;
|
|
112
|
+
if (!workspaceIdsRef.current.includes(workspaceId))
|
|
113
|
+
return;
|
|
114
|
+
setReadState((current) => {
|
|
115
|
+
const previousIds = current.targetError?.workspaceIds ?? [];
|
|
116
|
+
return {
|
|
117
|
+
...current,
|
|
118
|
+
status: 'ready',
|
|
119
|
+
views: mergeWorktreeViews(current.views, workspaceIdsRef.current, []),
|
|
120
|
+
error: undefined,
|
|
121
|
+
targetError: {
|
|
122
|
+
workspaceIds: [...new Set([...previousIds, workspaceId])],
|
|
123
|
+
error: {
|
|
124
|
+
...toWorktreeViewError(error),
|
|
125
|
+
retryable: true,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
await contextRefresh?.catch(() => undefined);
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
}, [invalidateWorktreeContext, manager, viewReader]);
|
|
136
|
+
const loadModalWorktreeView = useCallback((workspaceId) => {
|
|
137
|
+
setModalReadError(undefined);
|
|
138
|
+
setModalReadLoading(true);
|
|
139
|
+
if (manager === undefined) {
|
|
140
|
+
setModalReadLoading(false);
|
|
141
|
+
setModalReadError({
|
|
142
|
+
code: 'WORKTREE_VIEW_UNAVAILABLE',
|
|
143
|
+
message: '',
|
|
144
|
+
retryable: true,
|
|
145
|
+
});
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
void modalReadLoader.current.load(workspaceId, (view) => {
|
|
149
|
+
modalReadViewRef.current = view;
|
|
150
|
+
setModalReadLoading(false);
|
|
151
|
+
setReadState((current) => ({
|
|
152
|
+
...current,
|
|
153
|
+
views: mergeWorktreeView(current.views, view),
|
|
154
|
+
}));
|
|
155
|
+
}, (error) => {
|
|
156
|
+
setModalReadLoading(false);
|
|
157
|
+
setModalReadError(toWorktreeViewError(error));
|
|
158
|
+
});
|
|
159
|
+
}, [manager, viewReader]);
|
|
160
|
+
useEffect(() => {
|
|
161
|
+
if (mode === 'worktree') {
|
|
162
|
+
void refresh({ preserveCurrent: readStateRef.current.status === 'ready' });
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
refreshGuard.current.invalidate();
|
|
166
|
+
for (const guard of targetRefreshGuards.current.values())
|
|
167
|
+
guard.invalidate();
|
|
168
|
+
modalReadLoader.current.invalidate();
|
|
169
|
+
modalReadViewRef.current = undefined;
|
|
170
|
+
setWorktreeModalWorkspaceId(undefined);
|
|
171
|
+
setModalReadError(undefined);
|
|
172
|
+
setModalReadLoading(false);
|
|
173
|
+
setReadState(EMPTY_READ_STATE);
|
|
174
|
+
}
|
|
175
|
+
}, [mode, refresh]);
|
|
176
|
+
const previousWorkspaceIdsRef = useRef(workspaceIds);
|
|
177
|
+
useEffect(() => {
|
|
178
|
+
const previousWorkspaceIds = previousWorkspaceIdsRef.current;
|
|
179
|
+
previousWorkspaceIdsRef.current = workspaceIds;
|
|
180
|
+
if (mode !== 'worktree')
|
|
181
|
+
return;
|
|
182
|
+
const addedWorkspaceIds = workspaceIds.filter((workspaceId) => !previousWorkspaceIds.includes(workspaceId));
|
|
183
|
+
const removedWorkspaceIds = previousWorkspaceIds.filter((workspaceId) => !workspaceIds.includes(workspaceId));
|
|
184
|
+
for (const workspaceId of removedWorkspaceIds) {
|
|
185
|
+
targetRefreshGuards.current.delete(workspaceId);
|
|
186
|
+
}
|
|
187
|
+
setReadState((current) => {
|
|
188
|
+
const views = mergeWorktreeViews(current.views, workspaceIds, []);
|
|
189
|
+
const remainingTargetError = current.targetError?.workspaceIds.filter((workspaceId) => workspaceIds.includes(workspaceId)) ?? [];
|
|
190
|
+
const next = { ...current, views };
|
|
191
|
+
if (remainingTargetError.length === 0) {
|
|
192
|
+
const withoutTargetError = { ...next };
|
|
193
|
+
delete withoutTargetError.targetError;
|
|
194
|
+
return withoutTargetError;
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
...next,
|
|
198
|
+
targetError: {
|
|
199
|
+
workspaceIds: remainingTargetError,
|
|
200
|
+
error: current.targetError.error,
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
for (const workspaceId of addedWorkspaceIds) {
|
|
205
|
+
void refresh({
|
|
206
|
+
scope: { kind: 'workspace', workspaceId },
|
|
207
|
+
preserveCurrent: true,
|
|
208
|
+
}).catch(() => {
|
|
209
|
+
// The target error remains visible and can be retried explicitly.
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}, [mode, refresh, workspaceIds]);
|
|
213
|
+
useEffect(() => {
|
|
214
|
+
if (forkRecoveryRevisionRef.current === forkRecoverySnapshot.revision)
|
|
215
|
+
return;
|
|
216
|
+
forkRecoveryRevisionRef.current = forkRecoverySnapshot.revision;
|
|
217
|
+
if (mode !== 'worktree' || manager === undefined)
|
|
218
|
+
return;
|
|
219
|
+
if (forkRecoverySnapshot.affectedWorkspaceIds.length === 0)
|
|
220
|
+
return;
|
|
221
|
+
void refresh({
|
|
222
|
+
scope: {
|
|
223
|
+
kind: 'workspaces',
|
|
224
|
+
workspaceIds: forkRecoverySnapshot.affectedWorkspaceIds,
|
|
225
|
+
},
|
|
226
|
+
preserveCurrent: readStateRef.current.status === 'ready',
|
|
227
|
+
}).catch(() => {
|
|
228
|
+
// Recovery state remains visible; the next explicit retry can refresh it again.
|
|
229
|
+
});
|
|
230
|
+
}, [
|
|
231
|
+
forkRecoverySnapshot.affectedWorkspaceIds,
|
|
232
|
+
forkRecoverySnapshot.revision,
|
|
233
|
+
manager,
|
|
234
|
+
mode,
|
|
235
|
+
refresh,
|
|
236
|
+
]);
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
if (readState.status !== 'ready' || syncSessionWorkspaces === undefined)
|
|
239
|
+
return;
|
|
240
|
+
syncSessionWorkspaces(readState.views.flatMap((view) => view.bindings.map((binding) => ({
|
|
241
|
+
workspaceId: binding.workspaceId,
|
|
242
|
+
sessionId: binding.sessionId,
|
|
243
|
+
}))));
|
|
244
|
+
}, [readState.status, readState.views, syncSessionWorkspaces]);
|
|
245
|
+
const viewByWorkspace = useMemo(() => new Map(readState.views.map((view) => [view.workspaceId, view])), [readState.views]);
|
|
246
|
+
const previousActivityRef = useRef(sessionPresentations);
|
|
247
|
+
useEffect(() => {
|
|
248
|
+
const previous = previousActivityRef.current;
|
|
249
|
+
previousActivityRef.current = sessionPresentations;
|
|
250
|
+
if (mode !== 'worktree')
|
|
251
|
+
return;
|
|
252
|
+
const affected = worktreeActivityRefreshWorkspaceIds(readStateRef.current.views, previous, sessionPresentations);
|
|
253
|
+
if (affected.length > 0)
|
|
254
|
+
void refresh({
|
|
255
|
+
scope: { kind: 'workspaces', workspaceIds: affected },
|
|
256
|
+
preserveCurrent: true,
|
|
257
|
+
});
|
|
258
|
+
}, [mode, refresh, sessionPresentations]);
|
|
259
|
+
return {
|
|
260
|
+
readState,
|
|
261
|
+
setReadState,
|
|
262
|
+
readStateRef,
|
|
263
|
+
refreshGuard,
|
|
264
|
+
targetRefreshGuards,
|
|
265
|
+
forkRecoveryRevisionRef,
|
|
266
|
+
guardFor,
|
|
267
|
+
refresh,
|
|
268
|
+
loadModalWorktreeView,
|
|
269
|
+
previousWorkspaceIdsRef,
|
|
270
|
+
viewByWorkspace,
|
|
271
|
+
previousActivityRef,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=useSurfaceRefresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceRefresh.js","sourceRoot":"","sources":["../../../../src/client/surface/state/useSurfaceRefresh.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mCAAmC,EAAE,MA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K,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE;gBACrD,eAAe,EAAE,IAAI;aACtB,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAC1C,OAAO;QACL,SAAS;QACT,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,mBAAmB;QACnB,uBAAuB;QACvB,QAAQ;QACR,OAAO;QACP,qBAAqB;QACrB,uBAAuB;QACvB,eAAe;QACf,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type SessionListLike } from '../../session/session-view.js';
|
|
2
|
+
import type { WorkspaceListLike, WorktreeSurfaceProps } from '../types.js';
|
|
3
|
+
type Input = {
|
|
4
|
+
props: Pick<WorktreeSurfaceProps, 'useStore' | 'available' | 'manager' | 'useSessions' | 'useWorkspaces' | 'forkRecovery' | 'expandState' | 'permissionNotice' | 'fullAccessConfirmation' | 'sessionOrder'>;
|
|
5
|
+
};
|
|
6
|
+
export declare function useSurfaceSources({ props }: Input): {
|
|
7
|
+
preferredMode: import("../../view/view-mode.js").WorktreeViewMode;
|
|
8
|
+
mode: import("../../view/view-mode.js").WorktreeViewMode;
|
|
9
|
+
sessions: SessionListLike;
|
|
10
|
+
workspaces: WorkspaceListLike;
|
|
11
|
+
forkRecoveryStore: import("../../session/worktree-session-fork.js").WorktreeForkRecoveryStore;
|
|
12
|
+
forkRecoverySnapshot: import("../../session/worktree-session-fork.js").WorktreeForkRecoverySnapshot;
|
|
13
|
+
currentSessionId: string | undefined;
|
|
14
|
+
workspaceIds: readonly string[];
|
|
15
|
+
workspaceIdsRef: import("react").MutableRefObject<readonly string[]>;
|
|
16
|
+
expandSnapshot: import("../../view/worktree-expand-state.js").WorktreeExpandState;
|
|
17
|
+
permissionNoticeSnapshot: import("../types.js").WorktreePermissionNotice | undefined;
|
|
18
|
+
fullAccessConfirmationSnapshot: import("../../index.js").WorktreeFullAccessConfirmationInput | undefined;
|
|
19
|
+
fullAccessConfirmationKey: string;
|
|
20
|
+
fullAccessAcknowledged: boolean;
|
|
21
|
+
setFullAccessAcknowledged: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
22
|
+
sessionOrderSnapshot: import("../../session/worktree-session-order.js").WorktreeSessionOrderState;
|
|
23
|
+
sessionPresentations: Readonly<Record<string, import("../../session/session-view.js").SessionPresentation>>;
|
|
24
|
+
ref: import("react").RefObject<HTMLDivElement>;
|
|
25
|
+
width: number;
|
|
26
|
+
bounds: import("../../overlay/overlay-bounds.js").OverlayBounds;
|
|
27
|
+
collapsed: boolean;
|
|
28
|
+
archivedSessionIds: readonly string[];
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=useSurfaceSources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceSources.d.ts","sourceRoot":"","sources":["../../../../src/client/surface/state/useSurfaceSources.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAWrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE3E,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,IAAI,CACT,oBAAoB,EAClB,UAAU,GACV,WAAW,GACX,SAAS,GACT,aAAa,GACb,eAAe,GACf,cAAc,GACd,aAAa,GACb,kBAAkB,GAClB,wBAAwB,GACxB,cAAc,CACjB,CAAC;CACH,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;EA2FjD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
2
|
+
import { deriveSessionPresentationIndex } from '../../session/session-view.js';
|
|
3
|
+
import { useSidebarOverlayGeometry } from '../../overlay/sidebar-overlay-geometry.js';
|
|
4
|
+
import { effectiveViewMode } from '../../view/view-mode.js';
|
|
5
|
+
import { EMPTY_FORK_RECOVERY_STORE, EMPTY_FULL_ACCESS_CONFIRMATION_SNAPSHOT, EMPTY_FULL_ACCESS_CONFIRMATION_SUBSCRIBE, EMPTY_PERMISSION_NOTICE_SNAPSHOT, EMPTY_PERMISSION_NOTICE_SUBSCRIBE, useStableWorkspaceIds, } from '../shared.js';
|
|
6
|
+
export function useSurfaceSources({ props }) {
|
|
7
|
+
const { useStore, available, manager, useSessions, useWorkspaces, forkRecovery, expandState, permissionNotice, fullAccessConfirmation, sessionOrder, } = props;
|
|
8
|
+
const preferredMode = useStore((state) => state.viewMode);
|
|
9
|
+
const mode = effectiveViewMode(preferredMode, available && manager !== undefined);
|
|
10
|
+
const sessions = useSessions((state) => state);
|
|
11
|
+
const workspaces = useWorkspaces((state) => state);
|
|
12
|
+
const forkRecoveryStore = forkRecovery ?? EMPTY_FORK_RECOVERY_STORE;
|
|
13
|
+
const forkRecoverySnapshot = useSyncExternalStore(forkRecoveryStore.subscribe, forkRecoveryStore.getSnapshot, forkRecoveryStore.getSnapshot);
|
|
14
|
+
const currentSessionId = sessions.current;
|
|
15
|
+
const workspaceIds = useStableWorkspaceIds(workspaces.items);
|
|
16
|
+
const workspaceIdsRef = useRef(workspaceIds);
|
|
17
|
+
workspaceIdsRef.current = workspaceIds;
|
|
18
|
+
const expandSnapshot = useSyncExternalStore(expandState.subscribe, expandState.getSnapshot, expandState.getSnapshot);
|
|
19
|
+
const permissionNoticeSnapshot = useSyncExternalStore(permissionNotice?.subscribe ?? EMPTY_PERMISSION_NOTICE_SUBSCRIBE, permissionNotice?.getSnapshot ?? EMPTY_PERMISSION_NOTICE_SNAPSHOT, permissionNotice?.getSnapshot ?? EMPTY_PERMISSION_NOTICE_SNAPSHOT);
|
|
20
|
+
const fullAccessConfirmationSnapshot = useSyncExternalStore(fullAccessConfirmation?.subscribe ?? EMPTY_FULL_ACCESS_CONFIRMATION_SUBSCRIBE, fullAccessConfirmation?.getSnapshot ?? EMPTY_FULL_ACCESS_CONFIRMATION_SNAPSHOT, fullAccessConfirmation?.getSnapshot ?? EMPTY_FULL_ACCESS_CONFIRMATION_SNAPSHOT);
|
|
21
|
+
const fullAccessConfirmationKey = fullAccessConfirmationSnapshot === undefined
|
|
22
|
+
? ''
|
|
23
|
+
: [
|
|
24
|
+
fullAccessConfirmationSnapshot.workspaceId,
|
|
25
|
+
fullAccessConfirmationSnapshot.worktreeId,
|
|
26
|
+
fullAccessConfirmationSnapshot.sessionId,
|
|
27
|
+
fullAccessConfirmationSnapshot.cwd,
|
|
28
|
+
].join('\u0000');
|
|
29
|
+
const [fullAccessAcknowledged, setFullAccessAcknowledged] = useState(false);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
setFullAccessAcknowledged(false);
|
|
32
|
+
}, [fullAccessConfirmationKey]);
|
|
33
|
+
const sessionOrderSnapshot = useSyncExternalStore(sessionOrder.subscribe, sessionOrder.getSnapshot, sessionOrder.getSnapshot);
|
|
34
|
+
const sessionPresentations = useMemo(() => deriveSessionPresentationIndex(sessions), [sessions.byId]);
|
|
35
|
+
const { ref, width, bounds } = useSidebarOverlayGeometry(mode === 'worktree');
|
|
36
|
+
const collapsed = width <= 64;
|
|
37
|
+
const archivedSessionIds = workspaces.archivedSessionIds ?? [];
|
|
38
|
+
return {
|
|
39
|
+
preferredMode,
|
|
40
|
+
mode,
|
|
41
|
+
sessions,
|
|
42
|
+
workspaces,
|
|
43
|
+
forkRecoveryStore,
|
|
44
|
+
forkRecoverySnapshot,
|
|
45
|
+
currentSessionId,
|
|
46
|
+
workspaceIds,
|
|
47
|
+
workspaceIdsRef,
|
|
48
|
+
expandSnapshot,
|
|
49
|
+
permissionNoticeSnapshot,
|
|
50
|
+
fullAccessConfirmationSnapshot,
|
|
51
|
+
fullAccessConfirmationKey,
|
|
52
|
+
fullAccessAcknowledged,
|
|
53
|
+
setFullAccessAcknowledged,
|
|
54
|
+
sessionOrderSnapshot,
|
|
55
|
+
sessionPresentations,
|
|
56
|
+
ref,
|
|
57
|
+
width,
|
|
58
|
+
bounds,
|
|
59
|
+
collapsed,
|
|
60
|
+
archivedSessionIds,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=useSurfaceSources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceSources.js","sourceRoot":"","sources":["../../../../src/client/surface/state/useSurfaceSources.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAwB,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,yBAAyB,EACzB,uCAAuC,EACvC,wCAAwC,EACxC,gCAAgC,EAChC,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAmBtB,MAAM,UAAU,iBAAiB,CAAC,EAAE,KAAK,EAAS;IAChD,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,GACb,GAAG,KAAK,CAAC;IACV,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,iBAAiB,CAAC,aAAa,EAAE,SAAS,IAAI,OAAO,KAAK,SAAS,CAAC,CAAC;IAClF,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAoB,CAAC;IAClE,MAAM,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,CAAC,KAAK,CAAC,CAAC;IAC5E,SAAS,CAAC,GAAG,EAAE;QACb,yBAAyB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC,EAAE,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAChC,MAAM,oBAAoB,GAAG,oBAAoB,CAC/C,YAAY,CAAC,SAAS,EACtB,YAAY,CAAC,WAAW,EACxB,YAAY,CAAC,WAAW,CACzB,CAAC;IACF,MAAM,oBAAoB,GAAG,OAAO,CAClC,GAAG,EAAE,CAAC,8BAA8B,CAAC,QAAQ,CAAC,EAC9C,CAAC,QAAQ,CAAC,IAAI,CAAC,CAChB,CAAC;IACF,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,yBAAyB,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IAC9E,MAAM,SAAS,GAAG,KAAK,IAAI,EAAE,CAAC;IAC9B,MAAM,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,IAAI,EAAE,CAAC;IAC/D,OAAO;QACL,aAAa;QACb,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,iBAAiB;QACjB,oBAAoB;QACpB,gBAAgB;QAChB,YAAY;QACZ,eAAe;QACf,cAAc;QACd,wBAAwB;QACxB,8BAA8B;QAC9B,yBAAyB;QACzB,sBAAsB;QACtB,yBAAyB;QACzB,oBAAoB;QACpB,oBAAoB;QACpB,GAAG;QACH,KAAK;QACL,MAAM;QACN,SAAS;QACT,kBAAkB;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
1
|
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
|
|
3
2
|
import type { PropsLocale, PropsRuntime, PropsStore, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
6
|
-
import type {
|
|
7
|
-
import
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import type { WorktreeImportCandidate, WorktreeManager, WorktreePermissionManager, WorktreePermissionResult, WorktreeRecord } from '../../contract/index.js';
|
|
5
|
+
import type { DashboardRecord, DashboardSelection } from '../dashboard/dashboard-selection.js';
|
|
6
|
+
import { WORKTREE_NS } from '../locales.js';
|
|
7
|
+
import type { SessionListLike, SessionPresentation } from '../session/session-view.js';
|
|
8
|
+
import type { createWorktreeViewStore } from '../view/view-mode-store.js';
|
|
9
|
+
import type { WorktreeExpandStateStore } from '../view/worktree-expand-state.js';
|
|
10
|
+
import type { WorktreeFullAccessConfirmationController } from '../permission/worktree-permission.js';
|
|
11
|
+
import type { ForgottenWorktree, WorktreeForkRecoveryStore } from '../session/worktree-session-fork.js';
|
|
12
|
+
import type { WorktreeSessionOrderStore } from '../session/worktree-session-order.js';
|
|
13
|
+
import type { WorktreeViewReader } from '../view/worktree-view-read.js';
|
|
14
|
+
import type { CreateSessionForWorktreeInput, WorktreeGitReadiness, WorktreeViewError, WorktreeWorkspaceView } from '../view/worktree-view.js';
|
|
15
|
+
export type { ForgottenWorktree };
|
|
14
16
|
export interface WorkspaceLike {
|
|
15
17
|
readonly workspaceId: string;
|
|
16
18
|
readonly path: string;
|
|
@@ -31,6 +33,10 @@ export interface WorktreePermissionNotice {
|
|
|
31
33
|
/** Apply-time facts and DSH navigation callbacks used by the surface. */
|
|
32
34
|
export interface WorktreeSurfaceInjected {
|
|
33
35
|
readonly available: boolean;
|
|
36
|
+
readonly openDashboard?: (record: DashboardRecord) => void;
|
|
37
|
+
readonly dashboardStore?: ObservableSnapshot<DashboardSelection | undefined> & {
|
|
38
|
+
set(selection: DashboardSelection | undefined): void;
|
|
39
|
+
};
|
|
34
40
|
readonly expandState: WorktreeExpandStateStore;
|
|
35
41
|
readonly sessionOrder: WorktreeSessionOrderStore;
|
|
36
42
|
readonly manager?: WorktreeManager;
|
|
@@ -75,6 +81,7 @@ export interface WorktreeSurfaceInjected {
|
|
|
75
81
|
sessionId: string;
|
|
76
82
|
}[]) => void;
|
|
77
83
|
readonly openSession: (sessionId: string) => void;
|
|
84
|
+
readonly onWorktreeForgotten?: (input: ForgottenWorktree) => void;
|
|
78
85
|
}
|
|
79
86
|
/** Props derived from the frame overlay slot, shared state, and injected face. */
|
|
80
87
|
export type WorktreeSurfaceProps = PropsRuntime<'shell.overlay'> & PropsStore<ReturnType<typeof createWorktreeViewStore>> & PropsLocale<typeof WORKTREE_NS> & WorktreeSurfaceInjected;
|
|
@@ -116,6 +123,8 @@ export interface TargetedWorktreeReadError {
|
|
|
116
123
|
}
|
|
117
124
|
export interface RefreshOptions {
|
|
118
125
|
readonly preserveCurrent?: boolean;
|
|
126
|
+
/** Only read-only triggers may reuse reads started before this refresh. */
|
|
127
|
+
readonly reuseInFlight?: boolean;
|
|
119
128
|
readonly invalidateContext?: boolean;
|
|
120
129
|
readonly scope?: WorktreeRefreshScope;
|
|
121
130
|
}
|
|
@@ -180,17 +189,32 @@ export interface WorktreeWorkspaceRowProps {
|
|
|
180
189
|
readonly onMenuOpenChange: (open: boolean) => void;
|
|
181
190
|
}
|
|
182
191
|
export interface WorktreeGroupMenuProps {
|
|
192
|
+
readonly onDashboard?: () => void;
|
|
183
193
|
readonly open: boolean;
|
|
184
194
|
readonly label: string;
|
|
185
195
|
readonly copyPath: string;
|
|
186
196
|
readonly showCreate: boolean;
|
|
187
197
|
readonly showRemove: boolean;
|
|
198
|
+
readonly showUnarchive?: boolean;
|
|
199
|
+
readonly showCleanDisk?: boolean;
|
|
200
|
+
readonly onAdoptBranch?: () => void;
|
|
201
|
+
readonly onRecover?: () => void;
|
|
202
|
+
readonly showForget?: boolean;
|
|
188
203
|
readonly disabled: boolean;
|
|
204
|
+
readonly unarchiveDisabled?: boolean;
|
|
205
|
+
readonly cleanDiskDisabled?: boolean;
|
|
206
|
+
readonly forgetDisabled?: boolean;
|
|
207
|
+
readonly unarchiveDisabledReason?: string;
|
|
208
|
+
readonly cleanDiskDisabledReason?: string;
|
|
209
|
+
readonly forgetDisabledReason?: string;
|
|
189
210
|
readonly onOpenChange: (open: boolean) => void;
|
|
190
211
|
readonly onCreateWorktree?: () => void;
|
|
191
212
|
readonly onRemove?: () => void;
|
|
213
|
+
readonly onUnarchive?: () => void;
|
|
214
|
+
readonly onCleanDisk?: () => void;
|
|
215
|
+
readonly onForget?: () => void;
|
|
192
216
|
}
|
|
193
|
-
export type WorktreeGroupKind = 'main' | 'worktree';
|
|
217
|
+
export type WorktreeGroupKind = 'main' | 'worktree' | 'archived-group';
|
|
194
218
|
export interface WorktreeGroupRowProps {
|
|
195
219
|
readonly t: WorktreeTranslate;
|
|
196
220
|
readonly kind: WorktreeGroupKind;
|
|
@@ -202,8 +226,11 @@ export interface WorktreeGroupRowProps {
|
|
|
202
226
|
readonly workspaceTitle: string;
|
|
203
227
|
readonly state?: 'done' | 'warning' | 'error';
|
|
204
228
|
readonly stateLabel?: string;
|
|
229
|
+
readonly repairGuidance?: string;
|
|
205
230
|
readonly onToggle: () => void;
|
|
206
231
|
readonly onCreateSession?: () => void;
|
|
232
|
+
/** Whether this row should expose the inline Dashboard action when wired. */
|
|
233
|
+
readonly showDashboardAction?: boolean;
|
|
207
234
|
readonly menu?: WorktreeGroupMenuProps;
|
|
208
235
|
readonly drag?: WorktreeDragProps;
|
|
209
236
|
}
|
|
@@ -318,4 +345,22 @@ export interface WorktreeRemovalDialogProps {
|
|
|
318
345
|
readonly onClose: () => void;
|
|
319
346
|
readonly onSubmit: () => void;
|
|
320
347
|
}
|
|
321
|
-
|
|
348
|
+
export interface WorktreeAdoptBranchDialogProps extends WorktreeRemovalDialogProps {
|
|
349
|
+
readonly error?: WorktreeViewError;
|
|
350
|
+
readonly onRetry: () => void;
|
|
351
|
+
}
|
|
352
|
+
export interface WorktreeCleanDiskDialogProps {
|
|
353
|
+
readonly t: WorktreeTranslate;
|
|
354
|
+
readonly worktree: WorktreeRecord | undefined;
|
|
355
|
+
readonly actionPending: boolean;
|
|
356
|
+
readonly onClose: () => void;
|
|
357
|
+
readonly onSubmit: () => void;
|
|
358
|
+
}
|
|
359
|
+
export interface WorktreeForgetDialogProps {
|
|
360
|
+
readonly t: WorktreeTranslate;
|
|
361
|
+
readonly worktree: WorktreeRecord | undefined;
|
|
362
|
+
readonly actionPending: boolean;
|
|
363
|
+
readonly onClose: () => void;
|
|
364
|
+
readonly onSubmit: () => void;
|
|
365
|
+
}
|
|
366
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/surface/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAMxE,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACZ,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAE/F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,sCAAsC,CAAC;AACrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACxG,O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,QAAQ,EAAE,MAAM,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/client/surface/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsLocale, PropsRuntime, PropsStore } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
-
import { WORKTREE_NS } from '
|
|
2
|
+
import { WORKTREE_NS } from '../locales.js';
|
|
3
3
|
import type { createWorktreeViewStore } from './view-mode-store.js';
|
|
4
4
|
/** Apply-time facts and callbacks owned by the Consumer entry. */
|
|
5
5
|
export interface WorktreeModeActionInjected {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorktreeModeAction.d.ts","sourceRoot":"","sources":["../../../src/client/view/WorktreeModeAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAM9F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAGpE,kEAAkE;AAClE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,wFAAwF;AACxF,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,uBAAuB,CAAC,GACzE,UAAU,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,GACtD,WAAW,CAAC,OAAO,WAAW,CAAC,GAC/B,0BAA0B,CAAC;AAE7B,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,CAAC,EACD,SAAS,GACV,EAAE,uBAAuB,sCA6BzB"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
2
3
|
import { IconBranchOutline16 } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
3
|
-
import
|
|
4
|
+
import { registerViewModeSetter } from './view-mode-dispatch.js';
|
|
5
|
+
import styles from '../worktree.css';
|
|
4
6
|
/** Footer action that enters/exits the peer Worktree navigation mode. */
|
|
5
7
|
export function WorktreeModeAction({ wide, useStore, actions, t, available, }) {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
registerViewModeSetter(actions.setViewMode);
|
|
10
|
+
return () => {
|
|
11
|
+
registerViewModeSetter(undefined);
|
|
12
|
+
};
|
|
13
|
+
}, [actions.setViewMode]);
|
|
6
14
|
if (!available)
|
|
7
15
|
return null;
|
|
8
16
|
const mode = useStore((state) => state.viewMode);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorktreeModeAction.js","sourceRoot":"","sources":["../../../src/client/view/WorktreeModeAction.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAarC,yEAAyE;AACzE,MAAM,UAAU,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,CAAC,EACD,SAAS,GACe;IACxB,SAAS,CAAC,GAAG,EAAE;QACb,sBAAsB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC5C,OAAO,GAAG,EAAE;YACV,sBAAsB,CAAC,SAAS,CAAC,CAAC;QACpC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IAE1B,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,IAAI,KAAK,UAAU,CAAC;IACnC,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,MAAM,CAAC,MAAM,oDAEX,MAAM,IAAI,SAAS,oBAChB,CAAC,IAAI,IAAI,SAAS,gBACtB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,kBACtC,MAAM,EACpB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAChD,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACjE,CAAC,aAED,KAAC,mBAAmB,IAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAI,EAC5C,IAAI,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,WAAW,YAAG,CAAC,CAAC,YAAY,CAAC,GAAQ,IAC/D,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/client/view/navigation.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAElF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../src/client/view/navigation.ts"],"names":[],"mappings":"AAKA,gFAAgF;AAChF,MAAM,UAAU,mBAAmB,CAAC,MAAqB,EAAE,SAAiB;IAC1E,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorktreeViewMode } from './view-mode.js';
|
|
2
|
+
type SetViewModeFn = (mode: WorktreeViewMode) => void;
|
|
3
|
+
export declare function registerViewModeSetter(setter: SetViewModeFn | undefined): void;
|
|
4
|
+
export declare function getViewModeSetter(): SetViewModeFn | undefined;
|
|
5
|
+
export declare function switchViewMode(mode: WorktreeViewMode): void;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=view-mode-dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-mode-dispatch.d.ts","sourceRoot":"","sources":["../../../src/client/view/view-mode-dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAItD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI,CAE9E;AAED,wBAAgB,iBAAiB,IAAI,aAAa,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAE3D"}
|