@cerbur/clutch-dsh-worktree 0.1.13 → 0.1.15
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 +54 -32
- package/README.zh.md +50 -29
- package/lib/client/WorktreeSurface.js +2 -2
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/context/WorktreeContext.d.ts.map +1 -1
- package/lib/client/context/WorktreeContext.js +3 -2
- package/lib/client/context/WorktreeContext.js.map +1 -1
- package/lib/client/context/worktree-context-store.d.ts +3 -2
- package/lib/client/context/worktree-context-store.d.ts.map +1 -1
- package/lib/client/context/worktree-context-store.js +2 -1
- package/lib/client/context/worktree-context-store.js.map +1 -1
- package/lib/client/dashboard/OpenInAppButton.d.ts.map +1 -1
- package/lib/client/dashboard/OpenInAppButton.js +2 -1
- package/lib/client/dashboard/OpenInAppButton.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 +5 -3
- 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/GitChangedFiles.js +1 -1
- package/lib/client/dashboard/git/GitChangedFiles.js.map +1 -1
- package/lib/client/dashboard/git/GitDiffView.js +1 -1
- package/lib/client/dashboard/git/GitDiffView.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/dsh-icon-compat.d.ts +11 -0
- package/lib/client/dsh-icon-compat.d.ts.map +1 -0
- package/lib/client/dsh-icon-compat.js +12 -0
- package/lib/client/dsh-icon-compat.js.map +1 -0
- package/lib/client/dsh-icons.d.ts +20 -0
- package/lib/client/dsh-icons.d.ts.map +1 -0
- package/lib/client/dsh-icons.js +23 -0
- package/lib/client/dsh-icons.js.map +1 -0
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +6 -15
- package/lib/client/entry.js.map +1 -1
- package/lib/client/locales.js +6 -6
- package/lib/client/locales.js.map +1 -1
- package/lib/client/session/session-navigation.d.ts +8 -0
- package/lib/client/session/session-navigation.d.ts.map +1 -0
- package/lib/client/session/session-navigation.js +15 -0
- package/lib/client/session/session-navigation.js.map +1 -0
- package/lib/client/session/session-rename.d.ts +7 -0
- package/lib/client/session/session-rename.d.ts.map +1 -0
- package/lib/client/session/session-rename.js +18 -0
- package/lib/client/session/session-rename.js.map +1 -0
- package/lib/client/session/session-selection.d.ts +12 -0
- package/lib/client/session/session-selection.d.ts.map +1 -0
- package/lib/client/session/session-selection.js +8 -0
- package/lib/client/session/session-selection.js.map +1 -0
- package/lib/client/session/session-view.d.ts +3 -0
- package/lib/client/session/session-view.d.ts.map +1 -1
- package/lib/client/session/session-view.js +2 -1
- package/lib/client/session/session-view.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/surface/components/ActiveWorktree.js +1 -1
- package/lib/client/surface/components/ActiveWorktree.js.map +1 -1
- package/lib/client/surface/components/ArchivedWorktree.js +1 -1
- package/lib/client/surface/components/ArchivedWorktree.js.map +1 -1
- package/lib/client/surface/components/ArchivedWorktrees.js +1 -1
- package/lib/client/surface/components/ArchivedWorktrees.js.map +1 -1
- package/lib/client/surface/components/SurfaceHeader.js +2 -1
- package/lib/client/surface/components/SurfaceHeader.js.map +1 -1
- package/lib/client/surface/components/WorkspaceTree.js +1 -1
- package/lib/client/surface/components/WorkspaceTree.js.map +1 -1
- package/lib/client/surface/components/rows.d.ts.map +1 -1
- package/lib/client/surface/components/rows.js +2 -1
- package/lib/client/surface/components/rows.js.map +1 -1
- package/lib/client/surface/state/useSurfaceSources.d.ts.map +1 -1
- package/lib/client/surface/state/useSurfaceSources.js +2 -1
- package/lib/client/surface/state/useSurfaceSources.js.map +1 -1
- package/lib/client/view/WorktreeModeAction.js +1 -1
- package/lib/client/view/WorktreeModeAction.js.map +1 -1
- package/lib/client/view/view-mode.d.ts +4 -1
- package/lib/client/view/view-mode.d.ts.map +1 -1
- package/lib/client/view/view-mode.js +2 -1
- package/lib/client/view/view-mode.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 +237 -125
- 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.d.ts.map +1 -1
- package/lib/host/worktree-instructions.js +12 -4
- 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 +296 -189
- 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 +296 -189
- package/package.json +45 -44
package/lib/client.js
CHANGED
|
@@ -614,7 +614,7 @@ window.__ModuleLoader__.load({
|
|
|
614
614
|
}
|
|
615
615
|
var produce = new Immer2().produce;
|
|
616
616
|
//#endregion
|
|
617
|
-
//#region ../../node_modules/.pnpm/@deepseek-ai+dsh-client-store@0.1.
|
|
617
|
+
//#region ../../node_modules/.pnpm/@deepseek-ai+dsh-client-store@0.1.7-rc.2_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-client-store/lib/index.js
|
|
618
618
|
/**
|
|
619
619
|
* React-free snapshot store engine (zustand vanilla + immer + subscribeWithSelector +
|
|
620
620
|
* rafFlush middleware + opt-in persist + dev freeze) plus the declarative
|
|
@@ -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,39 @@ window.__ModuleLoader__.load({
|
|
|
1591
1595
|
};
|
|
1592
1596
|
}
|
|
1593
1597
|
//#endregion
|
|
1594
|
-
//#region
|
|
1598
|
+
//#region lib/client/dsh-icon-compat.js
|
|
1599
|
+
/** Resolve a legacy size-named export or the equivalent DSH 1.7 weighted export. */
|
|
1600
|
+
function createDshIconAlias(exports, legacyName, currentName) {
|
|
1601
|
+
return function DshIconAlias(props) {
|
|
1602
|
+
const candidate = exports[legacyName] ?? exports[currentName];
|
|
1603
|
+
if (typeof candidate !== "function") throw new Error(`Missing DSH icon export: ${legacyName} or ${currentName}`);
|
|
1604
|
+
return (0, react.createElement)(candidate, props);
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
//#endregion
|
|
1608
|
+
//#region lib/client/dsh-icons.js
|
|
1609
|
+
const exports$1 = _deepseek_ai_dsh_client_ui_primitives;
|
|
1610
|
+
const IconArchiveOutline20 = createDshIconAlias(exports$1, "IconArchiveOutline20", "IconArchiveOutlineRegular");
|
|
1611
|
+
const IconBranchOutline16 = createDshIconAlias(exports$1, "IconBranchOutline16", "IconBranchOutlineRegular");
|
|
1612
|
+
const IconChevronDownOutline14 = createDshIconAlias(exports$1, "IconChevronDownOutline14", "IconChevronDownOutlineRegular");
|
|
1613
|
+
const IconChevronRightOutline14 = createDshIconAlias(exports$1, "IconChevronRightOutline14", "IconChevronRightOutlineRegular");
|
|
1614
|
+
const IconCheckOutline16 = createDshIconAlias(exports$1, "IconCheckOutline16", "IconCheckOutlineRegular");
|
|
1615
|
+
const IconCloseFill14 = createDshIconAlias(exports$1, "IconCloseFill14", "IconCloseFillRegular");
|
|
1616
|
+
const IconCloseOutline16 = createDshIconAlias(exports$1, "IconCloseOutline16", "IconCloseOutlineRegular");
|
|
1617
|
+
const IconCopyOutline16 = createDshIconAlias(exports$1, "IconCopyOutline16", "IconCopyOutlineRegular");
|
|
1618
|
+
const IconEditOutline16 = createDshIconAlias(exports$1, "IconEditOutline16", "IconEditOutlineRegular");
|
|
1619
|
+
const IconEllipsisOutline16 = createDshIconAlias(exports$1, "IconEllipsisOutline16", "IconEllipsisOutlineRegular");
|
|
1620
|
+
const IconFolderClose16 = createDshIconAlias(exports$1, "IconFolderClose16", "IconFolderCloseRegular");
|
|
1621
|
+
const IconFolderOpen16 = createDshIconAlias(exports$1, "IconFolderOpen16", "IconFolderOpenRegular");
|
|
1622
|
+
const IconPanelLeftOutline16 = createDshIconAlias(exports$1, "IconPanelLeftOutline16", "IconPanelLeftOutlineRegular");
|
|
1623
|
+
const IconPlusOutline16 = createDshIconAlias(exports$1, "IconPlusOutline16", "IconPlusOutlineRegular");
|
|
1624
|
+
const IconProjectAddOutline16 = createDshIconAlias(exports$1, "IconProjectAddOutline16", "IconProjectAddOutlineRegular");
|
|
1625
|
+
const IconRefreshOutline16 = createDshIconAlias(exports$1, "IconRefreshOutline16", "IconRefreshOutlineRegular");
|
|
1626
|
+
const IconRightUpOutline16 = createDshIconAlias(exports$1, "IconRightUpOutline16", "IconRightUpOutlineRegular");
|
|
1627
|
+
const IconSearchOutline16 = createDshIconAlias(exports$1, "IconSearchOutline16", "IconSearchOutlineRegular");
|
|
1628
|
+
const IconTrashOutline16 = createDshIconAlias(exports$1, "IconTrashOutline16", "IconTrashOutlineRegular");
|
|
1629
|
+
//#endregion
|
|
1630
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_12c44ccd600c/packages/clutch-dsh-worktree/src/client/context/worktree-context.css.mjs
|
|
1595
1631
|
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
1632
|
const styleId$5 = "@cerbur/clutch-dsh-worktree/worktree-context.css";
|
|
1597
1633
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-context.css\"]") === null) {
|
|
@@ -1619,10 +1655,9 @@ window.__ModuleLoader__.load({
|
|
|
1619
1655
|
className: worktree_context_css_default.headerContext,
|
|
1620
1656
|
title: value.label,
|
|
1621
1657
|
"aria-label": ariaLabel,
|
|
1622
|
-
children: [(0, react_jsx_runtime.jsx)(
|
|
1658
|
+
children: [(0, react_jsx_runtime.jsx)(IconBranchOutline16, {
|
|
1623
1659
|
size: 14,
|
|
1624
|
-
className: worktree_context_css_default.contextIcon
|
|
1625
|
-
"aria-hidden": "true"
|
|
1660
|
+
className: worktree_context_css_default.contextIcon
|
|
1626
1661
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
1627
1662
|
className: worktree_context_css_default.contextLabel,
|
|
1628
1663
|
children: value.label
|
|
@@ -1656,7 +1691,7 @@ window.__ModuleLoader__.load({
|
|
|
1656
1691
|
globalSetViewMode?.(mode);
|
|
1657
1692
|
}
|
|
1658
1693
|
//#endregion
|
|
1659
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
1694
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_12c44ccd600c/packages/clutch-dsh-worktree/src/client/worktree.css.mjs
|
|
1660
1695
|
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
1696
|
const styleId$4 = "@cerbur/clutch-dsh-worktree/worktree.css";
|
|
1662
1697
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree.css\"]") === null) {
|
|
@@ -1779,7 +1814,7 @@ window.__ModuleLoader__.load({
|
|
|
1779
1814
|
onClick: () => {
|
|
1780
1815
|
actions.setViewMode(active ? "workspace-session" : "worktree");
|
|
1781
1816
|
},
|
|
1782
|
-
children: [(0, react_jsx_runtime.jsx)(
|
|
1817
|
+
children: [(0, react_jsx_runtime.jsx)(IconBranchOutline16, { size: wide ? 16 : 18 }), wide && (0, react_jsx_runtime.jsx)("span", {
|
|
1783
1818
|
className: worktree_css_default.actionLabel,
|
|
1784
1819
|
children: t("mode.label")
|
|
1785
1820
|
})]
|
|
@@ -1831,7 +1866,7 @@ window.__ModuleLoader__.load({
|
|
|
1831
1866
|
});
|
|
1832
1867
|
}
|
|
1833
1868
|
//#endregion
|
|
1834
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
1869
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_12c44ccd600c/packages/clutch-dsh-worktree/src/client/dashboard/dashboard-header-action.css.mjs
|
|
1835
1870
|
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
1871
|
const styleId$3 = "@cerbur/clutch-dsh-worktree/dashboard-header-action.css";
|
|
1837
1872
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard-header-action.css\"]") === null) {
|
|
@@ -2395,21 +2430,27 @@ window.__ModuleLoader__.load({
|
|
|
2395
2430
|
}
|
|
2396
2431
|
};
|
|
2397
2432
|
}
|
|
2398
|
-
/** Read
|
|
2433
|
+
/** Read the Worktree, branch, binding, and Workspace-root Main projections in one refresh. */
|
|
2399
2434
|
async function loadWorktreeView(manager, workspaceId) {
|
|
2400
|
-
const [worktreesResult, branchesResult, bindingsResult] = await Promise.allSettled([
|
|
2435
|
+
const [worktreesResult, branchesResult, bindingsResult, mainInstructionsResult] = await Promise.allSettled([
|
|
2401
2436
|
manager.listWorktrees({ workspaceId }),
|
|
2402
2437
|
manager.listBranches({ workspaceId }),
|
|
2403
|
-
manager.listBindings({ workspaceId })
|
|
2438
|
+
manager.listBindings({ workspaceId }),
|
|
2439
|
+
typeof manager.getWorktreeInstructions === "function" ? manager.getWorktreeInstructions({
|
|
2440
|
+
workspaceId,
|
|
2441
|
+
worktreeId: `main:${workspaceId}`
|
|
2442
|
+
}) : Promise.resolve("")
|
|
2404
2443
|
]);
|
|
2405
2444
|
if (worktreesResult.status === "rejected") throw worktreesResult.reason;
|
|
2406
2445
|
if (bindingsResult.status === "rejected") throw bindingsResult.reason;
|
|
2446
|
+
if (mainInstructionsResult.status === "rejected") throw mainInstructionsResult.reason;
|
|
2407
2447
|
if (branchesResult.status === "rejected") {
|
|
2408
2448
|
const readiness = readinessFromBranchError(branchesResult.reason);
|
|
2409
2449
|
if (readiness !== void 0) return {
|
|
2410
2450
|
worktrees: worktreesResult.value,
|
|
2411
2451
|
branches: [],
|
|
2412
2452
|
bindings: bindingsResult.value,
|
|
2453
|
+
mainInstructions: mainInstructionsResult.value,
|
|
2413
2454
|
readiness
|
|
2414
2455
|
};
|
|
2415
2456
|
throw branchesResult.reason;
|
|
@@ -2418,6 +2459,7 @@ window.__ModuleLoader__.load({
|
|
|
2418
2459
|
worktrees: worktreesResult.value,
|
|
2419
2460
|
branches: branchesResult.value,
|
|
2420
2461
|
bindings: bindingsResult.value,
|
|
2462
|
+
mainInstructions: mainInstructionsResult.value,
|
|
2421
2463
|
readiness: branchesResult.value.length > 0 ? { status: "ready" } : { status: "noLocalBranch" }
|
|
2422
2464
|
};
|
|
2423
2465
|
}
|
|
@@ -2436,6 +2478,13 @@ window.__ModuleLoader__.load({
|
|
|
2436
2478
|
return sessionIds.filter((sessionId) => !archivedSessionIds.includes(sessionId));
|
|
2437
2479
|
}
|
|
2438
2480
|
//#endregion
|
|
2481
|
+
//#region lib/client/session/session-selection.js
|
|
2482
|
+
/** Prefer the legacy selected-id field; DSH 1.7 represents selection by mainView retention. */
|
|
2483
|
+
function currentSessionIdFromList(sessions) {
|
|
2484
|
+
if (sessions.current !== void 0) return sessions.current;
|
|
2485
|
+
return Object.keys(sessions.byId).find((sessionId) => (sessions.byId[sessionId]?.retainedBy?.mainView ?? 0) > 0);
|
|
2486
|
+
}
|
|
2487
|
+
//#endregion
|
|
2439
2488
|
//#region lib/client/session/session-view.js
|
|
2440
2489
|
function isPendingInteractionStatus(value) {
|
|
2441
2490
|
return value === "approval" || value === "plan-review" || value === "question";
|
|
@@ -2610,7 +2659,7 @@ window.__ModuleLoader__.load({
|
|
|
2610
2659
|
}
|
|
2611
2660
|
/** Native tree visibility: ordinary rows plus the currently selected blank row. */
|
|
2612
2661
|
function isVisibleSession(sessionId, sessions) {
|
|
2613
|
-
return !isBlankSession(sessionId, sessions) || sessions
|
|
2662
|
+
return !isBlankSession(sessionId, sessions) || currentSessionIdFromList(sessions) === sessionId;
|
|
2614
2663
|
}
|
|
2615
2664
|
/** Filter a group without mutating its source order. */
|
|
2616
2665
|
function filterVisibleSessionIds(sessionIds, sessions) {
|
|
@@ -3596,7 +3645,7 @@ window.__ModuleLoader__.load({
|
|
|
3596
3645
|
//#endregion
|
|
3597
3646
|
//#region lib/client/view/navigation.js
|
|
3598
3647
|
/** Open an existing Session through DSH without touching the peer view mode. */
|
|
3599
|
-
function openWorktreeSession(opener, sessionId) {
|
|
3648
|
+
function openWorktreeSession$1(opener, sessionId) {
|
|
3600
3649
|
opener.open(sessionId);
|
|
3601
3650
|
}
|
|
3602
3651
|
//#endregion
|
|
@@ -3770,14 +3819,15 @@ window.__ModuleLoader__.load({
|
|
|
3770
3819
|
function isManagedDashboardRecord(record) {
|
|
3771
3820
|
return !isMainWorktreeId$1(record.worktreeId);
|
|
3772
3821
|
}
|
|
3773
|
-
function createMainWorktreeRecord(workspace, currentBranch) {
|
|
3822
|
+
function createMainWorktreeRecord(workspace, currentBranch, instructions = "") {
|
|
3774
3823
|
return {
|
|
3775
3824
|
worktreeId: `main:${workspace.workspaceId}`,
|
|
3776
3825
|
workspaceId: workspace.workspaceId,
|
|
3777
3826
|
branch: currentBranch ?? "",
|
|
3778
3827
|
currentBranch,
|
|
3779
3828
|
absolutePath: workspace.path,
|
|
3780
|
-
status: "active"
|
|
3829
|
+
status: "active",
|
|
3830
|
+
instructions
|
|
3781
3831
|
};
|
|
3782
3832
|
}
|
|
3783
3833
|
function resolveDashboardRecord(selection, mode, currentSessionId, workspaceIds, records, mainRecord) {
|
|
@@ -3867,12 +3917,12 @@ window.__ModuleLoader__.load({
|
|
|
3867
3917
|
const workspaceMenuItems = [{
|
|
3868
3918
|
id: "rename",
|
|
3869
3919
|
label: t("workspace.rename"),
|
|
3870
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
3920
|
+
icon: (0, react_jsx_runtime.jsx)(IconEditOutline16, {}),
|
|
3871
3921
|
disabled: actionPending
|
|
3872
3922
|
}, {
|
|
3873
3923
|
id: "delete",
|
|
3874
3924
|
label: t("workspace.delete"),
|
|
3875
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
3925
|
+
icon: (0, react_jsx_runtime.jsx)(IconTrashOutline16, {}),
|
|
3876
3926
|
danger: true,
|
|
3877
3927
|
disabled: actionPending
|
|
3878
3928
|
}];
|
|
@@ -3915,12 +3965,12 @@ window.__ModuleLoader__.load({
|
|
|
3915
3965
|
event.stopPropagation();
|
|
3916
3966
|
onToggle();
|
|
3917
3967
|
},
|
|
3918
|
-
children: expanded ? (0, react_jsx_runtime.jsx)(
|
|
3968
|
+
children: expanded ? (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, { size: 18 }) : (0, react_jsx_runtime.jsx)(IconChevronRightOutline14, { size: 18 })
|
|
3919
3969
|
}),
|
|
3920
3970
|
(0, react_jsx_runtime.jsx)("span", {
|
|
3921
3971
|
className: worktree_css_default.workspaceIcon,
|
|
3922
3972
|
"aria-hidden": "true",
|
|
3923
|
-
children: expanded ? (0, react_jsx_runtime.jsx)(
|
|
3973
|
+
children: expanded ? (0, react_jsx_runtime.jsx)(IconFolderOpen16, {}) : (0, react_jsx_runtime.jsx)(IconFolderClose16, {})
|
|
3924
3974
|
}),
|
|
3925
3975
|
(0, react_jsx_runtime.jsx)("span", {
|
|
3926
3976
|
className: worktree_css_default.workspaceTitle,
|
|
@@ -3961,7 +4011,7 @@ window.__ModuleLoader__.load({
|
|
|
3961
4011
|
event.stopPropagation();
|
|
3962
4012
|
onMenuOpenChange(!menuOpen);
|
|
3963
4013
|
},
|
|
3964
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
4014
|
+
children: (0, react_jsx_runtime.jsx)(IconEllipsisOutline16, {})
|
|
3965
4015
|
})
|
|
3966
4016
|
})
|
|
3967
4017
|
}),
|
|
@@ -3974,7 +4024,7 @@ window.__ModuleLoader__.load({
|
|
|
3974
4024
|
event.stopPropagation();
|
|
3975
4025
|
onCreateWorktree();
|
|
3976
4026
|
},
|
|
3977
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
4027
|
+
children: (0, react_jsx_runtime.jsx)(IconPlusOutline16, {})
|
|
3978
4028
|
})
|
|
3979
4029
|
]
|
|
3980
4030
|
})
|
|
@@ -4083,7 +4133,7 @@ window.__ModuleLoader__.load({
|
|
|
4083
4133
|
event.stopPropagation();
|
|
4084
4134
|
onToggle();
|
|
4085
4135
|
},
|
|
4086
|
-
children: expanded ? (0, react_jsx_runtime.jsx)(
|
|
4136
|
+
children: expanded ? (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, { size: 18 }) : (0, react_jsx_runtime.jsx)(IconChevronRightOutline14, { size: 18 })
|
|
4087
4137
|
}),
|
|
4088
4138
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4089
4139
|
className: worktree_css_default.worktreeIcon,
|
|
@@ -4141,19 +4191,19 @@ window.__ModuleLoader__.load({
|
|
|
4141
4191
|
...menu.showCreate ? [{
|
|
4142
4192
|
id: "create",
|
|
4143
4193
|
label: t("worktree.createNew"),
|
|
4144
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4194
|
+
icon: (0, react_jsx_runtime.jsx)(IconPlusOutline16, {}),
|
|
4145
4195
|
disabled: menu.disabled || menu.onCreateWorktree === void 0
|
|
4146
4196
|
}] : [],
|
|
4147
4197
|
{
|
|
4148
4198
|
id: "copy-path",
|
|
4149
4199
|
label: t("worktree.copyPath"),
|
|
4150
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4200
|
+
icon: (0, react_jsx_runtime.jsx)(IconCopyOutline16, {}),
|
|
4151
4201
|
disabled: menu.disabled
|
|
4152
4202
|
},
|
|
4153
4203
|
...menu.showRemove ? [{
|
|
4154
4204
|
id: "remove",
|
|
4155
4205
|
label: t("worktree.archive"),
|
|
4156
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4206
|
+
icon: (0, react_jsx_runtime.jsx)(IconArchiveOutline20, { size: 16 }),
|
|
4157
4207
|
danger: true,
|
|
4158
4208
|
disabled: menu.disabled || menu.onRemove === void 0
|
|
4159
4209
|
}] : [],
|
|
@@ -4170,20 +4220,20 @@ window.__ModuleLoader__.load({
|
|
|
4170
4220
|
...menu.showUnarchive ? [{
|
|
4171
4221
|
id: "unarchive",
|
|
4172
4222
|
label: menu.unarchiveDisabledReason ? `${t("worktree.unarchive")} (${menu.unarchiveDisabledReason})` : t("worktree.unarchive"),
|
|
4173
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4223
|
+
icon: (0, react_jsx_runtime.jsx)(IconRefreshOutline16, {}),
|
|
4174
4224
|
disabled: menu.disabled || menu.unarchiveDisabled || menu.onUnarchive === void 0
|
|
4175
4225
|
}] : [],
|
|
4176
4226
|
...menu.showCleanDisk ? [{
|
|
4177
4227
|
id: "clean-disk",
|
|
4178
4228
|
label: menu.cleanDiskDisabledReason ? `${t("worktree.cleanDisk")} (${menu.cleanDiskDisabledReason})` : t("worktree.cleanDisk"),
|
|
4179
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4229
|
+
icon: (0, react_jsx_runtime.jsx)(IconTrashOutline16, {}),
|
|
4180
4230
|
danger: true,
|
|
4181
4231
|
disabled: menu.disabled || menu.cleanDiskDisabled || menu.onCleanDisk === void 0
|
|
4182
4232
|
}] : [],
|
|
4183
4233
|
...menu.showForget ? [{
|
|
4184
4234
|
id: "forget",
|
|
4185
4235
|
label: menu.forgetDisabledReason ? `${t("worktree.forget")} (${menu.forgetDisabledReason})` : t("worktree.forget"),
|
|
4186
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4236
|
+
icon: (0, react_jsx_runtime.jsx)(IconTrashOutline16, {}),
|
|
4187
4237
|
danger: true,
|
|
4188
4238
|
disabled: menu.disabled || menu.forgetDisabled || menu.onForget === void 0
|
|
4189
4239
|
}] : []
|
|
@@ -4211,7 +4261,7 @@ window.__ModuleLoader__.load({
|
|
|
4211
4261
|
event.stopPropagation();
|
|
4212
4262
|
menu.onOpenChange(!menu.open);
|
|
4213
4263
|
},
|
|
4214
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
4264
|
+
children: (0, react_jsx_runtime.jsx)(IconEllipsisOutline16, {})
|
|
4215
4265
|
})
|
|
4216
4266
|
})
|
|
4217
4267
|
}),
|
|
@@ -4225,7 +4275,7 @@ window.__ModuleLoader__.load({
|
|
|
4225
4275
|
event.stopPropagation();
|
|
4226
4276
|
onCreateSession();
|
|
4227
4277
|
},
|
|
4228
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
4278
|
+
children: (0, react_jsx_runtime.jsx)(IconPlusOutline16, {})
|
|
4229
4279
|
})
|
|
4230
4280
|
]
|
|
4231
4281
|
})
|
|
@@ -4268,25 +4318,25 @@ window.__ModuleLoader__.load({
|
|
|
4268
4318
|
{
|
|
4269
4319
|
id: "rename",
|
|
4270
4320
|
label: t("session.rename"),
|
|
4271
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4321
|
+
icon: (0, react_jsx_runtime.jsx)(IconEditOutline16, {}),
|
|
4272
4322
|
disabled: onRename === void 0 || actionPending
|
|
4273
4323
|
},
|
|
4274
4324
|
{
|
|
4275
4325
|
id: "fork",
|
|
4276
4326
|
label: t("session.fork"),
|
|
4277
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4327
|
+
icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
4278
4328
|
disabled: onFork === void 0 || actionPending
|
|
4279
4329
|
},
|
|
4280
4330
|
{
|
|
4281
4331
|
id: "archive",
|
|
4282
4332
|
label: t("session.archive"),
|
|
4283
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4333
|
+
icon: (0, react_jsx_runtime.jsx)(IconArchiveOutline20, { size: 16 }),
|
|
4284
4334
|
disabled: onArchive === void 0 || actionPending
|
|
4285
4335
|
},
|
|
4286
4336
|
{
|
|
4287
4337
|
id: "copy-session-id",
|
|
4288
4338
|
label: t("session.copyId"),
|
|
4289
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4339
|
+
icon: (0, react_jsx_runtime.jsx)(IconCopyOutline16, {})
|
|
4290
4340
|
}
|
|
4291
4341
|
];
|
|
4292
4342
|
const statusLabel = presentation === void 0 ? void 0 : sessionStatusLabel$1(t, presentation.status);
|
|
@@ -4371,7 +4421,7 @@ window.__ModuleLoader__.load({
|
|
|
4371
4421
|
event.stopPropagation();
|
|
4372
4422
|
setMenuOpen((current) => !current);
|
|
4373
4423
|
},
|
|
4374
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
4424
|
+
children: (0, react_jsx_runtime.jsx)(IconEllipsisOutline16, {})
|
|
4375
4425
|
})
|
|
4376
4426
|
})
|
|
4377
4427
|
})]
|
|
@@ -4475,7 +4525,7 @@ window.__ModuleLoader__.load({
|
|
|
4475
4525
|
worktreeId: record.worktreeId,
|
|
4476
4526
|
expanded: worktreeExpanded,
|
|
4477
4527
|
groupActivityStatus: aggregateSessionStatus(worktreeSessionIds, sessionPresentations),
|
|
4478
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4528
|
+
icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
4479
4529
|
workspaceTitle: workspace.title,
|
|
4480
4530
|
state,
|
|
4481
4531
|
stateLabel,
|
|
@@ -4639,7 +4689,7 @@ window.__ModuleLoader__.load({
|
|
|
4639
4689
|
worktreeId: record.worktreeId,
|
|
4640
4690
|
expanded: worktreeExpanded,
|
|
4641
4691
|
groupActivityStatus: aggregateSessionStatus(worktreeSessionIds, sessionPresentations),
|
|
4642
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4692
|
+
icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
4643
4693
|
workspaceTitle: workspace.title,
|
|
4644
4694
|
state,
|
|
4645
4695
|
stateLabel,
|
|
@@ -4785,7 +4835,7 @@ window.__ModuleLoader__.load({
|
|
|
4785
4835
|
label: `${t("worktree.archivedGroup")} (${archivedWorktrees.length})`,
|
|
4786
4836
|
expanded: isArchivedExpanded,
|
|
4787
4837
|
groupActivityStatus: aggregateSessionStatus(filterArchivedSessionIds(archivedWorktrees.flatMap((record) => bindingIdsFor(bindings, record.worktreeId).filter((sessionId) => sessions.ids.includes(sessionId))), archivedSessionIds), sessionPresentations),
|
|
4788
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4838
|
+
icon: (0, react_jsx_runtime.jsx)(IconArchiveOutline20, { size: 16 }),
|
|
4789
4839
|
workspaceTitle: workspace.title,
|
|
4790
4840
|
onToggle: () => {
|
|
4791
4841
|
toggleArchivedWorkspace(workspace.workspaceId);
|
|
@@ -4921,7 +4971,7 @@ window.__ModuleLoader__.load({
|
|
|
4921
4971
|
label: mainLabel,
|
|
4922
4972
|
expanded: mainExpanded,
|
|
4923
4973
|
groupActivityStatus: aggregateSessionStatus(mainSessionIds, sessionPresentations),
|
|
4924
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
4974
|
+
icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
4925
4975
|
workspaceTitle: workspace.title,
|
|
4926
4976
|
onToggle: () => {
|
|
4927
4977
|
toggleMain(workspace.workspaceId);
|
|
@@ -4988,7 +5038,7 @@ window.__ModuleLoader__.load({
|
|
|
4988
5038
|
},
|
|
4989
5039
|
onCommitDrag: commitSessionDrag,
|
|
4990
5040
|
onOpen: (sessionId) => {
|
|
4991
|
-
openWorktreeSession({ open: openSession }, sessionId);
|
|
5041
|
+
openWorktreeSession$1({ open: openSession }, sessionId);
|
|
4992
5042
|
},
|
|
4993
5043
|
onRename: renameSession === void 0 ? void 0 : openSessionRename,
|
|
4994
5044
|
onFork: forkSession,
|
|
@@ -5334,7 +5384,7 @@ window.__ModuleLoader__.load({
|
|
|
5334
5384
|
setSearchExpanded(true);
|
|
5335
5385
|
searchInput.current?.focus();
|
|
5336
5386
|
},
|
|
5337
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
5387
|
+
children: (0, react_jsx_runtime.jsx)(IconSearchOutline16, { size: searchExpanded ? 12 : 14 })
|
|
5338
5388
|
})
|
|
5339
5389
|
}),
|
|
5340
5390
|
(0, react_jsx_runtime.jsx)("input", {
|
|
@@ -5364,7 +5414,7 @@ window.__ModuleLoader__.load({
|
|
|
5364
5414
|
setSearchQuery("");
|
|
5365
5415
|
setSearchExpanded(false);
|
|
5366
5416
|
},
|
|
5367
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
5417
|
+
children: (0, react_jsx_runtime.jsx)(IconCloseFill14, {})
|
|
5368
5418
|
})
|
|
5369
5419
|
]
|
|
5370
5420
|
})
|
|
@@ -5400,7 +5450,7 @@ window.__ModuleLoader__.load({
|
|
|
5400
5450
|
onClick: () => {
|
|
5401
5451
|
if (createWorkspace !== void 0) runMutation(createWorkspace);
|
|
5402
5452
|
},
|
|
5403
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
5453
|
+
children: (0, react_jsx_runtime.jsx)(IconProjectAddOutline16, {})
|
|
5404
5454
|
})
|
|
5405
5455
|
}),
|
|
5406
5456
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
@@ -5414,7 +5464,7 @@ window.__ModuleLoader__.load({
|
|
|
5414
5464
|
onClick: () => {
|
|
5415
5465
|
actions.setViewMode("workspace-session");
|
|
5416
5466
|
},
|
|
5417
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
5467
|
+
children: (0, react_jsx_runtime.jsx)(IconCloseOutline16, {})
|
|
5418
5468
|
})
|
|
5419
5469
|
})
|
|
5420
5470
|
]
|
|
@@ -6144,6 +6194,40 @@ window.__ModuleLoader__.load({
|
|
|
6144
6194
|
};
|
|
6145
6195
|
}
|
|
6146
6196
|
//#endregion
|
|
6197
|
+
//#region lib/contract/windows-path.js
|
|
6198
|
+
/**
|
|
6199
|
+
* Browser-safe Windows path identity helpers. They intentionally do not touch
|
|
6200
|
+
* the filesystem; Provider adds physical stat/realpath checks where it has
|
|
6201
|
+
* access to Node APIs.
|
|
6202
|
+
*/
|
|
6203
|
+
const EXTENDED_PATH_PREFIX = "//?/";
|
|
6204
|
+
const EXTENDED_UNC_PREFIX = "//?/UNC/";
|
|
6205
|
+
function isWindowsPath(value) {
|
|
6206
|
+
return /^[A-Za-z]:[\\/]/u.test(value) || value.startsWith("\\\\") || /^\/\/\?(?:\/|\\)/u.test(value);
|
|
6207
|
+
}
|
|
6208
|
+
/** Strip only the extended drive/UNC prefixes supported by the browser boundary. */
|
|
6209
|
+
function stripExtendedWindowsPrefix(value) {
|
|
6210
|
+
const normalized = value.replaceAll("\\", "/");
|
|
6211
|
+
const normalizedUncPrefix = EXTENDED_UNC_PREFIX.toLowerCase();
|
|
6212
|
+
if (normalized.toLowerCase().startsWith(normalizedUncPrefix)) return "//" + normalized.slice(8);
|
|
6213
|
+
if (normalized.startsWith(EXTENDED_PATH_PREFIX)) {
|
|
6214
|
+
const drivePath = normalized.slice(4);
|
|
6215
|
+
if (/^[A-Za-z]:\//u.test(drivePath)) return drivePath;
|
|
6216
|
+
}
|
|
6217
|
+
return value;
|
|
6218
|
+
}
|
|
6219
|
+
function normalizeWindowsPath(value) {
|
|
6220
|
+
let normalized = stripExtendedWindowsPrefix(value).replaceAll("\\", "/");
|
|
6221
|
+
const unc = normalized.startsWith("//");
|
|
6222
|
+
normalized = normalized.replace(/\/{2,}/gu, "/");
|
|
6223
|
+
if (unc && normalized.startsWith("/")) normalized = "/" + normalized;
|
|
6224
|
+
if (normalized.length > 3) normalized = normalized.replace(/\/+$/u, "");
|
|
6225
|
+
return normalized.toLowerCase();
|
|
6226
|
+
}
|
|
6227
|
+
function sameWindowsPath(left, right) {
|
|
6228
|
+
return (isWindowsPath(left) || isWindowsPath(right)) && normalizeWindowsPath(left) === normalizeWindowsPath(right);
|
|
6229
|
+
}
|
|
6230
|
+
//#endregion
|
|
6147
6231
|
//#region lib/client/session/worktree-session.js
|
|
6148
6232
|
var WorktreeSessionActionError = class extends Error {
|
|
6149
6233
|
code;
|
|
@@ -6205,6 +6289,13 @@ window.__ModuleLoader__.load({
|
|
|
6205
6289
|
cwd: input.cwd
|
|
6206
6290
|
}, result);
|
|
6207
6291
|
}
|
|
6292
|
+
/**
|
|
6293
|
+
* Compare paths for browser-side candidate filtering and the no-Host safety fallback.
|
|
6294
|
+
* When Host validation is available, it remains authoritative for physical aliases.
|
|
6295
|
+
*/
|
|
6296
|
+
function sameWorktreePath(left, right) {
|
|
6297
|
+
return left === right || sameWindowsPath(left, right);
|
|
6298
|
+
}
|
|
6208
6299
|
function resolveWorktreeSessionAction(input) {
|
|
6209
6300
|
if (input.target.status !== "active" || input.target.health === "repair" || input.target.health === "recovery-needed") return {
|
|
6210
6301
|
kind: "reject",
|
|
@@ -6222,7 +6313,7 @@ window.__ModuleLoader__.load({
|
|
|
6222
6313
|
reason: "active-binding-session-missing",
|
|
6223
6314
|
sessionId: targetBinding.sessionId
|
|
6224
6315
|
};
|
|
6225
|
-
if (summary.cwd
|
|
6316
|
+
if (summary.cwd === void 0 || !input.hostValidatesPhysicalPath && !sameWorktreePath(summary.cwd, input.target.absolutePath)) return {
|
|
6226
6317
|
kind: "repair",
|
|
6227
6318
|
reason: "active-binding-cwd-mismatch",
|
|
6228
6319
|
sessionId: targetBinding.sessionId
|
|
@@ -6241,7 +6332,7 @@ window.__ModuleLoader__.load({
|
|
|
6241
6332
|
}
|
|
6242
6333
|
for (const sessionId of input.sessions.ids) {
|
|
6243
6334
|
const summary = input.sessions.byId[sessionId];
|
|
6244
|
-
if (summary?.blank !== true || summary.cwd
|
|
6335
|
+
if (summary?.blank !== true || summary.cwd === void 0 || !sameWorktreePath(summary.cwd, input.target.absolutePath) || input.archivedSessionIds.includes(sessionId)) continue;
|
|
6245
6336
|
if (!input.bindings.some((binding) => binding.sessionId === sessionId)) return {
|
|
6246
6337
|
kind: "bind-existing",
|
|
6247
6338
|
sessionId
|
|
@@ -6293,12 +6384,13 @@ window.__ModuleLoader__.load({
|
|
|
6293
6384
|
const [worktrees, bindings] = await Promise.all([options.manager.listWorktrees({ workspaceId: input.workspaceId }), options.manager.listBindings({ workspaceId: input.workspaceId })]);
|
|
6294
6385
|
if (disposed) throw new WorktreeSessionActionError("CLIENT_DISPOSED", "", false);
|
|
6295
6386
|
const target = worktrees.find((record) => record.worktreeId === input.worktreeId);
|
|
6296
|
-
if (target === void 0 || target.absolutePath
|
|
6387
|
+
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
6388
|
const action = resolveWorktreeSessionAction({
|
|
6298
6389
|
target,
|
|
6299
6390
|
sessions: options.sessions.getSnapshot(),
|
|
6300
6391
|
archivedSessionIds: options.archivedSessionIds(),
|
|
6301
|
-
bindings
|
|
6392
|
+
bindings,
|
|
6393
|
+
hostValidatesPhysicalPath: options.permission !== void 0
|
|
6302
6394
|
});
|
|
6303
6395
|
if (action.kind === "open-bound") {
|
|
6304
6396
|
await ensureWorktreeSessionPermission({
|
|
@@ -6474,7 +6566,7 @@ window.__ModuleLoader__.load({
|
|
|
6474
6566
|
};
|
|
6475
6567
|
const openWorkspaceSession = (workspaceId, sessionId) => {
|
|
6476
6568
|
ensureSessionWorkspace?.(workspaceId, sessionId);
|
|
6477
|
-
openWorktreeSession({ open: openSession }, sessionId);
|
|
6569
|
+
openWorktreeSession$1({ open: openSession }, sessionId);
|
|
6478
6570
|
};
|
|
6479
6571
|
return {
|
|
6480
6572
|
pendingSessionBinding,
|
|
@@ -7214,7 +7306,7 @@ window.__ModuleLoader__.load({
|
|
|
7214
7306
|
const workspaces = useWorkspaces((state) => state);
|
|
7215
7307
|
const forkRecoveryStore = forkRecovery ?? EMPTY_FORK_RECOVERY_STORE;
|
|
7216
7308
|
const forkRecoverySnapshot = (0, react.useSyncExternalStore)(forkRecoveryStore.subscribe, forkRecoveryStore.getSnapshot, forkRecoveryStore.getSnapshot);
|
|
7217
|
-
const currentSessionId = sessions
|
|
7309
|
+
const currentSessionId = currentSessionIdFromList(sessions);
|
|
7218
7310
|
const workspaceIds = useStableWorkspaceIds(workspaces.items);
|
|
7219
7311
|
const workspaceIdsRef = (0, react.useRef)(workspaceIds);
|
|
7220
7312
|
workspaceIdsRef.current = workspaceIds;
|
|
@@ -7467,20 +7559,17 @@ window.__ModuleLoader__.load({
|
|
|
7467
7559
|
//#region lib/client/dashboard/vscode-url.js
|
|
7468
7560
|
/** Encode path segments while retaining Windows drive and directory separators. */
|
|
7469
7561
|
function vscodeFolderUrl(absolutePath) {
|
|
7470
|
-
const
|
|
7471
|
-
const
|
|
7562
|
+
const normalizedPath = stripExtendedWindowsPrefix(absolutePath);
|
|
7563
|
+
const windowsPath = /^[a-z]:[\\/]/i.test(normalizedPath) || normalizedPath.startsWith("\\\\") || normalizedPath.startsWith("//");
|
|
7564
|
+
const encoded = (windowsPath ? normalizedPath.replaceAll("\\", "/") : normalizedPath).split("/").map(encodeURIComponent).join("/");
|
|
7472
7565
|
const withDrive = windowsPath ? encoded.replace(/^([a-z])%3A/i, "$1:") : encoded;
|
|
7473
|
-
return
|
|
7566
|
+
return "vscode://file" + (withDrive.startsWith("/") ? "" : "/") + withDrive;
|
|
7474
7567
|
}
|
|
7475
7568
|
//#endregion
|
|
7476
7569
|
//#region lib/client/dashboard/open-in-app-controller.js
|
|
7477
7570
|
const OPEN_IN_APP_APPS_ROUTE = "/open-in-app/apps";
|
|
7571
|
+
const OPEN_IN_APP_ICON_ROUTE = "/open-in-app/icon/";
|
|
7478
7572
|
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
7573
|
var OpenInAppController = class {
|
|
7485
7574
|
fetcher;
|
|
7486
7575
|
_apps = null;
|
|
@@ -7489,9 +7578,6 @@ window.__ModuleLoader__.load({
|
|
|
7489
7578
|
_listeners = /* @__PURE__ */ new Set();
|
|
7490
7579
|
constructor(fetcher = (input, init) => fetch(input, init)) {
|
|
7491
7580
|
this.fetcher = fetcher;
|
|
7492
|
-
try {
|
|
7493
|
-
if (typeof localStorage !== "undefined") this._choice = localStorage.getItem(STORAGE_KEY) ?? "";
|
|
7494
|
-
} catch {}
|
|
7495
7581
|
}
|
|
7496
7582
|
get apps() {
|
|
7497
7583
|
return this._apps;
|
|
@@ -7515,20 +7601,17 @@ window.__ModuleLoader__.load({
|
|
|
7515
7601
|
choose(appId) {
|
|
7516
7602
|
if (this._choice === appId) return;
|
|
7517
7603
|
this._choice = appId;
|
|
7518
|
-
try {
|
|
7519
|
-
if (typeof localStorage !== "undefined") localStorage.setItem(STORAGE_KEY, appId);
|
|
7520
|
-
} catch {}
|
|
7521
7604
|
this.notify();
|
|
7522
7605
|
}
|
|
7523
7606
|
iconUrl(appId) {
|
|
7524
|
-
return
|
|
7607
|
+
return `${OPEN_IN_APP_ICON_ROUTE}${encodeURIComponent(appId)}`;
|
|
7525
7608
|
}
|
|
7526
7609
|
async launch(appId, path) {
|
|
7527
7610
|
const body = {
|
|
7528
7611
|
app: appId,
|
|
7529
7612
|
path
|
|
7530
7613
|
};
|
|
7531
|
-
const response = await this.fetcher(
|
|
7614
|
+
const response = await this.fetcher(OPEN_IN_APP_OPEN_ROUTE, {
|
|
7532
7615
|
method: "POST",
|
|
7533
7616
|
headers: { "content-type": "application/json" },
|
|
7534
7617
|
body: JSON.stringify(body)
|
|
@@ -7538,7 +7621,7 @@ window.__ModuleLoader__.load({
|
|
|
7538
7621
|
async run() {
|
|
7539
7622
|
let apps = [];
|
|
7540
7623
|
try {
|
|
7541
|
-
const response = await this.fetcher(
|
|
7624
|
+
const response = await this.fetcher(OPEN_IN_APP_APPS_ROUTE, { headers: { accept: "application/json" } });
|
|
7542
7625
|
if (response.ok) {
|
|
7543
7626
|
const payload = await response.json();
|
|
7544
7627
|
if (Array.isArray(payload.apps)) apps = payload.apps.filter((id) => typeof id === "string");
|
|
@@ -7550,7 +7633,7 @@ window.__ModuleLoader__.load({
|
|
|
7550
7633
|
};
|
|
7551
7634
|
const defaultOpenInAppController = new OpenInAppController();
|
|
7552
7635
|
//#endregion
|
|
7553
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
7636
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_12c44ccd600c/packages/clutch-dsh-worktree/src/client/dashboard/open-in-app.css.mjs
|
|
7554
7637
|
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
7638
|
const styleId$2 = "@cerbur/clutch-dsh-worktree/open-in-app.css";
|
|
7556
7639
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/open-in-app.css\"]") === null) {
|
|
@@ -7745,7 +7828,7 @@ window.__ModuleLoader__.load({
|
|
|
7745
7828
|
onClick: () => {
|
|
7746
7829
|
setOpen((prev) => !prev);
|
|
7747
7830
|
},
|
|
7748
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
7831
|
+
children: (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, { size: 12 })
|
|
7749
7832
|
})]
|
|
7750
7833
|
})
|
|
7751
7834
|
})
|
|
@@ -7905,7 +7988,7 @@ window.__ModuleLoader__.load({
|
|
|
7905
7988
|
};
|
|
7906
7989
|
}
|
|
7907
7990
|
//#endregion
|
|
7908
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
7991
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_12c44ccd600c/packages/clutch-dsh-worktree/src/client/dashboard/dashboard.css.mjs
|
|
7909
7992
|
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
7993
|
const styleId$1 = "@cerbur/clutch-dsh-worktree/dashboard.css";
|
|
7911
7994
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard.css\"]") === null) {
|
|
@@ -8074,19 +8157,25 @@ window.__ModuleLoader__.load({
|
|
|
8074
8157
|
const baseline = normalizeBranch$1(value);
|
|
8075
8158
|
return baseline === void 0 || baseline === currentBranch ? void 0 : baseline;
|
|
8076
8159
|
}
|
|
8077
|
-
/**
|
|
8160
|
+
/**
|
|
8161
|
+
* Sum the known text-file additions/deletions. Binary files have no line
|
|
8162
|
+
* counts, so they are ignored when a target also contains readable files;
|
|
8163
|
+
* binary-only targets remain explicitly unknown.
|
|
8164
|
+
*/
|
|
8078
8165
|
function sumLineTotals(files) {
|
|
8079
8166
|
let additions = 0;
|
|
8080
8167
|
let deletions = 0;
|
|
8168
|
+
let knownFiles = 0;
|
|
8081
8169
|
for (const file of files) {
|
|
8082
|
-
if (file.additions === void 0 || file.deletions === void 0)
|
|
8170
|
+
if (file.additions === void 0 || file.deletions === void 0) continue;
|
|
8083
8171
|
additions += file.additions;
|
|
8084
8172
|
deletions += file.deletions;
|
|
8173
|
+
knownFiles += 1;
|
|
8085
8174
|
}
|
|
8086
|
-
return {
|
|
8175
|
+
return files.length === 0 || knownFiles > 0 ? {
|
|
8087
8176
|
additions,
|
|
8088
8177
|
deletions
|
|
8089
|
-
};
|
|
8178
|
+
} : void 0;
|
|
8090
8179
|
}
|
|
8091
8180
|
//#endregion
|
|
8092
8181
|
//#region lib/client/dashboard/git/git-file-tree.js
|
|
@@ -8190,7 +8279,7 @@ window.__ModuleLoader__.load({
|
|
|
8190
8279
|
});
|
|
8191
8280
|
}
|
|
8192
8281
|
//#endregion
|
|
8193
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/
|
|
8282
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_12c44ccd600c/packages/clutch-dsh-worktree/src/client/dashboard/git/worktree-git.css.mjs
|
|
8194
8283
|
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
8284
|
const styleId = "@cerbur/clutch-dsh-worktree/worktree-git.css";
|
|
8196
8285
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-git.css\"]") === null) {
|
|
@@ -8352,7 +8441,7 @@ window.__ModuleLoader__.load({
|
|
|
8352
8441
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
8353
8442
|
className: worktree_git_css_default.gitFolderIcon,
|
|
8354
8443
|
"aria-hidden": "true",
|
|
8355
|
-
children: collapsed ? (0, react_jsx_runtime.jsx)(
|
|
8444
|
+
children: collapsed ? (0, react_jsx_runtime.jsx)(IconFolderClose16, {}) : (0, react_jsx_runtime.jsx)(IconFolderOpen16, {})
|
|
8356
8445
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
8357
8446
|
className: worktree_git_css_default.gitFolderName,
|
|
8358
8447
|
title: node.path,
|
|
@@ -8732,7 +8821,7 @@ window.__ModuleLoader__.load({
|
|
|
8732
8821
|
onClick: () => onOpenFile(diff.path),
|
|
8733
8822
|
title: t("dashboard.git.openInSidebar"),
|
|
8734
8823
|
"data-dashboard-git-open-file": diff.path,
|
|
8735
|
-
children: [(0, react_jsx_runtime.jsx)(
|
|
8824
|
+
children: [(0, react_jsx_runtime.jsx)(IconRightUpOutline16, {
|
|
8736
8825
|
size: 14,
|
|
8737
8826
|
className: worktree_git_css_default.gitDiffOpenIcon
|
|
8738
8827
|
}), (0, react_jsx_runtime.jsx)("span", { children: t("dashboard.git.openInSidebar") })]
|
|
@@ -8963,6 +9052,7 @@ window.__ModuleLoader__.load({
|
|
|
8963
9052
|
return typeof value === "string" && WORKTREE_GIT_COMMIT_PATTERN.test(value);
|
|
8964
9053
|
}
|
|
8965
9054
|
Object.freeze([
|
|
9055
|
+
"getWorktreeInstructions",
|
|
8966
9056
|
"updateWorktreeInstructions",
|
|
8967
9057
|
"updateWorktreeBaseBranch",
|
|
8968
9058
|
"listWorktrees",
|
|
@@ -9068,12 +9158,12 @@ window.__ModuleLoader__.load({
|
|
|
9068
9158
|
const normalized = branch?.trim();
|
|
9069
9159
|
return normalized === void 0 || normalized.length === 0 ? void 0 : normalized;
|
|
9070
9160
|
}
|
|
9071
|
-
function emptyState(defaultBaselineBranch) {
|
|
9161
|
+
function emptyState(defaultBaselineBranch, main) {
|
|
9072
9162
|
return {
|
|
9073
9163
|
branches: { status: "idle" },
|
|
9074
9164
|
baselineBranch: normalizeBranch(defaultBaselineBranch),
|
|
9075
9165
|
history: { status: "idle" },
|
|
9076
|
-
view: "summary",
|
|
9166
|
+
view: main ? "commits" : "summary",
|
|
9077
9167
|
includeWorkingTree: false,
|
|
9078
9168
|
selectedCommits: [],
|
|
9079
9169
|
commitMultiSelect: false,
|
|
@@ -9088,8 +9178,8 @@ window.__ModuleLoader__.load({
|
|
|
9088
9178
|
function createWorktreeGitStateController(input) {
|
|
9089
9179
|
const main = isMainWorktreeId(input.worktreeId);
|
|
9090
9180
|
const capturedBaseline = input.capturedBaseline === true;
|
|
9091
|
-
const canRead = (baselineBranch) =>
|
|
9092
|
-
let state = emptyState(input.defaultBaselineBranch);
|
|
9181
|
+
const canRead = (baselineBranch) => main || capturedBaseline || baselineBranch !== void 0;
|
|
9182
|
+
let state = emptyState(input.defaultBaselineBranch, main);
|
|
9093
9183
|
let disposed = false;
|
|
9094
9184
|
let branchesLoaded = false;
|
|
9095
9185
|
let branchesRequest = 0;
|
|
@@ -9232,11 +9322,11 @@ window.__ModuleLoader__.load({
|
|
|
9232
9322
|
});
|
|
9233
9323
|
try {
|
|
9234
9324
|
const value = await requestDiff(baselineBranch, state.history, target, diffPath);
|
|
9325
|
+
if (!isCurrentRequest(request, diffRequest, baselineBranch, target, selectedPath)) return;
|
|
9235
9326
|
if (!isLiveTarget(target)) {
|
|
9236
9327
|
diffCache.set(key, value);
|
|
9237
9328
|
trimCache(diffCache, 24);
|
|
9238
9329
|
}
|
|
9239
|
-
if (!isCurrentRequest(request, diffRequest, baselineBranch, target, selectedPath)) return;
|
|
9240
9330
|
update({
|
|
9241
9331
|
...state,
|
|
9242
9332
|
diff: {
|
|
@@ -9295,11 +9385,11 @@ window.__ModuleLoader__.load({
|
|
|
9295
9385
|
});
|
|
9296
9386
|
try {
|
|
9297
9387
|
const value = await requestFiles(baselineBranch, state.history, target);
|
|
9388
|
+
if (!isCurrentRequest(request, filesRequest, baselineBranch, target)) return;
|
|
9298
9389
|
if (!isLiveTarget(target)) {
|
|
9299
9390
|
filesCache.set(key, value);
|
|
9300
9391
|
trimCache(filesCache, 8);
|
|
9301
9392
|
}
|
|
9302
|
-
if (!isCurrentRequest(request, filesRequest, baselineBranch, target)) return;
|
|
9303
9393
|
applyFiles(target, value);
|
|
9304
9394
|
} catch (error) {
|
|
9305
9395
|
if (!isCurrentRequest(request, filesRequest, baselineBranch, target)) return;
|
|
@@ -9335,7 +9425,7 @@ window.__ModuleLoader__.load({
|
|
|
9335
9425
|
});
|
|
9336
9426
|
};
|
|
9337
9427
|
const selectBaselineBranch = (branch) => {
|
|
9338
|
-
if (disposed) return;
|
|
9428
|
+
if (disposed || main) return;
|
|
9339
9429
|
const nextBranch = normalizeBranch(branch);
|
|
9340
9430
|
if (state.baselineBranch === nextBranch) return;
|
|
9341
9431
|
++historyRequest;
|
|
@@ -9361,7 +9451,7 @@ window.__ModuleLoader__.load({
|
|
|
9361
9451
|
if (nextBranch !== void 0 || capturedBaseline) loadHistory();
|
|
9362
9452
|
};
|
|
9363
9453
|
const selectSummary = () => {
|
|
9364
|
-
if (disposed || !canRead(state.baselineBranch)) return;
|
|
9454
|
+
if (disposed || main || !canRead(state.baselineBranch)) return;
|
|
9365
9455
|
const target = {
|
|
9366
9456
|
kind: "selection",
|
|
9367
9457
|
selection: summarySelection(state.includeWorkingTree)
|
|
@@ -9374,7 +9464,7 @@ window.__ModuleLoader__.load({
|
|
|
9374
9464
|
loadFiles(target);
|
|
9375
9465
|
};
|
|
9376
9466
|
const setIncludeWorkingTree = (includeWorkingTree) => {
|
|
9377
|
-
if (disposed || state.includeWorkingTree === includeWorkingTree) return;
|
|
9467
|
+
if (disposed || main || state.includeWorkingTree === includeWorkingTree) return;
|
|
9378
9468
|
if (state.view !== "summary" || !canRead(state.baselineBranch)) {
|
|
9379
9469
|
update({
|
|
9380
9470
|
...state,
|
|
@@ -9923,13 +10013,17 @@ window.__ModuleLoader__.load({
|
|
|
9923
10013
|
})
|
|
9924
10014
|
}) })] })
|
|
9925
10015
|
] })]
|
|
10016
|
+
}),
|
|
10017
|
+
isMain && historyValue !== void 0 && (0, react_jsx_runtime.jsxs)("dl", {
|
|
10018
|
+
className: worktree_git_css_default.gitBaselineFacts,
|
|
10019
|
+
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
10020
|
})
|
|
9927
10021
|
]
|
|
9928
10022
|
}), (0, react_jsx_runtime.jsx)("button", {
|
|
9929
10023
|
type: "button",
|
|
9930
10024
|
className: worktree_git_css_default.gitRefresh,
|
|
9931
10025
|
"data-dashboard-git-refresh": true,
|
|
9932
|
-
disabled:
|
|
10026
|
+
disabled: refreshing || state.history.status === "loading",
|
|
9933
10027
|
"aria-busy": refreshing || state.history.status === "loading",
|
|
9934
10028
|
onClick: () => void state.refresh(),
|
|
9935
10029
|
children: refreshing ? t("dashboard.git.refreshing") : t("dashboard.git.refresh")
|
|
@@ -9944,10 +10038,6 @@ window.__ModuleLoader__.load({
|
|
|
9944
10038
|
children: t("dashboard.git.retry")
|
|
9945
10039
|
})]
|
|
9946
10040
|
}),
|
|
9947
|
-
isMain && (0, react_jsx_runtime.jsx)(UnavailableNotice, {
|
|
9948
|
-
reason: "main",
|
|
9949
|
-
t
|
|
9950
|
-
}),
|
|
9951
10041
|
!isMain && unavailable === "baseline-unselected" && (0, react_jsx_runtime.jsxs)("div", {
|
|
9952
10042
|
className: worktree_git_css_default.gitBaselinePrompt,
|
|
9953
10043
|
"data-dashboard-git-baseline-prompt": true,
|
|
@@ -10018,7 +10108,7 @@ window.__ModuleLoader__.load({
|
|
|
10018
10108
|
})]
|
|
10019
10109
|
})]
|
|
10020
10110
|
}),
|
|
10021
|
-
(0, react_jsx_runtime.jsxs)("button", {
|
|
10111
|
+
!isMain && (0, react_jsx_runtime.jsxs)("button", {
|
|
10022
10112
|
type: "button",
|
|
10023
10113
|
className: worktree_git_css_default.gitSummaryButton,
|
|
10024
10114
|
"data-dashboard-git-summary": true,
|
|
@@ -10026,7 +10116,7 @@ window.__ModuleLoader__.load({
|
|
|
10026
10116
|
onClick: state.selectSummary,
|
|
10027
10117
|
children: [(0, react_jsx_runtime.jsx)("span", { children: t("dashboard.git.baselineSummary") }), (0, react_jsx_runtime.jsx)("small", { children: t("dashboard.git.baselineSummaryDescription") })]
|
|
10028
10118
|
}),
|
|
10029
|
-
state.view === "summary" && (0, react_jsx_runtime.jsxs)("label", {
|
|
10119
|
+
!isMain && state.view === "summary" && (0, react_jsx_runtime.jsxs)("label", {
|
|
10030
10120
|
className: worktree_git_css_default.gitSummaryToggle,
|
|
10031
10121
|
"data-dashboard-git-include-working-tree": true,
|
|
10032
10122
|
children: [(0, react_jsx_runtime.jsx)("input", {
|
|
@@ -10458,7 +10548,7 @@ window.__ModuleLoader__.load({
|
|
|
10458
10548
|
"aria-expanded": draft !== void 0,
|
|
10459
10549
|
disabled: disabled || options.length === 0,
|
|
10460
10550
|
onClick: openEditor,
|
|
10461
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
10551
|
+
children: (0, react_jsx_runtime.jsx)(IconEditOutline16, {})
|
|
10462
10552
|
})
|
|
10463
10553
|
}) : void 0,
|
|
10464
10554
|
children: saved === void 0 ? (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -10493,7 +10583,7 @@ window.__ModuleLoader__.load({
|
|
|
10493
10583
|
"data-dashboard-baseline-modal": true,
|
|
10494
10584
|
children: [
|
|
10495
10585
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
10496
|
-
icon: (0, react_jsx_runtime.jsx)(
|
|
10586
|
+
icon: (0, react_jsx_runtime.jsx)(IconSearchOutline16, {}),
|
|
10497
10587
|
className: dashboard_css_default.dashboardBaselineSearch,
|
|
10498
10588
|
"aria-label": t("dashboard.searchBranches"),
|
|
10499
10589
|
role: "combobox",
|
|
@@ -10530,12 +10620,12 @@ window.__ModuleLoader__.load({
|
|
|
10530
10620
|
"aria-selected": branch.name === draft,
|
|
10531
10621
|
onClick: () => selectOption(index),
|
|
10532
10622
|
children: [
|
|
10533
|
-
(0, react_jsx_runtime.jsx)(
|
|
10623
|
+
(0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
10534
10624
|
(0, react_jsx_runtime.jsx)("span", {
|
|
10535
10625
|
className: dashboard_css_default.dashboardBaselineOptionLabel,
|
|
10536
10626
|
children: branch.name
|
|
10537
10627
|
}),
|
|
10538
|
-
branch.name === draft && (0, react_jsx_runtime.jsx)(
|
|
10628
|
+
branch.name === draft && (0, react_jsx_runtime.jsx)(IconCheckOutline16, {})
|
|
10539
10629
|
]
|
|
10540
10630
|
}, branch.name))
|
|
10541
10631
|
}) : (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -10560,7 +10650,7 @@ window.__ModuleLoader__.load({
|
|
|
10560
10650
|
})
|
|
10561
10651
|
})] });
|
|
10562
10652
|
}
|
|
10563
|
-
/** A Worktree or browser Main projection with explicit unavailable states
|
|
10653
|
+
/** A managed Worktree or browser Main projection with explicit unavailable states for inapplicable facts. */
|
|
10564
10654
|
function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, branches = [] }) {
|
|
10565
10655
|
const surface = (0, react.useRef)(null);
|
|
10566
10656
|
const heading = (0, react.useRef)(null);
|
|
@@ -10693,7 +10783,7 @@ window.__ModuleLoader__.load({
|
|
|
10693
10783
|
return (0, react_jsx_runtime.jsx)("li", { children: (0, react_jsx_runtime.jsxs)("button", {
|
|
10694
10784
|
type: "button",
|
|
10695
10785
|
"data-dashboard-session": sessionId,
|
|
10696
|
-
"aria-current": sessions
|
|
10786
|
+
"aria-current": currentSessionIdFromList(sessions) === sessionId ? "page" : void 0,
|
|
10697
10787
|
onClick: () => onOpenSession(sessionId),
|
|
10698
10788
|
children: [
|
|
10699
10789
|
(0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "sessions" }),
|
|
@@ -10778,7 +10868,7 @@ window.__ModuleLoader__.load({
|
|
|
10778
10868
|
onOpenSidebar();
|
|
10779
10869
|
setRightSidebarOpen(true);
|
|
10780
10870
|
},
|
|
10781
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
10871
|
+
children: (0, react_jsx_runtime.jsx)(IconPanelLeftOutline16, {})
|
|
10782
10872
|
})
|
|
10783
10873
|
})]
|
|
10784
10874
|
})]
|
|
@@ -10804,7 +10894,7 @@ window.__ModuleLoader__.load({
|
|
|
10804
10894
|
}
|
|
10805
10895
|
} : void 0,
|
|
10806
10896
|
children: [
|
|
10807
|
-
(0, react_jsx_runtime.jsx)(
|
|
10897
|
+
(0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
10808
10898
|
(0, react_jsx_runtime.jsx)("h1", {
|
|
10809
10899
|
id: `${id}-title`,
|
|
10810
10900
|
ref: heading,
|
|
@@ -10842,7 +10932,7 @@ window.__ModuleLoader__.load({
|
|
|
10842
10932
|
onClick: () => {
|
|
10843
10933
|
copyPath();
|
|
10844
10934
|
},
|
|
10845
|
-
children: (0, react_jsx_runtime.jsx)(
|
|
10935
|
+
children: (0, react_jsx_runtime.jsx)(IconCopyOutline16, {})
|
|
10846
10936
|
})
|
|
10847
10937
|
]
|
|
10848
10938
|
}),
|
|
@@ -10930,7 +11020,7 @@ window.__ModuleLoader__.load({
|
|
|
10930
11020
|
(0, react_jsx_runtime.jsxs)("section", {
|
|
10931
11021
|
className: dashboard_css_default.dashboardStart,
|
|
10932
11022
|
children: [
|
|
10933
|
-
(0, react_jsx_runtime.jsxs)("h2", { children: [(0, react_jsx_runtime.jsx)(
|
|
11023
|
+
(0, react_jsx_runtime.jsxs)("h2", { children: [(0, react_jsx_runtime.jsx)(IconBranchOutline16, {}), t("dashboard.start")] }),
|
|
10934
11024
|
(0, react_jsx_runtime.jsx)("p", { children: t("dashboard.startDescription") }),
|
|
10935
11025
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
10936
11026
|
className: dashboard_css_default.dashboardStartActions,
|
|
@@ -11219,7 +11309,7 @@ window.__ModuleLoader__.load({
|
|
|
11219
11309
|
const targetWorkspace = dashboard === void 0 ? void 0 : source.workspaces.items.find((workspace) => workspace.workspaceId === dashboard.workspaceId);
|
|
11220
11310
|
const targetView = dashboard === void 0 ? void 0 : read.viewByWorkspace.get(dashboard.workspaceId);
|
|
11221
11311
|
const dashboardMainBranch = targetView?.branches.find((branch) => branch.isCurrent)?.name;
|
|
11222
|
-
const dashboardMainRecord = targetWorkspace === void 0 ? void 0 : createMainWorktreeRecord(targetWorkspace, dashboardMainBranch);
|
|
11312
|
+
const dashboardMainRecord = targetWorkspace === void 0 ? void 0 : createMainWorktreeRecord(targetWorkspace, dashboardMainBranch, targetView?.mainInstructions);
|
|
11223
11313
|
const dashboardRecord = resolveDashboardRecord(dashboard, source.mode, source.currentSessionId, source.workspaceIds, dashboard === void 0 ? void 0 : targetView?.worktrees, dashboardMainRecord);
|
|
11224
11314
|
(0, react.useEffect)(() => {
|
|
11225
11315
|
if (dashboard !== void 0 && dashboardRecord === void 0) setDashboard(void 0);
|
|
@@ -11419,7 +11509,7 @@ window.__ModuleLoader__.load({
|
|
|
11419
11509
|
}), dashboardRecord !== void 0 && (0, react_jsx_runtime.jsx)(WorktreeDashboard, {
|
|
11420
11510
|
manager: props.manager,
|
|
11421
11511
|
record: dashboardRecord,
|
|
11422
|
-
onSaveInstructions: props.manager
|
|
11512
|
+
onSaveInstructions: props.manager ? async (instructions, expectedInstructions) => {
|
|
11423
11513
|
try {
|
|
11424
11514
|
return await props.manager.updateWorktreeInstructions({
|
|
11425
11515
|
workspaceId: dashboardRecord.workspaceId,
|
|
@@ -11554,7 +11644,7 @@ window.__ModuleLoader__.load({
|
|
|
11554
11644
|
function identityFrom(sessions, workspaces) {
|
|
11555
11645
|
const sessionSnapshot = sessions.getSnapshot();
|
|
11556
11646
|
const workspaceSnapshot = workspaces.getSnapshot();
|
|
11557
|
-
const sessionId = sessionSnapshot
|
|
11647
|
+
const sessionId = currentSessionIdFromList(sessionSnapshot);
|
|
11558
11648
|
if (sessionId === void 0) return { workspaceId: deriveRecentWorkspaceId({ items: workspaceSnapshot.items }, sessionSnapshot.byId) };
|
|
11559
11649
|
return {
|
|
11560
11650
|
sessionId,
|
|
@@ -11889,6 +11979,37 @@ window.__ModuleLoader__.load({
|
|
|
11889
11979
|
};
|
|
11890
11980
|
}
|
|
11891
11981
|
//#endregion
|
|
11982
|
+
//#region lib/client/session/session-rename.js
|
|
11983
|
+
/** Rename a listed Session across DSH generations with different retention semantics. */
|
|
11984
|
+
async function renameWorktreeSession(sessions, sessionId, title) {
|
|
11985
|
+
const compatibleSessions = sessions;
|
|
11986
|
+
if (typeof compatibleSessions.using === "function") {
|
|
11987
|
+
const result = await compatibleSessions.using(sessionId, { source: "workspaceOperation" }, (reference) => reference.binding.session.rename(title));
|
|
11988
|
+
if (!result.ok) throw new Error(result.error.message);
|
|
11989
|
+
return;
|
|
11990
|
+
}
|
|
11991
|
+
const session = compatibleSessions.binding(sessionId)?.session;
|
|
11992
|
+
if (session === void 0) throw new Error(`unknown session "${sessionId}"`);
|
|
11993
|
+
const result = await session.rename(title);
|
|
11994
|
+
if (!result.ok) throw new Error(result.error.message);
|
|
11995
|
+
}
|
|
11996
|
+
//#endregion
|
|
11997
|
+
//#region lib/client/session/session-navigation.js
|
|
11998
|
+
/** Use DSH-owned navigation in 1.7; keep the older Session-controller fallback. */
|
|
11999
|
+
function openWorktreeSession(uiWorkspace, sessions, sessionId) {
|
|
12000
|
+
const compatibleUiWorkspace = uiWorkspace;
|
|
12001
|
+
if (typeof compatibleUiWorkspace.openSession === "function") {
|
|
12002
|
+
compatibleUiWorkspace.openSession(sessionId);
|
|
12003
|
+
return;
|
|
12004
|
+
}
|
|
12005
|
+
const legacyOpen = sessions.open;
|
|
12006
|
+
if (typeof legacyOpen === "function") {
|
|
12007
|
+
legacyOpen(sessionId);
|
|
12008
|
+
return;
|
|
12009
|
+
}
|
|
12010
|
+
throw new Error("DSH Client does not expose a Session navigation method");
|
|
12011
|
+
}
|
|
12012
|
+
//#endregion
|
|
11892
12013
|
//#region lib/client/permission/worktree-permission.js
|
|
11893
12014
|
/**
|
|
11894
12015
|
* Coordinate async permission requests with the one in-page confirmation
|
|
@@ -12474,9 +12595,7 @@ window.__ModuleLoader__.load({
|
|
|
12474
12595
|
permission: permissionManager,
|
|
12475
12596
|
confirmFullAccess: permissionManager === void 0 ? void 0 : fullAccessConfirmation.request,
|
|
12476
12597
|
onPermissionResult: reportPermissionNotice,
|
|
12477
|
-
openSession: (sessionId) =>
|
|
12478
|
-
ctx.sessions.open(sessionId);
|
|
12479
|
-
}
|
|
12598
|
+
openSession: (sessionId) => openWorktreeSession(ctx.uiWorkspace, ctx.sessions, sessionId)
|
|
12480
12599
|
});
|
|
12481
12600
|
ctx.effect(() => () => worktreeSessionConnector.dispose(), "clutch-dsh-worktree: Worktree Session connector cleanup");
|
|
12482
12601
|
const openDashboardForSession = (sessionId) => {
|
|
@@ -12594,19 +12713,14 @@ window.__ModuleLoader__.load({
|
|
|
12594
12713
|
worktreeId,
|
|
12595
12714
|
beforeWorktreeId
|
|
12596
12715
|
}),
|
|
12597
|
-
renameSession:
|
|
12598
|
-
const session = ctx.sessions.binding(sessionId)?.session;
|
|
12599
|
-
if (session === void 0) throw new Error(`unknown session "${sessionId}"`);
|
|
12600
|
-
const result = await session.rename(title);
|
|
12601
|
-
if (!result.ok) throw new Error(result.error.message);
|
|
12602
|
-
},
|
|
12716
|
+
renameSession: (sessionId, title) => renameWorktreeSession(ctx.sessions, sessionId, title),
|
|
12603
12717
|
forkSession: (sessionId) => {
|
|
12604
12718
|
if (forkableSessions.fork === void 0) return;
|
|
12605
12719
|
ctx.sessions.fork({
|
|
12606
12720
|
sessionId,
|
|
12607
12721
|
increaseTitle: true
|
|
12608
12722
|
}).then((childId) => {
|
|
12609
|
-
ctx.sessions
|
|
12723
|
+
openWorktreeSession(ctx.uiWorkspace, ctx.sessions, childId);
|
|
12610
12724
|
}).catch(() => {});
|
|
12611
12725
|
},
|
|
12612
12726
|
archiveSession: (sessionId) => ctx.workspaces.archiveSession(sessionId),
|
|
@@ -12616,9 +12730,7 @@ window.__ModuleLoader__.load({
|
|
|
12616
12730
|
retryForkSession: forkCoordinator === void 0 ? void 0 : async (key) => {
|
|
12617
12731
|
await forkCoordinator.retry(key);
|
|
12618
12732
|
},
|
|
12619
|
-
openSession: (sessionId) =>
|
|
12620
|
-
ctx.sessions.open(sessionId);
|
|
12621
|
-
},
|
|
12733
|
+
openSession: (sessionId) => openWorktreeSession(ctx.uiWorkspace, ctx.sessions, sessionId),
|
|
12622
12734
|
onWorktreeForgotten: (input) => {
|
|
12623
12735
|
forkCoordinator?.forgetWorktree(input);
|
|
12624
12736
|
for (const sessionId of input.sessionIds) virtualWorkspaceMembership.removeSession(sessionId);
|