dsh-workspace-browser 0.0.0-stage → 0.4.13

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/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // DSH loads the browser half for this client-only plugin.
2
+ export function apply() {}
package/package.json CHANGED
@@ -1,6 +1,40 @@
1
1
  {
2
2
  "name": "dsh-workspace-browser",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.13",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/tm5452/dsh-workspace-browser.git"
8
+ },
9
+ "description": "Add folder browsing to DeepSeek Harness sidebar view options.",
10
+ "type": "module",
11
+ "main": "./lib/index.js",
12
+ "exports": {
13
+ ".": "./lib/index.js",
14
+ "./client": "./lib/client.js",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "dsh": {
18
+ "bundle": { "patch": "./cordis.patch.yml" },
19
+ "client": {
20
+ "platform": "web",
21
+ "inject": [
22
+ "@deepseek-ai/dsh-api-remotes",
23
+ "@deepseek-ai/dsh-api-workspace-controller",
24
+ "@deepseek-ai/dsh-api-session-controller",
25
+ "@deepseek-ai/dsh-client-locale",
26
+ "@deepseek-ai/dsh-client-ui-context-menu",
27
+ "@deepseek-ai/dsh-client-ui-layout",
28
+ "@deepseek-ai/dsh-client-ui-session",
29
+ "@deepseek-ai/dsh-client-ui-sidebar",
30
+ "@deepseek-ai/dsh-client-ui-workspace"
31
+ ]
32
+ }
33
+ },
34
+ "files": ["lib", "src", "scripts", "cordis.patch.yml"],
35
+ "scripts": {
36
+ "build": "node scripts/build.mjs",
37
+ "prepack": "npm run build"
38
+ },
39
+ "keywords": ["dsh-plugin", "deepseek-harness", "workspace", "sessions"]
40
+ }
@@ -0,0 +1,37 @@
1
+ import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
2
+
3
+ const root = new URL('../', import.meta.url);
4
+ const read = path => readFileSync(new URL(path, root), 'utf8');
5
+ const { name } = JSON.parse(read('package.json'));
6
+ const source = [read('src/mouse-gestures.js'), read('src/client.js')].join('\n');
7
+ const css = [read('src/browser.css'), read('src/gesture.css')].join('\n');
8
+ const folderIcon = `data:image/svg+xml;base64,${Buffer.from(read('src/folder.svg')).toString('base64')}`;
9
+ const sessionIcon = `data:image/svg+xml;base64,${Buffer.from(read('src/session.svg')).toString('base64')}`;
10
+
11
+ const menuFolderIcon = 'data:image/svg+xml;base64,' + Buffer.from(read('src/menu-folder.svg')).toString('base64');
12
+ const largeIconsMenuIcon = 'data:image/svg+xml;base64,' + Buffer.from(read('src/large-icons.svg')).toString('base64');
13
+ const listMenuIcon = 'data:image/svg+xml;base64,' + Buffer.from(read('src/list-view.svg')).toString('base64');
14
+
15
+ // DSH supplies React and its UI primitives through the client module loader.
16
+ const bundle = `// Generated by scripts/build.mjs.
17
+ window.__ModuleLoader__.load({
18
+ id: ${JSON.stringify(name)},
19
+ factory(require) {
20
+ const id = ${JSON.stringify(name)};
21
+ const react = require('react');
22
+ const { createPortal, flushSync } = require('react-dom');
23
+ const ui = require('@deepseek-ai/dsh-client-ui-primitives');
24
+ const css = ${JSON.stringify(css)};
25
+ const folderIcon = ${JSON.stringify(folderIcon)};
26
+ const sessionIcon = ${JSON.stringify(sessionIcon)};
27
+ const largeIconsMenuIcon = ${JSON.stringify(largeIconsMenuIcon)};
28
+ const menuFolderIcon = ${JSON.stringify(menuFolderIcon)};
29
+ const listMenuIcon = ${JSON.stringify(listMenuIcon)};
30
+ ${source.trimEnd().split('\n').map(line => ` ${line}`).join('\n')}
31
+ return { apply, inject };
32
+ },
33
+ });
34
+ `;
35
+
36
+ mkdirSync(new URL('lib/', root), { recursive: true });
37
+ writeFileSync(new URL('lib/client.js', root), bundle);
@@ -0,0 +1,439 @@
1
+ [data-dwb-grid] > :not(.dwb-mount) { display: none; }
2
+ .dwb-mount[hidden] { display: none; }
3
+ .dwb-toolbar-mount[hidden], .dwb-address-mount[hidden] { display: none; }
4
+
5
+ @property --dwb-reveal-size {
6
+ syntax: '<length>';
7
+ inherits: true;
8
+ initial-value: 0px;
9
+ }
10
+
11
+ [data-dwb-layout] {
12
+ --dwb-edge-end: 9px;
13
+ --dwb-content-start: 14px;
14
+ --dwb-list-item-padding: 8px;
15
+ --dwb-nav-width: 95px;
16
+ --dwb-tile-start: calc(var(--dwb-content-start) - var(--dwb-list-item-padding));
17
+ --dwb-heading-opacity: 1;
18
+ --dwb-heading-visibility: visible;
19
+ --dwb-heading-hide-delay: 0ms;
20
+ --dwb-reveal-height: 40px;
21
+ --dwb-reveal-delay: 0ms;
22
+ --dwb-reveal-size: 0px;
23
+ --dwb-control-opacity: 0;
24
+ --dwb-control-visibility: hidden;
25
+ --dwb-fade-duration: 42.5ms;
26
+ --dwb-visibility-delay: 42.5ms;
27
+ container-type: inline-size;
28
+ min-block-size: 0;
29
+ position: relative;
30
+ transition: --dwb-reveal-size 95ms ease var(--dwb-reveal-delay);
31
+ }
32
+
33
+ [data-dwb-layout]:is([data-dwb-reveal-held], [data-dwb-reveal-hover], :has(> .dwb-toolbar-mount .dwb-nav-buttons :focus-visible, > [data-dwb-header] :focus-visible, > .dwb-address-mount :focus-visible)) {
34
+ --dwb-reveal-delay: 50ms;
35
+ --dwb-reveal-size: var(--dwb-reveal-height);
36
+ --dwb-heading-opacity: 0;
37
+ --dwb-heading-visibility: hidden;
38
+ --dwb-heading-hide-delay: 117.5ms;
39
+ --dwb-control-opacity: 1;
40
+ --dwb-control-visibility: visible;
41
+ --dwb-fade-duration: 67.5ms;
42
+ --dwb-visibility-delay: var(--dwb-reveal-delay);
43
+ }
44
+
45
+ [data-slot='sidebar.workspaces'] [data-dwb-layout] > [data-dwb-grid] {
46
+ margin-inline: 0;
47
+ padding-inline: 0;
48
+ flex: 1 1 0;
49
+ min-block-size: 0;
50
+ display: block;
51
+ overflow: hidden;
52
+ overflow-y: auto;
53
+ overscroll-behavior-y: contain;
54
+ }
55
+
56
+ .dwb-heading[hidden], [data-dwb-replaced-heading] { display: none; }
57
+ .dwb-heading {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: 4px;
61
+ max-width: calc(100cqi - var(--dsh-sidebar-row-padding, 12px) - 104px);
62
+ min-width: 0;
63
+ flex: none;
64
+ white-space: nowrap;
65
+ line-height: 20px;
66
+ height: 22px;
67
+ position: absolute;
68
+ top: 21px;
69
+ inset-inline-start: var(--dwb-content-start);
70
+ z-index: 3;
71
+ pointer-events: none;
72
+ }
73
+
74
+ .dwb-heading:has(> .dwb-notifications) {
75
+ /* Center the 22px dot in the same 23px slot as the back arrow. */
76
+ inset-inline-start: calc(var(--dwb-tile-start) + 0.5px);
77
+ }
78
+
79
+ .dwb-heading-name {
80
+ overflow: hidden;
81
+ text-overflow: ellipsis;
82
+ translate: 0 var(--dwb-reveal-size);
83
+ opacity: var(--dwb-heading-opacity);
84
+ visibility: var(--dwb-heading-visibility);
85
+ transition: opacity 67.5ms ease var(--dwb-reveal-delay), visibility 0s linear var(--dwb-heading-hide-delay);
86
+ }
87
+
88
+ [data-dwb-header]:has(button[aria-expanded='true']) .dwb-heading-name { display: none; }
89
+
90
+ [data-slot='sidebar.workspaces'] [data-dwb-layout] > .dwb-toolbar-mount + [data-dwb-header] {
91
+ margin-block-start: 0;
92
+ }
93
+
94
+ [data-slot='sidebar.workspaces'] [data-dwb-layout] > [data-dwb-header]:has(button[aria-expanded='true']) {
95
+ padding-inline-start: calc(var(--dwb-tile-start) + var(--dwb-nav-width));
96
+ }
97
+
98
+ [data-slot='sidebar.workspaces'] [data-dwb-layout] > [data-dwb-header]:not(:has(button[aria-expanded='true'])) {
99
+ margin-inline-end: 0;
100
+ /* The native header reserves one 4px gap after its tool group. */
101
+ padding-inline-end: calc(var(--dwb-edge-end) - 4px);
102
+ }
103
+
104
+ .dwb-menu-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
105
+ .dwb-menu-label svg { flex: none; }
106
+
107
+ /* In this grouping mode, only the new grouping row carries a check. */
108
+ [data-dwb-selected] .dwb-native-group > svg:last-child { visibility: hidden; }
109
+
110
+ .dwb-browser {
111
+ min-width: 0;
112
+ padding: 0 0 10px;
113
+ color: var(--dsw-alias-label-primary);
114
+ font-size: 13px;
115
+ }
116
+
117
+ .dwb-toolbar-mount { flex: none; }
118
+ .dwb-reveal-zone {
119
+ min-height: 2px;
120
+ padding-block-end: 2px;
121
+ }
122
+
123
+ .dwb-address-mount {
124
+ flex: none;
125
+ block-size: var(--dwb-reveal-size);
126
+ }
127
+
128
+ .dwb-reveal-control {
129
+ visibility: var(--dwb-control-visibility);
130
+ opacity: var(--dwb-control-opacity);
131
+ transition: opacity var(--dwb-fade-duration) ease var(--dwb-reveal-delay),
132
+ visibility 0s linear var(--dwb-visibility-delay);
133
+ }
134
+
135
+ @media (prefers-reduced-motion: reduce) {
136
+ .dwb-reveal-control, .dwb-heading-name, [data-dwb-layout] { transition: none; }
137
+ }
138
+
139
+ .dwb-divider {
140
+ position: relative;
141
+ width: 100cqi;
142
+ height: 12px;
143
+ touch-action: none;
144
+ }
145
+
146
+ .dwb-divider[role='separator'] { cursor: row-resize; }
147
+
148
+ .dwb-divider::before {
149
+ content: '';
150
+ position: absolute;
151
+ inset: 50% 0 auto;
152
+ transform: translateY(-50%);
153
+ pointer-events: none;
154
+ border-top: 0.5px solid var(--dsw-alias-border-l3);
155
+ }
156
+
157
+ [data-dwb-resized-navigation] {
158
+ height: var(--dwb-navigation-height);
159
+ min-height: 0;
160
+ overflow-y: auto;
161
+ scrollbar-width: thin;
162
+ flex-shrink: 0;
163
+ }
164
+
165
+ [data-dwb-resized-navigation] > * { flex-shrink: 0; }
166
+
167
+ .dwb-nav-buttons {
168
+ position: absolute;
169
+ top: 19px;
170
+ inset-inline-start: var(--dwb-tile-start);
171
+ z-index: 2;
172
+ display: flex;
173
+ gap: 1px;
174
+ }
175
+
176
+ .dwb-nav-buttons .dwb-nav-button {
177
+ width: 23px;
178
+ height: 26px;
179
+ padding: 0;
180
+ justify-content: center;
181
+ }
182
+
183
+ .dwb-nav-buttons .dwb-nav-button:disabled { cursor: default; }
184
+
185
+ .dwb-path {
186
+ position: absolute;
187
+ top: calc(59px - var(--dwb-reveal-height));
188
+ translate: 0 var(--dwb-reveal-size);
189
+ inset-inline-start: var(--dwb-tile-start);
190
+ width: calc(100cqi - var(--dwb-tile-start) - var(--dwb-edge-end));
191
+ z-index: 2;
192
+ box-sizing: border-box;
193
+ display: flex;
194
+ align-items: center;
195
+ gap: 2px;
196
+ min-width: 0;
197
+ height: 30px;
198
+ padding: 0 5px;
199
+ overflow-x: auto;
200
+ scrollbar-width: none;
201
+ border: 0.5px solid var(--dsw-alias-border-l3);
202
+ border-radius: var(--dsw-radius-md);
203
+ background: var(--dsw-alias-bg-layer-1);
204
+ }
205
+
206
+ .dwb-crumb {
207
+ display: inline-flex;
208
+ flex: none;
209
+ align-items: center;
210
+ gap: 2px;
211
+ white-space: nowrap;
212
+ }
213
+
214
+ .dwb-crumb button { min-height: 24px; height: 24px; padding-inline: 4px; font-size: 12px; }
215
+ .dwb-current { padding: 0 4px; }
216
+ .dwb-indicator { flex: none; color: var(--dsw-alias-label-tertiary); }
217
+
218
+ .dwb-list {
219
+ box-sizing: border-box;
220
+ display: grid;
221
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 76px), 1fr));
222
+ gap: 4px 5px;
223
+ list-style: none;
224
+ width: calc(100cqi - var(--dwb-edge-end));
225
+ margin: 8px 0 0;
226
+ padding-inline: var(--dwb-tile-start) 0;
227
+ }
228
+
229
+ .dwb-list[data-dwb-display='icons'] { align-items: start; }
230
+ .dwb-list > li { min-width: 0; position: relative; }
231
+ .dwb-list > li[data-dwb-drop]::after {
232
+ content: '';
233
+ pointer-events: none;
234
+ position: absolute;
235
+ z-index: 1;
236
+ border-radius: 2px;
237
+ background: var(--dsw-alias-state-business-primary, #3975ea);
238
+ }
239
+ .dwb-list[data-dwb-display='icons'] > li[data-dwb-drop]::after { inset-block: 0; width: 2px; }
240
+ .dwb-list[data-dwb-display='icons'] > li[data-dwb-drop='before']::after { inset-inline-start: -2px; }
241
+ .dwb-list[data-dwb-display='icons'] > li[data-dwb-drop='after']::after { inset-inline-end: -2px; }
242
+ .dwb-list[data-dwb-display='list'] > li[data-dwb-drop]::after { inset-inline: 0; height: 2px; }
243
+ .dwb-list[data-dwb-display='list'] > li[data-dwb-drop='before']::after { inset-block-start: 0; }
244
+ .dwb-list[data-dwb-display='list'] > li[data-dwb-drop='after']::after { inset-block-end: 0; }
245
+
246
+ .dwb-list .dwb-tile {
247
+ position: relative;
248
+ width: 100%;
249
+ height: auto;
250
+ padding: 9px 4px 5px;
251
+ flex-direction: column;
252
+ justify-content: flex-start;
253
+ gap: 5px;
254
+ border-radius: var(--dsw-radius-md);
255
+ font-size: 12px;
256
+ font-weight: 400;
257
+ line-height: 15px;
258
+ color: var(--dsw-alias-label-primary);
259
+ user-select: none;
260
+ }
261
+
262
+ .dwb-list .dwb-tile {
263
+ --dwb-tile-fill: transparent;
264
+ background: var(--dwb-tile-fill);
265
+ }
266
+
267
+ .dwb-list .dwb-tile[data-dwb-guide] { --dwb-tile-fill: #F1F3F5; }
268
+ :where([data-ds-dark-theme]) .dwb-list .dwb-tile[data-dwb-guide] { --dwb-tile-fill: var(--dsw-alias-bg-layer-2); }
269
+
270
+ @media (hover: hover) {
271
+ .dwb-list .dwb-tile:hover { --dwb-tile-fill: var(--dsw-alias-interactive-bg-hover); }
272
+ }
273
+
274
+ .dwb-list .dwb-tile[aria-pressed='true'] { --dwb-tile-fill: var(--dsw-alias-interactive-bg-hover); }
275
+
276
+ .dwb-list .dwb-tile[aria-current] {
277
+ --dwb-tile-fill: var(--dsw-alias-interactive-bg-active);
278
+ }
279
+
280
+ .dwb-list .dwb-tile:is(:hover, :active):not(:disabled) { background: var(--dwb-tile-fill); }
281
+
282
+ .dwb-tile-icon {
283
+ position: relative;
284
+ display: flex;
285
+ align-items: center;
286
+ justify-content: center;
287
+ color: var(--dsw-alias-label-secondary);
288
+ }
289
+
290
+ .dwb-tile[aria-current] .dwb-tile-icon { color: var(--dsw-alias-state-business-primary, var(--dsw-alias-label-primary)); }
291
+ .dwb-tile-icon img { display: block; object-fit: contain; }
292
+ .dwb-session-icon {
293
+ display: block;
294
+ background: #C3C3C3;
295
+ mask: center / contain no-repeat;
296
+ }
297
+ .dwb-tile[aria-current] .dwb-session-icon { background: #61666B; }
298
+ :where([data-ds-dark-theme]) .dwb-session-icon { background: rgba(255, 255, 255, 0.45); }
299
+ :where([data-ds-dark-theme]) .dwb-tile[aria-current] .dwb-session-icon { background: rgba(255, 255, 255, 0.85); }
300
+
301
+ .dwb-label {
302
+ display: -webkit-box;
303
+ -webkit-box-orient: vertical;
304
+ -webkit-line-clamp: 2;
305
+ width: 100%;
306
+ overflow: hidden;
307
+ overflow-wrap: anywhere;
308
+ white-space: normal;
309
+ text-align: center;
310
+ }
311
+
312
+ .dwb-status { margin: 10px 8px; color: var(--dsw-alias-label-secondary); }
313
+
314
+ .dwb-menu-icon { display: block; object-fit: contain; }
315
+
316
+ .dwb-list[data-dwb-display='list'] { grid-template-columns: minmax(0, 1fr); gap: 0; }
317
+
318
+ .dwb-list[data-dwb-display='list'] .dwb-tile {
319
+ height: 32px;
320
+ padding: 0 var(--dwb-list-item-padding);
321
+ flex-direction: row;
322
+ align-items: center;
323
+ gap: 8px;
324
+ font-size: 14px;
325
+ }
326
+
327
+ .dwb-list[data-dwb-display='list'] .dwb-tile-icon { flex: none; }
328
+ .dwb-list[data-dwb-display='list'] .dwb-label {
329
+ display: block;
330
+ text-align: start;
331
+ white-space: nowrap;
332
+ text-overflow: ellipsis;
333
+ }
334
+
335
+ .dwb-notifications { display: inline-flex; align-items: center; flex: none; gap: 2px; }
336
+ .dwb-notification { display: inline-flex; }
337
+ .dwb-notification[data-dwb-notification='done'] {
338
+ --dsw-alias-state-done-primary: #48AD00;
339
+ --dsw-alias-state-success-primary: #48AD00;
340
+ }
341
+ .dwb-notification:is([data-dwb-notification='error'], [data-dwb-notification='warning']) {
342
+ animation: dwb-notification-pulse 1.2s ease-in-out infinite;
343
+ }
344
+
345
+ .dwb-tile-status, .dwb-status-marks {
346
+ display: flex;
347
+ align-items: center;
348
+ justify-content: flex-end;
349
+ flex-wrap: wrap;
350
+ gap: 2px 4px;
351
+ color: var(--dsw-alias-label-secondary);
352
+ }
353
+ .dwb-tile-status:empty { display: none; }
354
+ .dwb-running {
355
+ display: inline-flex;
356
+ flex: none;
357
+ align-items: center;
358
+ justify-content: center;
359
+ min-block-size: 16px;
360
+ padding-inline: 4px;
361
+ border-radius: 4px;
362
+ background: #D1E4C2;
363
+ color: #3D9300;
364
+ font-size: 11px;
365
+ font-weight: 700;
366
+ line-height: 14px;
367
+ white-space: nowrap;
368
+ }
369
+ :where([data-ds-dark-theme]) .dwb-running {
370
+ background: rgba(61, 147, 0, 0.24);
371
+ color: #7ED04B;
372
+ }
373
+ .dwb-running[data-dwb-running-count] {
374
+ box-sizing: border-box;
375
+ aspect-ratio: 1;
376
+ block-size: 16px;
377
+ min-inline-size: 16px;
378
+ }
379
+ .dwb-row-mark { display: inline-flex; flex: none; }
380
+ .dwb-tile-status .dwb-notifications { flex-direction: row-reverse; flex-wrap: wrap; justify-content: flex-start; max-inline-size: 100%; }
381
+
382
+ .dwb-list[data-dwb-display='icons'] .dwb-tile-status {
383
+ --dwb-corner-inset: 3px;
384
+ position: absolute;
385
+ inset: var(--dwb-corner-inset) var(--dwb-corner-inset) auto;
386
+ justify-content: flex-start;
387
+ flex-wrap: nowrap;
388
+ pointer-events: none;
389
+ z-index: 1;
390
+ }
391
+ .dwb-list[data-dwb-display='icons'] .dwb-running {
392
+ border-radius: max(0px, calc(var(--dsw-radius-md) - var(--dwb-corner-inset)));
393
+ }
394
+ .dwb-list[data-dwb-display='icons'] .dwb-tile-status > .dwb-notifications {
395
+ flex: 0 1 auto;
396
+ min-inline-size: 0;
397
+ justify-content: flex-end;
398
+ order: -1;
399
+ max-block-size: 24px;
400
+ overflow: hidden;
401
+ }
402
+ .dwb-tile[data-dwb-kind='folder'] .dwb-tile-status,
403
+ .dwb-tile[data-dwb-kind='folder'] .dwb-notifications {
404
+ gap: 4px;
405
+ }
406
+ .dwb-tile[data-dwb-kind='folder'] .dwb-notification,
407
+ .dwb-list[data-dwb-display='icons'] .dwb-tile .dwb-notification {
408
+ /* StateDot paints the middle 60% of its 22px box. Space the visible circles. */
409
+ position: relative;
410
+ flex: none;
411
+ inline-size: 13.2px;
412
+ block-size: 22px;
413
+ }
414
+ .dwb-tile[data-dwb-kind='folder'] .dwb-notification > [data-state],
415
+ .dwb-list[data-dwb-display='icons'] .dwb-tile .dwb-notification > [data-state] {
416
+ position: absolute;
417
+ left: calc(50% - 11px);
418
+ }
419
+ .dwb-list[data-dwb-display='icons'] .dwb-tile-status:has(> .dwb-notifications) {
420
+ inset-inline-start: calc(var(--dsw-radius-md) - 6.6px);
421
+ inset-block-start: calc(var(--dsw-radius-md) - 11px);
422
+ }
423
+ .dwb-list[data-dwb-display='icons'] .dwb-status-marks {
424
+ flex: none;
425
+ margin-inline-start: auto;
426
+ max-inline-size: 50%;
427
+ max-block-size: 24px;
428
+ overflow: hidden;
429
+ }
430
+ .dwb-list[data-dwb-display='list'] .dwb-tile-status {
431
+ flex: none;
432
+ max-inline-size: 60%;
433
+ max-block-size: 100%;
434
+ overflow-y: auto;
435
+ scrollbar-width: none;
436
+ }
437
+
438
+ @keyframes dwb-notification-pulse { 50% { opacity: 0.35; } }
439
+ @media (prefers-reduced-motion: reduce) { .dwb-notification[data-dwb-notification] { animation: none; } }