@cerbur/clutch-dsh-worktree 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -24
- package/README.zh.md +81 -23
- package/lib/client/WorktreeContext.d.ts.map +1 -1
- package/lib/client/WorktreeContext.js.map +1 -1
- package/lib/client/WorktreeHeroContext.d.ts +1 -1
- package/lib/client/WorktreeHeroContext.d.ts.map +1 -1
- package/lib/client/WorktreeHeroContext.js +10 -5
- package/lib/client/WorktreeHeroContext.js.map +1 -1
- package/lib/client/WorktreeSurface.d.ts +1 -1
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +349 -88
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +3 -0
- package/lib/client/entry.js.map +1 -1
- package/lib/client/locales.d.ts +28 -0
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +30 -2
- package/lib/client/locales.js.map +1 -1
- package/lib/client/virtual-workspace-membership.js +1 -1
- package/lib/client/virtual-workspace-membership.js.map +1 -1
- package/lib/client/worktree-connection.d.ts +2 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +4 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client/worktree-context-store.d.ts.map +1 -1
- package/lib/client/worktree-context-store.js +51 -11
- package/lib/client/worktree-context-store.js.map +1 -1
- package/lib/client/worktree-error-copy.d.ts.map +1 -1
- package/lib/client/worktree-error-copy.js +8 -0
- package/lib/client/worktree-error-copy.js.map +1 -1
- package/lib/client/worktree-expand-state.d.ts +33 -0
- package/lib/client/worktree-expand-state.d.ts.map +1 -0
- package/lib/client/worktree-expand-state.js +83 -0
- package/lib/client/worktree-expand-state.js.map +1 -0
- package/lib/client/worktree-session-position.d.ts +2 -0
- package/lib/client/worktree-session-position.d.ts.map +1 -0
- package/lib/client/worktree-session-position.js +11 -0
- package/lib/client/worktree-session-position.js.map +1 -0
- package/lib/client/worktree-surface-dialogs.d.ts +1 -1
- package/lib/client/worktree-surface-dialogs.d.ts.map +1 -1
- package/lib/client/worktree-surface-dialogs.js +33 -13
- package/lib/client/worktree-surface-dialogs.js.map +1 -1
- package/lib/client/worktree-surface-rows.d.ts +2 -2
- package/lib/client/worktree-surface-rows.d.ts.map +1 -1
- package/lib/client/worktree-surface-rows.js +5 -5
- package/lib/client/worktree-surface-rows.js.map +1 -1
- package/lib/client/worktree-surface-selectors.d.ts +16 -0
- package/lib/client/worktree-surface-selectors.d.ts.map +1 -1
- package/lib/client/worktree-surface-selectors.js +54 -0
- package/lib/client/worktree-surface-selectors.js.map +1 -1
- package/lib/client/worktree-surface-types.d.ts +28 -1
- package/lib/client/worktree-surface-types.d.ts.map +1 -1
- package/lib/client/worktree-view-actions.d.ts +3 -0
- package/lib/client/worktree-view-actions.d.ts.map +1 -1
- package/lib/client/worktree-view-actions.js +3 -0
- package/lib/client/worktree-view-actions.js.map +1 -1
- package/lib/client/worktree-view-read.d.ts +11 -0
- package/lib/client/worktree-view-read.d.ts.map +1 -1
- package/lib/client/worktree-view-read.js +24 -0
- package/lib/client/worktree-view-read.js.map +1 -1
- package/lib/client.js +697 -137
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +14 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +22 -2
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +5 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +2 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +8 -1
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +12 -0
- package/lib/host/service.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/manage/manager-support.d.ts +2 -0
- package/lib/manage/manager-support.d.ts.map +1 -1
- package/lib/manage/manager-support.js +9 -0
- package/lib/manage/manager-support.js.map +1 -1
- package/lib/manage/manager-worktrees.d.ts +10 -1
- package/lib/manage/manager-worktrees.d.ts.map +1 -1
- package/lib/manage/manager-worktrees.js +121 -5
- package/lib/manage/manager-worktrees.js.map +1 -1
- package/lib/manage/manager.d.ts +8 -1
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +7 -1
- package/lib/manage/manager.js.map +1 -1
- package/lib/provider/git.d.ts +8 -0
- package/lib/provider/git.d.ts.map +1 -1
- package/lib/provider/git.js +57 -11
- package/lib/provider/git.js.map +1 -1
- package/lib/provider/index.d.ts +1 -1
- package/lib/provider/index.d.ts.map +1 -1
- package/lib/provider/index.js +1 -1
- package/lib/provider/index.js.map +1 -1
- package/lib/provider/sidecar-schema.d.ts +1 -1
- package/lib/provider/sidecar-schema.d.ts.map +1 -1
- package/lib/provider/sidecar-schema.js +33 -37
- package/lib/provider/sidecar-schema.js.map +1 -1
- package/lib/provider/sidecar.d.ts.map +1 -1
- package/lib/provider/sidecar.js +3 -1
- package/lib/provider/sidecar.js.map +1 -1
- package/lib/provider/types.d.ts +9 -1
- package/lib/provider/types.d.ts.map +1 -1
- package/lib/provider/types.js +2 -1
- package/lib/provider/types.js.map +1 -1
- package/lib/typert.host.js +115 -21
- package/lib/typert.remote-client.d.ts +5 -1
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +115 -21
- package/package.json +30 -30
package/README.md
CHANGED
|
@@ -12,10 +12,18 @@ The plugin stores only external Worktree/Session relationship metadata.
|
|
|
12
12
|
The English screenshot shows Worktree mode in the Sidebar, a Workspace tree with Main and
|
|
13
13
|
Worktree rows, and the read-only blank-session Hero context.
|
|
14
14
|
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
The Import screenshot shows the existing Workspace `+` dialog with Create selected by default,
|
|
18
|
+
the adjacent Import tab, and a standard dropdown containing safe example branch/path values.
|
|
19
|
+
|
|
15
20
|
## Capabilities
|
|
16
21
|
|
|
17
22
|
- Enter Worktree mode from the DSH Sidebar footer and browse Workspace → Worktree → Session.
|
|
18
23
|
- Search Workspaces and create a Git Worktree and branch from an existing local branch.
|
|
24
|
+
- Choose Import in the same dialog to discover unmanaged, branch-attached Git Worktrees linked to the Workspace repository. The first version omits the repository root and detached HEAD entries.
|
|
25
|
+
- Register an existing Worktree in place without moving, copying, or editing its directory; the imported record uses `source: external` and then follows the same Session, binding, health, ordering, cwd, projection, refresh, and recovery flow as a plugin-created record.
|
|
26
|
+
- Remove plugin-created and imported Worktrees through real `git worktree remove`; removing an imported Worktree can delete its linked directory and is called out in the confirmation dialog.
|
|
19
27
|
- Create a normal Session from Main or a Session whose runtime cwd is an active Worktree, then
|
|
20
28
|
open it directly.
|
|
21
29
|
- See ready, repair, active, and detached Worktree states, including retryable operation errors.
|
|
@@ -24,21 +32,34 @@ Worktree rows, and the read-only blank-session Hero context.
|
|
|
24
32
|
- Continue using DSH-native Workspace rename/delete/reorder and Session menus. Worktree rows can
|
|
25
33
|
be reordered within their owning Workspace; order is stored in the plugin sidecar and Main is
|
|
26
34
|
fixed first.
|
|
35
|
+
- Persist Workspace, Main, and Worktree expansion choices in browser-local storage; the five-row Session overflow state remains transient and resets after refresh or parent collapse.
|
|
36
|
+
- Highlight the DSH current Session in Worktree view; entering Worktree mode or switching the current Session temporarily reveals its Workspace/Main/Worktree path, expands Session overflow, clears a hiding search, and scrolls the row into view; this browser-local behavior does not change persisted expansion choices.
|
|
27
37
|
- Keep the current local branch or Worktree branch visible as read-only context in the existing
|
|
28
38
|
Conversation title row and in the blank-session Hero.
|
|
39
|
+
- Keep Conversation and Hero context stable across same-Session snapshot updates and Session
|
|
40
|
+
switches, while retaining the last valid context during replacement reads.
|
|
41
|
+
- Truncate long branch labels to fit their chips and reveal the complete value through a native
|
|
42
|
+
hover card; the Sidebar footer action follows native typography and does not add a duplicate
|
|
43
|
+
`WT` button when the Sidebar is collapsed.
|
|
29
44
|
- Keep Worktree Sessions in the original DSH Project/Workspace view; the plugin does not copy
|
|
30
45
|
Session content or modify messages, prompts, transcripts, or history.
|
|
31
46
|
|
|
32
47
|
### Compatibility and prerequisites
|
|
33
48
|
|
|
34
|
-
-
|
|
49
|
+
- For development and source validation, use a clean checkout of the official [DeepSeek Harness
|
|
50
|
+
repository](https://github.com/deepseek-ai/deepseek-harness) on its current default branch. The
|
|
51
|
+
repository currently uses `master` rather than `main`; it is developer-preview software, so its
|
|
52
|
+
package and API contracts may change. Run the upstream install/build steps before installing
|
|
53
|
+
this plugin into that profile.
|
|
35
54
|
- The target profile, such as `web` or `demo`, must already start successfully, and the plugin
|
|
36
55
|
must be installed into the same profile that launches the Web UI.
|
|
37
56
|
- DSH Client must provide the native `@deepseek-ai/dsh-client-ui-conversation` package and its
|
|
38
57
|
`conversation.session.header.actions` seat.
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
58
|
+
- Git must be installed and available on `PATH` for Worktree operations. A Workspace must be
|
|
59
|
+
inside a Git repository with an initial commit and at least one local branch. A missing Git
|
|
60
|
+
executable shows install guidance and no command block; a missing repository, initial commit,
|
|
61
|
+
or local branch shows copyable setup commands. The plugin does not run setup or installation
|
|
62
|
+
commands or modify Workspace files.
|
|
42
63
|
- The package declares an installable `dsh.bundle` and provides `cordis.patch.yml`; its browser
|
|
43
64
|
UI is declared through the `dsh.client` metadata.
|
|
44
65
|
|
|
@@ -72,6 +93,20 @@ To inspect the currently published version on the official registry:
|
|
|
72
93
|
npm view @cerbur/clutch-dsh-worktree version --registry=https://registry.npmjs.org/
|
|
73
94
|
```
|
|
74
95
|
|
|
96
|
+
### Prepare the current upstream DSH checkout
|
|
97
|
+
|
|
98
|
+
For source-based development or validation, prepare the upstream checkout first. The current
|
|
99
|
+
upstream default branch is `master`; follow the repository's default branch if it changes later.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git clone https://github.com/deepseek-ai/deepseek-harness.git
|
|
103
|
+
cd deepseek-harness
|
|
104
|
+
git fetch origin
|
|
105
|
+
git pull --ff-only origin master
|
|
106
|
+
pnpm install
|
|
107
|
+
pnpm run build
|
|
108
|
+
```
|
|
109
|
+
|
|
75
110
|
### Install from a repository checkout
|
|
76
111
|
|
|
77
112
|
Build the package from the `clutch-dsh` checkout, then install its absolute path into the DSH
|
|
@@ -167,15 +202,32 @@ blank-session Hero. The displayed language follows DSH's current language settin
|
|
|
167
202
|
The default branch name is `dsh/<8-character-random-string>`.
|
|
168
203
|
2. The target Worktree path must be absolute, belong to the same Project, and differ from the
|
|
169
204
|
Project root. Relative paths, a different Project, or the Project root are rejected.
|
|
170
|
-
3.
|
|
171
|
-
|
|
172
|
-
|
|
205
|
+
3. Git must be installed and available on `PATH`. A missing Git executable shows install guidance
|
|
206
|
+
and no command block; install Git, restart DSH, and retry. If the repository, initial commit,
|
|
207
|
+
or local branch is missing, follow the copyable setup commands in the dialog. The plugin only
|
|
208
|
+
renders this guidance; it does not run setup or installation commands or edit business files.
|
|
209
|
+
|
|
210
|
+
### Import an existing Worktree
|
|
211
|
+
|
|
212
|
+
1. Select a Workspace, press its `+`, and choose the `Import` tab. The dialog loads Git-linked
|
|
213
|
+
Worktrees for that repository through the existing DSH `/api` Connection.
|
|
214
|
+
2. The first version lists only branch-attached, non-root Worktrees that are not already present
|
|
215
|
+
in the plugin sidecar. Detached HEAD entries are intentionally omitted. Candidates are presented
|
|
216
|
+
in a standard dropdown; each option shows its branch first and absolute path as secondary
|
|
217
|
+
diagnostic text.
|
|
218
|
+
3. Choose an option and select `Import Worktree`. Registration writes only the plugin sidecar;
|
|
219
|
+
the existing Worktree directory and Git working state remain in place. Import then creates or
|
|
220
|
+
reuses a Session at that Worktree cwd and runs the same bind → membership projection → open →
|
|
221
|
+
refresh flow as Create.
|
|
222
|
+
4. An active external import for the same Workspace and physical path is idempotent. A path already
|
|
223
|
+
managed by the plugin returns `WORKTREE_ALREADY_MANAGED`; invalid or stale candidates return
|
|
224
|
+
`WORKTREE_IMPORT_INVALID` and can be retried after the repository state is fixed.
|
|
173
225
|
|
|
174
226
|
### Create Main and Worktree Sessions
|
|
175
227
|
|
|
176
228
|
- Use Main's `+` to create a normal DSH Session in the Project-root view.
|
|
177
|
-
- Use a Worktree's `+` to create or reuse a Session with that Worktree as its runtime cwd.
|
|
178
|
-
|
|
229
|
+
- Use a Worktree's `+` to create or reuse a Session with that Worktree as its runtime cwd. The
|
|
230
|
+
plugin calls the upstream runtime with `session.create({ cwd: worktreePath })`, then saves the
|
|
179
231
|
external binding, applies a browser-local `{ workspaceId, sessionId }` membership projection,
|
|
180
232
|
and opens the Session.
|
|
181
233
|
- The connector reuses an unarchived blank Session with the exact target cwd when possible. An
|
|
@@ -195,17 +247,25 @@ blank-session Hero. The displayed language follows DSH's current language settin
|
|
|
195
247
|
the plugin sidecar; Main is a fixed first row and Worktrees cannot move across Workspaces.
|
|
196
248
|
- Use the active Worktree options menu and confirmation dialog to remove a Worktree. Main and
|
|
197
249
|
detached Worktrees do not show this menu.
|
|
250
|
+
- Imported Worktrees expose the same active options menu as plugin-created Worktrees. Removing
|
|
251
|
+
either source runs real `git worktree remove`; for an imported Worktree, the confirmation warns
|
|
252
|
+
that the linked Worktree directory may be deleted. Sessions are retained as detached bindings.
|
|
198
253
|
- Removing a Worktree does not delete its Sessions. The relationship remains detached until it
|
|
199
254
|
is explicitly unbound. Deleting a Workspace removes only DSH's Workspace registration; its
|
|
200
255
|
directory, Sessions, Git Worktrees, and plugin sidecar remain.
|
|
201
256
|
- DSH-native Workspace rename/delete/reorder and Session menus remain available. Session drag
|
|
202
257
|
ordering is limited to the current visual Main or Worktree group.
|
|
203
258
|
- The Main group shows the current local branch as `Local (branch)` and falls back to `Local` if
|
|
204
|
-
DSH reports no current branch.
|
|
205
|
-
|
|
259
|
+
DSH reports no current branch. When a Workspace is imported from a Git subdirectory, the Git
|
|
260
|
+
root is resolved first and the same branch/worktree information is used as for the root.
|
|
261
|
+
Branch names, paths, Workspace names, Session titles, and raw DSH/Git errors keep their
|
|
262
|
+
original values.
|
|
206
263
|
- Existing Sessions show read-only context in the form `Session title` → `Agent mode` →
|
|
207
|
-
`current branch / Worktree branch`.
|
|
208
|
-
|
|
264
|
+
`current branch / Worktree branch`. Long values remain ellipsized in the compact chip and show
|
|
265
|
+
their complete value in a hover card. The blank Hero shows `Workspace (branch)` after the native
|
|
266
|
+
title when its anchors are available and offers the same complete-value hover card.
|
|
267
|
+
- When the Sidebar is collapsed, the footer keeps its icon-only native action geometry; the plugin
|
|
268
|
+
does not render a separate `WT` rail control.
|
|
209
269
|
|
|
210
270
|
### Understand status and recovery messages
|
|
211
271
|
|
|
@@ -214,10 +274,13 @@ blank-session Hero. The displayed language follows DSH's current language settin
|
|
|
214
274
|
was retained. An active binding pointing to a missing Worktree produces an explicit repair
|
|
215
275
|
warning or error; it never silently falls back to another Worktree.
|
|
216
276
|
- Worktree health is a runtime Git projection and is not written to the sidecar. Git readiness
|
|
217
|
-
failures are shown per Workspace
|
|
218
|
-
|
|
277
|
+
failures are shown per Workspace: a missing Git executable shows installation guidance without
|
|
278
|
+
commands, while repository, initial commit, or local branch failures show copyable setup
|
|
279
|
+
commands. Connection, Gateway, and unexpected Worktree-domain failures remain visible as
|
|
280
|
+
retryable errors rather than empty lists.
|
|
219
281
|
- Refreshing an already-ready view preserves its current projection until replacement data is
|
|
220
|
-
available.
|
|
282
|
+
available. Same-Session snapshot updates do not blank the context or trigger redundant reads;
|
|
283
|
+
initial entry and explicit Retry may show a loading state when no cached view is available.
|
|
221
284
|
|
|
222
285
|
## Language behavior
|
|
223
286
|
|
|
@@ -240,6 +303,7 @@ an independent sidecar store and may contain only relationship facts such as:
|
|
|
240
303
|
|
|
241
304
|
- `projectId`, `worktreeId`, and `sessionId`;
|
|
242
305
|
- an absolute Worktree path, branch, and lifecycle state;
|
|
306
|
+
- the Worktree source (`plugin` or `external`);
|
|
243
307
|
- binding status and schema version.
|
|
244
308
|
|
|
245
309
|
The index is not written into a Project working tree or DSH's raw data directory. It does not
|
|
@@ -259,15 +323,16 @@ does not change the sidecar state, so the relationship remains retryable. Sessio
|
|
|
259
323
|
the native DSH API before binding; a binding failure never deletes or modifies the already-created
|
|
260
324
|
Session.
|
|
261
325
|
|
|
262
|
-
The
|
|
263
|
-
|
|
264
|
-
attach
|
|
265
|
-
projection is replayed after native list refreshes and removed when the binding
|
|
266
|
-
Client is disposed.
|
|
326
|
+
The Worktree session flow sends the independent Worktree cwd through the upstream DSH runtime and
|
|
327
|
+
keeps `{ workspaceId, sessionId }` as a browser-local membership projection rather than a
|
|
328
|
+
persistent DSH attach. It does not modify DSH source, Session metadata, or native Workspace
|
|
329
|
+
storage. The projection is replayed after native list refreshes and removed when the binding
|
|
330
|
+
disappears or the Client is disposed.
|
|
267
331
|
|
|
268
|
-
The blank Hero context is visual only. Because
|
|
269
|
-
placement depends on the native `[data-phase="hero"]` and title
|
|
270
|
-
anchors are unavailable and should move to a formal DSH slot
|
|
332
|
+
The blank Hero context is visual only. Because the current upstream DSH source checkout has no
|
|
333
|
+
additive Hero headline slot, its placement depends on the native `[data-phase="hero"]` and title
|
|
334
|
+
anchors; it disappears when those anchors are unavailable and should move to a formal DSH slot
|
|
335
|
+
when one exists.
|
|
271
336
|
|
|
272
337
|
## Development and verification
|
|
273
338
|
|
package/README.zh.md
CHANGED
|
@@ -12,30 +12,48 @@ Session 元数据、原生列表和会话历史的唯一事实来源。插件只
|
|
|
12
12
|
中文截图展示了侧边栏中的 Worktree 模式、包含 Main 和 Worktree 行的 Workspace 树,以及
|
|
13
13
|
新会话空白 Hero 中的只读上下文。
|
|
14
14
|
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
导入截图展示了现有 Workspace `+` 弹窗:默认选中创建,旁边是导入 Tab,并在普通下拉框中
|
|
18
|
+
使用安全的示例 branch 和路径值。
|
|
19
|
+
|
|
15
20
|
## 能力
|
|
16
21
|
|
|
17
22
|
- 从 DSH Sidebar footer 进入 Worktree 模式,按 Workspace → Worktree → Session 浏览会话。
|
|
18
23
|
- 搜索 Workspace,并从已有 local branch 创建 Git Worktree 和 branch。
|
|
24
|
+
- 在同一个弹窗中选择导入,发现与当前 Workspace repository 关联、尚未由 sidecar 管理且绑定 branch 的 Git Worktree。第一版不展示 repository root 和 detached HEAD 条目。
|
|
25
|
+
- 导入只登记已有 Worktree,不移动、复制或编辑其目录;记录使用 `source: external`,之后与 plugin 创建的记录共享 Session、binding、health、排序、cwd、projection、刷新和恢复流程。
|
|
26
|
+
- plugin 创建和导入的 Worktree 都通过真实的 `git worktree remove` 移除;移除导入的 Worktree 可能删除其关联目录,确认弹窗会明确提示。
|
|
19
27
|
- 在 Main 或 active Worktree 下创建普通 Session 或 Worktree Session,并直接打开新会话。
|
|
20
28
|
- 查看 ready、repair、active 和 detached Worktree 状态,包括可重试的操作错误。
|
|
21
29
|
- 通过 active Worktree 的选项菜单和确认弹窗移除 Worktree;Main 和 detached 行不显示该菜单。
|
|
22
30
|
- 继续使用 DSH 原生的 Workspace rename/delete/reorder 和 Session 菜单。Worktree 可以在所属
|
|
23
31
|
Workspace 内排序;顺序保存在插件 sidecar 中,Main 固定在第一位。
|
|
32
|
+
- 将 Workspace、Main 和 Worktree 的展开选择保存到浏览器本地存储;Session 五行溢出展开保持临时状态,并在刷新或父级折叠后重置。
|
|
33
|
+
- 在 Worktree view 高亮 DSH 当前 Session;进入 Worktree 模式或切换当前会话时,临时展开其 Workspace/Main/Worktree 路径和 Session 五行溢出,清空隐藏它的搜索并滚动定位;这一浏览器本地行为不改变已保存的展开选择。
|
|
24
34
|
- 在已有 Conversation 的标题行以及新会话空白 Hero 中,以只读方式显示当前 local branch 或
|
|
25
35
|
Worktree branch 上下文。
|
|
36
|
+
- 在同一个 Session 的 snapshot 更新以及 Session 切换期间保持 Conversation 和 Hero 上下文
|
|
37
|
+
稳定;替换读取进行时保留上一次有效上下文。
|
|
38
|
+
- 过长的 branch 名称在 chip 中折叠,并通过原生 hover card 展示完整值;Sidebar footer action
|
|
39
|
+
对齐原生字体和排版,Sidebar 折叠后不再额外显示 `WT` 按钮。
|
|
26
40
|
- Worktree Session 仍出现在原始 DSH Project/Workspace 视角中;插件不复制 Session 内容,
|
|
27
41
|
也不修改消息、prompt、transcript 或历史记录。
|
|
28
42
|
|
|
29
43
|
### 兼容性与前置条件
|
|
30
44
|
|
|
31
|
-
-
|
|
45
|
+
- 开发和源码验证应使用官方 [DeepSeek Harness 仓库](https://github.com/deepseek-ai/deepseek-harness)
|
|
46
|
+
的干净 checkout,并跟随仓库当前默认分支。该仓库当前使用 `master` 而不是 `main`,且仍是
|
|
47
|
+
developer preview,package 和 API contract 可能变化;在向 profile 安装本 plugin 前,先完成
|
|
48
|
+
upstream 的安装和构建步骤。
|
|
32
49
|
- 目标 profile(例如 `web` 或 `demo`)必须已经可以正常启动,且 plugin 必须安装到实际
|
|
33
50
|
启动 Web UI 的同一个 profile。
|
|
34
51
|
- DSH Client 必须提供原生 `@deepseek-ai/dsh-client-ui-conversation` package 及其
|
|
35
52
|
`conversation.session.header.actions` seat。
|
|
36
|
-
- Workspace 必须位于 Git repository
|
|
37
|
-
|
|
38
|
-
|
|
53
|
+
- Worktree 操作要求 Git 已安装且可在 PATH 中使用。Workspace 必须位于 Git repository 中,
|
|
54
|
+
且至少有一个初始 commit 和本地 branch。Git 可执行文件缺失时显示安装提示且不显示命令块;
|
|
55
|
+
缺少 repository、初始 commit 或本地 branch 时显示可复制的 setup 命令。插件不会执行 setup
|
|
56
|
+
或安装命令,也不会修改 Workspace 文件。
|
|
39
57
|
- package 声明了可安装的 `dsh.bundle` 并提供 `cordis.patch.yml`;浏览器 UI 通过
|
|
40
58
|
`dsh.client` metadata 声明。
|
|
41
59
|
|
|
@@ -68,6 +86,20 @@ pnpm dsh web
|
|
|
68
86
|
npm view @cerbur/clutch-dsh-worktree version --registry=https://registry.npmjs.org/
|
|
69
87
|
```
|
|
70
88
|
|
|
89
|
+
### 准备当前 upstream DSH checkout
|
|
90
|
+
|
|
91
|
+
进行源码开发或验证时,先准备 upstream checkout。当前 upstream 默认分支是 `master`;如果仓库
|
|
92
|
+
未来切换默认分支,应跟随仓库的当前默认分支。
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git clone https://github.com/deepseek-ai/deepseek-harness.git
|
|
96
|
+
cd deepseek-harness
|
|
97
|
+
git fetch origin
|
|
98
|
+
git pull --ff-only origin master
|
|
99
|
+
pnpm install
|
|
100
|
+
pnpm run build
|
|
101
|
+
```
|
|
102
|
+
|
|
71
103
|
### 从仓库 checkout 安装
|
|
72
104
|
|
|
73
105
|
先从 `clutch-dsh` checkout 构建 package,再把绝对路径安装到 DSH profile:
|
|
@@ -160,15 +192,31 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
|
160
192
|
branch 名称为 `dsh/<8-character-random-string>`。
|
|
161
193
|
2. 目标 Worktree 路径必须是绝对路径,属于同一个 Project,且不能是 Project 根目录。相对
|
|
162
194
|
路径、其他 Project 的路径或 Project 根目录都会被拒绝。
|
|
163
|
-
3.
|
|
164
|
-
|
|
195
|
+
3. Git 必须已安装且可在 PATH 中使用。Git 可执行文件缺失时显示安装提示且不显示命令块;请
|
|
196
|
+
安装 Git、重启 DSH 后重试。如果缺少 repository、初始 commit 或本地 branch,按照弹窗中
|
|
197
|
+
的可复制 setup 命令修复后重试。插件只展示这些提示,不会执行 setup 或安装命令或编辑
|
|
198
|
+
业务文件。
|
|
199
|
+
|
|
200
|
+
### 导入已有 Worktree
|
|
201
|
+
|
|
202
|
+
1. 选择 Workspace,点击旁边的 `+`,再选择 `导入` Tab。弹窗通过现有 DSH `/api` Connection
|
|
203
|
+
加载该 repository 的 Git Worktree 候选项。
|
|
204
|
+
2. 第一版只列出绑定 branch、不是 repository root、且未出现在 plugin sidecar 中的 Worktree。
|
|
205
|
+
detached HEAD 会被省略;候选项通过普通下拉框选择,每个选项先显示 branch,再显示绝对路径
|
|
206
|
+
作为诊断信息。
|
|
207
|
+
3. 在下拉框中选择一个选项并点击 `导入 Worktree`。登记只写入 plugin sidecar,已有 Worktree 目录和 Git
|
|
208
|
+
工作状态保持不变。随后会在该 Worktree cwd 创建或复用 Session,并执行与创建相同的
|
|
209
|
+
`bind → membership projection → open → refresh` 流程。
|
|
210
|
+
4. 同一 Workspace、同一物理路径的 active external 导入是幂等的。已经由 plugin 管理的路径
|
|
211
|
+
返回 `WORKTREE_ALREADY_MANAGED`;无效或过期候选项返回 `WORKTREE_IMPORT_INVALID`,修复
|
|
212
|
+
repository 状态后可以重试。
|
|
165
213
|
|
|
166
214
|
### 创建 Main 和 Worktree Session
|
|
167
215
|
|
|
168
216
|
- 使用 Main 的 `+`,在 Project 根目录视角中创建普通 DSH Session。
|
|
169
|
-
- 使用 Worktree 的 `+`,创建或复用 runtime cwd 指向该 Worktree 的 Session
|
|
170
|
-
|
|
171
|
-
|
|
217
|
+
- 使用 Worktree 的 `+`,创建或复用 runtime cwd 指向该 Worktree 的 Session。插件通过 upstream
|
|
218
|
+
runtime 调用 `session.create({ cwd: worktreePath })`,随后保存外部 binding,在当前浏览器内
|
|
219
|
+
应用 `{ workspaceId, sessionId }` membership projection,并打开该 Session。
|
|
172
220
|
- 如果存在目标 cwd 完全匹配的未归档 blank Session,连接器会优先复用它。已绑定的 Session
|
|
173
221
|
会直接打开;未绑定的候选会先 binding,再 projection 和打开。否则执行
|
|
174
222
|
`create → bind → project → open`,同一个 Worktree 的并发点击会合并。
|
|
@@ -184,17 +232,24 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
|
184
232
|
Main 是固定的第一行,Worktree 不能跨 Workspace 移动。
|
|
185
233
|
- 使用 active Worktree 的选项菜单和确认弹窗移除 Worktree。Main 和 detached Worktree 不显示
|
|
186
234
|
该菜单。
|
|
235
|
+
- 导入的 Worktree 与 plugin 创建的 Worktree 显示相同的 active 选项菜单。两种来源都执行真实
|
|
236
|
+
`git worktree remove`;导入项的确认文案会警告关联 Worktree 目录可能被删除。Session 会
|
|
237
|
+
保留为 detached binding。
|
|
187
238
|
- 移除 Worktree 不会删除其 Session。关系会保留为 detached,直到显式解绑。删除 Workspace
|
|
188
239
|
只会删除 DSH 的 Workspace registration;其目录、Session、Git Worktree 和 plugin
|
|
189
240
|
sidecar 会保留。
|
|
190
241
|
- DSH 原生的 Workspace rename/delete/reorder 和 Session 菜单继续可用。Session 拖动排序
|
|
191
242
|
限定在当前视觉 Main 或 Worktree 分组中。
|
|
192
243
|
- Main 分组显示当前 local branch:有分支时为 `本地(branch)`,DSH 没有返回当前分支时
|
|
193
|
-
回退为
|
|
194
|
-
|
|
244
|
+
回退为 `本地`。如果导入的 Workspace 是 Git 仓库中的子目录,会先解析 Git 根目录,再
|
|
245
|
+
复用与 Git 根目录相同的 branch/worktree 信息。branch 名称、路径、Workspace 名称、Session
|
|
246
|
+
标题以及原始 DSH/Git 错误信息保持原值。
|
|
195
247
|
- 已有 Session 会在标题行显示只读上下文,格式为 `Session title` → `Agent mode` →
|
|
196
|
-
`current branch / Worktree branch
|
|
197
|
-
|
|
248
|
+
`current branch / Worktree branch`。过长值在紧凑 chip 中折叠,并通过 hover card 显示完整
|
|
249
|
+
内容。原生标题存在且有锚点时,新会话空白 Hero 会在标题后显示 `Workspace (branch)`,并
|
|
250
|
+
提供相同的完整值 hover card。
|
|
251
|
+
- Sidebar 折叠后,footer 保留原生的 icon-only action 尺寸和排版;插件不会再绘制独立的
|
|
252
|
+
`WT` rail control。
|
|
198
253
|
|
|
199
254
|
### 理解状态与恢复提示
|
|
200
255
|
|
|
@@ -202,9 +257,11 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
|
202
257
|
`detached` 表示 Git Worktree 已被移除,但关系仍然保留。active binding 指向缺失
|
|
203
258
|
Worktree 时会显示明确的 repair 警告或错误,不会静默切换到其他 Worktree。
|
|
204
259
|
- Worktree health 是 Git 的运行时 projection,不写入 sidecar。Git 前置条件失败按
|
|
205
|
-
Workspace
|
|
206
|
-
|
|
207
|
-
|
|
260
|
+
Workspace 显示提示:Git 可执行文件缺失时显示安装提示且不显示命令块,缺少 repository、
|
|
261
|
+
初始 commit 或本地 branch 时显示可复制的 setup 命令。Connection、Gateway 和未预期的
|
|
262
|
+
Worktree domain 错误会保留为可重试错误,不会伪装为空列表。
|
|
263
|
+
- 已经 ready 的视角刷新时会保留当前 projection,直到替换数据可用。同一个 Session 的
|
|
264
|
+
snapshot 更新不会清空上下文,也不会触发重复读取;没有缓存视角时,首次进入和显式 Retry
|
|
208
265
|
可以显示 loading 状态。
|
|
209
266
|
|
|
210
267
|
## 界面语言
|
|
@@ -225,6 +282,7 @@ DSH 管理原始 Project/Workspace 身份和根目录、Session 身份和元数
|
|
|
225
282
|
|
|
226
283
|
- `projectId`、`worktreeId` 和 `sessionId`;
|
|
227
284
|
- 绝对 Worktree 路径、branch 和生命周期状态;
|
|
285
|
+
- Worktree 来源(`plugin` 或 `external`);
|
|
228
286
|
- binding 状态和 schema version。
|
|
229
287
|
|
|
230
288
|
索引不会写入 Project 工作树或 DSH 原始数据目录,也不会保存 `projectRoot` 副本或任何
|
|
@@ -240,14 +298,14 @@ Worktree binding 使用对应的 Worktree 路径。cwd 在每次执行时派生
|
|
|
240
298
|
创建的 Git Worktree。删除 Worktree 失败时不会改变 sidecar 状态,因此关系仍可重试。创建
|
|
241
299
|
Session 时先调用 DSH 原生 API,再写入 binding;binding 失败不会删除或修改已创建的 Session。
|
|
242
300
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
Session metadata 或原生 Workspace 存储。native list
|
|
246
|
-
|
|
301
|
+
Worktree Session 流程将独立的 Worktree cwd 交给 upstream DSH runtime,并将
|
|
302
|
+
`{ workspaceId, sessionId }` 保持为浏览器本地 membership projection,而不是持久化的 DSH
|
|
303
|
+
attach。它不会修改 DSH 源码、Session metadata 或原生 Workspace 存储。native list 刷新后会
|
|
304
|
+
重放 projection;binding 消失或 Client dispose 时会移除 projection。
|
|
247
305
|
|
|
248
|
-
空白 Hero
|
|
249
|
-
`[data-phase="hero"]`
|
|
250
|
-
|
|
306
|
+
空白 Hero 上下文只用于展示。由于当前 upstream DSH source checkout 没有 additive Hero
|
|
307
|
+
headline slot,它的位置依赖原生 `[data-phase="hero"]` 和标题锚点;锚点不可用时浮层会消失,
|
|
308
|
+
未来有正式 DSH slot 时应迁移到该 slot。
|
|
251
309
|
|
|
252
310
|
## 开发与验证
|
|
253
311
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorktreeContext.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,YAAY,EAEb,MAAM,kCAAkC,CAAC;AAI1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,mEAAmE;AACnE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;KAC/D,CAAC;CACH;AAID,0DAA0D;AAC1D,MAAM,MAAM,0BAA0B,GACpC,YAAY,CAAC,qCAAqC,CAAC,GACnD,WAAW,CAAC,OAAO,WAAW,CAAC,GAC/B,UAAU,CAAC,uBAAuB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"WorktreeContext.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,YAAY,EAEb,MAAM,kCAAkC,CAAC;AAI1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,mEAAmE;AACnE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;KAC/D,CAAC;CACH;AAID,0DAA0D;AAC1D,MAAM,MAAM,0BAA0B,GACpC,YAAY,CAAC,qCAAqC,CAAC,GACnD,WAAW,CAAC,OAAO,WAAW,CAAC,GAC/B,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAqBtC,oFAAoF;AACpF,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,kBAAkB,EAClB,CAAC,GACF,EAAE,0BAA0B,sCAI5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorktreeContext.js","sourceRoot":"","sources":["../../src/client/WorktreeContext.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAK5E,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAiB5C,SAAS,oBAAoB,CAAC,EAC5B,KAAK,EACL,CAAC,GAIF;IACC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACvC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,KAAK,MAAM;QACrC,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1C,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IACjD,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"WorktreeContext.js","sourceRoot":"","sources":["../../src/client/WorktreeContext.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAK5E,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAiB5C,SAAS,oBAAoB,CAAC,EAC5B,KAAK,EACL,CAAC,GAIF;IACC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACvC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,KAAK,MAAM;QACrC,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1C,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IACjD,OAAO,CACL,gBAAM,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,gBAAc,SAAS,aAC9E,KAAC,mBAAmB,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,WAAW,iBAAc,MAAM,GAAG,EACnF,eAAM,SAAS,EAAE,MAAM,CAAC,YAAY,YAAG,KAAK,CAAC,KAAK,GAAQ,IACrD,CACR,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,qBAAqB,CAAC,EACpC,SAAS,EACT,kBAAkB,EAClB,CAAC,GAC0B;IAC3B,MAAM,KAAK,GAAG,kBAAkB,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;IACzD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,KAAC,oBAAoB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,GAAI,CAAC;AAC5D,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { WORKTREE_NS } from './locales.js';
|
|
|
4
4
|
export type WorktreeHeroContextProps = PropsRuntime<'shell.overlay'> & PropsLocale<typeof WORKTREE_NS> & InjectFace<WorktreeContextInjected>;
|
|
5
5
|
/**
|
|
6
6
|
* Browser-local Hero suffix. It intentionally uses the frame overlay because
|
|
7
|
-
*
|
|
7
|
+
* The current upstream DSH exposes no additive slot beside the native Hero headline.
|
|
8
8
|
*/
|
|
9
9
|
export declare function WorktreeHeroContext({ useWorktreeContext, t, }: WorktreeHeroContextProps): import("react").JSX.Element | null;
|
|
10
10
|
//# sourceMappingURL=WorktreeHeroContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorktreeHeroContext.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeHeroContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,YAAY,EAEb,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"WorktreeHeroContext.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeHeroContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,YAAY,EAEb,MAAM,kCAAkC,CAAC;AAG1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK3C,MAAM,MAAM,wBAAwB,GAClC,YAAY,CAAC,eAAe,CAAC,GAC7B,WAAW,CAAC,OAAO,WAAW,CAAC,GAC/B,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAgFtC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,kBAAkB,EAClB,CAAC,GACF,EAAE,wBAAwB,sCAgF1B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useLayoutEffect, useState } from 'react';
|
|
3
|
+
import { HoverCard } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
3
4
|
import styles from './worktree-context.css';
|
|
4
5
|
function labelFor(state) {
|
|
5
6
|
if (state.status !== 'ready' ||
|
|
@@ -35,11 +36,15 @@ function positionedAncestor(element) {
|
|
|
35
36
|
}
|
|
36
37
|
return null;
|
|
37
38
|
}
|
|
39
|
+
function overlayFor(element) {
|
|
40
|
+
const host = element.closest('[data-worktree-hero-host]');
|
|
41
|
+
return positionedAncestor(host ?? element);
|
|
42
|
+
}
|
|
38
43
|
function measurePlacement(element) {
|
|
39
44
|
const hero = document.querySelector('[data-phase="hero"]');
|
|
40
45
|
// The Slot renderer inserts a display: contents wrapper before the actual
|
|
41
46
|
// shell overlay layer, so the direct parent is not the containing block.
|
|
42
|
-
const overlay =
|
|
47
|
+
const overlay = overlayFor(element);
|
|
43
48
|
const headline = hero === null ? null : headlineElement(hero);
|
|
44
49
|
if (hero === null || headline === null || overlay === null)
|
|
45
50
|
return null;
|
|
@@ -66,7 +71,7 @@ function contextAriaLabel(state, t) {
|
|
|
66
71
|
}
|
|
67
72
|
/**
|
|
68
73
|
* Browser-local Hero suffix. It intentionally uses the frame overlay because
|
|
69
|
-
*
|
|
74
|
+
* The current upstream DSH exposes no additive slot beside the native Hero headline.
|
|
70
75
|
*/
|
|
71
76
|
export function WorktreeHeroContext({ useWorktreeContext, t, }) {
|
|
72
77
|
const state = useWorktreeContext((snapshot) => snapshot);
|
|
@@ -106,7 +111,7 @@ export function WorktreeHeroContext({ useWorktreeContext, t, }) {
|
|
|
106
111
|
const resizeObserver = typeof ResizeObserver === 'undefined'
|
|
107
112
|
? undefined
|
|
108
113
|
: new ResizeObserver(schedule);
|
|
109
|
-
resizeObserver?.observe(
|
|
114
|
+
resizeObserver?.observe(overlayFor(element) ?? element);
|
|
110
115
|
window.addEventListener('resize', schedule);
|
|
111
116
|
schedule();
|
|
112
117
|
return () => {
|
|
@@ -120,9 +125,9 @@ export function WorktreeHeroContext({ useWorktreeContext, t, }) {
|
|
|
120
125
|
const ariaLabel = contextAriaLabel(state, t);
|
|
121
126
|
if (label === undefined)
|
|
122
127
|
return null;
|
|
123
|
-
return (_jsx("span", {
|
|
128
|
+
return (_jsx("span", { className: styles.heroContextHost, "data-worktree-hero-host": true, style: placement === null ? { visibility: 'hidden' } : {
|
|
124
129
|
left: `${placement.left}px`,
|
|
125
130
|
top: `${placement.top}px`,
|
|
126
|
-
}, children: label }));
|
|
131
|
+
}, children: _jsx(HoverCard, { anchor: (_jsx("span", { ref: measure, className: styles.heroContext, "data-worktree-hero-context": true, "aria-label": ariaLabel, title: label, children: label })), content: _jsx("div", { className: styles.contextHoverTitle, children: label }), openDelayMs: 500 }) }));
|
|
127
132
|
}
|
|
128
133
|
//# sourceMappingURL=WorktreeHeroContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorktreeHeroContext.js","sourceRoot":"","sources":["../../src/client/WorktreeHeroContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WorktreeHeroContext.js","sourceRoot":"","sources":["../../src/client/WorktreeHeroContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAO/D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAKlE,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAc5C,SAAS,QAAQ,CAAC,KAA2B;IAC3C,IACE,KAAK,CAAC,MAAM,KAAK,OAAO;QACxB,KAAK,CAAC,cAAc,KAAK,SAAS;QAClC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,EAC3B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,cAAc,KAAK,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC;AAC1D,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAgB,EAAE,MAAc;IAC9D,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAc,SAAS,CAAC,CAAC;IACjE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC,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AAC,eAAe,mCAEjC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;YACrD,IAAI,EAAE,GAAG,SAAS,CAAC,IAAI,IAAI;YAC3B,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,IAAI;SAC1B,YAED,KAAC,SAAS,IACR,MAAM,EAAE,CACN,eACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,MAAM,CAAC,WAAW,oDAEjB,SAAS,EACrB,KAAK,EAAE,KAAK,YAEX,KAAK,GACD,CACR,EACD,OAAO,EAAE,cAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,YAAG,KAAK,GAAO,EAChE,WAAW,EAAE,GAAG,GAChB,GACG,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -4,5 +4,5 @@ export type { WorktreeSurfaceInjected, WorktreeSurfaceProps, } from './worktree-
|
|
|
4
4
|
* Peer Worktree navigation surface. It keeps the original DSH Workspace mode
|
|
5
5
|
* intact and renders a browser-local Workspace → Worktree → Session projection.
|
|
6
6
|
*/
|
|
7
|
-
export declare function WorktreeSurface({ useStore, actions, useSessions, useWorkspaces, t, available, manager, invalidateWorktreeContext, createWorkspace, createSessionForWorktree: createSessionCallback, createMainSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, insertSessionBefore, insertWorktreeBefore, renameSession, forkSession, archiveSession, ensureSessionWorkspace, syncSessionWorkspaces, openSession, }: WorktreeSurfaceProps): import("react").JSX.Element | null;
|
|
7
|
+
export declare function WorktreeSurface({ useStore, actions, useSessions, useWorkspaces, t, available, expandState, manager, invalidateWorktreeContext, createWorkspace, createSessionForWorktree: createSessionCallback, createMainSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, insertSessionBefore, insertWorktreeBefore, renameSession, forkSession, archiveSession, ensureSessionWorkspace, syncSessionWorkspaces, openSession, }: WorktreeSurfaceProps): import("react").JSX.Element | null;
|
|
8
8
|
//# sourceMappingURL=WorktreeSurface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorktreeSurface.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeSurface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorktreeSurface.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeSurface.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAQV,oBAAoB,EAQrB,MAAM,6BAA6B,CAAC;AAsBrC,YAAY,EACV,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAwBrC;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,OAAO,EACP,WAAW,EACX,aAAa,EACb,CAAC,EACD,SAAS,EACT,WAAW,EACX,OAAO,EACP,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EAAE,qBAAqB,EAC/C,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,WAAW,GACZ,EAAE,oBAAoB,sCAu5CtB"}
|