@cerbur/clutch-dsh-worktree 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/README.md +164 -241
  2. package/README.zh.md +141 -238
  3. package/assets/screenshots/screenshots-dashboard.webp +0 -0
  4. package/assets/screenshots/screenshots-en.png +0 -0
  5. package/assets/screenshots/screenshots-import.png +0 -0
  6. package/assets/screenshots/screenshots-zh.png +0 -0
  7. package/lib/client/WorktreeSurface.d.ts +1 -1
  8. package/lib/client/WorktreeSurface.d.ts.map +1 -1
  9. package/lib/client/WorktreeSurface.js +145 -9
  10. package/lib/client/WorktreeSurface.js.map +1 -1
  11. package/lib/client/dashboard/DashboardHeaderAction.d.ts +20 -0
  12. package/lib/client/dashboard/DashboardHeaderAction.d.ts.map +1 -0
  13. package/lib/client/dashboard/DashboardHeaderAction.js +19 -0
  14. package/lib/client/dashboard/DashboardHeaderAction.js.map +1 -0
  15. package/lib/client/dashboard/OpenInAppButton.d.ts +9 -0
  16. package/lib/client/dashboard/OpenInAppButton.d.ts.map +1 -0
  17. package/lib/client/dashboard/OpenInAppButton.js +123 -0
  18. package/lib/client/dashboard/OpenInAppButton.js.map +1 -0
  19. package/lib/client/dashboard/WorktreeDashboard.d.ts +21 -0
  20. package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -0
  21. package/lib/client/dashboard/WorktreeDashboard.js +211 -0
  22. package/lib/client/dashboard/WorktreeDashboard.js.map +1 -0
  23. package/lib/client/dashboard/WorktreeInstructions.d.ts +8 -0
  24. package/lib/client/dashboard/WorktreeInstructions.d.ts.map +1 -0
  25. package/lib/client/dashboard/WorktreeInstructions.js +53 -0
  26. package/lib/client/dashboard/WorktreeInstructions.js.map +1 -0
  27. package/lib/client/dashboard/dashboard-icon.d.ts +7 -0
  28. package/lib/client/dashboard/dashboard-icon.d.ts.map +1 -0
  29. package/lib/client/dashboard/dashboard-icon.js +6 -0
  30. package/lib/client/dashboard/dashboard-icon.js.map +1 -0
  31. package/lib/client/dashboard/dashboard-overlay.d.ts +11 -0
  32. package/lib/client/dashboard/dashboard-overlay.d.ts.map +1 -0
  33. package/lib/client/dashboard/dashboard-overlay.js +120 -0
  34. package/lib/client/dashboard/dashboard-overlay.js.map +1 -0
  35. package/lib/client/dashboard/dashboard-selection.d.ts +32 -0
  36. package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -0
  37. package/lib/client/dashboard/dashboard-selection.js +31 -0
  38. package/lib/client/dashboard/dashboard-selection.js.map +1 -0
  39. package/lib/client/dashboard/dashboard-sessions.d.ts +6 -0
  40. package/lib/client/dashboard/dashboard-sessions.d.ts.map +1 -0
  41. package/lib/client/dashboard/dashboard-sessions.js +21 -0
  42. package/lib/client/dashboard/dashboard-sessions.js.map +1 -0
  43. package/lib/client/dashboard/open-in-app-controller.d.ts +30 -0
  44. package/lib/client/dashboard/open-in-app-controller.d.ts.map +1 -0
  45. package/lib/client/dashboard/open-in-app-controller.js +94 -0
  46. package/lib/client/dashboard/open-in-app-controller.js.map +1 -0
  47. package/lib/client/dashboard/vscode-url.d.ts +3 -0
  48. package/lib/client/dashboard/vscode-url.d.ts.map +1 -0
  49. package/lib/client/dashboard/vscode-url.js +9 -0
  50. package/lib/client/dashboard/vscode-url.js.map +1 -0
  51. package/lib/client/dashboard/worktree-acquisition-facts.d.ts +16 -0
  52. package/lib/client/dashboard/worktree-acquisition-facts.d.ts.map +1 -0
  53. package/lib/client/dashboard/worktree-acquisition-facts.js +14 -0
  54. package/lib/client/dashboard/worktree-acquisition-facts.js.map +1 -0
  55. package/lib/client/dsh-slot-contract.d.ts +5 -0
  56. package/lib/client/dsh-slot-contract.d.ts.map +1 -1
  57. package/lib/client/entry.d.ts.map +1 -1
  58. package/lib/client/entry.js +65 -0
  59. package/lib/client/entry.js.map +1 -1
  60. package/lib/client/locales.d.ts +138 -0
  61. package/lib/client/locales.d.ts.map +1 -1
  62. package/lib/client/locales.js +138 -0
  63. package/lib/client/locales.js.map +1 -1
  64. package/lib/client/session/session-labels.d.ts +9 -0
  65. package/lib/client/session/session-labels.d.ts.map +1 -0
  66. package/lib/client/session/session-labels.js +44 -0
  67. package/lib/client/session/session-labels.js.map +1 -0
  68. package/lib/client/surface/components/ActiveWorktree.d.ts +1 -1
  69. package/lib/client/surface/components/ActiveWorktree.d.ts.map +1 -1
  70. package/lib/client/surface/components/ActiveWorktree.js +2 -1
  71. package/lib/client/surface/components/ActiveWorktree.js.map +1 -1
  72. package/lib/client/surface/components/ArchivedWorktree.d.ts +1 -1
  73. package/lib/client/surface/components/ArchivedWorktree.d.ts.map +1 -1
  74. package/lib/client/surface/components/ArchivedWorktree.js +2 -1
  75. package/lib/client/surface/components/ArchivedWorktree.js.map +1 -1
  76. package/lib/client/surface/components/ArchivedWorktrees.d.ts +1 -1
  77. package/lib/client/surface/components/ArchivedWorktrees.d.ts.map +1 -1
  78. package/lib/client/surface/components/SurfaceContent.d.ts +1 -1
  79. package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -1
  80. package/lib/client/surface/components/SurfaceContent.js.map +1 -1
  81. package/lib/client/surface/components/WorkspaceTree.d.ts +1 -1
  82. package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -1
  83. package/lib/client/surface/components/WorkspaceTree.js +5 -1
  84. package/lib/client/surface/components/WorkspaceTree.js.map +1 -1
  85. package/lib/client/surface/components/rows.d.ts +1 -1
  86. package/lib/client/surface/components/rows.d.ts.map +1 -1
  87. package/lib/client/surface/components/rows.js +102 -4
  88. package/lib/client/surface/components/rows.js.map +1 -1
  89. package/lib/client/surface/types.d.ts +8 -0
  90. package/lib/client/surface/types.d.ts.map +1 -1
  91. package/lib/client/view/WorktreeModeAction.d.ts.map +1 -1
  92. package/lib/client/view/WorktreeModeAction.js +8 -0
  93. package/lib/client/view/WorktreeModeAction.js.map +1 -1
  94. package/lib/client/view/view-mode-dispatch.d.ts +7 -0
  95. package/lib/client/view/view-mode-dispatch.d.ts.map +1 -0
  96. package/lib/client/view/view-mode-dispatch.js +11 -0
  97. package/lib/client/view/view-mode-dispatch.js.map +1 -0
  98. package/lib/client/worktree-connection.d.ts +1 -0
  99. package/lib/client/worktree-connection.d.ts.map +1 -1
  100. package/lib/client/worktree-connection.js +4 -0
  101. package/lib/client/worktree-connection.js.map +1 -1
  102. package/lib/client.js +1582 -22
  103. package/lib/client.js.map +1 -1
  104. package/lib/contract/index.contract.js +2 -0
  105. package/lib/contract/index.contract.js.map +1 -1
  106. package/lib/contract/index.d.ts +19 -1
  107. package/lib/contract/index.d.ts.map +1 -1
  108. package/lib/contract/index.js +1 -0
  109. package/lib/contract/index.js.map +1 -1
  110. package/lib/host/dsh-read-adapter.d.ts +3 -1
  111. package/lib/host/dsh-read-adapter.d.ts.map +1 -1
  112. package/lib/host/dsh-read-adapter.js +5 -2
  113. package/lib/host/dsh-read-adapter.js.map +1 -1
  114. package/lib/host/remote.d.ts.map +1 -1
  115. package/lib/host/remote.js +1 -0
  116. package/lib/host/remote.js.map +1 -1
  117. package/lib/host/service.d.ts +6 -0
  118. package/lib/host/service.d.ts.map +1 -1
  119. package/lib/host/service.js +8 -0
  120. package/lib/host/service.js.map +1 -1
  121. package/lib/host/worktree-instructions.d.ts +41 -0
  122. package/lib/host/worktree-instructions.d.ts.map +1 -0
  123. package/lib/host/worktree-instructions.js +65 -0
  124. package/lib/host/worktree-instructions.js.map +1 -0
  125. package/lib/manage/manager-worktrees.d.ts.map +1 -1
  126. package/lib/manage/manager-worktrees.js +3 -0
  127. package/lib/manage/manager-worktrees.js.map +1 -1
  128. package/lib/manage/manager.d.ts +7 -0
  129. package/lib/manage/manager.d.ts.map +1 -1
  130. package/lib/manage/manager.js +47 -0
  131. package/lib/manage/manager.js.map +1 -1
  132. package/lib/manage/types.d.ts +1 -0
  133. package/lib/manage/types.d.ts.map +1 -1
  134. package/lib/provider/sidecar/repository.d.ts.map +1 -1
  135. package/lib/provider/sidecar/repository.js +5 -1
  136. package/lib/provider/sidecar/repository.js.map +1 -1
  137. package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -1
  138. package/lib/provider/sidecar/sidecar-schema.js +13 -6
  139. package/lib/provider/sidecar/sidecar-schema.js.map +1 -1
  140. package/lib/provider/transaction/operations/import.d.ts.map +1 -1
  141. package/lib/provider/transaction/operations/import.js +1 -0
  142. package/lib/provider/transaction/operations/import.js.map +1 -1
  143. package/lib/provider/transaction/recovery/recover.d.ts.map +1 -1
  144. package/lib/provider/transaction/recovery/recover.js +2 -0
  145. package/lib/provider/transaction/recovery/recover.js.map +1 -1
  146. package/lib/provider/transaction/support/journal.d.ts.map +1 -1
  147. package/lib/provider/transaction/support/journal.js +2 -0
  148. package/lib/provider/transaction/support/journal.js.map +1 -1
  149. package/lib/typert.host.js +87 -32
  150. package/lib/typert.remote-client.d.ts +2 -0
  151. package/lib/typert.remote-client.d.ts.map +1 -1
  152. package/lib/typert.remote-client.js +87 -32
  153. package/package.json +21 -20
