@cerbur/clutch-dsh-worktree 0.1.13 → 0.1.14
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 +51 -29
- package/README.zh.md +47 -26
- package/lib/client/WorktreeSurface.js +2 -2
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/dashboard/WorktreeDashboard.d.ts +1 -1
- package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -1
- package/lib/client/dashboard/WorktreeDashboard.js +1 -1
- package/lib/client/dashboard/WorktreeDashboard.js.map +1 -1
- package/lib/client/dashboard/dashboard-selection.d.ts +3 -2
- package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -1
- package/lib/client/dashboard/dashboard-selection.js +2 -1
- package/lib/client/dashboard/dashboard-selection.js.map +1 -1
- package/lib/client/dashboard/git/WorktreeGitOverview.js +1 -1
- package/lib/client/dashboard/git/WorktreeGitOverview.js.map +1 -1
- package/lib/client/dashboard/git/WorktreeGitPanel.d.ts.map +1 -1
- package/lib/client/dashboard/git/WorktreeGitPanel.js +1 -1
- package/lib/client/dashboard/git/WorktreeGitPanel.js.map +1 -1
- package/lib/client/dashboard/git/git-facts.d.ts +5 -1
- package/lib/client/dashboard/git/git-facts.d.ts.map +1 -1
- package/lib/client/dashboard/git/git-facts.js +9 -3
- package/lib/client/dashboard/git/git-facts.js.map +1 -1
- package/lib/client/dashboard/git/useWorktreeGitState.d.ts.map +1 -1
- package/lib/client/dashboard/git/useWorktreeGitState.js +13 -17
- package/lib/client/dashboard/git/useWorktreeGitState.js.map +1 -1
- package/lib/client/dashboard/open-in-app-controller.d.ts +1 -0
- package/lib/client/dashboard/open-in-app-controller.d.ts.map +1 -1
- package/lib/client/dashboard/open-in-app-controller.js +6 -24
- package/lib/client/dashboard/open-in-app-controller.js.map +1 -1
- package/lib/client/dashboard/vscode-url.d.ts.map +1 -1
- package/lib/client/dashboard/vscode-url.js +6 -3
- package/lib/client/dashboard/vscode-url.js.map +1 -1
- package/lib/client/locales.js +6 -6
- package/lib/client/locales.js.map +1 -1
- package/lib/client/session/worktree-session.d.ts +2 -0
- package/lib/client/session/worktree-session.d.ts.map +1 -1
- package/lib/client/session/worktree-session.js +15 -3
- package/lib/client/session/worktree-session.js.map +1 -1
- package/lib/client/view/worktree-view-read.d.ts +3 -1
- package/lib/client/view/worktree-view-read.d.ts.map +1 -1
- package/lib/client/view/worktree-view-read.js +9 -2
- package/lib/client/view/worktree-view-read.js.map +1 -1
- package/lib/client/worktree-connection.d.ts +1 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +4 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client.js +113 -61
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +2 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +11 -1
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +2 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/contract/windows-path.d.ts +11 -0
- package/lib/contract/windows-path.d.ts.map +1 -0
- package/lib/contract/windows-path.js +41 -0
- package/lib/contract/windows-path.js.map +1 -0
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +1 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +4 -0
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +6 -0
- package/lib/host/service.js.map +1 -1
- package/lib/host/worktree-instructions.js +2 -2
- package/lib/host/worktree-instructions.js.map +1 -1
- package/lib/host/worktree-permission-manager.d.ts.map +1 -1
- package/lib/host/worktree-permission-manager.js +5 -1
- package/lib/host/worktree-permission-manager.js.map +1 -1
- package/lib/manage/manager-git-history.d.ts.map +1 -1
- package/lib/manage/manager-git-history.js +215 -48
- package/lib/manage/manager-git-history.js.map +1 -1
- package/lib/manage/manager-sessions.js +1 -1
- package/lib/manage/manager-sessions.js.map +1 -1
- package/lib/manage/manager-support.d.ts +3 -2
- package/lib/manage/manager-support.d.ts.map +1 -1
- package/lib/manage/manager-support.js +5 -13
- package/lib/manage/manager-support.js.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.d.ts.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.js +11 -3
- package/lib/manage/manager-worktree-lifecycle.js.map +1 -1
- package/lib/manage/manager.d.ts +4 -0
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +61 -16
- package/lib/manage/manager.js.map +1 -1
- package/lib/provider/git/adapter.d.ts +2 -2
- package/lib/provider/git/adapter.d.ts.map +1 -1
- package/lib/provider/git/adapter.js +10 -7
- package/lib/provider/git/adapter.js.map +1 -1
- package/lib/provider/path-identity.d.ts +8 -0
- package/lib/provider/path-identity.d.ts.map +1 -0
- package/lib/provider/path-identity.js +62 -0
- package/lib/provider/path-identity.js.map +1 -0
- package/lib/provider/sidecar/mutation-lock.d.ts +4 -1
- package/lib/provider/sidecar/mutation-lock.d.ts.map +1 -1
- package/lib/provider/sidecar/mutation-lock.js +5 -11
- package/lib/provider/sidecar/mutation-lock.js.map +1 -1
- package/lib/provider/sidecar/process-liveness.d.ts +12 -0
- package/lib/provider/sidecar/process-liveness.d.ts.map +1 -0
- package/lib/provider/sidecar/process-liveness.js +39 -0
- package/lib/provider/sidecar/process-liveness.js.map +1 -0
- package/lib/provider/sidecar/sidecar-durability.d.ts +9 -0
- package/lib/provider/sidecar/sidecar-durability.d.ts.map +1 -0
- package/lib/provider/sidecar/sidecar-durability.js +36 -0
- package/lib/provider/sidecar/sidecar-durability.js.map +1 -0
- package/lib/provider/sidecar/sidecar-persistence.d.ts.map +1 -1
- package/lib/provider/sidecar/sidecar-persistence.js +2 -27
- package/lib/provider/sidecar/sidecar-persistence.js.map +1 -1
- package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -1
- package/lib/provider/sidecar/sidecar-schema.js +22 -5
- package/lib/provider/sidecar/sidecar-schema.js.map +1 -1
- package/lib/provider/transaction/support/paths.d.ts +2 -1
- package/lib/provider/transaction/support/paths.d.ts.map +1 -1
- package/lib/provider/transaction/support/paths.js +2 -12
- package/lib/provider/transaction/support/paths.js.map +1 -1
- package/lib/provider/types.d.ts +8 -6
- 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/typert.host.js +83 -42
- package/lib/typert.remote-client.d.ts +2 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +83 -42
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -897,11 +897,11 @@ window.__ModuleLoader__.load({
|
|
|
897
897
|
"dashboard.newSession": "新建会话",
|
|
898
898
|
"dashboard.newWorktreeDescription": "基于当前分支创建独立的工作目录",
|
|
899
899
|
"dashboard.newSessionDescription": "在这个 Worktree 中开始新的会话",
|
|
900
|
-
"dashboard.instructions": "Worktree 指令",
|
|
900
|
+
"dashboard.instructions": "Worktree / Main 指令",
|
|
901
901
|
"dashboard.edit": "编辑",
|
|
902
|
-
"dashboard.instructionsDescription": "为这个 Worktree 设置共享的工作指引。",
|
|
902
|
+
"dashboard.instructionsDescription": "为这个 Worktree 或 Main Workspace 设置共享的工作指引。",
|
|
903
903
|
"dashboard.noInstructions": "尚未设置指令",
|
|
904
|
-
"dashboard.instructionsHint": "最多 32,000
|
|
904
|
+
"dashboard.instructionsHint": "最多 32,000 字符。保存后在这个 Worktree 或 Main Workspace 中运行的会话下一次模型请求中以 <system-reminder> 生效;清空并保存可停用。",
|
|
905
905
|
"dashboard.noSessions": "此 Worktree 暂无可显示的会话。",
|
|
906
906
|
"dashboard.viewSessions": "查看全部会话",
|
|
907
907
|
"dashboard.status": "Worktree 状态",
|
|
@@ -1215,11 +1215,11 @@ window.__ModuleLoader__.load({
|
|
|
1215
1215
|
"dashboard.newSession": "New Session",
|
|
1216
1216
|
"dashboard.newWorktreeDescription": "Create an isolated worktree from this branch",
|
|
1217
1217
|
"dashboard.newSessionDescription": "Start another session in this worktree",
|
|
1218
|
-
"dashboard.instructions": "Worktree Instructions",
|
|
1218
|
+
"dashboard.instructions": "Worktree / Main Instructions",
|
|
1219
1219
|
"dashboard.edit": "Edit",
|
|
1220
|
-
"dashboard.instructionsDescription": "A place for shared guidance for this
|
|
1220
|
+
"dashboard.instructionsDescription": "A place for shared guidance for this Worktree or Main Workspace.",
|
|
1221
1221
|
"dashboard.noInstructions": "No instructions yet",
|
|
1222
|
-
"dashboard.instructionsHint": "Up to 32,000 characters. Saved instructions enter
|
|
1222
|
+
"dashboard.instructionsHint": "Up to 32,000 characters. Saved instructions enter the next model request for Sessions using this Worktree or Main Workspace as <system-reminder>. Clear and save to disable.",
|
|
1223
1223
|
"dashboard.noSessions": "No visible sessions in this worktree.",
|
|
1224
1224
|
"dashboard.viewSessions": "View all sessions",
|
|
1225
1225
|
"dashboard.status": "Worktree Status",
|
|
@@ -1439,6 +1439,7 @@ window.__ModuleLoader__.load({
|
|
|
1439
1439
|
recoverWorktrees: "worktreeManager/recoverWorktrees",
|
|
1440
1440
|
forgetWorktree: "worktreeManager/forgetWorktree",
|
|
1441
1441
|
insertWorktreeBefore: "worktreeManager/insertWorktreeBefore",
|
|
1442
|
+
getWorktreeInstructions: "worktreeManager/getWorktreeInstructions",
|
|
1442
1443
|
updateWorktreeInstructions: "worktreeManager/updateWorktreeInstructions",
|
|
1443
1444
|
updateWorktreeBaseBranch: "worktreeManager/updateWorktreeBaseBranch",
|
|
1444
1445
|
listBindings: "worktreeManager/listBindings",
|
|
@@ -1572,6 +1573,9 @@ window.__ModuleLoader__.load({
|
|
|
1572
1573
|
async insertWorktreeBefore(input) {
|
|
1573
1574
|
return invoke("insertWorktreeBefore", input);
|
|
1574
1575
|
},
|
|
1576
|
+
async getWorktreeInstructions(input) {
|
|
1577
|
+
return invoke("getWorktreeInstructions", input);
|
|
1578
|
+
},
|
|
1575
1579
|
async updateWorktreeInstructions(input) {
|
|
1576
1580
|
return invoke("updateWorktreeInstructions", input);
|
|
1577
1581
|
},
|
|
@@ -1591,7 +1595,7 @@ window.__ModuleLoader__.load({
|
|
|
1591
1595
|
};
|
|
1592
1596
|
}
|
|
1593
1597
|
//#endregion
|
|
1594
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
1598
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_f7c3c8176e38/packages/clutch-dsh-worktree/src/client/context/worktree-context.css.mjs
|
|
1595
1599
|
const css$5 = ".-cerbur-clutch-dsh-worktree-headerContext {\n display: inline-flex;\n min-width: 0;\n height: 22px;\n align-items: center;\n gap: 4px;\n max-width: 180px;\n overflow: hidden;\n border-radius: 6px;\n padding: 0 2px 0 0;\n background: var(--dsw-alias-fill-tsp-secondary);\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-contextIcon {\n flex: none;\n opacity: 0.7;\n}\n\n.-cerbur-clutch-dsh-worktree-contextLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-contextHoverTitle {\n max-width: 360px;\n color: var(--dsw-static-neutral-bluish-00);\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: anywhere;\n white-space: normal;\n}\n\n.-cerbur-clutch-dsh-worktree-heroContextHost {\n position: absolute;\n z-index: 0;\n display: block;\n width: max-content;\n max-width: 260px;\n min-height: 22px;\n}\n\n.-cerbur-clutch-dsh-worktree-heroContext {\n display: inline-flex;\n box-sizing: border-box;\n max-width: 260px;\n min-height: 22px;\n align-items: center;\n overflow: hidden;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n padding: 0 8px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 20px;\n pointer-events: auto;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
|
|
1596
1600
|
const styleId$5 = "@cerbur/clutch-dsh-worktree/worktree-context.css";
|
|
1597
1601
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-context.css\"]") === null) {
|
|
@@ -1656,7 +1660,7 @@ window.__ModuleLoader__.load({
|
|
|
1656
1660
|
globalSetViewMode?.(mode);
|
|
1657
1661
|
}
|
|
1658
1662
|
//#endregion
|
|
1659
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
1663
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_f7c3c8176e38/packages/clutch-dsh-worktree/src/client/worktree.css.mjs
|
|
1660
1664
|
const css$4 = ".-cerbur-clutch-dsh-worktree-action {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n width: calc(100% + 4px);\n height: 42px;\n margin: 4px -2px;\n box-sizing: border-box;\n border: 0;\n border-radius: 12px;\n padding: 0 10px 0 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n text-align: left;\n overflow: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-action:hover,\n.-cerbur-clutch-dsh-worktree-action[data-active='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-action[data-collapsed='true'] {\n width: 36px;\n height: 36px;\n margin: 8px 0 10px;\n justify-content: center;\n gap: 0;\n padding: 0;\n border-radius: 50%;\n}\n\n.-cerbur-clutch-dsh-worktree-actionLabel {\n display: inline-flex;\n min-width: 0;\n align-items: center;\n height: 22px;\n overflow: hidden;\n font-weight: 400;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-surface {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-width: 56px;\n overflow: hidden;\n border-right: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-specific-sidebar-fill);\n color: var(--dsw-alias-label-primary);\n pointer-events: auto;\n transition: width var(--ds-transition-duration-slow) var(--ds-ease-in-out);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .-cerbur-clutch-dsh-worktree-surface {\n transition: none;\n }\n}\n\n.-cerbur-clutch-dsh-worktree-wideContent {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n}\n\n.-cerbur-clutch-dsh-worktree-surface[data-collapsed='true'] .-cerbur-clutch-dsh-worktree-wideContent {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTabs {\n display: flex;\n gap: 8px;\n margin-bottom: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTab {\n border: 0;\n border-bottom: 2px solid transparent;\n padding: 4px 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTab[aria-selected='true'] {\n border-bottom-color: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeImportCandidates {\n display: grid;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeImportSelect {\n width: 100%;\n min-width: 0;\n padding: 7px 8px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeImportError {\n display: grid;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton {\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-header {\n display: flex;\n align-items: center;\n gap: 6px;\n flex: none;\n min-height: 44px;\n padding: 6px 10px;\n box-sizing: border-box;\n border-bottom: 1px solid var(--dsw-alias-border-l1);\n}\n\n.-cerbur-clutch-dsh-worktree-title {\n min-width: 0;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 600;\n opacity: 1;\n visibility: visible;\n transition:\n opacity 120ms var(--ds-ease-in-out),\n transform 180ms var(--ds-ease-in-out),\n visibility 0s linear;\n}\n\n.-cerbur-clutch-dsh-worktree-titleHidden {\n flex: 0 0 0px;\n max-width: 0;\n opacity: 0;\n transform: translateX(-4px);\n visibility: hidden;\n pointer-events: none;\n transition-delay: 0s, 0s, 180ms;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 16px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-modeButton[data-active='true'] {\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspacePicker {\n display: block;\n width: calc(100% - 20px);\n margin: 6px 10px 8px;\n padding: 6px 8px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 7px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceLabel {\n display: block;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-content {\n min-height: 0;\n flex: 1;\n overflow: auto;\n padding: 0 10px 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-content:focus-visible {\n outline: 2px solid var(--dsw-alias-border-l3);\n outline-offset: -2px;\n}\n\n.-cerbur-clutch-dsh-worktree-error {\n margin: 12px 0 0;\n padding: 8px;\n border: 1px solid var(--dsw-alias-state-error-primary);\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-notice {\n margin: 12px 0 0;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 7px;\n background: var(--dsw-alias-button-elevated-fill);\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton,\n.-cerbur-clutch-dsh-worktree-actionButton {\n border: 0;\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton,\n.-cerbur-clutch-dsh-worktree-actionButton {\n width: 100%;\n padding: 6px 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-recoveryActions {\n display: grid;\n gap: 6px;\n margin-top: 6px;\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton:disabled,\n.-cerbur-clutch-dsh-worktree-actionButton:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.-cerbur-clutch-dsh-worktree-actions {\n display: grid;\n gap: 6px;\n margin-top: 10px;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-actionSelect {\n min-width: 0;\n padding: 5px 6px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-section {\n margin: 12px 0 0;\n}\n\n.-cerbur-clutch-dsh-worktree-sectionTitle {\n margin: 0 2px 4px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n}\n\n.-cerbur-clutch-dsh-worktree-empty,\n.-cerbur-clutch-dsh-worktree-message {\n margin: 0;\n padding: 8px 4px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitReadiness {\n display: grid;\n gap: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-commandBlock {\n margin: 6px 0 0;\n padding: 8px;\n overflow-x: auto;\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-secondary);\n font:\n 11px/16px ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n white-space: pre-wrap;\n}\n\n.-cerbur-clutch-dsh-worktree-message[data-error='true'] {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktree,\n.-cerbur-clutch-dsh-worktree-session {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n border: 0;\n border-radius: 7px;\n padding: 6px 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 12px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-worktree {\n cursor: default;\n}\n\n.-cerbur-clutch-dsh-worktree-session {\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-worktree:hover,\n.-cerbur-clutch-dsh-worktree-session:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel,\n.-cerbur-clutch-dsh-worktree-sessionLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-status {\n flex: none;\n margin-left: auto;\n padding-left: 8px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-searchSlot {\n flex: none;\n max-width: 28px;\n min-width: 0;\n display: flex;\n align-items: center;\n margin-left: auto;\n box-sizing: border-box;\n transition:\n flex 180ms var(--ds-ease-in-out),\n max-width 180ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchSlotExpanded {\n flex: 1;\n max-width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-headerActions {\n flex: none;\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 0;\n opacity: 1;\n visibility: visible;\n transition:\n opacity 120ms var(--ds-ease-in-out),\n transform 180ms var(--ds-ease-in-out),\n visibility 0s linear;\n}\n\n.-cerbur-clutch-dsh-worktree-headerActionsHidden {\n flex: 0 0 0px;\n max-width: 0;\n margin-left: 0;\n opacity: 0;\n transform: translateX(4px);\n visibility: hidden;\n pointer-events: none;\n transition-delay: 0s, 0s, 180ms;\n}\n\n.-cerbur-clutch-dsh-worktree-search {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n height: 28px;\n box-sizing: border-box;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n transition:\n background 180ms var(--ds-ease-in-out),\n box-shadow 180ms var(--ds-ease-in-out),\n color 180ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded {\n background: var(--dsw-alias-interactive-bg-subtle);\n box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l2);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded:focus-within {\n box-shadow: inset 0 0 0 1px #3b82f6;\n}\n\n.-cerbur-clutch-dsh-worktree-searchButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-searchButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded .-cerbur-clutch-dsh-worktree-searchButton:hover {\n background: transparent;\n}\n\n.-cerbur-clutch-dsh-worktree-searchInput {\n flex: 1;\n width: 0;\n min-width: 0;\n box-sizing: border-box;\n border: none;\n outline: none;\n background: transparent;\n opacity: 0;\n pointer-events: none;\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n color: var(--dsw-alias-label-primary);\n transition: opacity 120ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded .-cerbur-clutch-dsh-worktree-searchInput {\n margin-left: -2px;\n opacity: 1;\n pointer-events: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-searchInput::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.-cerbur-clutch-dsh-worktree-clearButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-clearButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-actionSelect:focus,\n.-cerbur-clutch-dsh-worktree-worktreeImportSelect:focus {\n border-color: #3b82f6;\n}\n\n.-cerbur-clutch-dsh-worktree-iconButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 20px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-iconButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceList {\n min-width: 0;\n min-height: 0;\n display: grid;\n gap: 4px;\n overflow-x: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceGroup {\n min-width: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow,\n.-cerbur-clutch-dsh-worktree-worktreeRow {\n position: relative;\n display: flex;\n align-items: center;\n min-width: 0;\n min-height: 36px;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 3px 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow .-cerbur-clutch-dsh-worktree-workspaceDisclosure {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-workspaceDisclosure,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-workspaceDisclosure {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-workspaceIcon,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-workspaceIcon {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeDisclosure,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeIcon,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeIcon {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 28px;\n border: 0;\n border-radius: 6px;\n padding: 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 17px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton > svg {\n display: block;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon,\n.-cerbur-clutch-dsh-worktree-worktreeIcon {\n flex: none;\n width: 24px;\n color: var(--dsw-alias-label-secondary);\n font-size: 20px;\n line-height: 1;\n text-align: center;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='done'] {\n color: var(--dsw-alias-state-success-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='warning'] {\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='error'] {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeStateLabel {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n border: 0;\n padding: 0;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon {\n color: var(--dsw-alias-brand-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceTitle,\n.-cerbur-clutch-dsh-worktree-worktreeLabel {\n min-width: 0;\n overflow: hidden;\n flex: 1;\n padding: 0 6px;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-main-group='true'] .-cerbur-clutch-dsh-worktree-worktreeLabel {\n font-weight: 600;\n}\n\n/* A collapsed running row keeps one shared scroll container for its label. */\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-worktreeLabel,\n/* Once the action rail is revealed, allow long branch labels to scroll inline. */\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeLabel,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeLabel,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-worktreeLabel {\n overflow-x: auto;\n overflow-y: hidden;\n text-overflow: clip;\n scrollbar-width: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-worktreeLabel::-webkit-scrollbar,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeLabel::-webkit-scrollbar,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeLabel::-webkit-scrollbar,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-worktreeLabel::-webkit-scrollbar {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeHoverTitle {\n color: var(--dsw-static-neutral-bluish-00);\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: anywhere;\n}\n\n/* Native Session hover card: full title, relative time, and current status. */\n.-cerbur-clutch-dsh-worktree-sessionHoverContent {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverTitle {\n color: #FFFFFF;\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: break-word;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverTime {\n color: #CFD3D6;\n font-size: 12px;\n line-height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverStatus {\n display: flex;\n align-items: center;\n gap: 8px;\n color: #ADB2B8;\n font-size: 12px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-workspaceActions {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n height: 28px;\n margin-left: auto;\n}\n\n/* Workspace rows retain the native fixed action column. */\n.-cerbur-clutch-dsh-worktree-workspaceActions {\n flex: 0 0 64px;\n width: 64px;\n}\n\n/* Group actions do not reserve space until their row needs to show them. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot {\n min-width: 0;\n flex: 0 0 0;\n width: 0;\n gap: 4px;\n}\n\n/* Keep the 28px activity indicator plus a 4px label gap while collapsed. */\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot {\n flex: 0 0 32px;\n width: 32px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot {\n flex: 0 0 auto;\n width: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceActions > .-cerbur-clutch-dsh-worktree-menuAction {\n position: absolute;\n top: 0;\n right: 32px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceActions > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n position: absolute;\n top: 0;\n right: 0;\n}\n\n/* Worktree actions flow naturally so the rail matches the controls that exist. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n position: static;\n opacity: 0;\n pointer-events: none;\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-groupActivity {\n position: absolute;\n top: 0;\n right: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n visibility: hidden;\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-groupActivity {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'][data-menu-open='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'][data-menu-open='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-groupActivity {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'][data-menu-open='true']\n .-cerbur-clutch-dsh-worktree-treeActionSlot\n > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'][data-menu-open='true']\n .-cerbur-clutch-dsh-worktree-treeActionSlot\n > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardAction {\n display: inline-flex;\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-menuAction {\n display: inline-flex;\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow:focus-within .-cerbur-clutch-dsh-worktree-menuAction {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n opacity: 1;\n pointer-events: auto;\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeChildren {\n margin-left: 16px;\n padding: 2px 0 5px 12px;\n border-left: 1px solid var(--dsw-alias-border-l1);\n}\n\n.-cerbur-clutch-dsh-worktree-groupLabel {\n padding: 6px 8px 3px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n}\n\n.-cerbur-clutch-dsh-worktree-groupHeader {\n display: flex;\n align-items: center;\n min-height: 34px;\n padding-right: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-groupHeader .-cerbur-clutch-dsh-worktree-groupLabel {\n flex: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeGroup {\n margin-top: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow {\n min-height: 34px;\n}\n\n/* Compact the Worktree leading slots to make room for its third action. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-worktreeIcon,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-disclosureButton {\n width: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow {\n position: relative;\n display: flex;\n align-items: center;\n width: calc(100% - 20px);\n margin-left: 20px;\n min-width: 0;\n min-height: 31px;\n box-sizing: border-box;\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-session-current='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-session-current='true'] .-cerbur-clutch-dsh-worktree-treeSessionContent {\n font-weight: 600;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionContent {\n display: flex;\n align-items: center;\n flex: 1;\n width: 0;\n min-width: 0;\n min-height: 31px;\n box-sizing: border-box;\n border: 0;\n border-radius: 7px;\n padding: 4px 4px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionContent:hover {\n background: transparent;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionTrailing {\n position: relative;\n display: inline-flex;\n flex: 0 0 52px;\n align-items: center;\n justify-content: flex-end;\n width: 52px;\n height: 28px;\n margin-left: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-rowActions {\n position: absolute;\n inset: 0;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionMeta {\n color: var(--dsw-alias-label-tertiary);\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionStatus {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionTime {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-right: 4px;\n font-size: 12px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionOverflowButton {\n display: block;\n width: calc(100% - 24px);\n margin: 2px 0 4px 24px;\n padding: 4px 8px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionOverflowButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-rowActions {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-sessionTrailing:focus-within .-cerbur-clutch-dsh-worktree-sessionMeta {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-rowActions,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-rowActions,\n.-cerbur-clutch-dsh-worktree-sessionTrailing:focus-within .-cerbur-clutch-dsh-worktree-rowActions {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-renameInput {\n width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-renameError {\n margin: 8px 0 0;\n color: var(--dsw-alias-state-error-primary);\n font-size: 13px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-emptyNested {\n margin: 0;\n padding: 4px 8px 5px 28px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-archivedGroup {\n margin-top: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-modalField {\n display: grid;\n gap: 5px;\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-worktreeHoverDetails {\n max-width: 360px;\n white-space: normal;\n overflow-wrap: anywhere;\n line-height: 1.5;\n}\n\n.-cerbur-clutch-dsh-worktree-notificationDetails > summary {\n cursor: pointer;\n padding: 8px;\n font-size: 12px;\n}\n";
|
|
1661
1665
|
const styleId$4 = "@cerbur/clutch-dsh-worktree/worktree.css";
|
|
1662
1666
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree.css\"]") === null) {
|
|
@@ -1831,7 +1835,7 @@ window.__ModuleLoader__.load({
|
|
|
1831
1835
|
});
|
|
1832
1836
|
}
|
|
1833
1837
|
//#endregion
|
|
1834
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
1838
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_f7c3c8176e38/packages/clutch-dsh-worktree/src/client/dashboard/dashboard-header-action.css.mjs
|
|
1835
1839
|
const css$3 = "/* Match the native 28px circular Session-header utility controls. */\n.-cerbur-clutch-dsh-worktree-headerDashboardButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 6px;\n color: var(--dsw-alias-label-secondary);\n background: transparent;\n border: none;\n border-radius: 28px;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-headerDashboardButton svg {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-headerDashboardButton:hover,\n.-cerbur-clutch-dsh-worktree-headerDashboardButton:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n";
|
|
1836
1840
|
const styleId$3 = "@cerbur/clutch-dsh-worktree/dashboard-header-action.css";
|
|
1837
1841
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard-header-action.css\"]") === null) {
|
|
@@ -2395,21 +2399,27 @@ window.__ModuleLoader__.load({
|
|
|
2395
2399
|
}
|
|
2396
2400
|
};
|
|
2397
2401
|
}
|
|
2398
|
-
/** Read
|
|
2402
|
+
/** Read the Worktree, branch, binding, and Workspace-root Main projections in one refresh. */
|
|
2399
2403
|
async function loadWorktreeView(manager, workspaceId) {
|
|
2400
|
-
const [worktreesResult, branchesResult, bindingsResult] = await Promise.allSettled([
|
|
2404
|
+
const [worktreesResult, branchesResult, bindingsResult, mainInstructionsResult] = await Promise.allSettled([
|
|
2401
2405
|
manager.listWorktrees({ workspaceId }),
|
|
2402
2406
|
manager.listBranches({ workspaceId }),
|
|
2403
|
-
manager.listBindings({ workspaceId })
|
|
2407
|
+
manager.listBindings({ workspaceId }),
|
|
2408
|
+
typeof manager.getWorktreeInstructions === "function" ? manager.getWorktreeInstructions({
|
|
2409
|
+
workspaceId,
|
|
2410
|
+
worktreeId: `main:${workspaceId}`
|
|
2411
|
+
}) : Promise.resolve("")
|
|
2404
2412
|
]);
|
|
2405
2413
|
if (worktreesResult.status === "rejected") throw worktreesResult.reason;
|
|
2406
2414
|
if (bindingsResult.status === "rejected") throw bindingsResult.reason;
|
|
2415
|
+
if (mainInstructionsResult.status === "rejected") throw mainInstructionsResult.reason;
|
|
2407
2416
|
if (branchesResult.status === "rejected") {
|
|
2408
2417
|
const readiness = readinessFromBranchError(branchesResult.reason);
|
|
2409
2418
|
if (readiness !== void 0) return {
|
|
2410
2419
|
worktrees: worktreesResult.value,
|
|
2411
2420
|
branches: [],
|
|
2412
2421
|
bindings: bindingsResult.value,
|
|
2422
|
+
mainInstructions: mainInstructionsResult.value,
|
|
2413
2423
|
readiness
|
|
2414
2424
|
};
|
|
2415
2425
|
throw branchesResult.reason;
|
|
@@ -2418,6 +2428,7 @@ window.__ModuleLoader__.load({
|
|
|
2418
2428
|
worktrees: worktreesResult.value,
|
|
2419
2429
|
branches: branchesResult.value,
|
|
2420
2430
|
bindings: bindingsResult.value,
|
|
2431
|
+
mainInstructions: mainInstructionsResult.value,
|
|
2421
2432
|
readiness: branchesResult.value.length > 0 ? { status: "ready" } : { status: "noLocalBranch" }
|
|
2422
2433
|
};
|
|
2423
2434
|
}
|
|
@@ -3770,14 +3781,15 @@ window.__ModuleLoader__.load({
|
|
|
3770
3781
|
function isManagedDashboardRecord(record) {
|
|
3771
3782
|
return !isMainWorktreeId$1(record.worktreeId);
|
|
3772
3783
|
}
|
|
3773
|
-
function createMainWorktreeRecord(workspace, currentBranch) {
|
|
3784
|
+
function createMainWorktreeRecord(workspace, currentBranch, instructions = "") {
|
|
3774
3785
|
return {
|
|
3775
3786
|
worktreeId: `main:${workspace.workspaceId}`,
|
|
3776
3787
|
workspaceId: workspace.workspaceId,
|
|
3777
3788
|
branch: currentBranch ?? "",
|
|
3778
3789
|
currentBranch,
|
|
3779
3790
|
absolutePath: workspace.path,
|
|
3780
|
-
status: "active"
|
|
3791
|
+
status: "active",
|
|
3792
|
+
instructions
|
|
3781
3793
|
};
|
|
3782
3794
|
}
|
|
3783
3795
|
function resolveDashboardRecord(selection, mode, currentSessionId, workspaceIds, records, mainRecord) {
|
|
@@ -6144,6 +6156,40 @@ window.__ModuleLoader__.load({
|
|
|
6144
6156
|
};
|
|
6145
6157
|
}
|
|
6146
6158
|
//#endregion
|
|
6159
|
+
//#region lib/contract/windows-path.js
|
|
6160
|
+
/**
|
|
6161
|
+
* Browser-safe Windows path identity helpers. They intentionally do not touch
|
|
6162
|
+
* the filesystem; Provider adds physical stat/realpath checks where it has
|
|
6163
|
+
* access to Node APIs.
|
|
6164
|
+
*/
|
|
6165
|
+
const EXTENDED_PATH_PREFIX = "//?/";
|
|
6166
|
+
const EXTENDED_UNC_PREFIX = "//?/UNC/";
|
|
6167
|
+
function isWindowsPath(value) {
|
|
6168
|
+
return /^[A-Za-z]:[\\/]/u.test(value) || value.startsWith("\\\\") || /^\/\/\?(?:\/|\\)/u.test(value);
|
|
6169
|
+
}
|
|
6170
|
+
/** Strip only the extended drive/UNC prefixes supported by the browser boundary. */
|
|
6171
|
+
function stripExtendedWindowsPrefix(value) {
|
|
6172
|
+
const normalized = value.replaceAll("\\", "/");
|
|
6173
|
+
const normalizedUncPrefix = EXTENDED_UNC_PREFIX.toLowerCase();
|
|
6174
|
+
if (normalized.toLowerCase().startsWith(normalizedUncPrefix)) return "//" + normalized.slice(8);
|
|
6175
|
+
if (normalized.startsWith(EXTENDED_PATH_PREFIX)) {
|
|
6176
|
+
const drivePath = normalized.slice(4);
|
|
6177
|
+
if (/^[A-Za-z]:\//u.test(drivePath)) return drivePath;
|
|
6178
|
+
}
|
|
6179
|
+
return value;
|
|
6180
|
+
}
|
|
6181
|
+
function normalizeWindowsPath(value) {
|
|
6182
|
+
let normalized = stripExtendedWindowsPrefix(value).replaceAll("\\", "/");
|
|
6183
|
+
const unc = normalized.startsWith("//");
|
|
6184
|
+
normalized = normalized.replace(/\/{2,}/gu, "/");
|
|
6185
|
+
if (unc && normalized.startsWith("/")) normalized = "/" + normalized;
|
|
6186
|
+
if (normalized.length > 3) normalized = normalized.replace(/\/+$/u, "");
|
|
6187
|
+
return normalized.toLowerCase();
|
|
6188
|
+
}
|
|
6189
|
+
function sameWindowsPath(left, right) {
|
|
6190
|
+
return (isWindowsPath(left) || isWindowsPath(right)) && normalizeWindowsPath(left) === normalizeWindowsPath(right);
|
|
6191
|
+
}
|
|
6192
|
+
//#endregion
|
|
6147
6193
|
//#region lib/client/session/worktree-session.js
|
|
6148
6194
|
var WorktreeSessionActionError = class extends Error {
|
|
6149
6195
|
code;
|
|
@@ -6205,6 +6251,13 @@ window.__ModuleLoader__.load({
|
|
|
6205
6251
|
cwd: input.cwd
|
|
6206
6252
|
}, result);
|
|
6207
6253
|
}
|
|
6254
|
+
/**
|
|
6255
|
+
* Compare paths for browser-side candidate filtering and the no-Host safety fallback.
|
|
6256
|
+
* When Host validation is available, it remains authoritative for physical aliases.
|
|
6257
|
+
*/
|
|
6258
|
+
function sameWorktreePath(left, right) {
|
|
6259
|
+
return left === right || sameWindowsPath(left, right);
|
|
6260
|
+
}
|
|
6208
6261
|
function resolveWorktreeSessionAction(input) {
|
|
6209
6262
|
if (input.target.status !== "active" || input.target.health === "repair" || input.target.health === "recovery-needed") return {
|
|
6210
6263
|
kind: "reject",
|
|
@@ -6222,7 +6275,7 @@ window.__ModuleLoader__.load({
|
|
|
6222
6275
|
reason: "active-binding-session-missing",
|
|
6223
6276
|
sessionId: targetBinding.sessionId
|
|
6224
6277
|
};
|
|
6225
|
-
if (summary.cwd
|
|
6278
|
+
if (summary.cwd === void 0 || !input.hostValidatesPhysicalPath && !sameWorktreePath(summary.cwd, input.target.absolutePath)) return {
|
|
6226
6279
|
kind: "repair",
|
|
6227
6280
|
reason: "active-binding-cwd-mismatch",
|
|
6228
6281
|
sessionId: targetBinding.sessionId
|
|
@@ -6241,7 +6294,7 @@ window.__ModuleLoader__.load({
|
|
|
6241
6294
|
}
|
|
6242
6295
|
for (const sessionId of input.sessions.ids) {
|
|
6243
6296
|
const summary = input.sessions.byId[sessionId];
|
|
6244
|
-
if (summary?.blank !== true || summary.cwd
|
|
6297
|
+
if (summary?.blank !== true || summary.cwd === void 0 || !sameWorktreePath(summary.cwd, input.target.absolutePath) || input.archivedSessionIds.includes(sessionId)) continue;
|
|
6245
6298
|
if (!input.bindings.some((binding) => binding.sessionId === sessionId)) return {
|
|
6246
6299
|
kind: "bind-existing",
|
|
6247
6300
|
sessionId
|
|
@@ -6293,12 +6346,13 @@ window.__ModuleLoader__.load({
|
|
|
6293
6346
|
const [worktrees, bindings] = await Promise.all([options.manager.listWorktrees({ workspaceId: input.workspaceId }), options.manager.listBindings({ workspaceId: input.workspaceId })]);
|
|
6294
6347
|
if (disposed) throw new WorktreeSessionActionError("CLIENT_DISPOSED", "", false);
|
|
6295
6348
|
const target = worktrees.find((record) => record.worktreeId === input.worktreeId);
|
|
6296
|
-
if (target === void 0 || target.absolutePath
|
|
6349
|
+
if (target === void 0 || options.permission === void 0 && !sameWorktreePath(target.absolutePath, input.cwd)) throw new WorktreeSessionActionError("WORKTREE_SESSION_REPAIR_REQUIRED", "worktree target unavailable", true);
|
|
6297
6350
|
const action = resolveWorktreeSessionAction({
|
|
6298
6351
|
target,
|
|
6299
6352
|
sessions: options.sessions.getSnapshot(),
|
|
6300
6353
|
archivedSessionIds: options.archivedSessionIds(),
|
|
6301
|
-
bindings
|
|
6354
|
+
bindings,
|
|
6355
|
+
hostValidatesPhysicalPath: options.permission !== void 0
|
|
6302
6356
|
});
|
|
6303
6357
|
if (action.kind === "open-bound") {
|
|
6304
6358
|
await ensureWorktreeSessionPermission({
|
|
@@ -7467,20 +7521,17 @@ window.__ModuleLoader__.load({
|
|
|
7467
7521
|
//#region lib/client/dashboard/vscode-url.js
|
|
7468
7522
|
/** Encode path segments while retaining Windows drive and directory separators. */
|
|
7469
7523
|
function vscodeFolderUrl(absolutePath) {
|
|
7470
|
-
const
|
|
7471
|
-
const
|
|
7524
|
+
const normalizedPath = stripExtendedWindowsPrefix(absolutePath);
|
|
7525
|
+
const windowsPath = /^[a-z]:[\\/]/i.test(normalizedPath) || normalizedPath.startsWith("\\\\") || normalizedPath.startsWith("//");
|
|
7526
|
+
const encoded = (windowsPath ? normalizedPath.replaceAll("\\", "/") : normalizedPath).split("/").map(encodeURIComponent).join("/");
|
|
7472
7527
|
const withDrive = windowsPath ? encoded.replace(/^([a-z])%3A/i, "$1:") : encoded;
|
|
7473
|
-
return
|
|
7528
|
+
return "vscode://file" + (withDrive.startsWith("/") ? "" : "/") + withDrive;
|
|
7474
7529
|
}
|
|
7475
7530
|
//#endregion
|
|
7476
7531
|
//#region lib/client/dashboard/open-in-app-controller.js
|
|
7477
7532
|
const OPEN_IN_APP_APPS_ROUTE = "/open-in-app/apps";
|
|
7533
|
+
const OPEN_IN_APP_ICON_ROUTE = "/open-in-app/icon/";
|
|
7478
7534
|
const OPEN_IN_APP_OPEN_ROUTE = "/open-in-app/open";
|
|
7479
|
-
function hostBase() {
|
|
7480
|
-
const origin = globalThis.location?.origin;
|
|
7481
|
-
return origin !== void 0 && origin !== "null" ? origin : "http://dsh.internal";
|
|
7482
|
-
}
|
|
7483
|
-
const STORAGE_KEY = "dsh.open-in-app.choice";
|
|
7484
7535
|
var OpenInAppController = class {
|
|
7485
7536
|
fetcher;
|
|
7486
7537
|
_apps = null;
|
|
@@ -7489,9 +7540,6 @@ window.__ModuleLoader__.load({
|
|
|
7489
7540
|
_listeners = /* @__PURE__ */ new Set();
|
|
7490
7541
|
constructor(fetcher = (input, init) => fetch(input, init)) {
|
|
7491
7542
|
this.fetcher = fetcher;
|
|
7492
|
-
try {
|
|
7493
|
-
if (typeof localStorage !== "undefined") this._choice = localStorage.getItem(STORAGE_KEY) ?? "";
|
|
7494
|
-
} catch {}
|
|
7495
7543
|
}
|
|
7496
7544
|
get apps() {
|
|
7497
7545
|
return this._apps;
|
|
@@ -7515,20 +7563,17 @@ window.__ModuleLoader__.load({
|
|
|
7515
7563
|
choose(appId) {
|
|
7516
7564
|
if (this._choice === appId) return;
|
|
7517
7565
|
this._choice = appId;
|
|
7518
|
-
try {
|
|
7519
|
-
if (typeof localStorage !== "undefined") localStorage.setItem(STORAGE_KEY, appId);
|
|
7520
|
-
} catch {}
|
|
7521
7566
|
this.notify();
|
|
7522
7567
|
}
|
|
7523
7568
|
iconUrl(appId) {
|
|
7524
|
-
return
|
|
7569
|
+
return `${OPEN_IN_APP_ICON_ROUTE}${encodeURIComponent(appId)}`;
|
|
7525
7570
|
}
|
|
7526
7571
|
async launch(appId, path) {
|
|
7527
7572
|
const body = {
|
|
7528
7573
|
app: appId,
|
|
7529
7574
|
path
|
|
7530
7575
|
};
|
|
7531
|
-
const response = await this.fetcher(
|
|
7576
|
+
const response = await this.fetcher(OPEN_IN_APP_OPEN_ROUTE, {
|
|
7532
7577
|
method: "POST",
|
|
7533
7578
|
headers: { "content-type": "application/json" },
|
|
7534
7579
|
body: JSON.stringify(body)
|
|
@@ -7538,7 +7583,7 @@ window.__ModuleLoader__.load({
|
|
|
7538
7583
|
async run() {
|
|
7539
7584
|
let apps = [];
|
|
7540
7585
|
try {
|
|
7541
|
-
const response = await this.fetcher(
|
|
7586
|
+
const response = await this.fetcher(OPEN_IN_APP_APPS_ROUTE, { headers: { accept: "application/json" } });
|
|
7542
7587
|
if (response.ok) {
|
|
7543
7588
|
const payload = await response.json();
|
|
7544
7589
|
if (Array.isArray(payload.apps)) apps = payload.apps.filter((id) => typeof id === "string");
|
|
@@ -7550,7 +7595,7 @@ window.__ModuleLoader__.load({
|
|
|
7550
7595
|
};
|
|
7551
7596
|
const defaultOpenInAppController = new OpenInAppController();
|
|
7552
7597
|
//#endregion
|
|
7553
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
7598
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_f7c3c8176e38/packages/clutch-dsh-worktree/src/client/dashboard/open-in-app.css.mjs
|
|
7554
7599
|
const css$2 = ".-cerbur-clutch-dsh-worktree-control {\n display: inline-flex;\n align-self: flex-end;\n}\n\n.-cerbur-clutch-dsh-worktree-split {\n display: inline-flex;\n align-items: stretch;\n box-sizing: border-box;\n height: 28px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 14px;\n overflow: hidden;\n font-family: var(--dsw-font-family);\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-main,\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-chevron {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n border: 0;\n background: none;\n color: var(--dsw-alias-label-primary);\n font-size: 11px;\n font-weight: 400;\n line-height: 16px;\n cursor: pointer;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-main {\n padding: 5px 6px 5px 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-main:hover:not(:disabled),\n.-cerbur-clutch-dsh-worktree-main:focus-visible,\n.-cerbur-clutch-dsh-worktree-chevron:hover,\n.-cerbur-clutch-dsh-worktree-chevron:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-main:disabled {\n color: var(--dsw-alias-label-dimmed);\n cursor: wait;\n}\n\n.-cerbur-clutch-dsh-worktree-main[data-state='error'] {\n color: var(--dsw-alias-state-error-primary, #e03e3e);\n box-shadow: inset 0 0 0 1px var(--dsw-alias-state-error-primary, #e03e3e);\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-chevron {\n padding: 5px 6px 5px 4px;\n border-left: 0.5px solid var(--dsw-alias-border-l4);\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-icon {\n flex: none;\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-icon {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-chevron svg {\n width: 12px;\n height: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-fallback {\n text-decoration: none;\n align-self: flex-end;\n}\n\nimg.-cerbur-clutch-dsh-worktree-icon {\n display: block;\n object-fit: contain;\n user-select: none;\n}\n";
|
|
7555
7600
|
const styleId$2 = "@cerbur/clutch-dsh-worktree/open-in-app.css";
|
|
7556
7601
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/open-in-app.css\"]") === null) {
|
|
@@ -7905,7 +7950,7 @@ window.__ModuleLoader__.load({
|
|
|
7905
7950
|
};
|
|
7906
7951
|
}
|
|
7907
7952
|
//#endregion
|
|
7908
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
7953
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_f7c3c8176e38/packages/clutch-dsh-worktree/src/client/dashboard/dashboard.css.mjs
|
|
7909
7954
|
const css$1 = ".-cerbur-clutch-dsh-worktree-dashboardSurface {\n position: absolute;\n box-sizing: border-box;\n z-index: 2;\n overflow: auto;\n overscroll-behavior: contain;\n pointer-events: auto;\n container-type: inline-size;\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-primary, #19212f);\n font-family: inherit;\n font-size: 14px;\n line-height: 1.5;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardSurface *,\n.-cerbur-clutch-dsh-worktree-dashboardSurface *::before,\n.-cerbur-clutch-dsh-worktree-dashboardSurface *::after {\n box-sizing: border-box;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface button {\n font: inherit;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface svg {\n width: 18px;\n height: 18px;\n flex: none;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface code {\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface button:focus-visible,\n.-cerbur-clutch-dsh-worktree-dashboardSurface a:focus-visible,\n.-cerbur-clutch-dsh-worktree-dashboardPanel:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: 3px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface h1:focus {\n outline: none;\n}\n.-cerbur-clutch-dsh-worktree-dashboardPage {\n max-width: 1240px;\n margin: 0 auto;\n padding: 24px 30px 28px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessions {\n list-style: none;\n padding: 0;\n margin: 12px 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessions button {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 12px 8px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionLabel {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionMeta {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: flex-end;\n min-width: 28px;\n color: var(--dsw-alias-label-tertiary, #858e9d);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionStatus {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionTime {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 20px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessions button:hover,\n.-cerbur-clutch-dsh-worktree-dashboardSessions button[aria-current] {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface a {\n text-decoration: none;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions button:not(:disabled) {\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTopline {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 20px;\n margin-bottom: 28px;\n color: var(--dsw-alias-label-secondary, #677080);\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTopline > span {\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTopline > span > span {\n margin: 0 8px;\n opacity: 0.5;\n}\n.-cerbur-clutch-dsh-worktree-dashboardToplineActions {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n flex: none;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSidebarButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 6px;\n border: 0;\n border-radius: 28px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #677080);\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSidebarButton:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSidebarButton svg {\n width: 15px;\n height: 15px;\n transform: scaleX(-1);\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeader {\n display: grid;\n grid-template-columns: minmax(0, 1fr) 225px;\n gap: 32px;\n margin-bottom: 15px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardIdentity {\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow > svg {\n width: 24px;\n height: 24px;\n color: #3e73ca;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow h1 {\n font-size: 25px;\n letter-spacing: -0.6px;\n line-height: 1.3;\n font-weight: 650;\n margin: 0;\n overflow-wrap: anywhere;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow[role='button'] {\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow[role='button']:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: 3px;\n border-radius: 4px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHealth,\n.-cerbur-clutch-dsh-worktree-dashboardSoon {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n white-space: nowrap;\n border-radius: 6px;\n padding: 3px 7px;\n font-size: 11px;\n font-weight: 500;\n color: var(--dsw-alias-label-secondary, #687182);\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='ready'] {\n background: color-mix(in srgb, #1eab78 13%, transparent);\n color: #21976f;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='repair'],\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='recovery-needed'],\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='branch-drift'] {\n background: color-mix(in srgb, #e7a839 14%, transparent);\n color: #b27a1e;\n}\n.-cerbur-clutch-dsh-worktree-dashboardPath {\n display: flex;\n align-items: flex-start;\n gap: 9px;\n margin-top: 12px;\n color: var(--dsw-alias-label-secondary, #697283);\n}\n.-cerbur-clutch-dsh-worktree-dashboardPath code {\n padding-top: 4px;\n overflow-wrap: anywhere;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFieldLabel {\n font-size: 10px;\n border: 1px solid var(--dsw-alias-border-l3, #e5e7ed);\n border-radius: 4px;\n padding: 2px 5px;\n margin-top: 2px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardIconButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 29px;\n height: 29px;\n border: 0;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardIconButton:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardCopyStatus {\n font-size: 12px;\n margin: 4px 0 0;\n min-height: 18px;\n color: #21976f;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCopyStatus[role='alert'] {\n color: #bd5d43;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderAside {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 8px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderAside > button,\n.-cerbur-clutch-dsh-worktree-dashboardHeaderAside > a {\n align-self: flex-end;\n}\n.-cerbur-clutch-dsh-worktree-dashboardButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 7px;\n padding: 6px 11px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: var(--dsw-alias-bg-base, #fff);\n color: inherit;\n white-space: nowrap;\n cursor: pointer;\n font-size: 12px !important;\n line-height: 1.5;\n}\n.-cerbur-clutch-dsh-worktree-dashboardButton:disabled {\n color: var(--dsw-alias-label-secondary, #737e8e);\n cursor: not-allowed;\n}\n.-cerbur-clutch-dsh-worktree-dashboardButton:not(:disabled):hover {\n background: var(--dsw-alias-interactive-bg-hover, #f4f6f9);\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs {\n display: flex;\n gap: 22px;\n overflow-x: auto;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e1e5ed);\n margin-bottom: 24px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n gap: 8px;\n padding: 12px 2px;\n border: 0;\n border-bottom: 2px solid transparent;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #6c7480);\n cursor: pointer;\n font-size: 13px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs button[aria-selected='true'] {\n color: #4276c8;\n border-bottom-color: #4276c8;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs svg {\n width: 16px;\n height: 16px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardPanel {\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardGrid {\n display: grid;\n grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);\n gap: 20px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardColumn {\n display: flex;\n flex-direction: column;\n gap: 20px;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCard,\n.-cerbur-clutch-dsh-worktree-dashboardStart {\n padding: 20px;\n border: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-radius: 11px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCard h2,\n.-cerbur-clutch-dsh-worktree-dashboardStart h2 {\n display: flex;\n align-items: center;\n gap: 9px;\n font-size: 16px;\n font-weight: 620;\n line-height: 1.4;\n margin: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCard p,\n.-cerbur-clutch-dsh-worktree-dashboardStart > p {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #7b8290);\n margin: 8px 0 15px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCardHeading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 10px;\n margin-bottom: 7px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStart {\n background: linear-gradient(\n 115deg,\n color-mix(in srgb, #6b9eff 9%, transparent),\n color-mix(in srgb, #6b9eff 3%, transparent)\n );\n}\n.-cerbur-clutch-dsh-worktree-dashboardStart h2 > svg {\n color: #477bc6;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 13px;\n margin-top: 23px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions button {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 18px 14px;\n text-align: left;\n border: 1px solid color-mix(in srgb, #7299e7 28%, transparent);\n border-radius: 8px;\n background: color-mix(in srgb, #6b9eff 5%, transparent);\n color: #4673bc;\n cursor: not-allowed;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions button:nth-child(2) {\n color: #38846e;\n border-color: color-mix(in srgb, #4fba9a 25%, transparent);\n background: color-mix(in srgb, #4fba9a 5%, transparent);\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions svg {\n width: 23px;\n height: 23px;\n margin-top: 3px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions strong {\n display: block;\n font-size: 14px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions small {\n display: block;\n margin-top: 6px;\n line-height: 1.6;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #69788a);\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions em {\n display: block;\n font-size: 10px;\n font-style: normal;\n margin-top: 10px;\n opacity: 0.75;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder {\n padding: 26px 20px;\n min-height: 177px;\n border: 1px dashed var(--dsw-alias-border-l3, #dfe4ed);\n border-radius: 7px;\n background: var(--dsw-alias-interactive-bg-hover, #f7f8fa);\n text-align: center;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder > svg {\n display: block;\n margin: 0 auto 10px;\n width: 25px;\n height: 25px;\n color: #929cac;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder strong {\n font-size: 13px;\n font-weight: 500;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder p {\n max-width: 310px;\n margin: 7px auto 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardEmpty {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 78px;\n padding: 10px 8px;\n text-align: center;\n}\n.-cerbur-clutch-dsh-worktree-dashboardEmpty p {\n max-width: 300px;\n margin: 0;\n line-height: 1.7;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts {\n margin: 8px 0 14px;\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts > div {\n display: grid;\n grid-template-columns: minmax(90px, 0.85fr) minmax(0, 1fr) 29px;\n gap: 12px;\n align-items: center;\n padding: 11px 0;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #eef0f5);\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts > div:last-child {\n border: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts dt {\n grid-column: 1;\n min-width: 0;\n color: var(--dsw-alias-label-secondary, #788191);\n /* Prefer normal break points (including trailing `/` and `-`) first. */\n overflow-wrap: break-word;\n word-break: normal;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts dd {\n grid-column: 2;\n min-width: 0;\n margin: 0;\n text-align: right;\n /* Only split an unbreakable value after natural opportunities are exhausted. */\n overflow-wrap: break-word;\n word-break: normal;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFactAction {\n display: flex;\n grid-column: 3;\n align-items: center;\n justify-content: flex-end;\n min-width: 29px;\n min-height: 29px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderAside .-cerbur-clutch-dsh-worktree-dashboardFacts > div {\n padding: 4px 0;\n border: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHistorical {\n color: var(--dsw-alias-label-secondary, #788191);\n}\n.-cerbur-clutch-dsh-worktree-dashboardIconButton:disabled {\n color: var(--dsw-alias-label-secondary, #788191);\n cursor: not-allowed;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineModal {\n box-sizing: border-box;\n width: min(440px, calc(100vw - 48px));\n max-height: calc(100vh - 48px);\n max-height: calc(100dvh - 48px);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineModalContent {\n box-sizing: border-box;\n min-height: 0;\n overflow-y: auto;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselinePicker {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineSearch {\n box-sizing: border-box;\n flex: none;\n display: flex;\n width: 100%;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOptions {\n box-sizing: border-box;\n display: flex;\n flex: none;\n flex-direction: column;\n width: 100%;\n min-width: min(220px, 100%);\n max-width: min(420px, calc(100vw - 32px));\n /* Constant frame: six rows on compact windows, seven on normal ones. Search\n swaps the rows inside this fixed box, so the modal never resizes. */\n height: clamp(258px, 48vh, 300px);\n height: clamp(258px, 48dvh, 300px);\n padding: 4px;\n overflow-y: auto;\n overscroll-behavior: contain;\n border: 0;\n border-radius: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-3, #fff));\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n box-shadow: var(--dsw-elevation-prominent, 0 8px 24px rgb(25 33 47 / 12%));\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineList {\n display: flex;\n flex-direction: column;\n gap: 2px;\n width: 100%;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 40px;\n padding: 8px 10px;\n border: 0;\n border-radius: 10px;\n outline: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #19212f);\n text-align: left;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption:hover,\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption[data-highlighted='true'],\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption[aria-selected='true'] {\n background: var(--dsw-alias-interactive-bg-hover, #f0f3f8);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: -2px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption > svg {\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-secondary, #788191);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption[aria-selected='true'] > svg:last-child {\n color: var(--dsw-alias-label-primary, #19212f);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOptionLabel {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineEmpty {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n padding: 8px 10px;\n color: var(--dsw-alias-label-secondary, #788191);\n text-align: center;\n}\n/* Zero-height anchor: the save error floats over the list instead of growing\n the modal, so the frame keeps its size in every state. */\n.-cerbur-clutch-dsh-worktree-dashboardBaselineStatus {\n position: relative;\n box-sizing: border-box;\n min-height: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineError {\n position: absolute;\n right: 4px;\n bottom: 12px;\n left: 4px;\n z-index: 1;\n box-sizing: border-box;\n padding: 6px 10px;\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-2, #fff);\n background: color-mix(\n in srgb,\n var(--dsw-alias-state-error-label, #bd5d43) 10%,\n var(--dsw-alias-bg-layer-2, #fff)\n );\n box-shadow:\n inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-state-error-label, #bd5d43) 32%, transparent),\n var(--dsw-elevation-prominent, 0 8px 24px rgb(25 33 47 / 12%));\n color: var(--dsw-alias-state-error-label, #bd5d43);\n font-size: 12px;\n line-height: 16px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardLink {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n background: transparent;\n border: 1px solid var(--dsw-alias-border-l3, #e2e6ed);\n border-radius: 6px;\n padding: 7px 10px;\n font-size: 12px !important;\n color: inherit;\n cursor: pointer;\n margin-top: 8px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardLink:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f5f7fa);\n}\n.-cerbur-clutch-dsh-worktree-dashboardQuickActions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-top: 16px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardQuickActions .-cerbur-clutch-dsh-worktree-dashboardButton {\n justify-content: flex-start;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 390px;\n padding: 40px 24px;\n text-align: center;\n border: 1px dashed var(--dsw-alias-border-l3, #dde3ec);\n border-radius: 11px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder > svg {\n width: 36px;\n height: 36px;\n color: #7c9bcf;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder h2 {\n font-size: 20px;\n font-weight: 600;\n margin: 16px 0 4px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder p {\n max-width: 420px;\n font-size: 13px;\n color: var(--dsw-alias-label-secondary, #7b8596);\n margin: 8px 0 18px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFooter {\n margin: 23px 0 0;\n text-align: center;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary, #8a92a0);\n}\n\n@container (max-width: 820px) {\n .-cerbur-clutch-dsh-worktree-dashboardPage {\n padding: 20px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardHeader {\n grid-template-columns: minmax(0, 1fr);\n gap: 12px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardHeaderAside {\n display: flex;\n }\n .-cerbur-clutch-dsh-worktree-dashboardGrid {\n grid-template-columns: minmax(0, 1fr);\n }\n .-cerbur-clutch-dsh-worktree-dashboardTabs {\n gap: 18px;\n }\n}\n\n@container (max-width: 440px) {\n .-cerbur-clutch-dsh-worktree-dashboardPage {\n padding: 16px 12px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardTitleRow h1 {\n font-size: 22px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardStartActions {\n grid-template-columns: minmax(0, 1fr);\n }\n .-cerbur-clutch-dsh-worktree-dashboardCard,\n .-cerbur-clutch-dsh-worktree-dashboardStart {\n padding: 16px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardTopline {\n gap: 10px;\n align-items: flex-start;\n }\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionsText {\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n max-height: 240px;\n overflow: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardInstructionsInput {\n box-sizing: border-box;\n width: 100%;\n resize: vertical;\n padding: 10px;\n border: 1px solid var(--dsw-alias-border-l4);\n border-radius: 8px;\n background: var(--dsw-alias-bg-base);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardInstructionActions {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n";
|
|
7910
7955
|
const styleId$1 = "@cerbur/clutch-dsh-worktree/dashboard.css";
|
|
7911
7956
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard.css\"]") === null) {
|
|
@@ -8074,19 +8119,25 @@ window.__ModuleLoader__.load({
|
|
|
8074
8119
|
const baseline = normalizeBranch$1(value);
|
|
8075
8120
|
return baseline === void 0 || baseline === currentBranch ? void 0 : baseline;
|
|
8076
8121
|
}
|
|
8077
|
-
/**
|
|
8122
|
+
/**
|
|
8123
|
+
* Sum the known text-file additions/deletions. Binary files have no line
|
|
8124
|
+
* counts, so they are ignored when a target also contains readable files;
|
|
8125
|
+
* binary-only targets remain explicitly unknown.
|
|
8126
|
+
*/
|
|
8078
8127
|
function sumLineTotals(files) {
|
|
8079
8128
|
let additions = 0;
|
|
8080
8129
|
let deletions = 0;
|
|
8130
|
+
let knownFiles = 0;
|
|
8081
8131
|
for (const file of files) {
|
|
8082
|
-
if (file.additions === void 0 || file.deletions === void 0)
|
|
8132
|
+
if (file.additions === void 0 || file.deletions === void 0) continue;
|
|
8083
8133
|
additions += file.additions;
|
|
8084
8134
|
deletions += file.deletions;
|
|
8135
|
+
knownFiles += 1;
|
|
8085
8136
|
}
|
|
8086
|
-
return {
|
|
8137
|
+
return files.length === 0 || knownFiles > 0 ? {
|
|
8087
8138
|
additions,
|
|
8088
8139
|
deletions
|
|
8089
|
-
};
|
|
8140
|
+
} : void 0;
|
|
8090
8141
|
}
|
|
8091
8142
|
//#endregion
|
|
8092
8143
|
//#region lib/client/dashboard/git/git-file-tree.js
|
|
@@ -8190,7 +8241,7 @@ window.__ModuleLoader__.load({
|
|
|
8190
8241
|
});
|
|
8191
8242
|
}
|
|
8192
8243
|
//#endregion
|
|
8193
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
8244
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_f7c3c8176e38/packages/clutch-dsh-worktree/src/client/dashboard/git/worktree-git.css.mjs
|
|
8194
8245
|
const css = ".-cerbur-clutch-dsh-worktree-gitPanel {\n min-width: 0;\n min-height: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitPanelHeader {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 20px;\n margin-bottom: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitPanelHeader h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitPanelHeading {\n min-width: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineSelector {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n margin-top: 10px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineSelector select {\n min-width: 180px;\n max-width: min(360px, 60vw);\n padding: 5px 8px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-primary, #273142);\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineSelector select:disabled {\n cursor: wait;\n opacity: 0.7;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselinePrompt {\n padding: 22px;\n border: 1px dashed var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 10px;\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselinePrompt strong {\n display: block;\n margin-bottom: 6px;\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselinePrompt p {\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts {\n display: flex;\n flex-wrap: wrap;\n gap: 8px 20px;\n margin: 10px 0 0;\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts > div {\n display: flex;\n gap: 6px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts dt::after {\n content: ':';\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts dd {\n margin: 0;\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts code {\n margin-left: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDerived {\n margin-left: 7px;\n color: var(--dsw-alias-state-warn-label, #9a6e22);\n}\n\n.-cerbur-clutch-dsh-worktree-gitRefresh {\n flex: none;\n padding: 6px 11px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: var(--dsw-alias-bg-base, #fff);\n color: inherit;\n cursor: pointer;\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitRefresh:disabled {\n color: var(--dsw-alias-label-secondary, #7d8795);\n cursor: wait;\n}\n\n/*\n * One 3x3 grid carries both layouts: commit and changed-file panes sit around a\n * row divider, the diff sits beside them across a column divider. Wide layouts\n * place the stack in the left column, narrow layouts place all three panes on\n * three rows. Both shares are custom properties the dividers drag, and both are\n * clamped so each pane keeps a usable size.\n */\n.-cerbur-clutch-dsh-worktree-gitColumns {\n /* Keep the Git surface bounded by the viewport, never by its data volume. */\n --git-columns-height: clamp(360px, calc(100vh - 300px), 560px);\n --git-columns-height: clamp(360px, calc(100dvh - 300px), 560px);\n /* Leading-pane shares: the row divider and the column divider drag these. */\n --git-rows-top: 45%;\n --git-columns-left: 38%;\n display: grid;\n grid-template-columns:\n minmax(240px, min(var(--git-columns-left), calc(100% - 247px)))\n 7px\n minmax(240px, 1fr);\n grid-template-rows:\n minmax(140px, min(var(--git-rows-top), calc(100% - 147px)))\n 7px\n minmax(140px, 1fr);\n height: var(--git-columns-height);\n min-height: 0;\n border: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-radius: 10px;\n overflow: hidden;\n resize: none;\n}\n\n/* Wide: commits over changed files in the left column, diff down the right column. */\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='commits'] {\n grid-area: 1 / 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows'] {\n grid-area: 2 / 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='changed-files'] {\n grid-area: 3 / 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns'] {\n grid-area: 1 / 2 / -1 / 3;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='diff'] {\n grid-area: 1 / 3 / -1 / -1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--dsw-alias-bg-base, #fff);\n touch-action: none;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter::before {\n content: '';\n border-radius: 999px;\n background: var(--dsw-alias-border-l2, #cbd2dc);\n transition: background 0.15s ease;\n}\n\n/* Widen the grab area without moving the visible divider line. */\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter::after {\n content: '';\n position: absolute;\n}\n\n/* Both divider panes draw a full border box, so the pane above and the pane below\n (or the pane left and the pane right) are each closed by their own edge. */\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows'] {\n box-sizing: border-box;\n height: 7px;\n cursor: row-resize;\n border-top: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows']::before {\n width: 30px;\n height: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows']::after {\n inset: -3px 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns'] {\n box-sizing: border-box;\n width: 7px;\n cursor: col-resize;\n border-left: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-right: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns']::before {\n width: 2px;\n height: 30px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns']::after {\n inset: 0 -3px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter:hover::before,\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter:focus-visible::before,\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter[data-dashboard-git-splitting='true']::before {\n background: var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: -2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumn {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n background: var(--dsw-alias-bg-base, #fff);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader {\n display: flex;\n flex: none;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n min-height: 43px;\n padding: 12px 13px 9px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #edf0f4);\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader h3 {\n margin: 0;\n color: var(--dsw-alias-label-primary, #273142);\n font-size: 12px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader span,\n.-cerbur-clutch-dsh-worktree-gitColumnHeader code {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeaderMeta {\n display: flex;\n min-width: 0;\n align-items: baseline;\n justify-content: flex-end;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader .-cerbur-clutch-dsh-worktree-gitLineStats,\n.-cerbur-clutch-dsh-worktree-gitColumnHeader .-cerbur-clutch-dsh-worktree-gitLineStats > span {\n overflow: visible;\n text-overflow: clip;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeaderUnknown {\n color: var(--dsw-alias-label-tertiary, #8a94a3);\n}\n\n/* Right side of the commits header: the truncation note and the multi-select switch. */\n.-cerbur-clutch-dsh-worktree-gitColumnHeaderControls {\n display: flex;\n min-width: 0;\n align-self: center;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n}\n\n/*\n * A native checkbox owns the state, focus and keyboard behavior; the track and\n * thumb below are presentational and follow :checked through the sibling selector.\n */\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect {\n position: relative;\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n user-select: none;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n border: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack {\n position: relative;\n display: block;\n flex: none;\n width: 24px;\n height: 14px;\n border-radius: 999px;\n background: var(--dsw-alias-border-l2, #cbd2dc);\n transition: background 0.15s ease;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelectThumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: var(--dsw-alias-bg-base, #fff);\n box-shadow: 0 1px 2px rgb(15 23 42 / 25%);\n transition: transform 0.15s ease;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input:checked + .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack {\n background: var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input:checked + .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectThumb {\n transform: translateX(10px);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input:focus-visible + .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack {\n outline: 2px solid #497cd4;\n outline-offset: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton {\n display: flex;\n width: calc(100% - 10px);\n flex-direction: column;\n gap: 3px;\n margin: 5px;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-primary, #273142);\n text-align: left;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton:hover,\n.-cerbur-clutch-dsh-worktree-gitSummaryButton[aria-pressed='true'] {\n border-color: var(--dsw-alias-state-business-primary, #467bc8);\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton span {\n font-size: 12px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton small {\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle {\n display: flex;\n align-items: flex-start;\n gap: 7px;\n width: calc(100% - 20px);\n margin: 3px 10px 8px;\n color: var(--dsw-alias-label-primary, #273142);\n cursor: pointer;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle input {\n flex: none;\n margin: 2px 0 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle span {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle strong {\n font-weight: 560;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle small {\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle input:disabled,\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle:has(input:disabled) {\n cursor: wait;\n opacity: 0.65;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSelectionToolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 5px 10px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #edf0f4);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSelectionToolbar button {\n border: 0;\n background: transparent;\n color: var(--dsw-alias-state-business-primary, #467bc8);\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-gutter: stable;\n list-style: none;\n padding: 5px;\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList {\n overflow-x: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList > li,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderChildren,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderChildren > li {\n width: max-content;\n min-width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderChildren {\n list-style: none;\n padding: 0 0 0 12px;\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderButton {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 7px 8px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 11px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderButton:hover,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderButton:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderIcon {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderIcon > svg {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderName {\n min-width: max-content;\n overflow: visible;\n text-overflow: clip;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button {\n display: block;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button {\n display: grid;\n width: 100%;\n grid-template-columns: 15px minmax(0, 1fr);\n padding: 9px 8px;\n}\n\n/* Without the multi-select marks a row has a single column, so the subject and meta align with it. */\n.-cerbur-clutch-dsh-worktree-gitCommitList[data-dashboard-git-commit-multiselect='off'] button {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList[data-dashboard-git-commit-multiselect='off'] .-cerbur-clutch-dsh-worktree-gitCommitSubject,\n.-cerbur-clutch-dsh-worktree-gitCommitList[data-dashboard-git-commit-multiselect='off'] .-cerbur-clutch-dsh-worktree-gitCommitMeta {\n grid-column: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitSelectionMark {\n grid-row: 1 / span 2;\n color: var(--dsw-alias-state-business-primary, #467bc8);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button:hover,\n.-cerbur-clutch-dsh-worktree-gitCommitList button[aria-selected='true'],\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button:hover,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button[aria-selected='true'] {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button[aria-selected='true'] {\n box-shadow: inset 2px 0 var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button[data-dashboard-git-commit-kind='working-tree'] {\n background: var(--dsw-alias-state-warn-tertiary, #f8f5ed);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button[data-dashboard-git-commit-kind='working-tree'][aria-selected='true'] {\n box-shadow: inset 2px 0 var(--dsw-alias-state-warn-primary, #b18435);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitSubject {\n grid-column: 2;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMeta {\n grid-column: 2;\n display: flex;\n gap: 7px;\n margin-top: 4px;\n overflow: hidden;\n color: var(--dsw-alias-label-secondary, #7c8594);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMeta span,\n.-cerbur-clutch-dsh-worktree-gitCommitMeta time {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMeta time {\n margin-left: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitWorkingTree {\n color: var(--dsw-alias-state-warn-label, #8a6728);\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button {\n display: flex;\n width: max-content;\n min-width: 100%;\n box-sizing: border-box;\n align-items: flex-start;\n gap: 7px;\n padding: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFileIcon {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFileIconGlyph {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath {\n min-width: max-content;\n flex: 0 0 auto;\n overflow: visible;\n text-overflow: clip;\n white-space: nowrap;\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='added'] {\n color: var(--dsw-alias-state-success-primary, #23845f);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='deleted'] {\n color: var(--dsw-alias-state-error-secondary, #bd5d55);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='modified'],\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='renamed'],\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='copied'],\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='type-changed'] {\n color: var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFileContributors {\n flex: none;\n max-width: 9em;\n overflow: hidden;\n color: var(--dsw-alias-label-tertiary, #65758d);\n font-size: 9px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitLineStats {\n display: inline-flex;\n flex: none;\n gap: 6px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitLineStats {\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitLineAdded {\n color: var(--dsw-alias-state-success-primary, #23845f);\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitLineRemoved {\n color: var(--dsw-alias-state-error-secondary, #bd5d55);\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffContainer {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffToolbar {\n display: flex;\n flex: none;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 12px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #edf0f4);\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffPath {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n color: var(--dsw-alias-label-primary, #263342);\n font-weight: 560;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffOpenInSidebar {\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 5px;\n padding: 3px 8px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 4px;\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 11px;\n line-height: 16px;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n/* The square 16px arrow keeps its aspect ratio; pin the box so it centers on the label. */\n.-cerbur-clutch-dsh-worktree-gitDiffOpenIcon {\n flex: none;\n width: 14px;\n height: 14px;\n color: var(--dsw-alias-label-tertiary, #8a94a3);\n transition: color 0.15s ease;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffOpenInSidebar:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n color: var(--dsw-alias-label-primary, #263342);\n border-color: var(--dsw-alias-border-l2, #cbd2dc);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffOpenInSidebar:hover .-cerbur-clutch-dsh-worktree-gitDiffOpenIcon {\n color: var(--dsw-alias-label-primary, #263342);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiff {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n overflow: auto;\n padding: 7px 0 12px;\n background: var(--dsw-alias-markdown-code-block, #fafbfc);\n color: var(--dsw-alias-label-primary, #263342);\n font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffSegment {\n margin-bottom: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffSegmentHeader {\n padding: 5px 12px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffSegmentHeader code {\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffHunk {\n margin-bottom: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffHunkHeader {\n padding: 3px 12px;\n background: var(--dsw-alias-markdown-code-block-banner, #edf3fb);\n color: var(--dsw-alias-state-business-primary, #4a70a1);\n box-shadow: inset 0 1px 0 var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.04)), inset 0 -1px 0 var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.04));\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLine {\n display: grid;\n grid-template-columns: 44px 44px minmax(0, 1fr);\n min-width: max-content;\n padding-right: 12px;\n white-space: pre;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLineadd {\n background: color-mix(\n in srgb,\n var(--dsw-alias-state-success-primary, #23845f) 18%,\n var(--dsw-alias-markdown-code-block, #fafbfc)\n );\n box-shadow: inset 2px 0 var(--dsw-alias-state-success-primary, #23845f);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLinedelete {\n background: color-mix(\n in srgb,\n var(--dsw-alias-state-error-secondary, #bd5d55) 18%,\n var(--dsw-alias-markdown-code-block, #fafbfc)\n );\n box-shadow: inset 2px 0 var(--dsw-alias-state-error-secondary, #bd5d55);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLineNumber {\n padding-right: 8px;\n color: var(--dsw-alias-label-tertiary, #9aa3af);\n text-align: right;\n user-select: none;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLine code {\n min-width: 0;\n color: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSrOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffEmpty,\n.-cerbur-clutch-dsh-worktree-gitDiffMessage,\n.-cerbur-clutch-dsh-worktree-gitEmpty,\n.-cerbur-clutch-dsh-worktree-gitLoading,\n.-cerbur-clutch-dsh-worktree-gitUnavailable,\n.-cerbur-clutch-dsh-worktree-gitError {\n padding: 24px 16px;\n color: var(--dsw-alias-label-secondary, #727d8d);\n font-size: 12px;\n text-align: center;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffMessage,\n.-cerbur-clutch-dsh-worktree-gitUnavailable {\n min-height: 150px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitUnavailable strong {\n display: block;\n margin-bottom: 7px;\n color: var(--dsw-alias-label-primary, #273142);\n font-size: 14px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitUnavailable p {\n max-width: 500px;\n margin: 0 auto;\n line-height: 1.7;\n}\n\n.-cerbur-clutch-dsh-worktree-gitError {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 9px 12px;\n color: var(--dsw-alias-state-error-primary, #ae5c4c);\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-gitError p {\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitError button {\n flex: none;\n border: 1px solid currentColor;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font-size: 11px;\n padding: 3px 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffFolded {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 10px 12px;\n border-top: 1px dashed var(--dsw-alias-border-l3, #dfe3ea);\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffShowAll {\n padding: 2px 8px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-primary, #273142);\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitRawDiff {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n max-height: none;\n overflow: auto;\n padding: 12px;\n margin: 0;\n white-space: pre;\n background: var(--dsw-alias-markdown-code-block, #fafbfc);\n color: var(--dsw-alias-label-primary, #263342);\n font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;\n}\n\n@container (min-width: 901px) {\n .-cerbur-clutch-dsh-worktree-gitColumns {\n /* Two stacked panes need more vertical room than three side-by-side panes. */\n --git-columns-height: clamp(440px, calc(100vh - 300px), 720px);\n --git-columns-height: clamp(440px, calc(100dvh - 300px), 720px);\n }\n}\n\n@container (max-width: 900px) {\n /* Narrow layout keeps the two-row arrangement: commits and changed files side by\n side on the first row, with the summary diff across the second row. Both\n dividers move with the panes, so either axis stays adjustable. */\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='commits'] {\n grid-area: 1 / 1;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns'] {\n grid-area: 1 / 2;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='changed-files'] {\n grid-area: 1 / 3;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows'] {\n grid-area: 2 / 1 / 3 / -1;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='diff'] {\n grid-area: 3 / 1 / -1 / -1;\n }\n}\n\n@container (max-width: 520px) {\n .-cerbur-clutch-dsh-worktree-gitPanelHeader {\n flex-direction: column;\n gap: 10px;\n }\n .-cerbur-clutch-dsh-worktree-gitRefresh {\n align-self: flex-end;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns {\n display: block;\n height: auto;\n min-height: 0;\n }\n .-cerbur-clutch-dsh-worktree-gitColumnSplitter {\n display: none;\n }\n .-cerbur-clutch-dsh-worktree-gitColumn {\n height: clamp(260px, calc(100vh - 360px), 360px);\n height: clamp(260px, calc(100dvh - 360px), 360px);\n min-height: 260px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > .-cerbur-clutch-dsh-worktree-gitColumn:last-child {\n border-bottom: 0;\n }\n}\n";
|
|
8195
8246
|
const styleId = "@cerbur/clutch-dsh-worktree/worktree-git.css";
|
|
8196
8247
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-git.css\"]") === null) {
|
|
@@ -8963,6 +9014,7 @@ window.__ModuleLoader__.load({
|
|
|
8963
9014
|
return typeof value === "string" && WORKTREE_GIT_COMMIT_PATTERN.test(value);
|
|
8964
9015
|
}
|
|
8965
9016
|
Object.freeze([
|
|
9017
|
+
"getWorktreeInstructions",
|
|
8966
9018
|
"updateWorktreeInstructions",
|
|
8967
9019
|
"updateWorktreeBaseBranch",
|
|
8968
9020
|
"listWorktrees",
|
|
@@ -9068,12 +9120,12 @@ window.__ModuleLoader__.load({
|
|
|
9068
9120
|
const normalized = branch?.trim();
|
|
9069
9121
|
return normalized === void 0 || normalized.length === 0 ? void 0 : normalized;
|
|
9070
9122
|
}
|
|
9071
|
-
function emptyState(defaultBaselineBranch) {
|
|
9123
|
+
function emptyState(defaultBaselineBranch, main) {
|
|
9072
9124
|
return {
|
|
9073
9125
|
branches: { status: "idle" },
|
|
9074
9126
|
baselineBranch: normalizeBranch(defaultBaselineBranch),
|
|
9075
9127
|
history: { status: "idle" },
|
|
9076
|
-
view: "summary",
|
|
9128
|
+
view: main ? "commits" : "summary",
|
|
9077
9129
|
includeWorkingTree: false,
|
|
9078
9130
|
selectedCommits: [],
|
|
9079
9131
|
commitMultiSelect: false,
|
|
@@ -9088,8 +9140,8 @@ window.__ModuleLoader__.load({
|
|
|
9088
9140
|
function createWorktreeGitStateController(input) {
|
|
9089
9141
|
const main = isMainWorktreeId(input.worktreeId);
|
|
9090
9142
|
const capturedBaseline = input.capturedBaseline === true;
|
|
9091
|
-
const canRead = (baselineBranch) =>
|
|
9092
|
-
let state = emptyState(input.defaultBaselineBranch);
|
|
9143
|
+
const canRead = (baselineBranch) => main || capturedBaseline || baselineBranch !== void 0;
|
|
9144
|
+
let state = emptyState(input.defaultBaselineBranch, main);
|
|
9093
9145
|
let disposed = false;
|
|
9094
9146
|
let branchesLoaded = false;
|
|
9095
9147
|
let branchesRequest = 0;
|
|
@@ -9232,11 +9284,11 @@ window.__ModuleLoader__.load({
|
|
|
9232
9284
|
});
|
|
9233
9285
|
try {
|
|
9234
9286
|
const value = await requestDiff(baselineBranch, state.history, target, diffPath);
|
|
9287
|
+
if (!isCurrentRequest(request, diffRequest, baselineBranch, target, selectedPath)) return;
|
|
9235
9288
|
if (!isLiveTarget(target)) {
|
|
9236
9289
|
diffCache.set(key, value);
|
|
9237
9290
|
trimCache(diffCache, 24);
|
|
9238
9291
|
}
|
|
9239
|
-
if (!isCurrentRequest(request, diffRequest, baselineBranch, target, selectedPath)) return;
|
|
9240
9292
|
update({
|
|
9241
9293
|
...state,
|
|
9242
9294
|
diff: {
|
|
@@ -9295,11 +9347,11 @@ window.__ModuleLoader__.load({
|
|
|
9295
9347
|
});
|
|
9296
9348
|
try {
|
|
9297
9349
|
const value = await requestFiles(baselineBranch, state.history, target);
|
|
9350
|
+
if (!isCurrentRequest(request, filesRequest, baselineBranch, target)) return;
|
|
9298
9351
|
if (!isLiveTarget(target)) {
|
|
9299
9352
|
filesCache.set(key, value);
|
|
9300
9353
|
trimCache(filesCache, 8);
|
|
9301
9354
|
}
|
|
9302
|
-
if (!isCurrentRequest(request, filesRequest, baselineBranch, target)) return;
|
|
9303
9355
|
applyFiles(target, value);
|
|
9304
9356
|
} catch (error) {
|
|
9305
9357
|
if (!isCurrentRequest(request, filesRequest, baselineBranch, target)) return;
|
|
@@ -9335,7 +9387,7 @@ window.__ModuleLoader__.load({
|
|
|
9335
9387
|
});
|
|
9336
9388
|
};
|
|
9337
9389
|
const selectBaselineBranch = (branch) => {
|
|
9338
|
-
if (disposed) return;
|
|
9390
|
+
if (disposed || main) return;
|
|
9339
9391
|
const nextBranch = normalizeBranch(branch);
|
|
9340
9392
|
if (state.baselineBranch === nextBranch) return;
|
|
9341
9393
|
++historyRequest;
|
|
@@ -9361,7 +9413,7 @@ window.__ModuleLoader__.load({
|
|
|
9361
9413
|
if (nextBranch !== void 0 || capturedBaseline) loadHistory();
|
|
9362
9414
|
};
|
|
9363
9415
|
const selectSummary = () => {
|
|
9364
|
-
if (disposed || !canRead(state.baselineBranch)) return;
|
|
9416
|
+
if (disposed || main || !canRead(state.baselineBranch)) return;
|
|
9365
9417
|
const target = {
|
|
9366
9418
|
kind: "selection",
|
|
9367
9419
|
selection: summarySelection(state.includeWorkingTree)
|
|
@@ -9374,7 +9426,7 @@ window.__ModuleLoader__.load({
|
|
|
9374
9426
|
loadFiles(target);
|
|
9375
9427
|
};
|
|
9376
9428
|
const setIncludeWorkingTree = (includeWorkingTree) => {
|
|
9377
|
-
if (disposed || state.includeWorkingTree === includeWorkingTree) return;
|
|
9429
|
+
if (disposed || main || state.includeWorkingTree === includeWorkingTree) return;
|
|
9378
9430
|
if (state.view !== "summary" || !canRead(state.baselineBranch)) {
|
|
9379
9431
|
update({
|
|
9380
9432
|
...state,
|
|
@@ -9923,13 +9975,17 @@ window.__ModuleLoader__.load({
|
|
|
9923
9975
|
})
|
|
9924
9976
|
}) })] })
|
|
9925
9977
|
] })]
|
|
9978
|
+
}),
|
|
9979
|
+
isMain && historyValue !== void 0 && (0, react_jsx_runtime.jsxs)("dl", {
|
|
9980
|
+
className: worktree_git_css_default.gitBaselineFacts,
|
|
9981
|
+
children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.head") }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: shortCommit(historyValue.headCommit) }) })] }), (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.commits") }), (0, react_jsx_runtime.jsx)("dd", { children: commitCountLabel(historyValue, t) })] })]
|
|
9926
9982
|
})
|
|
9927
9983
|
]
|
|
9928
9984
|
}), (0, react_jsx_runtime.jsx)("button", {
|
|
9929
9985
|
type: "button",
|
|
9930
9986
|
className: worktree_git_css_default.gitRefresh,
|
|
9931
9987
|
"data-dashboard-git-refresh": true,
|
|
9932
|
-
disabled:
|
|
9988
|
+
disabled: refreshing || state.history.status === "loading",
|
|
9933
9989
|
"aria-busy": refreshing || state.history.status === "loading",
|
|
9934
9990
|
onClick: () => void state.refresh(),
|
|
9935
9991
|
children: refreshing ? t("dashboard.git.refreshing") : t("dashboard.git.refresh")
|
|
@@ -9944,10 +10000,6 @@ window.__ModuleLoader__.load({
|
|
|
9944
10000
|
children: t("dashboard.git.retry")
|
|
9945
10001
|
})]
|
|
9946
10002
|
}),
|
|
9947
|
-
isMain && (0, react_jsx_runtime.jsx)(UnavailableNotice, {
|
|
9948
|
-
reason: "main",
|
|
9949
|
-
t
|
|
9950
|
-
}),
|
|
9951
10003
|
!isMain && unavailable === "baseline-unselected" && (0, react_jsx_runtime.jsxs)("div", {
|
|
9952
10004
|
className: worktree_git_css_default.gitBaselinePrompt,
|
|
9953
10005
|
"data-dashboard-git-baseline-prompt": true,
|
|
@@ -10018,7 +10070,7 @@ window.__ModuleLoader__.load({
|
|
|
10018
10070
|
})]
|
|
10019
10071
|
})]
|
|
10020
10072
|
}),
|
|
10021
|
-
(0, react_jsx_runtime.jsxs)("button", {
|
|
10073
|
+
!isMain && (0, react_jsx_runtime.jsxs)("button", {
|
|
10022
10074
|
type: "button",
|
|
10023
10075
|
className: worktree_git_css_default.gitSummaryButton,
|
|
10024
10076
|
"data-dashboard-git-summary": true,
|
|
@@ -10026,7 +10078,7 @@ window.__ModuleLoader__.load({
|
|
|
10026
10078
|
onClick: state.selectSummary,
|
|
10027
10079
|
children: [(0, react_jsx_runtime.jsx)("span", { children: t("dashboard.git.baselineSummary") }), (0, react_jsx_runtime.jsx)("small", { children: t("dashboard.git.baselineSummaryDescription") })]
|
|
10028
10080
|
}),
|
|
10029
|
-
state.view === "summary" && (0, react_jsx_runtime.jsxs)("label", {
|
|
10081
|
+
!isMain && state.view === "summary" && (0, react_jsx_runtime.jsxs)("label", {
|
|
10030
10082
|
className: worktree_git_css_default.gitSummaryToggle,
|
|
10031
10083
|
"data-dashboard-git-include-working-tree": true,
|
|
10032
10084
|
children: [(0, react_jsx_runtime.jsx)("input", {
|
|
@@ -10560,7 +10612,7 @@ window.__ModuleLoader__.load({
|
|
|
10560
10612
|
})
|
|
10561
10613
|
})] });
|
|
10562
10614
|
}
|
|
10563
|
-
/** A Worktree or browser Main projection with explicit unavailable states
|
|
10615
|
+
/** A managed Worktree or browser Main projection with explicit unavailable states for inapplicable facts. */
|
|
10564
10616
|
function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, branches = [] }) {
|
|
10565
10617
|
const surface = (0, react.useRef)(null);
|
|
10566
10618
|
const heading = (0, react.useRef)(null);
|
|
@@ -11219,7 +11271,7 @@ window.__ModuleLoader__.load({
|
|
|
11219
11271
|
const targetWorkspace = dashboard === void 0 ? void 0 : source.workspaces.items.find((workspace) => workspace.workspaceId === dashboard.workspaceId);
|
|
11220
11272
|
const targetView = dashboard === void 0 ? void 0 : read.viewByWorkspace.get(dashboard.workspaceId);
|
|
11221
11273
|
const dashboardMainBranch = targetView?.branches.find((branch) => branch.isCurrent)?.name;
|
|
11222
|
-
const dashboardMainRecord = targetWorkspace === void 0 ? void 0 : createMainWorktreeRecord(targetWorkspace, dashboardMainBranch);
|
|
11274
|
+
const dashboardMainRecord = targetWorkspace === void 0 ? void 0 : createMainWorktreeRecord(targetWorkspace, dashboardMainBranch, targetView?.mainInstructions);
|
|
11223
11275
|
const dashboardRecord = resolveDashboardRecord(dashboard, source.mode, source.currentSessionId, source.workspaceIds, dashboard === void 0 ? void 0 : targetView?.worktrees, dashboardMainRecord);
|
|
11224
11276
|
(0, react.useEffect)(() => {
|
|
11225
11277
|
if (dashboard !== void 0 && dashboardRecord === void 0) setDashboard(void 0);
|
|
@@ -11419,7 +11471,7 @@ window.__ModuleLoader__.load({
|
|
|
11419
11471
|
}), dashboardRecord !== void 0 && (0, react_jsx_runtime.jsx)(WorktreeDashboard, {
|
|
11420
11472
|
manager: props.manager,
|
|
11421
11473
|
record: dashboardRecord,
|
|
11422
|
-
onSaveInstructions: props.manager
|
|
11474
|
+
onSaveInstructions: props.manager ? async (instructions, expectedInstructions) => {
|
|
11423
11475
|
try {
|
|
11424
11476
|
return await props.manager.updateWorktreeInstructions({
|
|
11425
11477
|
workspaceId: dashboardRecord.workspaceId,
|