package/lib/client.js CHANGED
@@ -4,9 +4,9 @@ window.__ModuleLoader__.load({
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
+ let react = require("react");
7
8
  let react_jsx_runtime = require("react/jsx-runtime");
8
9
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
9
- let react = require("react");
10
10
  //#region ../../node_modules/.pnpm/zustand@4.4.7_@types+react@18.3.31_immer@10.2.0_react@18.3.1/node_modules/zustand/esm/vanilla.mjs
11
11
  const createStoreImpl = (createState) => {
12
12
  let state;
@@ -756,6 +756,75 @@ window.__ModuleLoader__.load({
756
756
  //#region lib/client/locales.js
757
757
  const WORKTREE_NS = "worktree";
758
758
  const zh = {
759
+ "dashboard.title": "Dashboard",
760
+ "dashboard.preview": "Dashboard 预览",
761
+ "dashboard.open": "打开 Dashboard",
762
+ "dashboard.copyBranch": "复制分支名称",
763
+ "dashboard.branchCopied": "已复制分支名称",
764
+ "dashboard.branchCopyFailed": "复制分支名称失败,请重试。",
765
+ "dashboard.tab.overview": "概览",
766
+ "dashboard.tab.git": "Git 与变更",
767
+ "dashboard.tab.sessions": "会话",
768
+ "dashboard.tab.children": "派生 Worktree",
769
+ "dashboard.tab.settings": "设置",
770
+ "dashboard.back": "返回会话",
771
+ "dashboard.soon": "即将推出",
772
+ "dashboard.notConnected": "待接入",
773
+ "dashboard.unknown": "未知",
774
+ "dashboard.historicalUnavailable": "历史 Worktree 无法获取",
775
+ "dashboard.detached": "分离 HEAD",
776
+ "dashboard.cleaned": "已清理",
777
+ "dashboard.archived": "已归档",
778
+ "dashboard.copied": "已复制完整路径",
779
+ "dashboard.copyFailed": "复制失败,请重试或手动选择上方路径。",
780
+ "dashboard.openEditor": "在 VS Code 中打开",
781
+ "dashboard.openIn": "在 {app} 中打开",
782
+ "dashboard.created": "创建时间",
783
+ "dashboard.imported": "登记时间",
784
+ "dashboard.editorMenu": "选择打开应用",
785
+ "dashboard.saveInstructions": "保存",
786
+ "dashboard.savingInstructions": "保存中…",
787
+ "dashboard.cancelInstructions": "取消",
788
+ "dashboard.instructionsSaveFailed": "保存失败,草稿已保留。可重试;若其他窗口已修改指令,请取消并重新打开编辑。",
789
+ "dashboard.base": "基线",
790
+ "dashboard.source": "来源",
791
+ "dashboard.external": "外部导入",
792
+ "dashboard.plugin": "插件创建",
793
+ "dashboard.start": "开始新的工作",
794
+ "dashboard.startDescription": "从这个 Worktree 继续工作",
795
+ "dashboard.newWorktree": "新建 Worktree",
796
+ "dashboard.newSession": "新建会话",
797
+ "dashboard.newWorktreeDescription": "基于当前分支创建独立的工作目录",
798
+ "dashboard.newSessionDescription": "在这个 Worktree 中开始新的会话",
799
+ "dashboard.instructions": "Worktree 指令",
800
+ "dashboard.edit": "编辑",
801
+ "dashboard.instructionsDescription": "为这个 Worktree 设置共享的工作指引。",
802
+ "dashboard.noInstructions": "尚未设置指令",
803
+ "dashboard.instructionsHint": "最多 32,000 字符。保存后在绑定会话的下一次模型请求中以 <system-reminder> 生效;清空并保存可停用。",
804
+ "dashboard.noSessions": "此 Worktree 暂无可显示的会话。",
805
+ "dashboard.viewSessions": "查看全部会话",
806
+ "dashboard.status": "Worktree 状态",
807
+ "dashboard.statusHint": "目录可用性来自现有检查;文件变更状态待接入。",
808
+ "dashboard.health": "可用性",
809
+ "dashboard.branch": "当前分支",
810
+ "dashboard.branchUnavailable": "当前分支无法获取",
811
+ "dashboard.aheadBehind": "领先 / 落后",
812
+ "dashboard.workingTree": "文件变更",
813
+ "dashboard.viewDetails": "查看详情",
814
+ "dashboard.derived": "派生 Worktree",
815
+ "dashboard.childrenHint": "派生关系尚未接入,不代表没有其他 Worktree。",
816
+ "dashboard.viewChildren": "查看派生 Worktree",
817
+ "dashboard.quickActions": "快捷操作",
818
+ "dashboard.action.terminal": "在终端中打开",
819
+ "dashboard.action.diff": "查看 Git Diff",
820
+ "dashboard.action.pullRequest": "创建 Pull Request",
821
+ "dashboard.action.tests": "运行测试",
822
+ "dashboard.action.sync": "同步基线",
823
+ "dashboard.action.archive": "归档 Worktree",
824
+ "dashboard.hint.git": "这里将展示文件变更、diff 与分支同步状态。当前尚未读取这些数据。",
825
+ "dashboard.hint.children": "这里将展示基于此 Worktree 派生的工作目录与关系。",
826
+ "dashboard.hint.settings": "这里将提供 Worktree 指令与偏好设置。当前不会保存任何更改。",
827
+ "dashboard.mvpHint": "MVP · 会话、新建 Worktree、归档和 VS Code 已接入;其余标记为“即将推出”的操作暂不可用。",
759
828
  "mode.open": "打开 Worktree 模式",
760
829
  "mode.exit": "退出 Worktree 模式",
761
830
  "mode.label": "Worktree",
@@ -926,6 +995,75 @@ window.__ModuleLoader__.load({
926
995
  "branch.checkedOut": "(已检出)"
927
996
  };
928
997
  const en = {
998
+ "dashboard.title": "Dashboard",
999
+ "dashboard.preview": "Dashboard preview",
1000
+ "dashboard.open": "Open Dashboard",
1001
+ "dashboard.copyBranch": "Copy branch name",
1002
+ "dashboard.branchCopied": "Branch name copied",
1003
+ "dashboard.branchCopyFailed": "Branch name copy failed. Try again.",
1004
+ "dashboard.tab.overview": "Dashboard",
1005
+ "dashboard.tab.git": "Git & Changes",
1006
+ "dashboard.tab.sessions": "Sessions",
1007
+ "dashboard.tab.children": "Children",
1008
+ "dashboard.tab.settings": "Settings",
1009
+ "dashboard.back": "Back to session",
1010
+ "dashboard.soon": "Coming soon",
1011
+ "dashboard.notConnected": "Not connected",
1012
+ "dashboard.unknown": "Unknown",
1013
+ "dashboard.historicalUnavailable": "Unavailable for historical Worktrees",
1014
+ "dashboard.detached": "Detached HEAD",
1015
+ "dashboard.cleaned": "Cleaned",
1016
+ "dashboard.archived": "Archived",
1017
+ "dashboard.copied": "Full path copied",
1018
+ "dashboard.copyFailed": "Copy failed. Try again or select the path above.",
1019
+ "dashboard.openEditor": "Open in VS Code",
1020
+ "dashboard.openIn": "Open in {app}",
1021
+ "dashboard.created": "Created",
1022
+ "dashboard.imported": "Imported",
1023
+ "dashboard.editorMenu": "Choose application",
1024
+ "dashboard.saveInstructions": "Save",
1025
+ "dashboard.savingInstructions": "Saving…",
1026
+ "dashboard.cancelInstructions": "Cancel",
1027
+ "dashboard.instructionsSaveFailed": "Save failed; your draft is retained. Retry, or cancel and reopen if another window changed the instructions.",
1028
+ "dashboard.base": "Base",
1029
+ "dashboard.source": "Source",
1030
+ "dashboard.external": "Imported",
1031
+ "dashboard.plugin": "Plugin-created",
1032
+ "dashboard.start": "Start a new work",
1033
+ "dashboard.startDescription": "Choose how to continue from this worktree",
1034
+ "dashboard.newWorktree": "New Worktree",
1035
+ "dashboard.newSession": "New Session",
1036
+ "dashboard.newWorktreeDescription": "Create an isolated worktree from this branch",
1037
+ "dashboard.newSessionDescription": "Start another session in this worktree",
1038
+ "dashboard.instructions": "Worktree Instructions",
1039
+ "dashboard.edit": "Edit",
1040
+ "dashboard.instructionsDescription": "A place for shared guidance for this worktree.",
1041
+ "dashboard.noInstructions": "No instructions yet",
1042
+ "dashboard.instructionsHint": "Up to 32,000 characters. Saved instructions enter bound Sessions’ next model request as <system-reminder>. Clear and save to disable.",
1043
+ "dashboard.noSessions": "No visible sessions in this worktree.",
1044
+ "dashboard.viewSessions": "View all sessions",
1045
+ "dashboard.status": "Worktree Status",
1046
+ "dashboard.statusHint": "Availability comes from existing checks; file change status is not connected yet.",
1047
+ "dashboard.health": "Availability",
1048
+ "dashboard.branch": "Current branch",
1049
+ "dashboard.branchUnavailable": "Current branch unavailable",
1050
+ "dashboard.aheadBehind": "Ahead / Behind",
1051
+ "dashboard.workingTree": "Working tree",
1052
+ "dashboard.viewDetails": "View details",
1053
+ "dashboard.derived": "Derived Worktrees",
1054
+ "dashboard.childrenHint": "Parent and child relationships are not connected yet.",
1055
+ "dashboard.viewChildren": "View all children",
1056
+ "dashboard.quickActions": "Quick Actions",
1057
+ "dashboard.action.terminal": "Open in Terminal",
1058
+ "dashboard.action.diff": "View Git Diff",
1059
+ "dashboard.action.pullRequest": "Create Pull Request",
1060
+ "dashboard.action.tests": "Run Tests",
1061
+ "dashboard.action.sync": "Sync with Base",
1062
+ "dashboard.action.archive": "Archive Worktree",
1063
+ "dashboard.hint.git": "File changes, diffs, and branch sync status will appear here. These data are not connected yet.",
1064
+ "dashboard.hint.children": "Derived worktrees and their relationships will appear here.",
1065
+ "dashboard.hint.settings": "Worktree instructions and preferences will appear here. No changes are saved yet.",
1066
+ "dashboard.mvpHint": "MVP · Sessions, Worktree creation, archive, and VS Code are connected. Other actions marked Coming soon are unavailable.",
929
1067
  "mode.open": "Open Worktree mode",
930
1068
  "mode.exit": "Exit Worktree mode",
931
1069
  "mode.label": "Worktree",
@@ -1116,6 +1254,7 @@ window.__ModuleLoader__.load({
1116
1254
  recoverWorktrees: "worktreeManager/recoverWorktrees",
1117
1255
  forgetWorktree: "worktreeManager/forgetWorktree",
1118
1256
  insertWorktreeBefore: "worktreeManager/insertWorktreeBefore",
1257
+ updateWorktreeInstructions: "worktreeManager/updateWorktreeInstructions",
1119
1258
  listBindings: "worktreeManager/listBindings",
1120
1259
  bindSession: "worktreeManager/bindSession",
1121
1260
  ensureWorktreePermission: "worktreeManager/ensureWorktreePermission",
@@ -1244,6 +1383,9 @@ window.__ModuleLoader__.load({
1244
1383
  async insertWorktreeBefore(input) {
1245
1384
  return invoke("insertWorktreeBefore", input);
1246
1385
  },
1386
+ async updateWorktreeInstructions(input) {
1387
+ return invoke("updateWorktreeInstructions", input);
1388
+ },
1247
1389
  listBindings: (input) => invoke("listBindings", input),
1248
1390
  bindSession: (input) => invoke("bindSession", input),
1249
1391
  ensureWorktreePermission: (input) => invoke("ensureWorktreePermission", input),
@@ -1257,14 +1399,14 @@ window.__ModuleLoader__.load({
1257
1399
  };
1258
1400
  }
1259
1401
  //#endregion
1260
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_9e9961ee-4627-469d-b6e1-48db3ba09242/packages/clutch-dsh-worktree/src/client/context/worktree-context.css.mjs
1261
- const css$1 = ".-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: 1;\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";
1262
- const styleId$1 = "@cerbur/clutch-dsh-worktree/worktree-context.css";
1402
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_7a9c1e4b8f02/packages/clutch-dsh-worktree/src/client/context/worktree-context.css.mjs
1403
+ const css$4 = ".-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: 1;\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";
1404
+ const styleId$4 = "@cerbur/clutch-dsh-worktree/worktree-context.css";
1263
1405
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-context.css\"]") === null) {
1264
1406
  const tag = document.createElement("style");
1265
1407
  tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
1266
- tag.dataset.pluginCss = styleId$1;
1267
- tag.textContent = css$1;
1408
+ tag.dataset.pluginCss = styleId$4;
1409
+ tag.textContent = css$4;
1268
1410
  document.head.appendChild(tag);
1269
1411
  }
1270
1412
  var worktree_context_css_default = {
@@ -1313,14 +1455,23 @@ window.__ModuleLoader__.load({
1313
1455
  });
1314
1456
  }
1315
1457
  //#endregion
1316
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_9e9961ee-4627-469d-b6e1-48db3ba09242/packages/clutch-dsh-worktree/src/client/worktree.css.mjs
1317
- const css = ".-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-worktreeState {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 12px;\n margin-right: 0;\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.-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 flex: 0 0 64px;\n align-items: center;\n justify-content: flex-end;\n width: 64px;\n height: 28px;\n margin-left: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction {\n position: absolute;\n top: 0;\n right: 32px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n position: absolute;\n top: 0;\n right: 0;\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-menuAction {\n display: inline-flex;\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-worktreeRow:hover .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-menuAction {\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.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-worktreeIcon,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-disclosureButton {\n width: 22px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow {\n position: relative;\n display: flex;\n align-items: center;\n width: calc(100% - 22px);\n margin-left: 22px;\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";
1318
- const styleId = "@cerbur/clutch-dsh-worktree/worktree.css";
1458
+ //#region lib/client/view/view-mode-dispatch.js
1459
+ let globalSetViewMode;
1460
+ function registerViewModeSetter(setter) {
1461
+ globalSetViewMode = setter;
1462
+ }
1463
+ function switchViewMode(mode) {
1464
+ globalSetViewMode?.(mode);
1465
+ }
1466
+ //#endregion
1467
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_7a9c1e4b8f02/packages/clutch-dsh-worktree/src/client/worktree.css.mjs
1468
+ const css$3 = ".-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-worktreeState {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 12px;\n margin-right: 0;\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 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";
1469
+ const styleId$3 = "@cerbur/clutch-dsh-worktree/worktree.css";
1319
1470
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree.css\"]") === null) {
1320
1471
  const tag = document.createElement("style");
1321
1472
  tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
1322
- tag.dataset.pluginCss = styleId;
1323
- tag.textContent = css;
1473
+ tag.dataset.pluginCss = styleId$3;
1474
+ tag.textContent = css$3;
1324
1475
  document.head.appendChild(tag);
1325
1476
  }
1326
1477
  var worktree_css_default = {
@@ -1388,6 +1539,7 @@ window.__ModuleLoader__.load({
1388
1539
  "treeActionSlot": "-cerbur-clutch-dsh-worktree-treeActionSlot",
1389
1540
  "workspaceActions": "-cerbur-clutch-dsh-worktree-workspaceActions",
1390
1541
  "menuAction": "-cerbur-clutch-dsh-worktree-menuAction",
1542
+ "dashboardAction": "-cerbur-clutch-dsh-worktree-dashboardAction",
1391
1543
  "groupActivity": "-cerbur-clutch-dsh-worktree-groupActivity",
1392
1544
  "dropBefore": "-cerbur-clutch-dsh-worktree-dropBefore",
1393
1545
  "dropAfter": "-cerbur-clutch-dsh-worktree-dropAfter",
@@ -1415,6 +1567,12 @@ window.__ModuleLoader__.load({
1415
1567
  //#region lib/client/view/WorktreeModeAction.js
1416
1568
  /** Footer action that enters/exits the peer Worktree navigation mode. */
1417
1569
  function WorktreeModeAction({ wide, useStore, actions, t, available }) {
1570
+ (0, react.useEffect)(() => {
1571
+ registerViewModeSetter(actions.setViewMode);
1572
+ return () => {
1573
+ registerViewModeSetter(void 0);
1574
+ };
1575
+ }, [actions.setViewMode]);
1418
1576
  if (!available) return null;
1419
1577
  const active = useStore((state) => state.viewMode) === "worktree";
1420
1578
  return (0, react_jsx_runtime.jsxs)("button", {
@@ -1436,6 +1594,88 @@ window.__ModuleLoader__.load({
1436
1594
  });
1437
1595
  }
1438
1596
  //#endregion
1597
+ //#region lib/client/dashboard/dashboard-icon.js
1598
+ /** 4-quadrant layout glyph representing dashboard / overview. */
1599
+ function IconDashboard({ size = 16, className }) {
1600
+ return (0, react_jsx_runtime.jsxs)("svg", {
1601
+ width: size,
1602
+ height: size,
1603
+ viewBox: "0 0 16 16",
1604
+ fill: "none",
1605
+ stroke: "currentColor",
1606
+ strokeWidth: "1.5",
1607
+ className,
1608
+ "aria-hidden": "true",
1609
+ children: [
1610
+ (0, react_jsx_runtime.jsx)("rect", {
1611
+ x: "2",
1612
+ y: "2",
1613
+ width: "5",
1614
+ height: "5",
1615
+ rx: "1"
1616
+ }),
1617
+ (0, react_jsx_runtime.jsx)("rect", {
1618
+ x: "9",
1619
+ y: "2",
1620
+ width: "5",
1621
+ height: "5",
1622
+ rx: "1"
1623
+ }),
1624
+ (0, react_jsx_runtime.jsx)("rect", {
1625
+ x: "2",
1626
+ y: "9",
1627
+ width: "5",
1628
+ height: "5",
1629
+ rx: "1"
1630
+ }),
1631
+ (0, react_jsx_runtime.jsx)("rect", {
1632
+ x: "9",
1633
+ y: "9",
1634
+ width: "5",
1635
+ height: "5",
1636
+ rx: "1"
1637
+ })
1638
+ ]
1639
+ });
1640
+ }
1641
+ //#endregion
1642
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_7a9c1e4b8f02/packages/clutch-dsh-worktree/src/client/dashboard/dashboard-header-action.css.mjs
1643
+ const css$2 = "/* 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";
1644
+ const styleId$2 = "@cerbur/clutch-dsh-worktree/dashboard-header-action.css";
1645
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard-header-action.css\"]") === null) {
1646
+ const tag = document.createElement("style");
1647
+ tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
1648
+ tag.dataset.pluginCss = styleId$2;
1649
+ tag.textContent = css$2;
1650
+ document.head.appendChild(tag);
1651
+ }
1652
+ var dashboard_header_action_css_default = { "headerDashboardButton": "-cerbur-clutch-dsh-worktree-headerDashboardButton" };
1653
+ //#endregion
1654
+ //#region lib/client/dashboard/DashboardHeaderAction.js
1655
+ /**
1656
+ * Render a quick Dashboard action for the current Session's resolved context.
1657
+ * The entry only appears after the shared context read is ready and points at
1658
+ * the same Session that owns the native header.
1659
+ */
1660
+ function DashboardHeaderAction({ sessionId, useWorktreeContext, openDashboard, t }) {
1661
+ const state = useWorktreeContext((snapshot) => snapshot);
1662
+ if (state.status !== "ready" || state.sessionId !== sessionId || state.value.kind === "none") return null;
1663
+ return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
1664
+ label: t("dashboard.open"),
1665
+ side: "bottom",
1666
+ delayMs: 500,
1667
+ children: (0, react_jsx_runtime.jsx)("button", {
1668
+ type: "button",
1669
+ className: dashboard_header_action_css_default.headerDashboardButton,
1670
+ "aria-label": t("dashboard.open"),
1671
+ onClick: () => {
1672
+ openDashboard(String(sessionId));
1673
+ },
1674
+ children: (0, react_jsx_runtime.jsx)(IconDashboard, { size: 16 })
1675
+ })
1676
+ });
1677
+ }
1678
+ //#endregion
1439
1679
  //#region lib/client/context/WorktreeHeroContext.js
1440
1680
  function labelFor(state) {
1441
1681
  if (state.status !== "ready" || state.workspaceTitle === void 0 || state.value.kind === "none") return;
@@ -3258,12 +3498,49 @@ window.__ModuleLoader__.load({
3258
3498
  } });
3259
3499
  }
3260
3500
  //#endregion
3501
+ //#region lib/client/dashboard/dashboard-selection.js
3502
+ function isMainWorktreeId(worktreeId) {
3503
+ return worktreeId === "main" || worktreeId.startsWith("main:");
3504
+ }
3505
+ function isManagedDashboardRecord(record) {
3506
+ return !isMainWorktreeId(record.worktreeId);
3507
+ }
3508
+ function createMainWorktreeRecord(workspace, currentBranch) {
3509
+ return {
3510
+ worktreeId: `main:${workspace.workspaceId}`,
3511
+ workspaceId: workspace.workspaceId,
3512
+ branch: currentBranch ?? "",
3513
+ currentBranch,
3514
+ absolutePath: workspace.path,
3515
+ status: "active"
3516
+ };
3517
+ }
3518
+ function resolveDashboardRecord(selection, mode, currentSessionId, workspaceIds, records, mainRecord) {
3519
+ if (selection === void 0 || mode !== "worktree" || selection.sessionId !== currentSessionId || !workspaceIds.includes(selection.workspaceId)) return void 0;
3520
+ if (mainRecord !== void 0 && (isMainWorktreeId(selection.worktreeId) || selection.worktreeId === mainRecord.worktreeId)) return mainRecord;
3521
+ return records?.find((record) => record.workspaceId === selection.workspaceId && record.worktreeId === selection.worktreeId);
3522
+ }
3523
+ //#endregion
3261
3524
  //#region lib/client/surface/components/rows.js
3262
3525
  function rowHalf(event) {
3263
3526
  const rect = event.currentTarget.getBoundingClientRect();
3264
3527
  return event.clientY < rect.top + rect.height / 2 ? "before" : "after";
3265
3528
  }
3266
- function sessionStatusLabel(t, status) {
3529
+ const WORKTREE_LABEL_SCROLL_START_PAUSE_MS = 800;
3530
+ const WORKTREE_LABEL_SCROLL_FORWARD_MS = 3e3;
3531
+ const WORKTREE_LABEL_SCROLL_RETURN_MS = 3e3;
3532
+ const WORKTREE_LABEL_SCROLL_CYCLE_MS = 7800;
3533
+ function worktreeLabelScrollProgress(elapsedMs) {
3534
+ const elapsed = elapsedMs % WORKTREE_LABEL_SCROLL_CYCLE_MS;
3535
+ const forwardStart = WORKTREE_LABEL_SCROLL_START_PAUSE_MS;
3536
+ const forwardEnd = 3800;
3537
+ const returnStart = 4800;
3538
+ if (elapsed < forwardStart) return 0;
3539
+ if (elapsed < forwardEnd) return (elapsed - forwardStart) / WORKTREE_LABEL_SCROLL_FORWARD_MS;
3540
+ if (elapsed < returnStart) return 1;
3541
+ return 1 - (elapsed - returnStart) / WORKTREE_LABEL_SCROLL_RETURN_MS;
3542
+ }
3543
+ function sessionStatusLabel$1(t, status) {
3267
3544
  switch (status.labelKey) {
3268
3545
  case "running": return t("session.status.running");
3269
3546
  case "subagentsRunning": return t(status.runningSubagentCount === 1 ? "session.status.subagentsRunning.one" : "session.status.subagentsRunning.other", { n: status.runningSubagentCount });
@@ -3274,7 +3551,7 @@ window.__ModuleLoader__.load({
3274
3551
  case "completed": return t("session.status.completed");
3275
3552
  }
3276
3553
  }
3277
- function sessionTimeLabel(t, value) {
3554
+ function sessionTimeLabel$1(t, value) {
3278
3555
  switch (value.unit) {
3279
3556
  case "now": return t("session.time.now");
3280
3557
  case "minutes": return t("session.time.minutes", { n: value.n });
@@ -3286,7 +3563,7 @@ window.__ModuleLoader__.load({
3286
3563
  }
3287
3564
  /** Native Workspace hover-card time copy, including the trailing "ago" marker. */
3288
3565
  function sessionHoverTimeLabel(t, value) {
3289
- const label = sessionTimeLabel(t, value);
3566
+ const label = sessionTimeLabel$1(t, value);
3290
3567
  return value.unit === "now" ? label : t("session.time.ago", { t: label });
3291
3568
  }
3292
3569
  /** Native Workspace hover-card status list, including a secondary subagent status when relevant. */
@@ -3315,7 +3592,7 @@ window.__ModuleLoader__.load({
3315
3592
  }),
3316
3593
  statuses.map((status) => (0, react_jsx_runtime.jsxs)("div", {
3317
3594
  className: worktree_css_default.sessionHoverStatus,
3318
- children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: status.state }), (0, react_jsx_runtime.jsx)("span", { children: sessionStatusLabel(t, status) })]
3595
+ children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: status.state }), (0, react_jsx_runtime.jsx)("span", { children: sessionStatusLabel$1(t, status) })]
3319
3596
  }, `${status.labelKey}-${status.runningSubagentCount}`))
3320
3597
  ]
3321
3598
  });
@@ -3438,8 +3715,60 @@ window.__ModuleLoader__.load({
3438
3715
  });
3439
3716
  }
3440
3717
  /** Shared Main/Worktree group row with parameterized icon, state, and actions. */
3441
- function WorktreeGroupRow({ t, kind, label, worktreeId, expanded, hasOngoingSession, icon, workspaceTitle, state, stateLabel, repairGuidance, onToggle, onCreateSession, menu, drag }) {
3718
+ function WorktreeGroupRow({ t, kind, label, worktreeId, expanded, hasOngoingSession, icon, workspaceTitle, state, stateLabel, repairGuidance, onToggle, onCreateSession, showDashboardAction, menu, drag }) {
3442
3719
  const main = kind === "main";
3720
+ const dashboardActionVisible = showDashboardAction === true && menu?.onDashboard !== void 0;
3721
+ const worktreeLabelRef = (0, react.useRef)(null);
3722
+ const labelScrollFrameRef = (0, react.useRef)(void 0);
3723
+ const worktreeLabelPointerInsideRef = (0, react.useRef)(false);
3724
+ const stopWorktreeLabelScroll = () => {
3725
+ if (labelScrollFrameRef.current !== void 0) {
3726
+ cancelAnimationFrame(labelScrollFrameRef.current);
3727
+ labelScrollFrameRef.current = void 0;
3728
+ }
3729
+ if (worktreeLabelRef.current !== null) worktreeLabelRef.current.scrollLeft = 0;
3730
+ };
3731
+ const startWorktreeLabelScroll = () => {
3732
+ if (labelScrollFrameRef.current !== void 0) return;
3733
+ const labelElement = worktreeLabelRef.current;
3734
+ const prefersReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
3735
+ if (labelElement === null || prefersReducedMotion) return;
3736
+ const startedAt = performance.now();
3737
+ const animate = (timestamp) => {
3738
+ if (worktreeLabelRef.current !== labelElement) {
3739
+ labelScrollFrameRef.current = void 0;
3740
+ return;
3741
+ }
3742
+ const maxScrollLeft = Math.max(0, labelElement.scrollWidth - labelElement.clientWidth);
3743
+ if (maxScrollLeft === 0) {
3744
+ labelElement.scrollLeft = 0;
3745
+ labelScrollFrameRef.current = void 0;
3746
+ return;
3747
+ }
3748
+ labelElement.scrollLeft = maxScrollLeft * worktreeLabelScrollProgress(timestamp - startedAt);
3749
+ labelScrollFrameRef.current = requestAnimationFrame(animate);
3750
+ };
3751
+ labelScrollFrameRef.current = requestAnimationFrame(animate);
3752
+ };
3753
+ const syncWorktreeLabelScroll = () => {
3754
+ if (worktreeLabelPointerInsideRef.current || !expanded && hasOngoingSession) startWorktreeLabelScroll();
3755
+ else stopWorktreeLabelScroll();
3756
+ };
3757
+ (0, react.useEffect)(() => {
3758
+ syncWorktreeLabelScroll();
3759
+ }, [
3760
+ expanded,
3761
+ hasOngoingSession,
3762
+ label
3763
+ ]);
3764
+ (0, react.useEffect)(() => {
3765
+ return () => {
3766
+ if (labelScrollFrameRef.current !== void 0) {
3767
+ cancelAnimationFrame(labelScrollFrameRef.current);
3768
+ labelScrollFrameRef.current = void 0;
3769
+ }
3770
+ };
3771
+ }, []);
3443
3772
  const markerClass = drag?.marker === "before" ? worktree_css_default.dropBefore : drag?.marker === "after" ? worktree_css_default.dropAfter : "";
3444
3773
  const dragProps = drag === void 0 ? {} : {
3445
3774
  draggable: true,
@@ -3470,6 +3799,14 @@ window.__ModuleLoader__.load({
3470
3799
  "data-worktree-drag": drag?.active ? "active" : void 0,
3471
3800
  ...dragProps,
3472
3801
  onClick: onToggle,
3802
+ onMouseEnter: () => {
3803
+ worktreeLabelPointerInsideRef.current = true;
3804
+ syncWorktreeLabelScroll();
3805
+ },
3806
+ onMouseLeave: () => {
3807
+ worktreeLabelPointerInsideRef.current = false;
3808
+ syncWorktreeLabelScroll();
3809
+ },
3473
3810
  children: [
3474
3811
  (0, react_jsx_runtime.jsx)("button", {
3475
3812
  type: "button",
@@ -3495,6 +3832,7 @@ window.__ModuleLoader__.load({
3495
3832
  children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state })
3496
3833
  }),
3497
3834
  (0, react_jsx_runtime.jsx)("span", {
3835
+ ref: worktreeLabelRef,
3498
3836
  className: worktree_css_default.worktreeLabel,
3499
3837
  children: label
3500
3838
  }),
@@ -3509,6 +3847,20 @@ window.__ModuleLoader__.load({
3509
3847
  title: hasOngoingSession && !expanded ? t("session.status.running") : void 0,
3510
3848
  children: hasOngoingSession && !expanded && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "ongoing" })
3511
3849
  }),
3850
+ dashboardActionVisible && (0, react_jsx_runtime.jsx)("span", {
3851
+ className: worktree_css_default.dashboardAction,
3852
+ children: (0, react_jsx_runtime.jsx)("button", {
3853
+ type: "button",
3854
+ className: worktree_css_default.iconButton,
3855
+ "data-dashboard-action": true,
3856
+ "aria-label": t("dashboard.title"),
3857
+ onClick: (event) => {
3858
+ event.stopPropagation();
3859
+ menu?.onDashboard?.();
3860
+ },
3861
+ children: (0, react_jsx_runtime.jsx)(IconDashboard, { size: 16 })
3862
+ })
3863
+ }),
3512
3864
  menu !== void 0 && (0, react_jsx_runtime.jsx)("span", {
3513
3865
  className: worktree_css_default.menuAction,
3514
3866
  children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
@@ -3517,6 +3869,11 @@ window.__ModuleLoader__.load({
3517
3869
  menu.onOpenChange(false);
3518
3870
  },
3519
3871
  items: [
3872
+ ...menu.onDashboard === void 0 ? [] : [{
3873
+ id: "dashboard",
3874
+ label: t("dashboard.title"),
3875
+ icon: (0, react_jsx_runtime.jsx)(IconDashboard, { size: 16 })
3876
+ }],
3520
3877
  ...menu.showCreate ? [{
3521
3878
  id: "create",
3522
3879
  label: t("worktree.createNew"),
@@ -3570,6 +3927,7 @@ window.__ModuleLoader__.load({
3570
3927
  onSelect: (id) => {
3571
3928
  menu.onOpenChange(false);
3572
3929
  if (id === "create" && menu.showCreate) menu.onCreateWorktree?.();
3930
+ if (id === "dashboard") menu.onDashboard?.();
3573
3931
  if (id === "adopt-branch") menu.onAdoptBranch?.();
3574
3932
  if (id === "recover") menu.onRecover?.();
3575
3933
  if (id === "copy-path") (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(menu.copyPath);
@@ -3667,10 +4025,10 @@ window.__ModuleLoader__.load({
3667
4025
  icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCopyOutline16, {})
3668
4026
  }
3669
4027
  ];
3670
- const statusLabel = presentation === void 0 ? void 0 : sessionStatusLabel(t, presentation.status);
4028
+ const statusLabel = presentation === void 0 ? void 0 : sessionStatusLabel$1(t, presentation.status);
3671
4029
  const showTrailingStatus = !blank && presentation !== void 0 && (presentation.status.state !== "done" || presentation.completed);
3672
4030
  const timeValue = !blank && !showTrailingStatus && presentation?.updatedAt !== void 0 ? relativeTime(presentation.updatedAt, Date.now()) : void 0;
3673
- const timeLabel = timeValue === void 0 ? void 0 : sessionTimeLabel(t, timeValue);
4031
+ const timeLabel = timeValue === void 0 ? void 0 : sessionTimeLabel$1(t, timeValue);
3674
4032
  return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.HoverCard, {
3675
4033
  anchor: (0, react_jsx_runtime.jsxs)("div", {
3676
4034
  className: `${worktree_css_default.treeSessionRow} ${markerClass}`,
@@ -3861,6 +4219,7 @@ window.__ModuleLoader__.load({
3861
4219
  onToggle: () => {
3862
4220
  toggleWorktree(record.worktreeId);
3863
4221
  },
4222
+ showDashboardAction: props.openDashboard !== void 0,
3864
4223
  onCreateSession: record.status === "active" && record.health !== "repair" && record.health !== "recovery-needed" ? () => {
3865
4224
  createSession({
3866
4225
  workspaceId: record.workspaceId,
@@ -3869,6 +4228,7 @@ window.__ModuleLoader__.load({
3869
4228
  });
3870
4229
  } : void 0,
3871
4230
  menu: {
4231
+ onDashboard: props.openDashboard === void 0 ? void 0 : () => props.openDashboard?.(record),
3872
4232
  ...branchActions(record),
3873
4233
  open: openWorktreeMenuId === record.worktreeId,
3874
4234
  label: record.branch,
@@ -4022,10 +4382,12 @@ window.__ModuleLoader__.load({
4022
4382
  onToggle: () => {
4023
4383
  toggleWorktree(record.worktreeId);
4024
4384
  },
4385
+ showDashboardAction: props.openDashboard !== void 0,
4025
4386
  menu: (() => {
4026
4387
  const activityBlocked = worktreeLifecycleBlockReason(actionPending, record.health);
4027
4388
  const blockedReasonText = activityBlocked === "recovery" ? t("worktree.recovery") : void 0;
4028
4389
  return {
4390
+ onDashboard: props.openDashboard === void 0 ? void 0 : () => props.openDashboard?.(record),
4029
4391
  ...branchActions(record),
4030
4392
  open: openWorktreeMenuId === record.worktreeId,
4031
4393
  label: record.branch,
@@ -4300,7 +4662,9 @@ window.__ModuleLoader__.load({
4300
4662
  onToggle: () => {
4301
4663
  toggleMain(workspace.workspaceId);
4302
4664
  },
4665
+ showDashboardAction: props.openDashboard !== void 0,
4303
4666
  menu: {
4667
+ onDashboard: props.openDashboard === void 0 ? void 0 : () => props.openDashboard?.(createMainWorktreeRecord(workspace, currentBranch)),
4304
4668
  open: openMainMenuId === workspace.workspaceId,
4305
4669
  label: mainLabel,
4306
4670
  copyPath: workspace.path,
@@ -6729,16 +7093,1105 @@ window.__ModuleLoader__.load({
6729
7093
  };
6730
7094
  }
6731
7095
  //#endregion
7096
+ //#region lib/client/session/session-labels.js
7097
+ /** Localize the native-compatible Session status used by both surfaces. */
7098
+ function sessionStatusLabel(t, status) {
7099
+ switch (status.labelKey) {
7100
+ case "running": return t("session.status.running");
7101
+ case "subagentsRunning": return t(status.runningSubagentCount === 1 ? "session.status.subagentsRunning.one" : "session.status.subagentsRunning.other", { n: status.runningSubagentCount });
7102
+ case "idle": return t("session.status.idle");
7103
+ case "waitingApproval": return t("session.status.waitingApproval");
7104
+ case "planReview": return t("session.status.planReview");
7105
+ case "waitingAnswer": return t("session.status.waitingAnswer");
7106
+ case "completed": return t("session.status.completed");
7107
+ }
7108
+ }
7109
+ /** Localize the compact relative time shown for idle Sessions. */
7110
+ function sessionTimeLabel(t, value) {
7111
+ switch (value.unit) {
7112
+ case "now": return t("session.time.now");
7113
+ case "minutes": return t("session.time.minutes", { n: value.n });
7114
+ case "hours": return t("session.time.hours", { n: value.n });
7115
+ case "days": return t("session.time.days", { n: value.n });
7116
+ case "months": return t("session.time.months", { n: value.n });
7117
+ case "years": return t("session.time.years", { n: value.n });
7118
+ }
7119
+ }
7120
+ //#endregion
7121
+ //#region lib/client/dashboard/vscode-url.js
7122
+ /** Encode path segments while retaining Windows drive and directory separators. */
7123
+ function vscodeFolderUrl(absolutePath) {
7124
+ const windowsPath = /^[a-z]:[\\/]/i.test(absolutePath) || absolutePath.startsWith("\\\\");
7125
+ const encoded = (windowsPath ? absolutePath.replaceAll("\\", "/") : absolutePath).split("/").map(encodeURIComponent).join("/");
7126
+ const withDrive = windowsPath ? encoded.replace(/^([a-z])%3A/i, "$1:") : encoded;
7127
+ return `vscode://file${withDrive.startsWith("/") ? "" : "/"}${withDrive}`;
7128
+ }
7129
+ //#endregion
7130
+ //#region lib/client/dashboard/open-in-app-controller.js
7131
+ const OPEN_IN_APP_APPS_ROUTE = "/open-in-app/apps";
7132
+ const OPEN_IN_APP_OPEN_ROUTE = "/open-in-app/open";
7133
+ function hostBase() {
7134
+ const origin = globalThis.location?.origin;
7135
+ return origin !== void 0 && origin !== "null" ? origin : "http://dsh.internal";
7136
+ }
7137
+ const STORAGE_KEY = "dsh.open-in-app.choice";
7138
+ var OpenInAppController = class {
7139
+ fetcher;
7140
+ _apps = null;
7141
+ _choice = "";
7142
+ _loading;
7143
+ _listeners = /* @__PURE__ */ new Set();
7144
+ constructor(fetcher = (input, init) => fetch(input, init)) {
7145
+ this.fetcher = fetcher;
7146
+ try {
7147
+ if (typeof localStorage !== "undefined") this._choice = localStorage.getItem(STORAGE_KEY) ?? "";
7148
+ } catch {}
7149
+ }
7150
+ get apps() {
7151
+ return this._apps;
7152
+ }
7153
+ get choice() {
7154
+ return this._choice;
7155
+ }
7156
+ subscribe(listener) {
7157
+ this._listeners.add(listener);
7158
+ return () => {
7159
+ this._listeners.delete(listener);
7160
+ };
7161
+ }
7162
+ notify() {
7163
+ for (const listener of this._listeners) listener();
7164
+ }
7165
+ load() {
7166
+ this._loading ??= this.run();
7167
+ return this._loading;
7168
+ }
7169
+ choose(appId) {
7170
+ if (this._choice === appId) return;
7171
+ this._choice = appId;
7172
+ try {
7173
+ if (typeof localStorage !== "undefined") localStorage.setItem(STORAGE_KEY, appId);
7174
+ } catch {}
7175
+ this.notify();
7176
+ }
7177
+ iconUrl(appId) {
7178
+ return new URL(`/open-in-app/icon/${encodeURIComponent(appId)}`, hostBase()).href;
7179
+ }
7180
+ async launch(appId, path) {
7181
+ const body = {
7182
+ app: appId,
7183
+ path
7184
+ };
7185
+ const response = await this.fetcher(new URL(OPEN_IN_APP_OPEN_ROUTE, hostBase()), {
7186
+ method: "POST",
7187
+ headers: { "content-type": "application/json" },
7188
+ body: JSON.stringify(body)
7189
+ });
7190
+ if (!response.ok) throw new Error(`open failed: HTTP ${String(response.status)}`);
7191
+ }
7192
+ async run() {
7193
+ let apps = [];
7194
+ try {
7195
+ const response = await this.fetcher(new URL(OPEN_IN_APP_APPS_ROUTE, hostBase()), { headers: { accept: "application/json" } });
7196
+ if (response.ok) {
7197
+ const payload = await response.json();
7198
+ if (Array.isArray(payload.apps)) apps = payload.apps.filter((id) => typeof id === "string");
7199
+ }
7200
+ } catch {}
7201
+ this._apps = apps;
7202
+ this.notify();
7203
+ }
7204
+ };
7205
+ const defaultOpenInAppController = new OpenInAppController();
7206
+ //#endregion
7207
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_7a9c1e4b8f02/packages/clutch-dsh-worktree/src/client/dashboard/open-in-app.css.mjs
7208
+ const css$1 = ".-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";
7209
+ const styleId$1 = "@cerbur/clutch-dsh-worktree/open-in-app.css";
7210
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/open-in-app.css\"]") === null) {
7211
+ const tag = document.createElement("style");
7212
+ tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
7213
+ tag.dataset.pluginCss = styleId$1;
7214
+ tag.textContent = css$1;
7215
+ document.head.appendChild(tag);
7216
+ }
7217
+ var open_in_app_css_default = {
7218
+ "control": "-cerbur-clutch-dsh-worktree-control",
7219
+ "split": "-cerbur-clutch-dsh-worktree-split",
7220
+ "main": "-cerbur-clutch-dsh-worktree-main",
7221
+ "chevron": "-cerbur-clutch-dsh-worktree-chevron",
7222
+ "icon": "-cerbur-clutch-dsh-worktree-icon",
7223
+ "fallback": "-cerbur-clutch-dsh-worktree-fallback"
7224
+ };
7225
+ //#endregion
7226
+ //#region lib/client/dashboard/OpenInAppButton.js
7227
+ const APP_NAMES = {
7228
+ cursor: "Cursor",
7229
+ vscode: "VS Code",
7230
+ vscodeinsiders: "VS Code Insiders",
7231
+ windsurf: "Windsurf",
7232
+ zed: "Zed",
7233
+ sublimetext: "Sublime Text",
7234
+ xcode: "Xcode",
7235
+ androidstudio: "Android Studio",
7236
+ intellij: "IntelliJ IDEA",
7237
+ pycharm: "PyCharm",
7238
+ webstorm: "WebStorm",
7239
+ phpstorm: "PhpStorm",
7240
+ goland: "GoLand",
7241
+ rider: "Rider",
7242
+ rustrover: "RustRover",
7243
+ fork: "Fork",
7244
+ sourcetree: "Sourcetree",
7245
+ github: "GitHub Desktop",
7246
+ tower: "Tower",
7247
+ gitkraken: "GitKraken",
7248
+ smartgit: "SmartGit",
7249
+ sublimemerge: "Sublime Merge",
7250
+ ghostty: "Ghostty",
7251
+ warp: "Warp",
7252
+ iterm: "iTerm2",
7253
+ kitty: "kitty",
7254
+ terminal: "Terminal",
7255
+ finder: "Finder",
7256
+ explorer: "Explorer"
7257
+ };
7258
+ const failedIcons = /* @__PURE__ */ new Set();
7259
+ function AppIcon({ id, url, size }) {
7260
+ const [failed, setFailed] = (0, react.useState)(failedIcons.has(id));
7261
+ if (failed) return (0, react_jsx_runtime.jsx)("svg", {
7262
+ width: size,
7263
+ height: size,
7264
+ viewBox: "0 0 24 24",
7265
+ fill: "none",
7266
+ stroke: "currentColor",
7267
+ strokeWidth: 1.8,
7268
+ className: open_in_app_css_default.icon,
7269
+ "aria-hidden": "true",
7270
+ children: (0, react_jsx_runtime.jsx)("rect", {
7271
+ x: "3",
7272
+ y: "3",
7273
+ width: "18",
7274
+ height: "18",
7275
+ rx: "5"
7276
+ })
7277
+ });
7278
+ return (0, react_jsx_runtime.jsx)("img", {
7279
+ src: url,
7280
+ width: size,
7281
+ height: size,
7282
+ className: open_in_app_css_default.icon,
7283
+ alt: "",
7284
+ "aria-hidden": "true",
7285
+ draggable: false,
7286
+ onError: () => {
7287
+ failedIcons.add(id);
7288
+ setFailed(true);
7289
+ }
7290
+ });
7291
+ }
7292
+ const BUSY_DRESS_DELAY_MS = 250;
7293
+ function OpenInAppButton({ path, t, controller = defaultOpenInAppController }) {
7294
+ (0, react.useEffect)(() => {
7295
+ controller.load();
7296
+ }, [controller]);
7297
+ const appsSnapshot = (0, react.useSyncExternalStore)((onStoreChange) => controller.subscribe(onStoreChange), () => controller.apps, () => null);
7298
+ const choiceSnapshot = (0, react.useSyncExternalStore)((onStoreChange) => controller.subscribe(onStoreChange), () => controller.choice, () => "");
7299
+ const [open, setOpen] = (0, react.useState)(false);
7300
+ const [phase, setPhase] = (0, react.useState)("idle");
7301
+ const inFlight = (0, react.useRef)(false);
7302
+ const busyTimer = (0, react.useRef)(void 0);
7303
+ const errorTimer = (0, react.useRef)(void 0);
7304
+ (0, react.useEffect)(() => () => {
7305
+ clearTimeout(busyTimer.current);
7306
+ clearTimeout(errorTimer.current);
7307
+ }, []);
7308
+ if (appsSnapshot === null || appsSnapshot.length === 0) return (0, react_jsx_runtime.jsx)("a", {
7309
+ className: `${open_in_app_css_default.split} ${open_in_app_css_default.fallback}`,
7310
+ href: vscodeFolderUrl(path),
7311
+ "data-dashboard-action": "open-editor",
7312
+ children: (0, react_jsx_runtime.jsx)("span", {
7313
+ className: open_in_app_css_default.main,
7314
+ children: t("dashboard.openEditor")
7315
+ })
7316
+ });
7317
+ const validApps = appsSnapshot;
7318
+ const currentAppId = validApps.find((appId) => appId === choiceSnapshot) ?? validApps[0] ?? "vscode";
7319
+ const buttonLabel = t("dashboard.openIn", { app: APP_NAMES[currentAppId] ?? currentAppId });
7320
+ const launch = (appId) => {
7321
+ if (inFlight.current) return;
7322
+ inFlight.current = true;
7323
+ clearTimeout(errorTimer.current);
7324
+ clearTimeout(busyTimer.current);
7325
+ busyTimer.current = setTimeout(() => {
7326
+ setPhase("busy");
7327
+ }, BUSY_DRESS_DELAY_MS);
7328
+ controller.launch(appId, path).then(() => {
7329
+ inFlight.current = false;
7330
+ clearTimeout(busyTimer.current);
7331
+ setPhase("idle");
7332
+ }).catch(() => {
7333
+ inFlight.current = false;
7334
+ clearTimeout(busyTimer.current);
7335
+ setPhase("error");
7336
+ clearTimeout(errorTimer.current);
7337
+ errorTimer.current = setTimeout(() => {
7338
+ setPhase("idle");
7339
+ }, 2e3);
7340
+ });
7341
+ };
7342
+ const menuItems = validApps.map((appId) => ({
7343
+ id: appId,
7344
+ label: APP_NAMES[appId] ?? appId,
7345
+ icon: (0, react_jsx_runtime.jsx)(AppIcon, {
7346
+ id: appId,
7347
+ url: controller.iconUrl(appId),
7348
+ size: 16
7349
+ })
7350
+ }));
7351
+ return (0, react_jsx_runtime.jsx)("div", {
7352
+ className: open_in_app_css_default.control,
7353
+ onKeyDown: (event) => {
7354
+ if (event.key === "Escape" && open) {
7355
+ event.stopPropagation();
7356
+ setOpen(false);
7357
+ }
7358
+ },
7359
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
7360
+ open,
7361
+ align: "end",
7362
+ dense: true,
7363
+ onClose: () => {
7364
+ setOpen(false);
7365
+ },
7366
+ items: menuItems,
7367
+ selectedId: currentAppId,
7368
+ onSelect: (id) => {
7369
+ setOpen(false);
7370
+ if (inFlight.current) return;
7371
+ controller.choose(id);
7372
+ launch(id);
7373
+ },
7374
+ anchor: (0, react_jsx_runtime.jsxs)("div", {
7375
+ className: open_in_app_css_default.split,
7376
+ "data-dashboard-action": "open-editor",
7377
+ children: [(0, react_jsx_runtime.jsxs)("button", {
7378
+ type: "button",
7379
+ className: open_in_app_css_default.main,
7380
+ "data-state": phase,
7381
+ disabled: phase === "busy",
7382
+ "aria-label": buttonLabel,
7383
+ title: buttonLabel,
7384
+ onClick: () => {
7385
+ launch(currentAppId);
7386
+ },
7387
+ children: [(0, react_jsx_runtime.jsx)(AppIcon, {
7388
+ id: currentAppId,
7389
+ url: controller.iconUrl(currentAppId),
7390
+ size: 16
7391
+ }), (0, react_jsx_runtime.jsx)("span", { children: buttonLabel })]
7392
+ }), validApps.length > 1 && (0, react_jsx_runtime.jsx)("button", {
7393
+ type: "button",
7394
+ className: open_in_app_css_default.chevron,
7395
+ "aria-expanded": open,
7396
+ "aria-haspopup": "menu",
7397
+ "aria-label": t("dashboard.editorMenu"),
7398
+ disabled: phase === "busy",
7399
+ onClick: () => {
7400
+ setOpen((prev) => !prev);
7401
+ },
7402
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { size: 12 })
7403
+ })]
7404
+ })
7405
+ })
7406
+ });
7407
+ }
7408
+ //#endregion
7409
+ //#region lib/client/dashboard/dashboard-overlay.js
7410
+ const SIDEBAR_RESIZE_HANDLE_HALF_WIDTH = 4;
7411
+ /** Reversible presentation only: leave the native React tree and Session alive. */
7412
+ function concealDashboardBackground(element) {
7413
+ const visibility = element.style.getPropertyValue("visibility");
7414
+ const priority = element.style.getPropertyPriority("visibility");
7415
+ const inert = element.getAttribute("inert");
7416
+ const hidden = element.getAttribute("aria-hidden");
7417
+ element.style.setProperty("visibility", "hidden");
7418
+ element.setAttribute("inert", "");
7419
+ element.setAttribute("aria-hidden", "true");
7420
+ return () => {
7421
+ if (element.style.getPropertyValue("visibility") === "hidden") if (visibility) element.style.setProperty("visibility", visibility, priority);
7422
+ else element.style.removeProperty("visibility");
7423
+ for (const [name, value] of [["inert", inert], ["aria-hidden", hidden]]) if (value === null) element.removeAttribute(name);
7424
+ else element.setAttribute(name, value);
7425
+ };
7426
+ }
7427
+ /** Layout seam shared with the existing Sidebar overlay; fail closed on anchor loss. */
7428
+ function mountDashboardOverlay(surface, onPlacement) {
7429
+ const overlay = surface.closest("[data-shell-overlay]");
7430
+ const frame = overlay?.parentElement;
7431
+ if (!overlay || !frame) {
7432
+ onPlacement(void 0);
7433
+ return () => {};
7434
+ }
7435
+ const hidden = /* @__PURE__ */ new Map();
7436
+ let observed = [];
7437
+ let scheduled;
7438
+ let disposed = false;
7439
+ const restore = () => {
7440
+ for (const cleanup of hidden.values()) cleanup();
7441
+ hidden.clear();
7442
+ };
7443
+ const schedule = () => {
7444
+ if (disposed || scheduled !== void 0) return;
7445
+ scheduled = requestAnimationFrame(() => {
7446
+ scheduled = void 0;
7447
+ update();
7448
+ });
7449
+ };
7450
+ const resize = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(schedule);
7451
+ const update = () => {
7452
+ if (disposed) return;
7453
+ const sidebar = frame.firstElementChild;
7454
+ const center = sidebar?.nextElementSibling;
7455
+ const right = center?.nextElementSibling;
7456
+ const valid = overlay.isConnected && overlay.parentElement === frame && sidebar instanceof HTMLElement && center instanceof HTMLElement && right instanceof HTMLElement && right.nextElementSibling === overlay;
7457
+ const nextObserved = valid ? [
7458
+ overlay,
7459
+ sidebar,
7460
+ center,
7461
+ right
7462
+ ] : [frame];
7463
+ for (const old of observed) if (!nextObserved.includes(old)) resize?.unobserve(old);
7464
+ for (const next of nextObserved) if (!observed.includes(next)) resize?.observe(next);
7465
+ observed = nextObserved;
7466
+ if (!valid) {
7467
+ restore();
7468
+ onPlacement(void 0);
7469
+ return;
7470
+ }
7471
+ const box = overlay.getBoundingClientRect();
7472
+ const boundary = sidebar.getBoundingClientRect();
7473
+ const left = Math.max(0, boundary.right - box.left + SIDEBAR_RESIZE_HANDLE_HALF_WIDTH);
7474
+ const width = box.width - left;
7475
+ if (width <= 0 || box.height <= 0) {
7476
+ restore();
7477
+ onPlacement(void 0);
7478
+ return;
7479
+ }
7480
+ for (const [element, cleanup] of hidden) if (element !== center && element !== right) {
7481
+ cleanup();
7482
+ hidden.delete(element);
7483
+ }
7484
+ for (const element of [center, right]) if (!hidden.has(element)) hidden.set(element, concealDashboardBackground(element));
7485
+ onPlacement({
7486
+ left,
7487
+ top: 0,
7488
+ width,
7489
+ height: box.height
7490
+ });
7491
+ };
7492
+ const mutation = typeof MutationObserver === "undefined" ? void 0 : new MutationObserver(schedule);
7493
+ mutation?.observe(frame, { childList: true });
7494
+ if (frame.parentElement) mutation?.observe(frame.parentElement, { childList: true });
7495
+ update();
7496
+ return () => {
7497
+ disposed = true;
7498
+ resize?.disconnect();
7499
+ mutation?.disconnect();
7500
+ if (scheduled !== void 0) cancelAnimationFrame(scheduled);
7501
+ restore();
7502
+ };
7503
+ }
7504
+ //#endregion
7505
+ //#region lib/client/dashboard/worktree-acquisition-facts.js
7506
+ function selectWorktreeAcquisitionFacts(record) {
7507
+ return {
7508
+ timestampKind: record.source === "external" ? "imported" : "created",
7509
+ ...record.source === "external" ? record.importedAt === void 0 ? {} : { timestamp: record.importedAt } : record.createdAt === void 0 ? {} : { timestamp: record.createdAt },
7510
+ ...record.baseBranch === void 0 ? {} : { baseBranch: record.baseBranch }
7511
+ };
7512
+ }
7513
+ //#endregion
7514
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_7a9c1e4b8f02/packages/clutch-dsh-worktree/src/client/dashboard/dashboard.css.mjs
7515
+ const css = ".-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-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);\n gap: 12px;\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 color: var(--dsw-alias-label-secondary, #788191);\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts dd {\n text-align: right;\n margin: 0;\n overflow-wrap: anywhere;\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-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";
7516
+ const styleId = "@cerbur/clutch-dsh-worktree/dashboard.css";
7517
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard.css\"]") === null) {
7518
+ const tag = document.createElement("style");
7519
+ tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
7520
+ tag.dataset.pluginCss = styleId;
7521
+ tag.textContent = css;
7522
+ document.head.appendChild(tag);
7523
+ }
7524
+ var dashboard_css_default = {
7525
+ "dashboardSurface": "-cerbur-clutch-dsh-worktree-dashboardSurface",
7526
+ "dashboardPanel": "-cerbur-clutch-dsh-worktree-dashboardPanel",
7527
+ "dashboardPage": "-cerbur-clutch-dsh-worktree-dashboardPage",
7528
+ "dashboardSessions": "-cerbur-clutch-dsh-worktree-dashboardSessions",
7529
+ "dashboardSessionLabel": "-cerbur-clutch-dsh-worktree-dashboardSessionLabel",
7530
+ "dashboardSessionMeta": "-cerbur-clutch-dsh-worktree-dashboardSessionMeta",
7531
+ "dashboardSessionStatus": "-cerbur-clutch-dsh-worktree-dashboardSessionStatus",
7532
+ "dashboardSessionTime": "-cerbur-clutch-dsh-worktree-dashboardSessionTime",
7533
+ "dashboardStartActions": "-cerbur-clutch-dsh-worktree-dashboardStartActions",
7534
+ "dashboardTopline": "-cerbur-clutch-dsh-worktree-dashboardTopline",
7535
+ "dashboardHeader": "-cerbur-clutch-dsh-worktree-dashboardHeader",
7536
+ "dashboardIdentity": "-cerbur-clutch-dsh-worktree-dashboardIdentity",
7537
+ "dashboardTitleRow": "-cerbur-clutch-dsh-worktree-dashboardTitleRow",
7538
+ "dashboardHealth": "-cerbur-clutch-dsh-worktree-dashboardHealth",
7539
+ "dashboardSoon": "-cerbur-clutch-dsh-worktree-dashboardSoon",
7540
+ "dashboardPath": "-cerbur-clutch-dsh-worktree-dashboardPath",
7541
+ "dashboardFieldLabel": "-cerbur-clutch-dsh-worktree-dashboardFieldLabel",
7542
+ "dashboardIconButton": "-cerbur-clutch-dsh-worktree-dashboardIconButton",
7543
+ "dashboardCopyStatus": "-cerbur-clutch-dsh-worktree-dashboardCopyStatus",
7544
+ "dashboardHeaderAside": "-cerbur-clutch-dsh-worktree-dashboardHeaderAside",
7545
+ "dashboardButton": "-cerbur-clutch-dsh-worktree-dashboardButton",
7546
+ "dashboardTabs": "-cerbur-clutch-dsh-worktree-dashboardTabs",
7547
+ "dashboardGrid": "-cerbur-clutch-dsh-worktree-dashboardGrid",
7548
+ "dashboardColumn": "-cerbur-clutch-dsh-worktree-dashboardColumn",
7549
+ "dashboardCard": "-cerbur-clutch-dsh-worktree-dashboardCard",
7550
+ "dashboardStart": "-cerbur-clutch-dsh-worktree-dashboardStart",
7551
+ "dashboardCardHeading": "-cerbur-clutch-dsh-worktree-dashboardCardHeading",
7552
+ "dashboardInstructionPlaceholder": "-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder",
7553
+ "dashboardEmpty": "-cerbur-clutch-dsh-worktree-dashboardEmpty",
7554
+ "dashboardFacts": "-cerbur-clutch-dsh-worktree-dashboardFacts",
7555
+ "dashboardHistorical": "-cerbur-clutch-dsh-worktree-dashboardHistorical",
7556
+ "dashboardLink": "-cerbur-clutch-dsh-worktree-dashboardLink",
7557
+ "dashboardQuickActions": "-cerbur-clutch-dsh-worktree-dashboardQuickActions",
7558
+ "dashboardTabPlaceholder": "-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder",
7559
+ "dashboardFooter": "-cerbur-clutch-dsh-worktree-dashboardFooter",
7560
+ "dashboardInstructionsText": "-cerbur-clutch-dsh-worktree-dashboardInstructionsText",
7561
+ "dashboardInstructionsInput": "-cerbur-clutch-dsh-worktree-dashboardInstructionsInput",
7562
+ "dashboardInstructionActions": "-cerbur-clutch-dsh-worktree-dashboardInstructionActions"
7563
+ };
7564
+ //#endregion
7565
+ //#region lib/client/dashboard/WorktreeInstructions.js
7566
+ function WorktreeInstructions({ value, onSave, t, disabled }) {
7567
+ const [saved, setSaved] = (0, react.useState)(value);
7568
+ const [draft, setDraft] = (0, react.useState)();
7569
+ const [error, setError] = (0, react.useState)(false);
7570
+ const [pending, setPending] = (0, react.useState)(false);
7571
+ const busy = (0, react.useRef)(false);
7572
+ const alive = (0, react.useRef)(true);
7573
+ (0, react.useEffect)(() => {
7574
+ alive.current = true;
7575
+ return () => {
7576
+ alive.current = false;
7577
+ };
7578
+ }, []);
7579
+ (0, react.useEffect)(() => {
7580
+ setSaved(value);
7581
+ }, [value]);
7582
+ const expected = (0, react.useRef)(value);
7583
+ const save = async () => {
7584
+ if (busy.current || draft === void 0 || !onSave) return;
7585
+ busy.current = true;
7586
+ setPending(true);
7587
+ setError(false);
7588
+ try {
7589
+ const result = await onSave(draft, expected.current);
7590
+ if (alive.current) {
7591
+ setSaved(result);
7592
+ setDraft(void 0);
7593
+ }
7594
+ } catch {
7595
+ if (alive.current) setError(true);
7596
+ } finally {
7597
+ busy.current = false;
7598
+ if (alive.current) setPending(false);
7599
+ }
7600
+ };
7601
+ return (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("p", { children: t("dashboard.instructionsHint") }), draft === void 0 ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("p", {
7602
+ className: dashboard_css_default.dashboardInstructionsText,
7603
+ children: saved || t("dashboard.noInstructions")
7604
+ }), (0, react_jsx_runtime.jsx)("button", {
7605
+ type: "button",
7606
+ className: dashboard_css_default.dashboardButton,
7607
+ disabled: disabled || !onSave,
7608
+ onClick: () => {
7609
+ expected.current = saved;
7610
+ setDraft(saved);
7611
+ setError(false);
7612
+ },
7613
+ children: t("dashboard.edit")
7614
+ })] }) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
7615
+ (0, react_jsx_runtime.jsx)("textarea", {
7616
+ className: dashboard_css_default.dashboardInstructionsInput,
7617
+ "aria-label": t("dashboard.instructions"),
7618
+ value: draft,
7619
+ maxLength: 32e3,
7620
+ rows: 8,
7621
+ disabled: pending,
7622
+ onChange: (event) => setDraft(event.target.value)
7623
+ }),
7624
+ (0, react_jsx_runtime.jsxs)("div", {
7625
+ className: dashboard_css_default.dashboardInstructionActions,
7626
+ children: [(0, react_jsx_runtime.jsx)("button", {
7627
+ type: "button",
7628
+ className: dashboard_css_default.dashboardButton,
7629
+ disabled: pending || disabled,
7630
+ onClick: () => void save(),
7631
+ children: t(pending ? "dashboard.savingInstructions" : "dashboard.saveInstructions")
7632
+ }), (0, react_jsx_runtime.jsx)("button", {
7633
+ type: "button",
7634
+ className: dashboard_css_default.dashboardButton,
7635
+ disabled: pending,
7636
+ onClick: () => {
7637
+ setDraft(void 0);
7638
+ setError(false);
7639
+ },
7640
+ children: t("dashboard.cancelInstructions")
7641
+ })]
7642
+ }),
7643
+ error && (0, react_jsx_runtime.jsx)("p", {
7644
+ role: "alert",
7645
+ children: t("dashboard.instructionsSaveFailed")
7646
+ })
7647
+ ] })] });
7648
+ }
7649
+ //#endregion
7650
+ //#region lib/client/dashboard/WorktreeDashboard.js
7651
+ const TABS = [
7652
+ "overview",
7653
+ "git",
7654
+ "sessions",
7655
+ "children",
7656
+ "settings"
7657
+ ];
7658
+ function DashboardIcon({ kind }) {
7659
+ return (0, react_jsx_runtime.jsx)("svg", {
7660
+ viewBox: "0 0 24 24",
7661
+ fill: "none",
7662
+ stroke: "currentColor",
7663
+ strokeWidth: "1.6",
7664
+ strokeLinecap: "round",
7665
+ strokeLinejoin: "round",
7666
+ "aria-hidden": "true",
7667
+ children: (0, react_jsx_runtime.jsx)("path", { d: {
7668
+ overview: "M3 3h7v7H3z M14 3h7v7h-7z M3 14h7v7H3z M14 14h7v7h-7z",
7669
+ git: "M7 7v10 M17 7v3c0 4-10 0-10 4 M5 3h4v4H5z M5 17h4v4H5z M15 3h4v4h-4z",
7670
+ sessions: "M4 4h16v13H9l-5 4z M8 8h8 M8 12h5",
7671
+ children: "M12 7v5 M5 17v-5h14v5 M9 3h6v4H9z M2 17h6v4H2z M16 17h6v4h-6z",
7672
+ settings: "M4 6h16 M4 12h16 M4 18h16 M8 3v6 M16 9v6 M10 15v6",
7673
+ instructions: "M5 3h14v18H5z M8 7h8 M8 11h8 M8 15h5",
7674
+ actions: "M13 2 4 14h7l-1 8 10-13h-8z"
7675
+ }[kind] })
7676
+ });
7677
+ }
7678
+ function Card({ title, icon, action, children }) {
7679
+ return (0, react_jsx_runtime.jsxs)("section", {
7680
+ className: dashboard_css_default.dashboardCard,
7681
+ children: [(0, react_jsx_runtime.jsxs)("div", {
7682
+ className: dashboard_css_default.dashboardCardHeading,
7683
+ children: [(0, react_jsx_runtime.jsxs)("h2", { children: [icon, title] }), action]
7684
+ }), children]
7685
+ });
7686
+ }
7687
+ function PlaceholderButton({ children, t }) {
7688
+ return (0, react_jsx_runtime.jsx)("button", {
7689
+ type: "button",
7690
+ className: dashboard_css_default.dashboardButton,
7691
+ disabled: true,
7692
+ title: t("dashboard.soon"),
7693
+ children
7694
+ });
7695
+ }
7696
+ /** A Worktree or browser Main projection with explicitly unconnected MVP cards. */
7697
+ function WorktreeDashboard({ record, workspaceTitle, t, onClose, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onSaveInstructions }) {
7698
+ const surface = (0, react.useRef)(null);
7699
+ const heading = (0, react.useRef)(null);
7700
+ const [placement, setPlacement] = (0, react.useState)();
7701
+ const [tab, setTab] = (0, react.useState)("overview");
7702
+ const [copyState, setCopyState] = (0, react.useState)("idle");
7703
+ const [branchCopyState, setBranchCopyState] = (0, react.useState)("idle");
7704
+ const copyGeneration = (0, react.useRef)(0);
7705
+ const branchCopyGeneration = (0, react.useRef)(0);
7706
+ const copyPending = (0, react.useRef)(false);
7707
+ const branchCopyPending = (0, react.useRef)(false);
7708
+ const id = (0, react.useId)();
7709
+ (0, react.useLayoutEffect)(() => {
7710
+ const element = surface.current;
7711
+ if (!element) return;
7712
+ return mountDashboardOverlay(element, (next) => setPlacement((previous) => JSON.stringify(previous) === JSON.stringify(next) ? previous : next));
7713
+ }, []);
7714
+ (0, react.useLayoutEffect)(() => {
7715
+ if (!placement) return;
7716
+ const previous = document.activeElement;
7717
+ const element = surface.current;
7718
+ heading.current?.focus({ preventScroll: true });
7719
+ return () => {
7720
+ if (previous instanceof HTMLElement && previous.isConnected && (element?.contains(document.activeElement) || document.activeElement === document.body)) previous.focus({ preventScroll: true });
7721
+ };
7722
+ }, [placement !== void 0]);
7723
+ (0, react.useEffect)(() => {
7724
+ copyGeneration.current += 1;
7725
+ copyPending.current = false;
7726
+ setCopyState("idle");
7727
+ return () => {
7728
+ copyGeneration.current += 1;
7729
+ };
7730
+ }, [record.absolutePath]);
7731
+ (0, react.useEffect)(() => {
7732
+ branchCopyGeneration.current += 1;
7733
+ branchCopyPending.current = false;
7734
+ setBranchCopyState("idle");
7735
+ return () => {
7736
+ branchCopyGeneration.current += 1;
7737
+ };
7738
+ }, [record.branch]);
7739
+ const copyPath = async () => {
7740
+ if (copyPending.current) return;
7741
+ copyPending.current = true;
7742
+ const generation = copyGeneration.current;
7743
+ setCopyState("pending");
7744
+ try {
7745
+ const copied = await (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(record.absolutePath);
7746
+ if (generation === copyGeneration.current) setCopyState(copied ? "copied" : "failed");
7747
+ } catch {
7748
+ if (generation === copyGeneration.current) setCopyState("failed");
7749
+ } finally {
7750
+ if (generation === copyGeneration.current) copyPending.current = false;
7751
+ }
7752
+ };
7753
+ const branchAvailable = record.branch.length > 0;
7754
+ const displayBranch = branchAvailable ? record.branch : t("dashboard.branchUnavailable");
7755
+ const copyBranch = async () => {
7756
+ if (!branchAvailable || branchCopyPending.current) return;
7757
+ branchCopyPending.current = true;
7758
+ const generation = branchCopyGeneration.current;
7759
+ setBranchCopyState("pending");
7760
+ try {
7761
+ const copied = await (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(record.branch);
7762
+ if (generation === branchCopyGeneration.current) setBranchCopyState(copied ? "copied" : "failed");
7763
+ } catch {
7764
+ if (generation === branchCopyGeneration.current) setBranchCopyState("failed");
7765
+ } finally {
7766
+ if (generation === branchCopyGeneration.current) branchCopyPending.current = false;
7767
+ }
7768
+ };
7769
+ const healthKey = record.health === "ready" ? "worktree.ready" : record.health === "repair" ? "worktree.repair" : record.health === "recovery-needed" ? "worktree.recovery" : record.health === "branch-drift" ? "worktree.branchDrift" : record.health === "cleaned" ? "dashboard.cleaned" : "dashboard.unknown";
7770
+ const liveBranch = record.currentBranch === null ? t("dashboard.detached") : record.currentBranch ?? (branchAvailable ? record.branch : t("dashboard.branchUnavailable"));
7771
+ const acquisitionFacts = selectWorktreeAcquisitionFacts(record);
7772
+ const acquisitionLabel = acquisitionFacts.timestampKind === "imported" ? "dashboard.imported" : "dashboard.created";
7773
+ const tabLabel = (value) => t(`dashboard.tab.${value}`);
7774
+ const placeholder = (0, react_jsx_runtime.jsx)("span", {
7775
+ className: dashboard_css_default.dashboardSoon,
7776
+ children: t("dashboard.soon")
7777
+ });
7778
+ const selectTab = (next, focus = false) => {
7779
+ setTab(next);
7780
+ if (focus) document.getElementById(`${id}-${next}`)?.focus();
7781
+ };
7782
+ const tabLink = (next, label) => (0, react_jsx_runtime.jsxs)("button", {
7783
+ type: "button",
7784
+ className: dashboard_css_default.dashboardLink,
7785
+ onClick: () => selectTab(next, true),
7786
+ children: [label, (0, react_jsx_runtime.jsx)("span", {
7787
+ "aria-hidden": "true",
7788
+ children: "→"
7789
+ })]
7790
+ });
7791
+ const sessionList = (ids) => ids.length === 0 ? (0, react_jsx_runtime.jsx)("div", {
7792
+ className: dashboard_css_default.dashboardEmpty,
7793
+ children: (0, react_jsx_runtime.jsx)("p", { children: t("dashboard.noSessions") })
7794
+ }) : (0, react_jsx_runtime.jsx)("ul", {
7795
+ className: dashboard_css_default.dashboardSessions,
7796
+ children: ids.map((sessionId) => {
7797
+ const presentation = sessionPresentations[sessionId];
7798
+ const blank = isBlankSession(sessionId, sessions);
7799
+ const statusLabel = presentation === void 0 ? void 0 : sessionStatusLabel(t, presentation.status);
7800
+ const showTrailingStatus = !blank && presentation !== void 0 && (presentation.status.state !== "done" || presentation.completed);
7801
+ const timeValue = !blank && !showTrailingStatus && presentation?.updatedAt !== void 0 ? relativeTime(presentation.updatedAt, Date.now()) : void 0;
7802
+ const timeLabel = timeValue === void 0 ? void 0 : sessionTimeLabel(t, timeValue);
7803
+ return (0, react_jsx_runtime.jsx)("li", { children: (0, react_jsx_runtime.jsxs)("button", {
7804
+ type: "button",
7805
+ "data-dashboard-session": sessionId,
7806
+ "aria-current": sessions.current === sessionId ? "page" : void 0,
7807
+ onClick: () => onOpenSession(sessionId),
7808
+ children: [
7809
+ (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "sessions" }),
7810
+ (0, react_jsx_runtime.jsx)("span", {
7811
+ className: dashboard_css_default.dashboardSessionLabel,
7812
+ children: sessionDisplayLabel(sessionId, sessions, t("session.new"))
7813
+ }),
7814
+ !blank && (0, react_jsx_runtime.jsx)("span", {
7815
+ className: dashboard_css_default.dashboardSessionMeta,
7816
+ children: showTrailingStatus && presentation !== void 0 ? (0, react_jsx_runtime.jsx)("span", {
7817
+ className: dashboard_css_default.dashboardSessionStatus,
7818
+ "data-dashboard-session-status": statusLabel,
7819
+ role: "img",
7820
+ "aria-label": statusLabel,
7821
+ title: statusLabel,
7822
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: presentation.status.state })
7823
+ }) : timeLabel !== void 0 ? (0, react_jsx_runtime.jsx)("span", {
7824
+ className: dashboard_css_default.dashboardSessionTime,
7825
+ "data-dashboard-session-time": true,
7826
+ children: timeLabel
7827
+ }) : null
7828
+ }),
7829
+ (0, react_jsx_runtime.jsx)("span", {
7830
+ "aria-hidden": "true",
7831
+ children: "→"
7832
+ })
7833
+ ]
7834
+ }) }, sessionId);
7835
+ })
7836
+ });
7837
+ return (0, react_jsx_runtime.jsx)("section", {
7838
+ ref: surface,
7839
+ className: dashboard_css_default.dashboardSurface,
7840
+ "data-worktree-dashboard": record.worktreeId,
7841
+ "aria-labelledby": `${id}-title`,
7842
+ style: placement ?? {
7843
+ visibility: "hidden",
7844
+ height: 0
7845
+ },
7846
+ onKeyDown: (event) => {
7847
+ if (event.key === "Escape") {
7848
+ if (event.currentTarget.querySelector("[role=\"menu\"]")) return;
7849
+ event.stopPropagation();
7850
+ onClose();
7851
+ }
7852
+ },
7853
+ children: (0, react_jsx_runtime.jsxs)("div", {
7854
+ className: dashboard_css_default.dashboardPage,
7855
+ children: [
7856
+ (0, react_jsx_runtime.jsxs)("div", {
7857
+ className: dashboard_css_default.dashboardTopline,
7858
+ children: [(0, react_jsx_runtime.jsxs)("span", { children: [
7859
+ workspaceTitle,
7860
+ (0, react_jsx_runtime.jsx)("span", {
7861
+ "aria-hidden": "true",
7862
+ children: " / "
7863
+ }),
7864
+ t("dashboard.preview")
7865
+ ] }), (0, react_jsx_runtime.jsxs)("button", {
7866
+ type: "button",
7867
+ className: dashboard_css_default.dashboardButton,
7868
+ onClick: onClose,
7869
+ children: ["← ", t("dashboard.back")]
7870
+ })]
7871
+ }),
7872
+ (0, react_jsx_runtime.jsxs)("header", {
7873
+ className: dashboard_css_default.dashboardHeader,
7874
+ children: [(0, react_jsx_runtime.jsxs)("div", {
7875
+ className: dashboard_css_default.dashboardIdentity,
7876
+ children: [
7877
+ (0, react_jsx_runtime.jsxs)("div", {
7878
+ className: dashboard_css_default.dashboardTitleRow,
7879
+ "data-dashboard-copy": "branch",
7880
+ role: branchAvailable ? "button" : void 0,
7881
+ tabIndex: branchAvailable ? 0 : void 0,
7882
+ "aria-label": branchAvailable ? t("dashboard.copyBranch") : void 0,
7883
+ title: branchAvailable ? t("dashboard.copyBranch") : void 0,
7884
+ "aria-busy": branchAvailable && branchCopyState === "pending" ? true : void 0,
7885
+ onClick: branchAvailable ? () => void copyBranch() : void 0,
7886
+ onKeyDown: branchAvailable ? (event) => {
7887
+ if (event.key === "Enter" || event.key === " ") {
7888
+ event.preventDefault();
7889
+ copyBranch();
7890
+ }
7891
+ } : void 0,
7892
+ children: [
7893
+ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutline16, {}),
7894
+ (0, react_jsx_runtime.jsx)("h1", {
7895
+ id: `${id}-title`,
7896
+ ref: heading,
7897
+ tabIndex: -1,
7898
+ children: displayBranch
7899
+ }),
7900
+ (0, react_jsx_runtime.jsxs)("span", {
7901
+ className: dashboard_css_default.dashboardHealth,
7902
+ "data-health": record.health ?? "unknown",
7903
+ children: [(0, react_jsx_runtime.jsx)("span", {
7904
+ "aria-hidden": "true",
7905
+ children: "●"
7906
+ }), t(healthKey)]
7907
+ }),
7908
+ record.status === "removed" && (0, react_jsx_runtime.jsx)("span", {
7909
+ className: dashboard_css_default.dashboardSoon,
7910
+ children: t("dashboard.archived")
7911
+ })
7912
+ ]
7913
+ }),
7914
+ (0, react_jsx_runtime.jsxs)("div", {
7915
+ className: dashboard_css_default.dashboardPath,
7916
+ children: [
7917
+ (0, react_jsx_runtime.jsx)("span", {
7918
+ className: dashboard_css_default.dashboardFieldLabel,
7919
+ children: "cwd"
7920
+ }),
7921
+ (0, react_jsx_runtime.jsx)("code", { children: record.absolutePath }),
7922
+ (0, react_jsx_runtime.jsx)("button", {
7923
+ type: "button",
7924
+ className: dashboard_css_default.dashboardIconButton,
7925
+ "aria-label": t("worktree.copyPath"),
7926
+ title: t("worktree.copyPath"),
7927
+ disabled: copyState === "pending",
7928
+ onClick: () => {
7929
+ copyPath();
7930
+ },
7931
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCopyOutline16, {})
7932
+ })
7933
+ ]
7934
+ }),
7935
+ (0, react_jsx_runtime.jsx)("p", {
7936
+ className: dashboard_css_default.dashboardCopyStatus,
7937
+ role: branchCopyState === "failed" || branchCopyState === "idle" && copyState === "failed" ? "alert" : "status",
7938
+ children: branchCopyState === "pending" ? "\xA0" : branchCopyState === "copied" ? t("dashboard.branchCopied") : branchCopyState === "failed" ? t("dashboard.branchCopyFailed") : copyState === "copied" ? t("dashboard.copied") : copyState === "failed" ? t("dashboard.copyFailed") : "\xA0"
7939
+ })
7940
+ ]
7941
+ }), (0, react_jsx_runtime.jsxs)("div", {
7942
+ className: dashboard_css_default.dashboardHeaderAside,
7943
+ children: [(0, react_jsx_runtime.jsx)(OpenInAppButton, {
7944
+ path: record.absolutePath,
7945
+ t
7946
+ }), (0, react_jsx_runtime.jsxs)("dl", {
7947
+ className: dashboard_css_default.dashboardFacts,
7948
+ children: [
7949
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t(acquisitionLabel) }), (0, react_jsx_runtime.jsx)("dd", { children: acquisitionFacts.timestamp ? (0, react_jsx_runtime.jsx)("time", {
7950
+ dateTime: acquisitionFacts.timestamp,
7951
+ children: new Date(acquisitionFacts.timestamp).toLocaleString()
7952
+ }) : (0, react_jsx_runtime.jsx)("span", {
7953
+ className: dashboard_css_default.dashboardHistorical,
7954
+ children: t("dashboard.historicalUnavailable")
7955
+ }) })] }),
7956
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.base") }), (0, react_jsx_runtime.jsx)("dd", { children: acquisitionFacts.baseBranch ?? (0, react_jsx_runtime.jsx)("span", {
7957
+ className: dashboard_css_default.dashboardHistorical,
7958
+ children: t("dashboard.historicalUnavailable")
7959
+ }) })] }),
7960
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.source") }), (0, react_jsx_runtime.jsx)("dd", { children: isMainWorktreeId(record.worktreeId) ? t("worktree.main") : t(record.source === "external" ? "dashboard.external" : "dashboard.plugin") })] })
7961
+ ]
7962
+ })]
7963
+ })]
7964
+ }),
7965
+ (0, react_jsx_runtime.jsx)("div", {
7966
+ className: dashboard_css_default.dashboardTabs,
7967
+ role: "tablist",
7968
+ "aria-label": t("dashboard.title"),
7969
+ children: TABS.map((value) => (0, react_jsx_runtime.jsxs)("button", {
7970
+ type: "button",
7971
+ id: `${id}-${value}`,
7972
+ role: "tab",
7973
+ "aria-selected": tab === value,
7974
+ "aria-controls": `${id}-panel`,
7975
+ tabIndex: tab === value ? 0 : -1,
7976
+ onClick: () => selectTab(value),
7977
+ onKeyDown: (event) => {
7978
+ const index = TABS.indexOf(value);
7979
+ const next = event.key === "ArrowRight" ? TABS[(index + 1) % TABS.length] : event.key === "ArrowLeft" ? TABS[(index + TABS.length - 1) % TABS.length] : event.key === "Home" ? TABS[0] : event.key === "End" ? TABS[TABS.length - 1] : void 0;
7980
+ if (next) {
7981
+ event.preventDefault();
7982
+ selectTab(next, true);
7983
+ }
7984
+ },
7985
+ children: [(0, react_jsx_runtime.jsx)(DashboardIcon, { kind: value }), tabLabel(value)]
7986
+ }, value))
7987
+ }),
7988
+ (0, react_jsx_runtime.jsx)("div", {
7989
+ id: `${id}-panel`,
7990
+ role: "tabpanel",
7991
+ "aria-labelledby": `${id}-${tab}`,
7992
+ tabIndex: 0,
7993
+ className: dashboard_css_default.dashboardPanel,
7994
+ children: tab === "overview" ? (0, react_jsx_runtime.jsxs)("div", {
7995
+ className: dashboard_css_default.dashboardGrid,
7996
+ children: [(0, react_jsx_runtime.jsxs)("div", {
7997
+ className: dashboard_css_default.dashboardColumn,
7998
+ children: [
7999
+ (0, react_jsx_runtime.jsxs)("section", {
8000
+ className: dashboard_css_default.dashboardStart,
8001
+ children: [
8002
+ (0, react_jsx_runtime.jsxs)("h2", { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutline16, {}), t("dashboard.start")] }),
8003
+ (0, react_jsx_runtime.jsx)("p", { children: t("dashboard.startDescription") }),
8004
+ (0, react_jsx_runtime.jsxs)("div", {
8005
+ className: dashboard_css_default.dashboardStartActions,
8006
+ children: [(0, react_jsx_runtime.jsxs)("button", {
8007
+ type: "button",
8008
+ disabled: actionPending || !onCreateWorktree,
8009
+ onClick: onCreateWorktree,
8010
+ "data-dashboard-action": "create-worktree",
8011
+ children: [(0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "git" }), (0, react_jsx_runtime.jsxs)("span", { children: [(0, react_jsx_runtime.jsx)("strong", { children: t("dashboard.newWorktree") }), (0, react_jsx_runtime.jsx)("small", { children: t("dashboard.newWorktreeDescription") })] })]
8012
+ }), (0, react_jsx_runtime.jsxs)("button", {
8013
+ type: "button",
8014
+ disabled: actionPending || !onCreateSession,
8015
+ onClick: onCreateSession,
8016
+ "data-dashboard-action": "create-session",
8017
+ children: [(0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "sessions" }), (0, react_jsx_runtime.jsxs)("span", { children: [(0, react_jsx_runtime.jsx)("strong", { children: t("dashboard.newSession") }), (0, react_jsx_runtime.jsx)("small", { children: t("dashboard.newSessionDescription") })] })]
8018
+ })]
8019
+ })
8020
+ ]
8021
+ }),
8022
+ (0, react_jsx_runtime.jsxs)(Card, {
8023
+ title: t("dashboard.instructions"),
8024
+ icon: (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "instructions" }),
8025
+ children: [(0, react_jsx_runtime.jsx)("p", { children: t("dashboard.instructionsDescription") }), (0, react_jsx_runtime.jsx)(WorktreeInstructions, {
8026
+ value: record.instructions ?? "",
8027
+ onSave: onSaveInstructions,
8028
+ t,
8029
+ disabled: actionPending || record.health === "recovery-needed"
8030
+ })]
8031
+ }),
8032
+ (0, react_jsx_runtime.jsxs)(Card, {
8033
+ title: tabLabel("sessions"),
8034
+ icon: (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "sessions" }),
8035
+ action: (0, react_jsx_runtime.jsx)("span", { children: sessionIds.length }),
8036
+ children: [sessionList(sessionIds.slice(0, 5)), tabLink("sessions", t("dashboard.viewSessions"))]
8037
+ })
8038
+ ]
8039
+ }), (0, react_jsx_runtime.jsxs)("div", {
8040
+ className: dashboard_css_default.dashboardColumn,
8041
+ children: [
8042
+ (0, react_jsx_runtime.jsxs)(Card, {
8043
+ title: t("dashboard.status"),
8044
+ icon: (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "git" }),
8045
+ children: [
8046
+ (0, react_jsx_runtime.jsx)("p", { children: t("dashboard.statusHint") }),
8047
+ (0, react_jsx_runtime.jsxs)("dl", {
8048
+ className: dashboard_css_default.dashboardFacts,
8049
+ children: [
8050
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.health") }), (0, react_jsx_runtime.jsx)("dd", { children: t(healthKey) })] }),
8051
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.branch") }), (0, react_jsx_runtime.jsx)("dd", { children: liveBranch })] }),
8052
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.base") }), (0, react_jsx_runtime.jsx)("dd", { children: record.baseBranch ?? (0, react_jsx_runtime.jsx)("span", {
8053
+ className: dashboard_css_default.dashboardHistorical,
8054
+ children: t("dashboard.historicalUnavailable")
8055
+ }) })] }),
8056
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.aheadBehind") }), (0, react_jsx_runtime.jsx)("dd", { children: t("dashboard.notConnected") })] }),
8057
+ (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.workingTree") }), (0, react_jsx_runtime.jsx)("dd", { children: t("dashboard.notConnected") })] })
8058
+ ]
8059
+ }),
8060
+ tabLink("git", t("dashboard.viewDetails"))
8061
+ ]
8062
+ }),
8063
+ (0, react_jsx_runtime.jsxs)(Card, {
8064
+ title: t("dashboard.derived"),
8065
+ icon: (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "children" }),
8066
+ action: placeholder,
8067
+ children: [(0, react_jsx_runtime.jsx)("div", {
8068
+ className: dashboard_css_default.dashboardEmpty,
8069
+ children: (0, react_jsx_runtime.jsx)("p", { children: t("dashboard.childrenHint") })
8070
+ }), tabLink("children", t("dashboard.viewChildren"))]
8071
+ }),
8072
+ (0, react_jsx_runtime.jsx)(Card, {
8073
+ title: t("dashboard.quickActions"),
8074
+ icon: (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "actions" }),
8075
+ children: (0, react_jsx_runtime.jsxs)("div", {
8076
+ className: dashboard_css_default.dashboardQuickActions,
8077
+ children: [[
8078
+ "terminal",
8079
+ "diff",
8080
+ "pullRequest",
8081
+ "tests",
8082
+ "sync"
8083
+ ].map((action) => (0, react_jsx_runtime.jsx)(PlaceholderButton, {
8084
+ t,
8085
+ children: t(`dashboard.action.${action}`)
8086
+ }, action)), (0, react_jsx_runtime.jsx)("button", {
8087
+ type: "button",
8088
+ className: dashboard_css_default.dashboardButton,
8089
+ disabled: actionPending || !onArchiveWorktree,
8090
+ onClick: onArchiveWorktree,
8091
+ "data-dashboard-action": "archive-worktree",
8092
+ children: t("dashboard.action.archive")
8093
+ })]
8094
+ })
8095
+ })
8096
+ ]
8097
+ })]
8098
+ }) : tab === "sessions" ? (0, react_jsx_runtime.jsx)(Card, {
8099
+ title: tabLabel("sessions"),
8100
+ icon: (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: "sessions" }),
8101
+ action: (0, react_jsx_runtime.jsx)("button", {
8102
+ type: "button",
8103
+ className: dashboard_css_default.dashboardButton,
8104
+ disabled: actionPending || !onCreateSession,
8105
+ onClick: onCreateSession,
8106
+ children: t("dashboard.newSession")
8107
+ }),
8108
+ children: sessionList(sessionIds)
8109
+ }) : (0, react_jsx_runtime.jsxs)("section", {
8110
+ className: dashboard_css_default.dashboardTabPlaceholder,
8111
+ children: [
8112
+ (0, react_jsx_runtime.jsx)(DashboardIcon, { kind: tab }),
8113
+ (0, react_jsx_runtime.jsx)("h2", { children: tabLabel(tab) }),
8114
+ (0, react_jsx_runtime.jsx)("p", { children: t(`dashboard.hint.${tab}`) }),
8115
+ placeholder
8116
+ ]
8117
+ })
8118
+ }),
8119
+ (0, react_jsx_runtime.jsx)("p", {
8120
+ className: dashboard_css_default.dashboardFooter,
8121
+ children: t("dashboard.mvpHint")
8122
+ })
8123
+ ]
8124
+ })
8125
+ });
8126
+ }
8127
+ //#endregion
8128
+ //#region lib/client/dashboard/dashboard-sessions.js
8129
+ /** Join retained snapshots without reading, mutating, or applying Sidebar search. */
8130
+ function dashboardSessionIds(record, sessions, bindings, archivedSessionIds, orderedIds = [], workspaceSessionIds = []) {
8131
+ if (isMainWorktreeId(record.worktreeId)) {
8132
+ const boundSessionIds = new Set(bindings.filter((binding) => binding.workspaceId === record.workspaceId && binding.status !== "detached").map((binding) => binding.sessionId));
8133
+ const visible = filterVisibleSessionIds(filterArchivedSessionIds(workspaceSessionIds.filter((sessionId) => !boundSessionIds.has(sessionId)), archivedSessionIds), sessions);
8134
+ const visibleIds = new Set(visible);
8135
+ return [.../* @__PURE__ */ new Set([...orderedIds, ...visible])].filter((id) => visibleIds.has(id));
8136
+ }
8137
+ const members = new Set(bindings.filter((binding) => binding.workspaceId === record.workspaceId && binding.worktreeId === record.worktreeId).map((binding) => binding.sessionId));
8138
+ const visible = filterVisibleSessionIds(filterArchivedSessionIds(sessions.ids.filter((sessionId) => members.has(sessionId)), archivedSessionIds), sessions);
8139
+ const visibleIds = new Set(visible);
8140
+ return [.../* @__PURE__ */ new Set([...orderedIds, ...visible])].filter((id) => visibleIds.has(id));
8141
+ }
8142
+ //#endregion
6732
8143
  //#region lib/client/WorktreeSurface.js
6733
8144
  /** Composes independent surface state/action domains into the sidebar overlay. */
6734
- function WorktreeSurface(props) {
6735
- const source = useSurfaceSources({ props });
8145
+ function WorktreeSurface(inputProps) {
8146
+ const [internalDashboard, setInternalDashboard] = (0, react.useState)();
8147
+ const externalDashboard = inputProps.dashboardStore ? (0, react.useSyncExternalStore)(inputProps.dashboardStore.subscribe, inputProps.dashboardStore.getSnapshot, () => void 0) : void 0;
8148
+ const dashboard = inputProps.dashboardStore !== void 0 ? externalDashboard : internalDashboard;
8149
+ const setDashboard = (0, react.useCallback)((selection) => {
8150
+ if (inputProps.dashboardStore !== void 0) inputProps.dashboardStore.set(selection);
8151
+ setInternalDashboard(selection);
8152
+ }, [inputProps.dashboardStore]);
8153
+ const closeDashboard = (0, react.useCallback)(() => setDashboard(void 0), [setDashboard]);
8154
+ const source = useSurfaceSources({ props: inputProps });
8155
+ (0, react.useEffect)(() => {
8156
+ if (source.mode !== "worktree") setDashboard(void 0);
8157
+ }, [source.mode, setDashboard]);
8158
+ (0, react.useEffect)(() => () => {
8159
+ inputProps.dashboardStore?.set(void 0);
8160
+ }, [inputProps.dashboardStore]);
8161
+ const props = {
8162
+ ...inputProps,
8163
+ openDashboard: (record) => setDashboard({
8164
+ workspaceId: record.workspaceId,
8165
+ worktreeId: record.worktreeId,
8166
+ sessionId: source.currentSessionId
8167
+ }),
8168
+ openSession: (sessionId) => {
8169
+ closeDashboard();
8170
+ inputProps.openSession(sessionId);
8171
+ },
8172
+ createMainSession: inputProps.createMainSession === void 0 ? void 0 : (workspaceId) => {
8173
+ closeDashboard();
8174
+ inputProps.createMainSession?.(workspaceId);
8175
+ }
8176
+ };
6736
8177
  const registrationState = useRegistrationState({ props });
6737
8178
  const read = useSurfaceRefresh({
6738
8179
  source,
6739
8180
  props,
6740
8181
  registrationState
6741
8182
  });
8183
+ const targetWorkspace = dashboard === void 0 ? void 0 : source.workspaces.items.find((workspace) => workspace.workspaceId === dashboard.workspaceId);
8184
+ const targetView = dashboard === void 0 ? void 0 : read.viewByWorkspace.get(dashboard.workspaceId);
8185
+ const dashboardMainBranch = targetView?.branches.find((branch) => branch.isCurrent)?.name;
8186
+ const dashboardMainRecord = targetWorkspace === void 0 ? void 0 : createMainWorktreeRecord(targetWorkspace, dashboardMainBranch);
8187
+ const dashboardRecord = resolveDashboardRecord(dashboard, source.mode, source.currentSessionId, source.workspaceIds, dashboard === void 0 ? void 0 : targetView?.worktrees, dashboardMainRecord);
8188
+ (0, react.useEffect)(() => {
8189
+ if (dashboard !== void 0 && dashboardRecord === void 0) closeDashboard();
8190
+ }, [
8191
+ dashboard,
8192
+ dashboardRecord,
8193
+ closeDashboard
8194
+ ]);
6742
8195
  const mutation = useSurfaceMutation({ read });
6743
8196
  const lifecycleState = useLifecycleState({
6744
8197
  props,
@@ -6788,10 +8241,14 @@ window.__ModuleLoader__.load({
6788
8241
  props,
6789
8242
  mutation
6790
8243
  });
8244
+ const dashboardWorkspace = source.workspaces.items.find((workspace) => workspace.workspaceId === dashboardRecord?.workspaceId);
8245
+ const dashboardView = dashboardRecord === void 0 ? void 0 : read.viewByWorkspace.get(dashboardRecord.workspaceId);
8246
+ const dashboardCanCreate = dashboardRecord?.status === "active" && dashboardRecord.diskCleanup !== "completed" && dashboardRecord.health !== "cleaned" && dashboardRecord.health !== "repair" && dashboardRecord.health !== "recovery-needed";
8247
+ const dashboardManagedRecord = dashboardRecord !== void 0 && isManagedDashboardRecord(dashboardRecord) ? dashboardRecord : void 0;
6791
8248
  if (source.mode !== "worktree") return null;
6792
8249
  const { ref, width, bounds, collapsed } = source;
6793
8250
  const { t } = props;
6794
- return (0, react_jsx_runtime.jsxs)("aside", {
8251
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("aside", {
6795
8252
  ref,
6796
8253
  className: worktree_css_default.surface,
6797
8254
  "data-worktree-surface": true,
@@ -6857,7 +8314,58 @@ window.__ModuleLoader__.load({
6857
8314
  props
6858
8315
  })
6859
8316
  ]
6860
- });
8317
+ }), dashboardRecord !== void 0 && (0, react_jsx_runtime.jsx)(WorktreeDashboard, {
8318
+ record: dashboardRecord,
8319
+ onSaveInstructions: props.manager && !isMainWorktreeId(dashboardRecord.worktreeId) ? async (instructions, expectedInstructions) => {
8320
+ try {
8321
+ return await props.manager.updateWorktreeInstructions({
8322
+ workspaceId: dashboardRecord.workspaceId,
8323
+ worktreeId: dashboardRecord.worktreeId,
8324
+ instructions,
8325
+ expectedInstructions
8326
+ });
8327
+ } finally {
8328
+ read.refresh({
8329
+ preserveCurrent: true,
8330
+ scope: {
8331
+ kind: "workspace",
8332
+ workspaceId: dashboardRecord.workspaceId
8333
+ }
8334
+ });
8335
+ }
8336
+ } : void 0,
8337
+ workspaceTitle: dashboardWorkspace?.title ?? "",
8338
+ sessions: source.sessions,
8339
+ sessionPresentations: source.sessionPresentations,
8340
+ sessionIds: dashboardSessionIds(dashboardRecord, source.sessions, dashboardView?.bindings ?? [], source.archivedSessionIds, isMainWorktreeId(dashboardRecord.worktreeId) ? ordering.orderedSessionIdsByAccount.get(`main:${dashboardRecord.workspaceId}`) : ordering.orderedSessionIdsByAccount.get(`worktree:${dashboardRecord.worktreeId}`), dashboardWorkspace === void 0 ? [] : workspaceSessionIds(source.workspaces, dashboardWorkspace.workspaceId, source.sessions.ids)),
8341
+ actionPending: mutation.actionPending,
8342
+ onOpenSession: (sessionId) => session.openWorkspaceSession(dashboardRecord.workspaceId, sessionId),
8343
+ onCreateSession: dashboardCanCreate && (isMainWorktreeId(dashboardRecord.worktreeId) ? props.createMainSession !== void 0 : props.createSessionForWorktree !== void 0) ? () => {
8344
+ if (mutation.actionPending) return;
8345
+ closeDashboard();
8346
+ if (isMainWorktreeId(dashboardRecord.worktreeId)) props.createMainSession?.(dashboardRecord.workspaceId);
8347
+ else session.createSession({
8348
+ workspaceId: dashboardRecord.workspaceId,
8349
+ worktreeId: dashboardRecord.worktreeId,
8350
+ cwd: dashboardRecord.absolutePath
8351
+ });
8352
+ } : void 0,
8353
+ onCreateWorktree: dashboardCanCreate && dashboardRecord.currentBranch !== null && dashboardRecord.branch.length > 0 && dashboardWorkspace !== void 0 && dashboardView !== void 0 ? () => {
8354
+ if (mutation.actionPending) return;
8355
+ const branch = dashboardRecord.currentBranch ?? dashboardRecord.branch;
8356
+ registration.openWorktreeCreator(dashboardWorkspace, {
8357
+ baseBranch: branch,
8358
+ newBranch: createNumberedWorktreeName(branch, [...dashboardView.branches.map((candidate) => candidate.name), ...dashboardView.worktrees.map((candidate) => candidate.branch)])
8359
+ });
8360
+ } : void 0,
8361
+ onArchiveWorktree: dashboardManagedRecord !== void 0 && dashboardManagedRecord.status === "active" && dashboardManagedRecord.health !== "recovery-needed" ? () => {
8362
+ if (mutation.actionPending) return;
8363
+ lifecycleState.setWorktreeRemoval(dashboardManagedRecord);
8364
+ mutation.setActionError(void 0);
8365
+ } : void 0,
8366
+ t,
8367
+ onClose: closeDashboard
8368
+ }, `${dashboardRecord.workspaceId}:${dashboardRecord.worktreeId}`)] });
6861
8369
  }
6862
8370
  //#endregion
6863
8371
  //#region lib/client/overlay/WorktreeOverlay.js
@@ -7708,6 +9216,7 @@ window.__ModuleLoader__.load({
7708
9216
  const fullAccessConfirmation = createWorktreeFullAccessConfirmationController();
7709
9217
  const permissionNotice = createSnapshotStore(void 0);
7710
9218
  const permissionManager = typeof document !== "undefined" ? manager : void 0;
9219
+ const dashboardStore = createSnapshotStore(void 0);
7711
9220
  const reportPermissionNotice = (input, result) => {
7712
9221
  const visible = result.status === "fallback-workspace-write" || result.status === "user-restricted" || result.status === "unverified";
7713
9222
  permissionNotice.set(visible ? {
@@ -7842,6 +9351,33 @@ window.__ModuleLoader__.load({
7842
9351
  }
7843
9352
  });
7844
9353
  ctx.effect(() => () => worktreeSessionConnector.dispose(), "clutch-dsh-worktree: Worktree Session connector cleanup");
9354
+ const openDashboardForSession = (sessionId) => {
9355
+ switchViewMode("worktree");
9356
+ const contextSnapshot = contextProjection.store.getSnapshot();
9357
+ let targetWorkspaceId;
9358
+ let targetWorktreeId;
9359
+ if (contextSnapshot.sessionId === sessionId) {
9360
+ if (contextSnapshot.value.kind === "worktree") {
9361
+ targetWorkspaceId = contextSnapshot.workspaceId;
9362
+ targetWorktreeId = contextSnapshot.value.worktreeId;
9363
+ } else if (contextSnapshot.value.kind === "main") {
9364
+ targetWorkspaceId = contextSnapshot.workspaceId;
9365
+ targetWorktreeId = "main";
9366
+ }
9367
+ }
9368
+ if (targetWorkspaceId === void 0) {
9369
+ const workspace = (ctx.workspaces.list.getSnapshot()?.items ?? []).find((candidate) => candidate.sessionIds?.includes(sessionId));
9370
+ if (workspace !== void 0) {
9371
+ targetWorkspaceId = workspace.workspaceId;
9372
+ targetWorktreeId = "main";
9373
+ }
9374
+ }
9375
+ if (targetWorkspaceId !== void 0 && targetWorktreeId !== void 0) dashboardStore.set({
9376
+ workspaceId: targetWorkspaceId,
9377
+ worktreeId: targetWorktreeId,
9378
+ sessionId
9379
+ });
9380
+ };
7845
9381
  slots.inject("conversation.session.header.actions", () => slots.register({
7846
9382
  name: "conversation.session.header.actions",
7847
9383
  id: "clutch-dsh-worktree-context-header",
@@ -7849,6 +9385,16 @@ window.__ModuleLoader__.load({
7849
9385
  locale: WORKTREE_NS,
7850
9386
  inject: () => ({ hooks: { worktreeContext: contextProjection.store } })
7851
9387
  }, WorktreeHeaderContext));
9388
+ slots.inject("conversation.session.header.utilities", () => slots.register({
9389
+ name: "conversation.session.header.utilities",
9390
+ id: "clutch-dsh-worktree-dashboard-header",
9391
+ order: -10,
9392
+ locale: WORKTREE_NS,
9393
+ inject: () => ({
9394
+ hooks: { worktreeContext: contextProjection.store },
9395
+ openDashboard: openDashboardForSession
9396
+ })
9397
+ }, DashboardHeaderAction));
7852
9398
  slots.inject("sidebar.footer.action", () => slots.register({
7853
9399
  name: "sidebar.footer.action",
7854
9400
  id: "clutch-dsh-worktree-mode-action",
@@ -7865,6 +9411,7 @@ window.__ModuleLoader__.load({
7865
9411
  available: true,
7866
9412
  expandState,
7867
9413
  sessionOrder,
9414
+ dashboardStore,
7868
9415
  hooks: { worktreeContext: contextProjection.store },
7869
9416
  manager,
7870
9417
  viewReader,
@@ -7933,6 +9480,19 @@ window.__ModuleLoader__.load({
7933
9480
  }
7934
9481
  })
7935
9482
  }, WorktreeOverlay));
9483
+ if (typeof ctx.inject === "function") ctx.inject(["sessionLogDownload"], (innerCtx) => {
9484
+ const sessionLogDownload = innerCtx.get("sessionLogDownload");
9485
+ if (typeof sessionLogDownload?.registerMoreItem !== "function") return;
9486
+ innerCtx.effect(() => {
9487
+ return sessionLogDownload.registerMoreItem({
9488
+ id: "clutch-dsh-worktree-dashboard",
9489
+ label: () => innerCtx.locale.getLocale().active === "zh" ? "前往 Dashboard" : "Go to Dashboard",
9490
+ icon: (0, react.createElement)(IconDashboard, { size: 16 }),
9491
+ order: -1,
9492
+ onSelect: openDashboardForSession
9493
+ });
9494
+ }, "clutch-dsh-worktree: session header more item");
9495
+ });
7936
9496
  }
7937
9497
  //#endregion
7938
9498
  exports.WORKTREE_CONNECTION_CHANNEL = WORKTREE_CONNECTION_CHANNEL;