dsh-taskbridge 1.7.1 → 1.8.0
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/CHANGELOG.md +12 -0
- package/LICENSE +21 -21
- package/README.md +149 -290
- package/THIRD_PARTY_NOTICES.txt +23 -23
- package/antigravity/agents/dsh-taskbridge.md +31 -0
- package/antigravity/skills/dsh-taskbridge/SKILL.md +51 -0
- package/codex/dsh-taskbridge.toml +170 -631
- package/cordis.patch.yml +6 -6
- package/docs/INTRODUCTION.md +119 -295
- package/docs/INTRODUCTION.zh.md +134 -279
- package/docs/antigravity-integration.md +42 -0
- package/docs/auth-contract.md +138 -138
- package/docs/claude-code.md +6 -11
- package/docs/codex-integration.md +2 -2
- package/docs/contracts-stage-b.md +443 -443
- package/docs/plugin-market.md +30 -30
- package/docs/redaction-contract.md +170 -170
- package/docs/releases/1.7.0.zh.md +11 -11
- package/docs/releases/1.8.0.zh.md +16 -0
- package/docs/runtime-compatibility.md +1 -1
- package/docs/taskbridge-upgrade.md +28 -28
- package/docs/taskdispatch-upgrade.md +25 -25
- package/docs/workspace-contract.md +538 -538
- package/docs/workspace-grouping.md +126 -126
- package/icon.svg +1 -1
- package/lib/client.d.ts +733 -699
- package/lib/client.js +7 -7
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +149 -144
- package/src/antigravity/installer.js +1046 -0
- package/src/antigravity/seam.js +142 -0
- package/src/auth/fence.js +361 -361
- package/src/auth/grants.js +789 -789
- package/src/client/api.js +143 -0
- package/src/client/index.jsx +113 -3
- package/src/client/sidebar.jsx +862 -862
- package/src/client/styles.js +624 -624
- package/src/client/task-cleanup.js +304 -304
- package/src/client/task-records-table.jsx +217 -217
- package/src/client/task-view.js +307 -307
- package/src/client/workspace-groups.js +482 -482
- package/src/client/workspaces-browser.jsx +770 -770
- package/src/codex/agent-ownership.js +270 -270
- package/src/codex/installer.js +3 -0
- package/src/codex/toml.js +784 -784
- package/src/config/redact.js +245 -245
- package/src/config/store.js +186 -186
- package/src/credentials/seam.js +202 -202
- package/src/http/respond.js +6 -5
- package/src/http/user-plane.js +72 -0
- package/src/index.js +25 -0
- package/src/jobs/diagnostics.js +15 -15
- package/src/jobs/plan-store.js +1020 -1020
- package/src/jobs/review-note.js +63 -63
- package/src/jobs/task-descriptions.js +82 -82
- package/src/jobs/task-display.js +73 -73
- package/src/jobs/task-tree.js +786 -786
- package/src/jobs/title.js +134 -134
- package/src/mcp/continuation.js +317 -317
- package/src/mcp/server.js +4 -1
- package/src/model/connectivity.js +371 -371
- package/src/model/discovery.js +582 -582
- package/src/model/native-catalog.js +68 -68
- package/src/model/openai-adapter.js +671 -671
- package/src/model/probe.js +264 -264
- package/src/model/providers.js +756 -756
- package/src/model/routing.js +321 -321
- package/src/runtime/permissions.js +1619 -1619
- package/src/runtime/question-call.js +162 -162
- package/src/runtime/questions.js +909 -909
- package/src/runtime/worker-prompt.js +60 -55
- package/src/workspace/audit.js +775 -775
- package/src/workspace/preflight.js +424 -424
- package/src/workspace/worktrees.js +679 -679
package/src/client/styles.js
CHANGED
|
@@ -1,624 +1,624 @@
|
|
|
1
|
-
// dsh-delegate settings UI — stylesheet, injected once by the client entry.
|
|
2
|
-
//
|
|
3
|
-
// The page lives *inside* the native settings dialog, so it must not restyle
|
|
4
|
-
// anything it does not own: every rule below is scoped to `.dshdg-*` class names
|
|
5
|
-
// this plugin is the only producer of, and every colour/radius/font reads a
|
|
6
|
-
// native design token (`--dsw-*`, `--ds-*`) with a safe literal fallback. That is
|
|
7
|
-
// how the page follows the operator's light/dark theme and locale-specific font
|
|
8
|
-
// without shipping a second design system or touching the shell's CSS.
|
|
9
|
-
//
|
|
10
|
-
// Injection contract (from the native client module system,
|
|
11
|
-
// `@deepseek-ai/dsh-client-modules` 0.2.0-rc.2): a `<style>` element authored
|
|
12
|
-
// inside the bundle factory is claimed for the materializing plugin by
|
|
13
|
-
// `data-plugin`, and the loader removes exactly the tags carrying this plugin's
|
|
14
|
-
// id when the plugin is disabled. We therefore tag the element ourselves and
|
|
15
|
-
// also return a disposer, so HMR/unload cannot leave an orphaned sheet behind.
|
|
16
|
-
|
|
17
|
-
/** Attribute the native module system uses to attribute and clean up styles. */
|
|
18
|
-
export const STYLE_PLUGIN_ATTRIBUTE = 'data-plugin';
|
|
19
|
-
|
|
20
|
-
/** Plugin id used for style ownership; matches the bundle registration id. */
|
|
21
|
-
export const STYLE_PLUGIN_ID = 'dsh-delegate';
|
|
22
|
-
|
|
23
|
-
/** Stable element id so a second injection replaces instead of stacking. */
|
|
24
|
-
export const STYLE_ELEMENT_ID = 'dsh-delegate-settings';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The stylesheet text.
|
|
28
|
-
*
|
|
29
|
-
* Layout notes worth keeping: the authorization block is rendered before the
|
|
30
|
-
* tab bar in the DOM (not merely first visually), so reading order, keyboard
|
|
31
|
-
* order and screen-reader order all put authorization above the four areas. Grid
|
|
32
|
-
* tracks use `minmax(0, 1fr)` so a long model id or diff line cannot push the
|
|
33
|
-
* form wider than the settings panel.
|
|
34
|
-
*/
|
|
35
|
-
export const CSS_TEXT = `
|
|
36
|
-
.dshdg-root {
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
gap: 16px;
|
|
40
|
-
padding: 4px 2px 24px;
|
|
41
|
-
color: var(--dsw-alias-label-primary, #1f2329);
|
|
42
|
-
font-family: var(--dsw-font-family, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
43
|
-
font-size: 13px;
|
|
44
|
-
line-height: 1.55;
|
|
45
|
-
}
|
|
46
|
-
.dshdg-root * { box-sizing: border-box; }
|
|
47
|
-
.dshdg-root h3, .dshdg-root h4 { margin: 0; font-weight: 600; }
|
|
48
|
-
.dshdg-root h3 { font-size: 15px; }
|
|
49
|
-
.dshdg-root h4 { font-size: 13px; }
|
|
50
|
-
.dshdg-root p { margin: 0; }
|
|
51
|
-
.dshdg-muted { color: var(--dsw-alias-label-secondary, #61666d); }
|
|
52
|
-
.dshdg-faint { color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
53
|
-
.dshdg-mono {
|
|
54
|
-
font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Consolas, monospace);
|
|
55
|
-
font-size: 12px;
|
|
56
|
-
}
|
|
57
|
-
.dshdg-card {
|
|
58
|
-
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
59
|
-
border-radius: var(--dsw-radius-md, 8px);
|
|
60
|
-
background: var(--dsw-alias-bg-layer-3, #fff);
|
|
61
|
-
padding: 12px 14px;
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
gap: 10px;
|
|
65
|
-
min-width: 0;
|
|
66
|
-
}
|
|
67
|
-
.dshdg-card-danger { border-color: var(--dsw-alias-label-error, #d92d20); }
|
|
68
|
-
.dshdg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
|
|
69
|
-
.dshdg-row-end { justify-content: flex-end; }
|
|
70
|
-
.dshdg-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
|
|
71
|
-
.dshdg-switch input { width: 18px; height: 18px; margin: 0; accent-color: #087e8b; }
|
|
72
|
-
.dshdg-spacer { flex: 1 1 auto; }
|
|
73
|
-
.dshdg-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); min-width: 0; }
|
|
74
|
-
.dshdg-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
75
|
-
.dshdg-field > label { font-weight: 500; color: var(--dsw-alias-label-secondary, #61666d); font-size: 12px; }
|
|
76
|
-
.dshdg-hint { font-size: 12px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
77
|
-
.dshdg-root input[type="text"],
|
|
78
|
-
.dshdg-root input[type="password"],
|
|
79
|
-
.dshdg-root input[type="number"],
|
|
80
|
-
.dshdg-root select,
|
|
81
|
-
.dshdg-root textarea {
|
|
82
|
-
width: 100%;
|
|
83
|
-
padding: 5px 8px;
|
|
84
|
-
color: inherit;
|
|
85
|
-
font: inherit;
|
|
86
|
-
background: var(--dsw-alias-bg-base, #f7f8f9);
|
|
87
|
-
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
88
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
89
|
-
min-width: 0;
|
|
90
|
-
}
|
|
91
|
-
.dshdg-root textarea { resize: vertical; min-height: 76px; }
|
|
92
|
-
.dshdg-root input:focus-visible,
|
|
93
|
-
.dshdg-root select:focus-visible,
|
|
94
|
-
.dshdg-root textarea:focus-visible,
|
|
95
|
-
.dshdg-root button:focus-visible {
|
|
96
|
-
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, #3457d5);
|
|
97
|
-
outline-offset: 1px;
|
|
98
|
-
}
|
|
99
|
-
.dshdg-root input:disabled, .dshdg-root select:disabled, .dshdg-root textarea:disabled {
|
|
100
|
-
opacity: 0.6;
|
|
101
|
-
cursor: not-allowed;
|
|
102
|
-
}
|
|
103
|
-
.dshdg-root button {
|
|
104
|
-
font: inherit;
|
|
105
|
-
padding: 5px 12px;
|
|
106
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
107
|
-
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
108
|
-
background: var(--dsw-alias-button-tool-bar-fill, #f2f3f5);
|
|
109
|
-
color: inherit;
|
|
110
|
-
cursor: pointer;
|
|
111
|
-
white-space: nowrap;
|
|
112
|
-
}
|
|
113
|
-
.dshdg-root button:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover, #e9ebee); }
|
|
114
|
-
.dshdg-root button:disabled { opacity: 0.55; cursor: not-allowed; }
|
|
115
|
-
.dshdg-root button.dshdg-primary {
|
|
116
|
-
background: var(--dsw-alias-button-primary-fill, #3457d5);
|
|
117
|
-
border-color: transparent;
|
|
118
|
-
color: var(--dsw-alias-label-primary-foreground, #fff);
|
|
119
|
-
}
|
|
120
|
-
.dshdg-root button.dshdg-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover, #2b49b8); }
|
|
121
|
-
.dshdg-root button.dshdg-danger { color: var(--dsw-alias-label-error, #d92d20); }
|
|
122
|
-
.dshdg-check { display: flex; flex-wrap: wrap; gap: 6px 12px; }
|
|
123
|
-
.dshdg-check label { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; }
|
|
124
|
-
.dshdg-check input { margin: 0; }
|
|
125
|
-
.dshdg-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--dsw-alias-border-l2, #e2e5e9); }
|
|
126
|
-
.dshdg-tab {
|
|
127
|
-
border: 1px solid transparent;
|
|
128
|
-
border-bottom: none;
|
|
129
|
-
border-radius: var(--dsw-radius-sm, 6px) var(--dsw-radius-sm, 6px) 0 0;
|
|
130
|
-
background: transparent;
|
|
131
|
-
padding: 6px 14px;
|
|
132
|
-
}
|
|
133
|
-
.dshdg-tab[aria-selected="true"] {
|
|
134
|
-
background: var(--dsw-alias-bg-layer-3, #fff);
|
|
135
|
-
border-color: var(--dsw-alias-border-l2, #e2e5e9);
|
|
136
|
-
font-weight: 600;
|
|
137
|
-
}
|
|
138
|
-
.dshdg-panel { display: flex; flex-direction: column; gap: 14px; }
|
|
139
|
-
.dshdg-notices { display: flex; flex-direction: column; gap: 6px; }
|
|
140
|
-
.dshdg-notice {
|
|
141
|
-
display: flex;
|
|
142
|
-
gap: 8px;
|
|
143
|
-
align-items: flex-start;
|
|
144
|
-
padding: 7px 10px;
|
|
145
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
146
|
-
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
147
|
-
background: var(--dsw-alias-bg-layer-4, #f7f8f9);
|
|
148
|
-
}
|
|
149
|
-
.dshdg-notice-error { border-color: var(--dsw-alias-label-error, #d92d20); }
|
|
150
|
-
.dshdg-notice-success { border-color: var(--dsw-alias-state-business-primary, #12b76a); }
|
|
151
|
-
.dshdg-notice > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
|
|
152
|
-
.dshdg-badge {
|
|
153
|
-
display: inline-block;
|
|
154
|
-
padding: 1px 8px;
|
|
155
|
-
border-radius: 999px;
|
|
156
|
-
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
157
|
-
font-size: 11px;
|
|
158
|
-
white-space: nowrap;
|
|
159
|
-
}
|
|
160
|
-
.dshdg-badge-on { border-color: var(--dsw-alias-state-business-primary, #12b76a); }
|
|
161
|
-
.dshdg-badge-off { border-color: var(--dsw-alias-label-tertiary, #8a9098); color: var(--dsw-alias-label-secondary, #61666d); }
|
|
162
|
-
.dshdg-badge-warn { border-color: var(--dsw-alias-label-error, #d92d20); color: var(--dsw-alias-label-error, #d92d20); }
|
|
163
|
-
.dshdg-list { display: flex; flex-direction: column; gap: 8px; }
|
|
164
|
-
.dshdg-item {
|
|
165
|
-
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
166
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
167
|
-
padding: 10px 12px;
|
|
168
|
-
display: flex;
|
|
169
|
-
flex-direction: column;
|
|
170
|
-
gap: 8px;
|
|
171
|
-
min-width: 0;
|
|
172
|
-
}
|
|
173
|
-
.dshdg-item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
|
|
174
|
-
.dshdg-item-head strong { overflow-wrap: anywhere; }
|
|
175
|
-
.dshdg-secret-warning {
|
|
176
|
-
border: 1px solid var(--dsw-alias-label-error, #d92d20);
|
|
177
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
178
|
-
padding: 10px 12px;
|
|
179
|
-
display: flex;
|
|
180
|
-
flex-direction: column;
|
|
181
|
-
gap: 8px;
|
|
182
|
-
}
|
|
183
|
-
.dshdg-token {
|
|
184
|
-
display: block;
|
|
185
|
-
width: 100%;
|
|
186
|
-
padding: 8px 10px;
|
|
187
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
188
|
-
border: 1px dashed var(--dsw-alias-border-l3, #d3d7dd);
|
|
189
|
-
background: var(--dsw-alias-bg-base, #f7f8f9);
|
|
190
|
-
overflow-wrap: anywhere;
|
|
191
|
-
user-select: all;
|
|
192
|
-
}
|
|
193
|
-
.dshdg-pre {
|
|
194
|
-
margin: 0;
|
|
195
|
-
padding: 8px 10px;
|
|
196
|
-
max-height: 320px;
|
|
197
|
-
overflow: auto;
|
|
198
|
-
background: var(--dsw-alias-markdown-code-block, #f5f6f8);
|
|
199
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
200
|
-
white-space: pre-wrap;
|
|
201
|
-
overflow-wrap: anywhere;
|
|
202
|
-
font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Consolas, monospace);
|
|
203
|
-
font-size: 12px;
|
|
204
|
-
}
|
|
205
|
-
.dshdg-layers { display: grid; gap: 6px; }
|
|
206
|
-
.dshdg-layer { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 8px; align-items: start; }
|
|
207
|
-
.dshdg-layer-detail { overflow-wrap: anywhere; }
|
|
208
|
-
.dshdg-ok { color: var(--dsw-alias-state-business-primary, #12b76a); }
|
|
209
|
-
.dshdg-fail { color: var(--dsw-alias-label-error, #d92d20); }
|
|
210
|
-
.dshdg-unknown { color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
211
|
-
.dshdg-table { display: grid; gap: 4px; }
|
|
212
|
-
.dshdg-kv {
|
|
213
|
-
display: grid;
|
|
214
|
-
grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
|
|
215
|
-
gap: 4px 10px;
|
|
216
|
-
min-width: 0;
|
|
217
|
-
}
|
|
218
|
-
.dshdg-kv dt { color: var(--dsw-alias-label-secondary, #61666d); }
|
|
219
|
-
.dshdg-kv dd {
|
|
220
|
-
margin: 0;
|
|
221
|
-
/* A grid item defaults to min-width: auto, i.e. "at least as wide as my longest
|
|
222
|
-
unbreakable run" — the single place that pushed a long review note past the panel. */
|
|
223
|
-
min-width: 0;
|
|
224
|
-
overflow-wrap: anywhere;
|
|
225
|
-
}
|
|
226
|
-
/* A recorded review note: shown whole, wrapped inside its own track, never clipped.
|
|
227
|
-
pre-wrap keeps every paragraph break and every space the host stored; anywhere breaks a
|
|
228
|
-
long unbroken run (a path, a URL, 270 code points of Chinese with no spaces). Nothing
|
|
229
|
-
here shortens, hides or line-clamps the body: the block keeps its natural height. */
|
|
230
|
-
.dshdg-note {
|
|
231
|
-
min-width: 0;
|
|
232
|
-
max-width: 100%;
|
|
233
|
-
overflow-wrap: anywhere;
|
|
234
|
-
}
|
|
235
|
-
.dshdg-note-full {
|
|
236
|
-
min-width: 0;
|
|
237
|
-
max-width: 100%;
|
|
238
|
-
margin: 0;
|
|
239
|
-
white-space: pre-wrap;
|
|
240
|
-
overflow-wrap: anywhere;
|
|
241
|
-
word-break: break-word;
|
|
242
|
-
}
|
|
243
|
-
.dshdg-note-preview {
|
|
244
|
-
min-width: 0;
|
|
245
|
-
overflow-wrap: anywhere;
|
|
246
|
-
word-break: break-word;
|
|
247
|
-
}
|
|
248
|
-
/* ---- task tree (G09) -------------------------------------------------------
|
|
249
|
-
The tree is drawn with indentation measured in em units, so a deep level adds
|
|
250
|
-
its own small step and a narrow window still fits the text before wrapping.
|
|
251
|
-
Every row is a flex line that WRAPS: a long node title or a long status never
|
|
252
|
-
pushes the round buttons out of the panel, and nothing is clipped. */
|
|
253
|
-
.dshdg-tree-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px; }
|
|
254
|
-
.dshdg-tree-filters label { display: grid; gap: 2px; flex: 1 1 132px; min-width: 0; }
|
|
255
|
-
.dshdg-tree-filters label > * { width: 100%; min-width: 0; }
|
|
256
|
-
/* ---- creation-date range ---------------------------------------------------
|
|
257
|
-
Two native date inputs plus a clear button. The inputs stay inside the same
|
|
258
|
-
wrapping filter row, so a narrow window stacks them instead of overflowing;
|
|
259
|
-
the native picker supplies the calendar, so no date widget is shipped. */
|
|
260
|
-
.dshdg-root input[type="date"] {
|
|
261
|
-
width: 100%;
|
|
262
|
-
min-width: 0;
|
|
263
|
-
padding: 5px 8px;
|
|
264
|
-
color: inherit;
|
|
265
|
-
font: inherit;
|
|
266
|
-
background: var(--dsw-alias-bg-base, #f7f8f9);
|
|
267
|
-
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
268
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
269
|
-
}
|
|
270
|
-
.dshdg-root input[type="date"]:focus-visible {
|
|
271
|
-
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, #3457d5);
|
|
272
|
-
outline-offset: 1px;
|
|
273
|
-
}
|
|
274
|
-
.dshdg-root input[type="date"][aria-invalid="true"] { border-color: var(--dsw-alias-label-error, #d92d20); }
|
|
275
|
-
/* The clear control sits on the row's baseline with the inputs, not under them. */
|
|
276
|
-
.dshdg-tree-day-actions { display: flex; align-items: flex-end; flex: 0 1 auto; min-width: 0; }
|
|
277
|
-
.dshdg-tree-day-actions button { padding: 5px 10px; font-size: 12px; }
|
|
278
|
-
.dshdg-record-views { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
279
|
-
.dshdg-record-views button[aria-pressed="true"] { font-weight: 600; background: var(--dsw-alias-interactive-bg-hover, #e9ebee); }
|
|
280
|
-
.dshdg-records-overflow { overflow-x: auto; margin-top: 12px; }
|
|
281
|
-
.dshdg-records-table { width: 100%; border-collapse: collapse; min-width: 36em; }
|
|
282
|
-
.dshdg-records-table th, .dshdg-records-table td {
|
|
283
|
-
padding: 8px 10px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--dshdg-line);
|
|
284
|
-
}
|
|
285
|
-
.dshdg-records-table th { font-size: 12px; white-space: nowrap; }
|
|
286
|
-
.dshdg-records-table td[data-column="title"] { width: 42%; }
|
|
287
|
-
.dshdg-records-table td[data-column="updatedAt"] { font-variant-numeric: tabular-nums; }
|
|
288
|
-
.dshdg-records-table td[data-column="project"] { overflow-wrap: anywhere; }
|
|
289
|
-
.dshdg-record-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
|
|
290
|
-
.dshdg-records-table .dshdg-record-toggle, .dshdg-records-table .dshdg-record-sort {
|
|
291
|
-
display: inline-flex; align-items: baseline; gap: 6px; text-align: start;
|
|
292
|
-
border: 0; background: transparent; padding: 0; color: inherit; font: inherit;
|
|
293
|
-
}
|
|
294
|
-
.dshdg-records-table .dshdg-record-toggle { font-weight: 600; overflow-wrap: anywhere; }
|
|
295
|
-
.dshdg-records-table .dshdg-record-toggle:hover, .dshdg-records-table .dshdg-record-sort:hover { text-decoration: underline; }
|
|
296
|
-
.dshdg-record-detail { display: grid; gap: 8px; justify-items: start; }
|
|
297
|
-
.dshdg-record-detail p { margin: 0; }
|
|
298
|
-
.dshdg-record-detail .dshdg-tree-execution { width: 100%; }
|
|
299
|
-
.dshdg-record-selection { display: grid; gap: 3px; justify-items: start; }
|
|
300
|
-
.dshdg-tree-project { border-top: 1px solid var(--dshdg-line); margin-top: 12px; padding-top: 8px; }
|
|
301
|
-
.dshdg-tree-project h4 { margin: 0; overflow-wrap: anywhere; }
|
|
302
|
-
.dshdg-tree-project h4 small { font-weight: normal; }
|
|
303
|
-
.dshdg-tree-roots, .dshdg-tree-children, .dshdg-tree-rounds { list-style: none; margin: 0; padding: 0; }
|
|
304
|
-
.dshdg-tree-roots { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
305
|
-
.dshdg-tree-node { min-width: 0; }
|
|
306
|
-
.dshdg-tree-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; padding: 3px 0; }
|
|
307
|
-
.dshdg-tree-title { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
|
|
308
|
-
.dshdg-tree-toggle { padding: 1px 8px; font-size: 12px; }
|
|
309
|
-
.dshdg-tree-body {
|
|
310
|
-
display: flex;
|
|
311
|
-
flex-direction: column;
|
|
312
|
-
gap: 4px;
|
|
313
|
-
/* One indent step per level, bounded so a 16-level plan cannot march off-screen. */
|
|
314
|
-
margin-inline-start: 1.25em;
|
|
315
|
-
padding-inline-start: 10px;
|
|
316
|
-
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
317
|
-
min-width: 0;
|
|
318
|
-
}
|
|
319
|
-
.dshdg-tree-children { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
320
|
-
.dshdg-tree-round { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
321
|
-
.dshdg-tree-round-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
|
|
322
|
-
.dshdg-tree-round-head > span { overflow-wrap: anywhere; min-width: 0; }
|
|
323
|
-
.dshdg-tree-round-head button { padding: 1px 8px; font-size: 12px; }
|
|
324
|
-
/* ---- task-record cleanup ---------------------------------------------------
|
|
325
|
-
One bar above the tree while selection mode is on, one checkbox line per
|
|
326
|
-
execution chain, and a confirmation block that wraps instead of squeezing. The
|
|
327
|
-
warning keeps the error colour because the action is irreversible. */
|
|
328
|
-
.dshdg-cleanup-bar {
|
|
329
|
-
display: flex;
|
|
330
|
-
flex-direction: column;
|
|
331
|
-
gap: 6px;
|
|
332
|
-
margin-block: 8px;
|
|
333
|
-
padding: 8px;
|
|
334
|
-
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
335
|
-
border-radius: 6px;
|
|
336
|
-
min-width: 0;
|
|
337
|
-
}
|
|
338
|
-
.dshdg-cleanup-bar p { margin: 0; overflow-wrap: anywhere; }
|
|
339
|
-
.dshdg-cleanup-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; padding: 2px 0; }
|
|
340
|
-
.dshdg-cleanup-check { display: inline-flex; gap: 6px; align-items: center; min-width: 0; }
|
|
341
|
-
.dshdg-cleanup-row span { overflow-wrap: anywhere; min-width: 0; }
|
|
342
|
-
.dshdg-cleanup-bar .dshdg-row { flex-wrap: wrap; }
|
|
343
|
-
|
|
344
|
-
@media (max-width: 560px) {
|
|
345
|
-
/* Narrow window: halve the indent so the deepest level still leaves room for
|
|
346
|
-
text, and let the round controls wrap under the title instead of squeezing. */
|
|
347
|
-
.dshdg-tree-body { margin-inline-start: 0.6em; padding-inline-start: 6px; }
|
|
348
|
-
.dshdg-tree-round-head { gap: 4px; }
|
|
349
|
-
}
|
|
350
|
-
@media (max-width: 560px) {
|
|
351
|
-
.dshdg-layer, .dshdg-kv { grid-template-columns: minmax(0, 1fr); }
|
|
352
|
-
}
|
|
353
|
-
/* ---- native left navigation (G08) ------------------------------------------
|
|
354
|
-
This panel is NOT inside the settings dialog: it renders in the shell's own
|
|
355
|
-
sidebar, whose width the host owns. So it uses the same .dshdg-* names (same
|
|
356
|
-
tokens, same theme handling) but repeats no layout assumptions from the page:
|
|
357
|
-
every row wraps, every title may shrink, and nothing may force a minimum width
|
|
358
|
-
the sidebar does not have. */
|
|
359
|
-
.dshdg-nav {
|
|
360
|
-
display: flex;
|
|
361
|
-
flex-direction: column;
|
|
362
|
-
gap: 8px;
|
|
363
|
-
padding: 6px 2px;
|
|
364
|
-
min-width: 0;
|
|
365
|
-
color: var(--dsw-alias-label-primary, #1f2329);
|
|
366
|
-
font-family: var(--dsw-font-family, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
367
|
-
font-size: 13px;
|
|
368
|
-
line-height: 1.5;
|
|
369
|
-
}
|
|
370
|
-
.dshdg-nav * { box-sizing: border-box; }
|
|
371
|
-
.dshdg-nav h3 { margin: 0; font-size: 13px; font-weight: 600; min-width: 0; }
|
|
372
|
-
.dshdg-nav p { margin: 0; }
|
|
373
|
-
.dshdg-nav-head, .dshdg-nav-project-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
|
|
374
|
-
.dshdg-nav-note { font-size: 12px; }
|
|
375
|
-
.dshdg-nav-projects, .dshdg-nav-sessions { list-style: none; margin: 0; padding: 0; min-width: 0; }
|
|
376
|
-
.dshdg-nav-projects { display: flex; flex-direction: column; gap: 4px; }
|
|
377
|
-
.dshdg-nav-project { min-width: 0; }
|
|
378
|
-
.dshdg-nav-project-title {
|
|
379
|
-
font-weight: 600;
|
|
380
|
-
min-width: 0;
|
|
381
|
-
overflow-wrap: anywhere;
|
|
382
|
-
word-break: break-word;
|
|
383
|
-
}
|
|
384
|
-
.dshdg-nav-sessions {
|
|
385
|
-
display: flex;
|
|
386
|
-
flex-direction: column;
|
|
387
|
-
gap: 2px;
|
|
388
|
-
margin-inline-start: 0.8em;
|
|
389
|
-
padding-inline-start: 8px;
|
|
390
|
-
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
391
|
-
}
|
|
392
|
-
.dshdg-nav-session { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
|
|
393
|
-
.dshdg-nav-session-title {
|
|
394
|
-
min-width: 0;
|
|
395
|
-
flex: 1 1 6em;
|
|
396
|
-
overflow: hidden;
|
|
397
|
-
text-overflow: ellipsis;
|
|
398
|
-
white-space: nowrap;
|
|
399
|
-
}
|
|
400
|
-
.dshdg-nav-session button { padding: 1px 8px; font-size: 12px; }
|
|
401
|
-
.dshdg-nav-toggle-row { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
|
|
402
|
-
.dshdg-nav-archived { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
403
|
-
.dshdg-nav-icon { display: block; }
|
|
404
|
-
/* ---- grouped workspaces browser (sidebar.workspaces) -----------------------
|
|
405
|
-
This block renders in the shell's workspace cell, which the shell sizes. It
|
|
406
|
-
therefore assumes NOTHING about width: every row is a wrapping flex line, a
|
|
407
|
-
title shrinks and ellipsises, and the actions wrap under the title rather than
|
|
408
|
-
pushing the row wider. Colours, radii and fonts are the shell's own tokens, so
|
|
409
|
-
the tree follows light/dark and the shared menu blur without a second theme. */
|
|
410
|
-
.dshdg-ws {
|
|
411
|
-
display: flex;
|
|
412
|
-
flex-direction: column;
|
|
413
|
-
gap: 6px;
|
|
414
|
-
min-width: 0;
|
|
415
|
-
color: var(--dsw-alias-label-primary, #1f2329);
|
|
416
|
-
font-family: var(--dsw-font-family, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
417
|
-
font-size: 13px;
|
|
418
|
-
line-height: 1.45;
|
|
419
|
-
}
|
|
420
|
-
.dshdg-ws * { box-sizing: border-box; }
|
|
421
|
-
.dshdg-ws p { margin: 0; }
|
|
422
|
-
.dshdg-ws-tree, .dshdg-ws-projects, .dshdg-ws-workspaces, .dshdg-ws-sessions {
|
|
423
|
-
list-style: none;
|
|
424
|
-
margin: 0;
|
|
425
|
-
padding: 0;
|
|
426
|
-
min-width: 0;
|
|
427
|
-
}
|
|
428
|
-
.dshdg-ws-tree, .dshdg-ws-projects, .dshdg-ws-workspaces, .dshdg-ws-sessions { display: flex; flex-direction: column; gap: 1px; }
|
|
429
|
-
/* One indent step per level, and the same dashed guide the task tree uses, so the two
|
|
430
|
-
trees read as one product without sharing a component. */
|
|
431
|
-
.dshdg-ws-projects, .dshdg-ws-workspaces, .dshdg-ws-sessions {
|
|
432
|
-
margin-inline-start: 0.9em;
|
|
433
|
-
padding-inline-start: 8px;
|
|
434
|
-
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
435
|
-
}
|
|
436
|
-
.dshdg-ws-row { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; padding: 2px 0; }
|
|
437
|
-
.dshdg-ws-caret {
|
|
438
|
-
flex: 0 0 auto;
|
|
439
|
-
width: 18px;
|
|
440
|
-
padding: 0;
|
|
441
|
-
border: 0;
|
|
442
|
-
background: transparent;
|
|
443
|
-
color: inherit;
|
|
444
|
-
font: inherit;
|
|
445
|
-
line-height: 1;
|
|
446
|
-
cursor: pointer;
|
|
447
|
-
opacity: 0.75;
|
|
448
|
-
}
|
|
449
|
-
.dshdg-ws-caret:hover { opacity: 1; }
|
|
450
|
-
.dshdg-ws-title {
|
|
451
|
-
flex: 1 1 5em;
|
|
452
|
-
min-width: 0;
|
|
453
|
-
padding: 0;
|
|
454
|
-
border: 0;
|
|
455
|
-
background: transparent;
|
|
456
|
-
color: inherit;
|
|
457
|
-
font: inherit;
|
|
458
|
-
text-align: start;
|
|
459
|
-
cursor: pointer;
|
|
460
|
-
overflow: hidden;
|
|
461
|
-
text-overflow: ellipsis;
|
|
462
|
-
white-space: nowrap;
|
|
463
|
-
}
|
|
464
|
-
.dshdg-ws-title:hover { text-decoration: underline; }
|
|
465
|
-
.dshdg-ws-root-row .dshdg-ws-title { font-weight: 600; }
|
|
466
|
-
.dshdg-ws-project-row .dshdg-ws-title { font-weight: 500; }
|
|
467
|
-
.dshdg-ws-workspace .dshdg-ws-title { font-weight: 400; }
|
|
468
|
-
.dshdg-ws-count { flex: 0 1 auto; font-size: 11px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
469
|
-
.dshdg-ws-spacer { flex: 1 1 auto; }
|
|
470
|
-
.dshdg-ws-actions { display: inline-flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
|
|
471
|
-
.dshdg-ws button + button { margin: 0; }
|
|
472
|
-
.dshdg-ws-actions button, .dshdg-ws-session-action {
|
|
473
|
-
padding: 0 6px;
|
|
474
|
-
font-size: 11px;
|
|
475
|
-
line-height: 18px;
|
|
476
|
-
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
477
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
478
|
-
background: transparent;
|
|
479
|
-
color: inherit;
|
|
480
|
-
cursor: pointer;
|
|
481
|
-
}
|
|
482
|
-
.dshdg-ws-actions button:hover:not(:disabled), .dshdg-ws-session-action:hover:not(:disabled) {
|
|
483
|
-
background: var(--dsw-alias-interactive-bg-hover, #e9ebee);
|
|
484
|
-
}
|
|
485
|
-
.dshdg-ws-actions button:disabled, .dshdg-ws-session-action:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
486
|
-
.dshdg-ws-session { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
|
|
487
|
-
.dshdg-ws-open {
|
|
488
|
-
display: flex;
|
|
489
|
-
flex: 1 1 5em;
|
|
490
|
-
gap: 6px;
|
|
491
|
-
align-items: center;
|
|
492
|
-
min-width: 0;
|
|
493
|
-
padding: 2px 4px;
|
|
494
|
-
border: 0;
|
|
495
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
496
|
-
background: transparent;
|
|
497
|
-
color: inherit;
|
|
498
|
-
font: inherit;
|
|
499
|
-
text-align: start;
|
|
500
|
-
cursor: pointer;
|
|
501
|
-
}
|
|
502
|
-
.dshdg-ws-open:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover, #e9ebee); }
|
|
503
|
-
.dshdg-ws-open:disabled { cursor: not-allowed; opacity: 0.6; }
|
|
504
|
-
.dshdg-ws-session-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
505
|
-
.dshdg-ws-badge {
|
|
506
|
-
flex: 0 0 auto;
|
|
507
|
-
padding: 0 6px;
|
|
508
|
-
border-radius: 999px;
|
|
509
|
-
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
510
|
-
font-size: 10px;
|
|
511
|
-
color: var(--dsw-alias-label-secondary, #61666d);
|
|
512
|
-
}
|
|
513
|
-
/* ---- the per-session marker inside a NATIVE sidebar row --------------------
|
|
514
|
-
Rendered through the host's published child slot (sidebar.workspaces.session.row.action),
|
|
515
|
-
so it sits inside the host's own row. Deliberately tiny and quiet: the operator sees a native
|
|
516
|
-
row with one extra word, never a restyled or reordered one. Host density is respected — the
|
|
517
|
-
host's own row actions are icon buttons, so this only adds an inline label. */
|
|
518
|
-
.dshdg-row-marker {
|
|
519
|
-
display: inline-flex;
|
|
520
|
-
align-items: center;
|
|
521
|
-
flex: 0 0 auto;
|
|
522
|
-
padding: 0 4px;
|
|
523
|
-
border-radius: var(--dsw-radius-sm, 4px);
|
|
524
|
-
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
525
|
-
font-size: 10px;
|
|
526
|
-
line-height: 14px;
|
|
527
|
-
color: var(--dsw-alias-label-secondary, #61666d);
|
|
528
|
-
white-space: nowrap;
|
|
529
|
-
user-select: none;
|
|
530
|
-
}
|
|
531
|
-
.dshdg-row-marker[data-dshdg-row-marker-isolation="worktree"] {
|
|
532
|
-
border-color: var(--dsw-alias-state-business-primary, #12b76a);
|
|
533
|
-
color: var(--dsw-alias-state-business-primary, #12b76a);
|
|
534
|
-
}
|
|
535
|
-
/* ---- the plugin's own grouping surface ------------------------------------
|
|
536
|
-
This is drawn on the plugin's OWN panel, not inside the shell's workspace cell, so it may use
|
|
537
|
-
a full title row; it still wraps instead of pushing a control off a narrow sidebar. */
|
|
538
|
-
.dshdg-ws { display: flex; flex-direction: column; min-width: 0; }
|
|
539
|
-
.dshdg-ws-section {
|
|
540
|
-
padding: 6px 0 2px;
|
|
541
|
-
font-size: 11px;
|
|
542
|
-
color: var(--dsw-alias-label-tertiary, #8a9098);
|
|
543
|
-
}
|
|
544
|
-
/* A project's action bar: the Workspace target picker plus its operations. Both wrap under the
|
|
545
|
-
title so a narrow sidebar never pushes a control off-screen, and the picker is a CONTROL, not
|
|
546
|
-
a level: it stays on the project's own row block. */
|
|
547
|
-
.dshdg-ws-project-actions {
|
|
548
|
-
display: flex;
|
|
549
|
-
flex-wrap: wrap;
|
|
550
|
-
gap: 4px 8px;
|
|
551
|
-
align-items: center;
|
|
552
|
-
min-width: 0;
|
|
553
|
-
margin-inline-start: 1.4em;
|
|
554
|
-
padding: 1px 0 3px;
|
|
555
|
-
}
|
|
556
|
-
.dshdg-ws-target { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
|
|
557
|
-
.dshdg-ws-target select {
|
|
558
|
-
max-width: 14em;
|
|
559
|
-
min-width: 0;
|
|
560
|
-
padding: 0 4px;
|
|
561
|
-
font: inherit;
|
|
562
|
-
font-size: 11px;
|
|
563
|
-
color: inherit;
|
|
564
|
-
background: transparent;
|
|
565
|
-
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
566
|
-
border-radius: var(--dsw-radius-sm, 6px);
|
|
567
|
-
}
|
|
568
|
-
/* The conversations of one project: one indent step, and the same dashed guide as the
|
|
569
|
-
Workspace rows, so the three levels read as one tree. */
|
|
570
|
-
.dshdg-ws-conversations {
|
|
571
|
-
list-style: none;
|
|
572
|
-
margin: 0;
|
|
573
|
-
padding: 0;
|
|
574
|
-
margin-inline-start: 1.4em;
|
|
575
|
-
padding-inline-start: 8px;
|
|
576
|
-
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
577
|
-
display: flex;
|
|
578
|
-
flex-direction: column;
|
|
579
|
-
gap: 1px;
|
|
580
|
-
min-width: 0;
|
|
581
|
-
}
|
|
582
|
-
.dshdg-ws-faint { color: var(--dsw-alias-label-tertiary, #8a9098); font-size: 10px; }
|
|
583
|
-
.dshdg-ws-empty { padding: 2px 4px; font-size: 12px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
584
|
-
.dshdg-ws-hint { font-size: 11px; color: var(--dsw-alias-label-tertiary, #8a9098); padding: 0 2px; }
|
|
585
|
-
.dshdg-ws-warn { font-size: 11px; color: var(--dsw-alias-label-error, #d92d20); padding: 0 2px; }
|
|
586
|
-
.dshdg-ws-archived > summary { cursor: pointer; font-size: 11px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
587
|
-
.dshdg-ws:focus-visible, .dshdg-ws button:focus-visible {
|
|
588
|
-
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, #3457d5);
|
|
589
|
-
outline-offset: 1px;
|
|
590
|
-
}
|
|
591
|
-
`;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Inject the stylesheet once.
|
|
595
|
-
*
|
|
596
|
-
* @param {Document | null | undefined} doc - document to inject into; a non-browser
|
|
597
|
-
* or test composition passes `null` and receives a no-op disposer.
|
|
598
|
-
* @returns {() => void} disposer removing exactly the element this call created.
|
|
599
|
-
*/
|
|
600
|
-
export function injectStyles(doc) {
|
|
601
|
-
const document_ = doc ?? (typeof document === 'undefined' ? null : document);
|
|
602
|
-
if (document_ === null || typeof document_.createElement !== 'function') return () => {};
|
|
603
|
-
|
|
604
|
-
const existing = typeof document_.getElementById === 'function'
|
|
605
|
-
? document_.getElementById(STYLE_ELEMENT_ID)
|
|
606
|
-
: null;
|
|
607
|
-
if (existing !== null && existing !== undefined) {
|
|
608
|
-
// A previous instance of this plugin (HMR, re-enable) owns the sheet. Take it
|
|
609
|
-
// over instead of stacking a duplicate, and give the caller a disposer for it.
|
|
610
|
-
return () => {
|
|
611
|
-
existing.remove?.();
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
const element = document_.createElement('style');
|
|
616
|
-
element.id = STYLE_ELEMENT_ID;
|
|
617
|
-
element.setAttribute(STYLE_PLUGIN_ATTRIBUTE, STYLE_PLUGIN_ID);
|
|
618
|
-
element.textContent = CSS_TEXT;
|
|
619
|
-
const parent = document_.head ?? document_.documentElement ?? document_.body;
|
|
620
|
-
parent.appendChild(element);
|
|
621
|
-
return () => {
|
|
622
|
-
element.remove?.();
|
|
623
|
-
};
|
|
624
|
-
}
|
|
1
|
+
// dsh-delegate settings UI — stylesheet, injected once by the client entry.
|
|
2
|
+
//
|
|
3
|
+
// The page lives *inside* the native settings dialog, so it must not restyle
|
|
4
|
+
// anything it does not own: every rule below is scoped to `.dshdg-*` class names
|
|
5
|
+
// this plugin is the only producer of, and every colour/radius/font reads a
|
|
6
|
+
// native design token (`--dsw-*`, `--ds-*`) with a safe literal fallback. That is
|
|
7
|
+
// how the page follows the operator's light/dark theme and locale-specific font
|
|
8
|
+
// without shipping a second design system or touching the shell's CSS.
|
|
9
|
+
//
|
|
10
|
+
// Injection contract (from the native client module system,
|
|
11
|
+
// `@deepseek-ai/dsh-client-modules` 0.2.0-rc.2): a `<style>` element authored
|
|
12
|
+
// inside the bundle factory is claimed for the materializing plugin by
|
|
13
|
+
// `data-plugin`, and the loader removes exactly the tags carrying this plugin's
|
|
14
|
+
// id when the plugin is disabled. We therefore tag the element ourselves and
|
|
15
|
+
// also return a disposer, so HMR/unload cannot leave an orphaned sheet behind.
|
|
16
|
+
|
|
17
|
+
/** Attribute the native module system uses to attribute and clean up styles. */
|
|
18
|
+
export const STYLE_PLUGIN_ATTRIBUTE = 'data-plugin';
|
|
19
|
+
|
|
20
|
+
/** Plugin id used for style ownership; matches the bundle registration id. */
|
|
21
|
+
export const STYLE_PLUGIN_ID = 'dsh-delegate';
|
|
22
|
+
|
|
23
|
+
/** Stable element id so a second injection replaces instead of stacking. */
|
|
24
|
+
export const STYLE_ELEMENT_ID = 'dsh-delegate-settings';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The stylesheet text.
|
|
28
|
+
*
|
|
29
|
+
* Layout notes worth keeping: the authorization block is rendered before the
|
|
30
|
+
* tab bar in the DOM (not merely first visually), so reading order, keyboard
|
|
31
|
+
* order and screen-reader order all put authorization above the four areas. Grid
|
|
32
|
+
* tracks use `minmax(0, 1fr)` so a long model id or diff line cannot push the
|
|
33
|
+
* form wider than the settings panel.
|
|
34
|
+
*/
|
|
35
|
+
export const CSS_TEXT = `
|
|
36
|
+
.dshdg-root {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 16px;
|
|
40
|
+
padding: 4px 2px 24px;
|
|
41
|
+
color: var(--dsw-alias-label-primary, #1f2329);
|
|
42
|
+
font-family: var(--dsw-font-family, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
43
|
+
font-size: 13px;
|
|
44
|
+
line-height: 1.55;
|
|
45
|
+
}
|
|
46
|
+
.dshdg-root * { box-sizing: border-box; }
|
|
47
|
+
.dshdg-root h3, .dshdg-root h4 { margin: 0; font-weight: 600; }
|
|
48
|
+
.dshdg-root h3 { font-size: 15px; }
|
|
49
|
+
.dshdg-root h4 { font-size: 13px; }
|
|
50
|
+
.dshdg-root p { margin: 0; }
|
|
51
|
+
.dshdg-muted { color: var(--dsw-alias-label-secondary, #61666d); }
|
|
52
|
+
.dshdg-faint { color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
53
|
+
.dshdg-mono {
|
|
54
|
+
font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Consolas, monospace);
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
}
|
|
57
|
+
.dshdg-card {
|
|
58
|
+
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
59
|
+
border-radius: var(--dsw-radius-md, 8px);
|
|
60
|
+
background: var(--dsw-alias-bg-layer-3, #fff);
|
|
61
|
+
padding: 12px 14px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 10px;
|
|
65
|
+
min-width: 0;
|
|
66
|
+
}
|
|
67
|
+
.dshdg-card-danger { border-color: var(--dsw-alias-label-error, #d92d20); }
|
|
68
|
+
.dshdg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
|
|
69
|
+
.dshdg-row-end { justify-content: flex-end; }
|
|
70
|
+
.dshdg-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
|
|
71
|
+
.dshdg-switch input { width: 18px; height: 18px; margin: 0; accent-color: #087e8b; }
|
|
72
|
+
.dshdg-spacer { flex: 1 1 auto; }
|
|
73
|
+
.dshdg-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); min-width: 0; }
|
|
74
|
+
.dshdg-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
75
|
+
.dshdg-field > label { font-weight: 500; color: var(--dsw-alias-label-secondary, #61666d); font-size: 12px; }
|
|
76
|
+
.dshdg-hint { font-size: 12px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
77
|
+
.dshdg-root input[type="text"],
|
|
78
|
+
.dshdg-root input[type="password"],
|
|
79
|
+
.dshdg-root input[type="number"],
|
|
80
|
+
.dshdg-root select,
|
|
81
|
+
.dshdg-root textarea {
|
|
82
|
+
width: 100%;
|
|
83
|
+
padding: 5px 8px;
|
|
84
|
+
color: inherit;
|
|
85
|
+
font: inherit;
|
|
86
|
+
background: var(--dsw-alias-bg-base, #f7f8f9);
|
|
87
|
+
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
88
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
89
|
+
min-width: 0;
|
|
90
|
+
}
|
|
91
|
+
.dshdg-root textarea { resize: vertical; min-height: 76px; }
|
|
92
|
+
.dshdg-root input:focus-visible,
|
|
93
|
+
.dshdg-root select:focus-visible,
|
|
94
|
+
.dshdg-root textarea:focus-visible,
|
|
95
|
+
.dshdg-root button:focus-visible {
|
|
96
|
+
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, #3457d5);
|
|
97
|
+
outline-offset: 1px;
|
|
98
|
+
}
|
|
99
|
+
.dshdg-root input:disabled, .dshdg-root select:disabled, .dshdg-root textarea:disabled {
|
|
100
|
+
opacity: 0.6;
|
|
101
|
+
cursor: not-allowed;
|
|
102
|
+
}
|
|
103
|
+
.dshdg-root button {
|
|
104
|
+
font: inherit;
|
|
105
|
+
padding: 5px 12px;
|
|
106
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
107
|
+
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
108
|
+
background: var(--dsw-alias-button-tool-bar-fill, #f2f3f5);
|
|
109
|
+
color: inherit;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
white-space: nowrap;
|
|
112
|
+
}
|
|
113
|
+
.dshdg-root button:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover, #e9ebee); }
|
|
114
|
+
.dshdg-root button:disabled { opacity: 0.55; cursor: not-allowed; }
|
|
115
|
+
.dshdg-root button.dshdg-primary {
|
|
116
|
+
background: var(--dsw-alias-button-primary-fill, #3457d5);
|
|
117
|
+
border-color: transparent;
|
|
118
|
+
color: var(--dsw-alias-label-primary-foreground, #fff);
|
|
119
|
+
}
|
|
120
|
+
.dshdg-root button.dshdg-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover, #2b49b8); }
|
|
121
|
+
.dshdg-root button.dshdg-danger { color: var(--dsw-alias-label-error, #d92d20); }
|
|
122
|
+
.dshdg-check { display: flex; flex-wrap: wrap; gap: 6px 12px; }
|
|
123
|
+
.dshdg-check label { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; }
|
|
124
|
+
.dshdg-check input { margin: 0; }
|
|
125
|
+
.dshdg-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--dsw-alias-border-l2, #e2e5e9); }
|
|
126
|
+
.dshdg-tab {
|
|
127
|
+
border: 1px solid transparent;
|
|
128
|
+
border-bottom: none;
|
|
129
|
+
border-radius: var(--dsw-radius-sm, 6px) var(--dsw-radius-sm, 6px) 0 0;
|
|
130
|
+
background: transparent;
|
|
131
|
+
padding: 6px 14px;
|
|
132
|
+
}
|
|
133
|
+
.dshdg-tab[aria-selected="true"] {
|
|
134
|
+
background: var(--dsw-alias-bg-layer-3, #fff);
|
|
135
|
+
border-color: var(--dsw-alias-border-l2, #e2e5e9);
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
}
|
|
138
|
+
.dshdg-panel { display: flex; flex-direction: column; gap: 14px; }
|
|
139
|
+
.dshdg-notices { display: flex; flex-direction: column; gap: 6px; }
|
|
140
|
+
.dshdg-notice {
|
|
141
|
+
display: flex;
|
|
142
|
+
gap: 8px;
|
|
143
|
+
align-items: flex-start;
|
|
144
|
+
padding: 7px 10px;
|
|
145
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
146
|
+
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
147
|
+
background: var(--dsw-alias-bg-layer-4, #f7f8f9);
|
|
148
|
+
}
|
|
149
|
+
.dshdg-notice-error { border-color: var(--dsw-alias-label-error, #d92d20); }
|
|
150
|
+
.dshdg-notice-success { border-color: var(--dsw-alias-state-business-primary, #12b76a); }
|
|
151
|
+
.dshdg-notice > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
|
|
152
|
+
.dshdg-badge {
|
|
153
|
+
display: inline-block;
|
|
154
|
+
padding: 1px 8px;
|
|
155
|
+
border-radius: 999px;
|
|
156
|
+
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
157
|
+
font-size: 11px;
|
|
158
|
+
white-space: nowrap;
|
|
159
|
+
}
|
|
160
|
+
.dshdg-badge-on { border-color: var(--dsw-alias-state-business-primary, #12b76a); }
|
|
161
|
+
.dshdg-badge-off { border-color: var(--dsw-alias-label-tertiary, #8a9098); color: var(--dsw-alias-label-secondary, #61666d); }
|
|
162
|
+
.dshdg-badge-warn { border-color: var(--dsw-alias-label-error, #d92d20); color: var(--dsw-alias-label-error, #d92d20); }
|
|
163
|
+
.dshdg-list { display: flex; flex-direction: column; gap: 8px; }
|
|
164
|
+
.dshdg-item {
|
|
165
|
+
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
166
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
167
|
+
padding: 10px 12px;
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
gap: 8px;
|
|
171
|
+
min-width: 0;
|
|
172
|
+
}
|
|
173
|
+
.dshdg-item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
|
|
174
|
+
.dshdg-item-head strong { overflow-wrap: anywhere; }
|
|
175
|
+
.dshdg-secret-warning {
|
|
176
|
+
border: 1px solid var(--dsw-alias-label-error, #d92d20);
|
|
177
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
178
|
+
padding: 10px 12px;
|
|
179
|
+
display: flex;
|
|
180
|
+
flex-direction: column;
|
|
181
|
+
gap: 8px;
|
|
182
|
+
}
|
|
183
|
+
.dshdg-token {
|
|
184
|
+
display: block;
|
|
185
|
+
width: 100%;
|
|
186
|
+
padding: 8px 10px;
|
|
187
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
188
|
+
border: 1px dashed var(--dsw-alias-border-l3, #d3d7dd);
|
|
189
|
+
background: var(--dsw-alias-bg-base, #f7f8f9);
|
|
190
|
+
overflow-wrap: anywhere;
|
|
191
|
+
user-select: all;
|
|
192
|
+
}
|
|
193
|
+
.dshdg-pre {
|
|
194
|
+
margin: 0;
|
|
195
|
+
padding: 8px 10px;
|
|
196
|
+
max-height: 320px;
|
|
197
|
+
overflow: auto;
|
|
198
|
+
background: var(--dsw-alias-markdown-code-block, #f5f6f8);
|
|
199
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
200
|
+
white-space: pre-wrap;
|
|
201
|
+
overflow-wrap: anywhere;
|
|
202
|
+
font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Consolas, monospace);
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
}
|
|
205
|
+
.dshdg-layers { display: grid; gap: 6px; }
|
|
206
|
+
.dshdg-layer { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 8px; align-items: start; }
|
|
207
|
+
.dshdg-layer-detail { overflow-wrap: anywhere; }
|
|
208
|
+
.dshdg-ok { color: var(--dsw-alias-state-business-primary, #12b76a); }
|
|
209
|
+
.dshdg-fail { color: var(--dsw-alias-label-error, #d92d20); }
|
|
210
|
+
.dshdg-unknown { color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
211
|
+
.dshdg-table { display: grid; gap: 4px; }
|
|
212
|
+
.dshdg-kv {
|
|
213
|
+
display: grid;
|
|
214
|
+
grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
|
|
215
|
+
gap: 4px 10px;
|
|
216
|
+
min-width: 0;
|
|
217
|
+
}
|
|
218
|
+
.dshdg-kv dt { color: var(--dsw-alias-label-secondary, #61666d); }
|
|
219
|
+
.dshdg-kv dd {
|
|
220
|
+
margin: 0;
|
|
221
|
+
/* A grid item defaults to min-width: auto, i.e. "at least as wide as my longest
|
|
222
|
+
unbreakable run" — the single place that pushed a long review note past the panel. */
|
|
223
|
+
min-width: 0;
|
|
224
|
+
overflow-wrap: anywhere;
|
|
225
|
+
}
|
|
226
|
+
/* A recorded review note: shown whole, wrapped inside its own track, never clipped.
|
|
227
|
+
pre-wrap keeps every paragraph break and every space the host stored; anywhere breaks a
|
|
228
|
+
long unbroken run (a path, a URL, 270 code points of Chinese with no spaces). Nothing
|
|
229
|
+
here shortens, hides or line-clamps the body: the block keeps its natural height. */
|
|
230
|
+
.dshdg-note {
|
|
231
|
+
min-width: 0;
|
|
232
|
+
max-width: 100%;
|
|
233
|
+
overflow-wrap: anywhere;
|
|
234
|
+
}
|
|
235
|
+
.dshdg-note-full {
|
|
236
|
+
min-width: 0;
|
|
237
|
+
max-width: 100%;
|
|
238
|
+
margin: 0;
|
|
239
|
+
white-space: pre-wrap;
|
|
240
|
+
overflow-wrap: anywhere;
|
|
241
|
+
word-break: break-word;
|
|
242
|
+
}
|
|
243
|
+
.dshdg-note-preview {
|
|
244
|
+
min-width: 0;
|
|
245
|
+
overflow-wrap: anywhere;
|
|
246
|
+
word-break: break-word;
|
|
247
|
+
}
|
|
248
|
+
/* ---- task tree (G09) -------------------------------------------------------
|
|
249
|
+
The tree is drawn with indentation measured in em units, so a deep level adds
|
|
250
|
+
its own small step and a narrow window still fits the text before wrapping.
|
|
251
|
+
Every row is a flex line that WRAPS: a long node title or a long status never
|
|
252
|
+
pushes the round buttons out of the panel, and nothing is clipped. */
|
|
253
|
+
.dshdg-tree-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px; }
|
|
254
|
+
.dshdg-tree-filters label { display: grid; gap: 2px; flex: 1 1 132px; min-width: 0; }
|
|
255
|
+
.dshdg-tree-filters label > * { width: 100%; min-width: 0; }
|
|
256
|
+
/* ---- creation-date range ---------------------------------------------------
|
|
257
|
+
Two native date inputs plus a clear button. The inputs stay inside the same
|
|
258
|
+
wrapping filter row, so a narrow window stacks them instead of overflowing;
|
|
259
|
+
the native picker supplies the calendar, so no date widget is shipped. */
|
|
260
|
+
.dshdg-root input[type="date"] {
|
|
261
|
+
width: 100%;
|
|
262
|
+
min-width: 0;
|
|
263
|
+
padding: 5px 8px;
|
|
264
|
+
color: inherit;
|
|
265
|
+
font: inherit;
|
|
266
|
+
background: var(--dsw-alias-bg-base, #f7f8f9);
|
|
267
|
+
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
268
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
269
|
+
}
|
|
270
|
+
.dshdg-root input[type="date"]:focus-visible {
|
|
271
|
+
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, #3457d5);
|
|
272
|
+
outline-offset: 1px;
|
|
273
|
+
}
|
|
274
|
+
.dshdg-root input[type="date"][aria-invalid="true"] { border-color: var(--dsw-alias-label-error, #d92d20); }
|
|
275
|
+
/* The clear control sits on the row's baseline with the inputs, not under them. */
|
|
276
|
+
.dshdg-tree-day-actions { display: flex; align-items: flex-end; flex: 0 1 auto; min-width: 0; }
|
|
277
|
+
.dshdg-tree-day-actions button { padding: 5px 10px; font-size: 12px; }
|
|
278
|
+
.dshdg-record-views { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
279
|
+
.dshdg-record-views button[aria-pressed="true"] { font-weight: 600; background: var(--dsw-alias-interactive-bg-hover, #e9ebee); }
|
|
280
|
+
.dshdg-records-overflow { overflow-x: auto; margin-top: 12px; }
|
|
281
|
+
.dshdg-records-table { width: 100%; border-collapse: collapse; min-width: 36em; }
|
|
282
|
+
.dshdg-records-table th, .dshdg-records-table td {
|
|
283
|
+
padding: 8px 10px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--dshdg-line);
|
|
284
|
+
}
|
|
285
|
+
.dshdg-records-table th { font-size: 12px; white-space: nowrap; }
|
|
286
|
+
.dshdg-records-table td[data-column="title"] { width: 42%; }
|
|
287
|
+
.dshdg-records-table td[data-column="updatedAt"] { font-variant-numeric: tabular-nums; }
|
|
288
|
+
.dshdg-records-table td[data-column="project"] { overflow-wrap: anywhere; }
|
|
289
|
+
.dshdg-record-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
|
|
290
|
+
.dshdg-records-table .dshdg-record-toggle, .dshdg-records-table .dshdg-record-sort {
|
|
291
|
+
display: inline-flex; align-items: baseline; gap: 6px; text-align: start;
|
|
292
|
+
border: 0; background: transparent; padding: 0; color: inherit; font: inherit;
|
|
293
|
+
}
|
|
294
|
+
.dshdg-records-table .dshdg-record-toggle { font-weight: 600; overflow-wrap: anywhere; }
|
|
295
|
+
.dshdg-records-table .dshdg-record-toggle:hover, .dshdg-records-table .dshdg-record-sort:hover { text-decoration: underline; }
|
|
296
|
+
.dshdg-record-detail { display: grid; gap: 8px; justify-items: start; }
|
|
297
|
+
.dshdg-record-detail p { margin: 0; }
|
|
298
|
+
.dshdg-record-detail .dshdg-tree-execution { width: 100%; }
|
|
299
|
+
.dshdg-record-selection { display: grid; gap: 3px; justify-items: start; }
|
|
300
|
+
.dshdg-tree-project { border-top: 1px solid var(--dshdg-line); margin-top: 12px; padding-top: 8px; }
|
|
301
|
+
.dshdg-tree-project h4 { margin: 0; overflow-wrap: anywhere; }
|
|
302
|
+
.dshdg-tree-project h4 small { font-weight: normal; }
|
|
303
|
+
.dshdg-tree-roots, .dshdg-tree-children, .dshdg-tree-rounds { list-style: none; margin: 0; padding: 0; }
|
|
304
|
+
.dshdg-tree-roots { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
305
|
+
.dshdg-tree-node { min-width: 0; }
|
|
306
|
+
.dshdg-tree-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; padding: 3px 0; }
|
|
307
|
+
.dshdg-tree-title { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
|
|
308
|
+
.dshdg-tree-toggle { padding: 1px 8px; font-size: 12px; }
|
|
309
|
+
.dshdg-tree-body {
|
|
310
|
+
display: flex;
|
|
311
|
+
flex-direction: column;
|
|
312
|
+
gap: 4px;
|
|
313
|
+
/* One indent step per level, bounded so a 16-level plan cannot march off-screen. */
|
|
314
|
+
margin-inline-start: 1.25em;
|
|
315
|
+
padding-inline-start: 10px;
|
|
316
|
+
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
317
|
+
min-width: 0;
|
|
318
|
+
}
|
|
319
|
+
.dshdg-tree-children { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
320
|
+
.dshdg-tree-round { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
321
|
+
.dshdg-tree-round-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
|
|
322
|
+
.dshdg-tree-round-head > span { overflow-wrap: anywhere; min-width: 0; }
|
|
323
|
+
.dshdg-tree-round-head button { padding: 1px 8px; font-size: 12px; }
|
|
324
|
+
/* ---- task-record cleanup ---------------------------------------------------
|
|
325
|
+
One bar above the tree while selection mode is on, one checkbox line per
|
|
326
|
+
execution chain, and a confirmation block that wraps instead of squeezing. The
|
|
327
|
+
warning keeps the error colour because the action is irreversible. */
|
|
328
|
+
.dshdg-cleanup-bar {
|
|
329
|
+
display: flex;
|
|
330
|
+
flex-direction: column;
|
|
331
|
+
gap: 6px;
|
|
332
|
+
margin-block: 8px;
|
|
333
|
+
padding: 8px;
|
|
334
|
+
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
335
|
+
border-radius: 6px;
|
|
336
|
+
min-width: 0;
|
|
337
|
+
}
|
|
338
|
+
.dshdg-cleanup-bar p { margin: 0; overflow-wrap: anywhere; }
|
|
339
|
+
.dshdg-cleanup-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; padding: 2px 0; }
|
|
340
|
+
.dshdg-cleanup-check { display: inline-flex; gap: 6px; align-items: center; min-width: 0; }
|
|
341
|
+
.dshdg-cleanup-row span { overflow-wrap: anywhere; min-width: 0; }
|
|
342
|
+
.dshdg-cleanup-bar .dshdg-row { flex-wrap: wrap; }
|
|
343
|
+
|
|
344
|
+
@media (max-width: 560px) {
|
|
345
|
+
/* Narrow window: halve the indent so the deepest level still leaves room for
|
|
346
|
+
text, and let the round controls wrap under the title instead of squeezing. */
|
|
347
|
+
.dshdg-tree-body { margin-inline-start: 0.6em; padding-inline-start: 6px; }
|
|
348
|
+
.dshdg-tree-round-head { gap: 4px; }
|
|
349
|
+
}
|
|
350
|
+
@media (max-width: 560px) {
|
|
351
|
+
.dshdg-layer, .dshdg-kv { grid-template-columns: minmax(0, 1fr); }
|
|
352
|
+
}
|
|
353
|
+
/* ---- native left navigation (G08) ------------------------------------------
|
|
354
|
+
This panel is NOT inside the settings dialog: it renders in the shell's own
|
|
355
|
+
sidebar, whose width the host owns. So it uses the same .dshdg-* names (same
|
|
356
|
+
tokens, same theme handling) but repeats no layout assumptions from the page:
|
|
357
|
+
every row wraps, every title may shrink, and nothing may force a minimum width
|
|
358
|
+
the sidebar does not have. */
|
|
359
|
+
.dshdg-nav {
|
|
360
|
+
display: flex;
|
|
361
|
+
flex-direction: column;
|
|
362
|
+
gap: 8px;
|
|
363
|
+
padding: 6px 2px;
|
|
364
|
+
min-width: 0;
|
|
365
|
+
color: var(--dsw-alias-label-primary, #1f2329);
|
|
366
|
+
font-family: var(--dsw-font-family, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
367
|
+
font-size: 13px;
|
|
368
|
+
line-height: 1.5;
|
|
369
|
+
}
|
|
370
|
+
.dshdg-nav * { box-sizing: border-box; }
|
|
371
|
+
.dshdg-nav h3 { margin: 0; font-size: 13px; font-weight: 600; min-width: 0; }
|
|
372
|
+
.dshdg-nav p { margin: 0; }
|
|
373
|
+
.dshdg-nav-head, .dshdg-nav-project-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
|
|
374
|
+
.dshdg-nav-note { font-size: 12px; }
|
|
375
|
+
.dshdg-nav-projects, .dshdg-nav-sessions { list-style: none; margin: 0; padding: 0; min-width: 0; }
|
|
376
|
+
.dshdg-nav-projects { display: flex; flex-direction: column; gap: 4px; }
|
|
377
|
+
.dshdg-nav-project { min-width: 0; }
|
|
378
|
+
.dshdg-nav-project-title {
|
|
379
|
+
font-weight: 600;
|
|
380
|
+
min-width: 0;
|
|
381
|
+
overflow-wrap: anywhere;
|
|
382
|
+
word-break: break-word;
|
|
383
|
+
}
|
|
384
|
+
.dshdg-nav-sessions {
|
|
385
|
+
display: flex;
|
|
386
|
+
flex-direction: column;
|
|
387
|
+
gap: 2px;
|
|
388
|
+
margin-inline-start: 0.8em;
|
|
389
|
+
padding-inline-start: 8px;
|
|
390
|
+
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
391
|
+
}
|
|
392
|
+
.dshdg-nav-session { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
|
|
393
|
+
.dshdg-nav-session-title {
|
|
394
|
+
min-width: 0;
|
|
395
|
+
flex: 1 1 6em;
|
|
396
|
+
overflow: hidden;
|
|
397
|
+
text-overflow: ellipsis;
|
|
398
|
+
white-space: nowrap;
|
|
399
|
+
}
|
|
400
|
+
.dshdg-nav-session button { padding: 1px 8px; font-size: 12px; }
|
|
401
|
+
.dshdg-nav-toggle-row { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
|
|
402
|
+
.dshdg-nav-archived { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
403
|
+
.dshdg-nav-icon { display: block; }
|
|
404
|
+
/* ---- grouped workspaces browser (sidebar.workspaces) -----------------------
|
|
405
|
+
This block renders in the shell's workspace cell, which the shell sizes. It
|
|
406
|
+
therefore assumes NOTHING about width: every row is a wrapping flex line, a
|
|
407
|
+
title shrinks and ellipsises, and the actions wrap under the title rather than
|
|
408
|
+
pushing the row wider. Colours, radii and fonts are the shell's own tokens, so
|
|
409
|
+
the tree follows light/dark and the shared menu blur without a second theme. */
|
|
410
|
+
.dshdg-ws {
|
|
411
|
+
display: flex;
|
|
412
|
+
flex-direction: column;
|
|
413
|
+
gap: 6px;
|
|
414
|
+
min-width: 0;
|
|
415
|
+
color: var(--dsw-alias-label-primary, #1f2329);
|
|
416
|
+
font-family: var(--dsw-font-family, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
417
|
+
font-size: 13px;
|
|
418
|
+
line-height: 1.45;
|
|
419
|
+
}
|
|
420
|
+
.dshdg-ws * { box-sizing: border-box; }
|
|
421
|
+
.dshdg-ws p { margin: 0; }
|
|
422
|
+
.dshdg-ws-tree, .dshdg-ws-projects, .dshdg-ws-workspaces, .dshdg-ws-sessions {
|
|
423
|
+
list-style: none;
|
|
424
|
+
margin: 0;
|
|
425
|
+
padding: 0;
|
|
426
|
+
min-width: 0;
|
|
427
|
+
}
|
|
428
|
+
.dshdg-ws-tree, .dshdg-ws-projects, .dshdg-ws-workspaces, .dshdg-ws-sessions { display: flex; flex-direction: column; gap: 1px; }
|
|
429
|
+
/* One indent step per level, and the same dashed guide the task tree uses, so the two
|
|
430
|
+
trees read as one product without sharing a component. */
|
|
431
|
+
.dshdg-ws-projects, .dshdg-ws-workspaces, .dshdg-ws-sessions {
|
|
432
|
+
margin-inline-start: 0.9em;
|
|
433
|
+
padding-inline-start: 8px;
|
|
434
|
+
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
435
|
+
}
|
|
436
|
+
.dshdg-ws-row { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; padding: 2px 0; }
|
|
437
|
+
.dshdg-ws-caret {
|
|
438
|
+
flex: 0 0 auto;
|
|
439
|
+
width: 18px;
|
|
440
|
+
padding: 0;
|
|
441
|
+
border: 0;
|
|
442
|
+
background: transparent;
|
|
443
|
+
color: inherit;
|
|
444
|
+
font: inherit;
|
|
445
|
+
line-height: 1;
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
opacity: 0.75;
|
|
448
|
+
}
|
|
449
|
+
.dshdg-ws-caret:hover { opacity: 1; }
|
|
450
|
+
.dshdg-ws-title {
|
|
451
|
+
flex: 1 1 5em;
|
|
452
|
+
min-width: 0;
|
|
453
|
+
padding: 0;
|
|
454
|
+
border: 0;
|
|
455
|
+
background: transparent;
|
|
456
|
+
color: inherit;
|
|
457
|
+
font: inherit;
|
|
458
|
+
text-align: start;
|
|
459
|
+
cursor: pointer;
|
|
460
|
+
overflow: hidden;
|
|
461
|
+
text-overflow: ellipsis;
|
|
462
|
+
white-space: nowrap;
|
|
463
|
+
}
|
|
464
|
+
.dshdg-ws-title:hover { text-decoration: underline; }
|
|
465
|
+
.dshdg-ws-root-row .dshdg-ws-title { font-weight: 600; }
|
|
466
|
+
.dshdg-ws-project-row .dshdg-ws-title { font-weight: 500; }
|
|
467
|
+
.dshdg-ws-workspace .dshdg-ws-title { font-weight: 400; }
|
|
468
|
+
.dshdg-ws-count { flex: 0 1 auto; font-size: 11px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
469
|
+
.dshdg-ws-spacer { flex: 1 1 auto; }
|
|
470
|
+
.dshdg-ws-actions { display: inline-flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
|
|
471
|
+
.dshdg-ws button + button { margin: 0; }
|
|
472
|
+
.dshdg-ws-actions button, .dshdg-ws-session-action {
|
|
473
|
+
padding: 0 6px;
|
|
474
|
+
font-size: 11px;
|
|
475
|
+
line-height: 18px;
|
|
476
|
+
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
477
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
478
|
+
background: transparent;
|
|
479
|
+
color: inherit;
|
|
480
|
+
cursor: pointer;
|
|
481
|
+
}
|
|
482
|
+
.dshdg-ws-actions button:hover:not(:disabled), .dshdg-ws-session-action:hover:not(:disabled) {
|
|
483
|
+
background: var(--dsw-alias-interactive-bg-hover, #e9ebee);
|
|
484
|
+
}
|
|
485
|
+
.dshdg-ws-actions button:disabled, .dshdg-ws-session-action:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
486
|
+
.dshdg-ws-session { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
|
|
487
|
+
.dshdg-ws-open {
|
|
488
|
+
display: flex;
|
|
489
|
+
flex: 1 1 5em;
|
|
490
|
+
gap: 6px;
|
|
491
|
+
align-items: center;
|
|
492
|
+
min-width: 0;
|
|
493
|
+
padding: 2px 4px;
|
|
494
|
+
border: 0;
|
|
495
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
496
|
+
background: transparent;
|
|
497
|
+
color: inherit;
|
|
498
|
+
font: inherit;
|
|
499
|
+
text-align: start;
|
|
500
|
+
cursor: pointer;
|
|
501
|
+
}
|
|
502
|
+
.dshdg-ws-open:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover, #e9ebee); }
|
|
503
|
+
.dshdg-ws-open:disabled { cursor: not-allowed; opacity: 0.6; }
|
|
504
|
+
.dshdg-ws-session-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
505
|
+
.dshdg-ws-badge {
|
|
506
|
+
flex: 0 0 auto;
|
|
507
|
+
padding: 0 6px;
|
|
508
|
+
border-radius: 999px;
|
|
509
|
+
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
510
|
+
font-size: 10px;
|
|
511
|
+
color: var(--dsw-alias-label-secondary, #61666d);
|
|
512
|
+
}
|
|
513
|
+
/* ---- the per-session marker inside a NATIVE sidebar row --------------------
|
|
514
|
+
Rendered through the host's published child slot (sidebar.workspaces.session.row.action),
|
|
515
|
+
so it sits inside the host's own row. Deliberately tiny and quiet: the operator sees a native
|
|
516
|
+
row with one extra word, never a restyled or reordered one. Host density is respected — the
|
|
517
|
+
host's own row actions are icon buttons, so this only adds an inline label. */
|
|
518
|
+
.dshdg-row-marker {
|
|
519
|
+
display: inline-flex;
|
|
520
|
+
align-items: center;
|
|
521
|
+
flex: 0 0 auto;
|
|
522
|
+
padding: 0 4px;
|
|
523
|
+
border-radius: var(--dsw-radius-sm, 4px);
|
|
524
|
+
border: 1px solid var(--dsw-alias-border-l3, #d3d7dd);
|
|
525
|
+
font-size: 10px;
|
|
526
|
+
line-height: 14px;
|
|
527
|
+
color: var(--dsw-alias-label-secondary, #61666d);
|
|
528
|
+
white-space: nowrap;
|
|
529
|
+
user-select: none;
|
|
530
|
+
}
|
|
531
|
+
.dshdg-row-marker[data-dshdg-row-marker-isolation="worktree"] {
|
|
532
|
+
border-color: var(--dsw-alias-state-business-primary, #12b76a);
|
|
533
|
+
color: var(--dsw-alias-state-business-primary, #12b76a);
|
|
534
|
+
}
|
|
535
|
+
/* ---- the plugin's own grouping surface ------------------------------------
|
|
536
|
+
This is drawn on the plugin's OWN panel, not inside the shell's workspace cell, so it may use
|
|
537
|
+
a full title row; it still wraps instead of pushing a control off a narrow sidebar. */
|
|
538
|
+
.dshdg-ws { display: flex; flex-direction: column; min-width: 0; }
|
|
539
|
+
.dshdg-ws-section {
|
|
540
|
+
padding: 6px 0 2px;
|
|
541
|
+
font-size: 11px;
|
|
542
|
+
color: var(--dsw-alias-label-tertiary, #8a9098);
|
|
543
|
+
}
|
|
544
|
+
/* A project's action bar: the Workspace target picker plus its operations. Both wrap under the
|
|
545
|
+
title so a narrow sidebar never pushes a control off-screen, and the picker is a CONTROL, not
|
|
546
|
+
a level: it stays on the project's own row block. */
|
|
547
|
+
.dshdg-ws-project-actions {
|
|
548
|
+
display: flex;
|
|
549
|
+
flex-wrap: wrap;
|
|
550
|
+
gap: 4px 8px;
|
|
551
|
+
align-items: center;
|
|
552
|
+
min-width: 0;
|
|
553
|
+
margin-inline-start: 1.4em;
|
|
554
|
+
padding: 1px 0 3px;
|
|
555
|
+
}
|
|
556
|
+
.dshdg-ws-target { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
|
|
557
|
+
.dshdg-ws-target select {
|
|
558
|
+
max-width: 14em;
|
|
559
|
+
min-width: 0;
|
|
560
|
+
padding: 0 4px;
|
|
561
|
+
font: inherit;
|
|
562
|
+
font-size: 11px;
|
|
563
|
+
color: inherit;
|
|
564
|
+
background: transparent;
|
|
565
|
+
border: 1px solid var(--dsw-alias-border-l2, #e2e5e9);
|
|
566
|
+
border-radius: var(--dsw-radius-sm, 6px);
|
|
567
|
+
}
|
|
568
|
+
/* The conversations of one project: one indent step, and the same dashed guide as the
|
|
569
|
+
Workspace rows, so the three levels read as one tree. */
|
|
570
|
+
.dshdg-ws-conversations {
|
|
571
|
+
list-style: none;
|
|
572
|
+
margin: 0;
|
|
573
|
+
padding: 0;
|
|
574
|
+
margin-inline-start: 1.4em;
|
|
575
|
+
padding-inline-start: 8px;
|
|
576
|
+
border-inline-start: 1px dashed var(--dsw-alias-border-l2, #e2e5e9);
|
|
577
|
+
display: flex;
|
|
578
|
+
flex-direction: column;
|
|
579
|
+
gap: 1px;
|
|
580
|
+
min-width: 0;
|
|
581
|
+
}
|
|
582
|
+
.dshdg-ws-faint { color: var(--dsw-alias-label-tertiary, #8a9098); font-size: 10px; }
|
|
583
|
+
.dshdg-ws-empty { padding: 2px 4px; font-size: 12px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
584
|
+
.dshdg-ws-hint { font-size: 11px; color: var(--dsw-alias-label-tertiary, #8a9098); padding: 0 2px; }
|
|
585
|
+
.dshdg-ws-warn { font-size: 11px; color: var(--dsw-alias-label-error, #d92d20); padding: 0 2px; }
|
|
586
|
+
.dshdg-ws-archived > summary { cursor: pointer; font-size: 11px; color: var(--dsw-alias-label-tertiary, #8a9098); }
|
|
587
|
+
.dshdg-ws:focus-visible, .dshdg-ws button:focus-visible {
|
|
588
|
+
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, #3457d5);
|
|
589
|
+
outline-offset: 1px;
|
|
590
|
+
}
|
|
591
|
+
`;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Inject the stylesheet once.
|
|
595
|
+
*
|
|
596
|
+
* @param {Document | null | undefined} doc - document to inject into; a non-browser
|
|
597
|
+
* or test composition passes `null` and receives a no-op disposer.
|
|
598
|
+
* @returns {() => void} disposer removing exactly the element this call created.
|
|
599
|
+
*/
|
|
600
|
+
export function injectStyles(doc) {
|
|
601
|
+
const document_ = doc ?? (typeof document === 'undefined' ? null : document);
|
|
602
|
+
if (document_ === null || typeof document_.createElement !== 'function') return () => {};
|
|
603
|
+
|
|
604
|
+
const existing = typeof document_.getElementById === 'function'
|
|
605
|
+
? document_.getElementById(STYLE_ELEMENT_ID)
|
|
606
|
+
: null;
|
|
607
|
+
if (existing !== null && existing !== undefined) {
|
|
608
|
+
// A previous instance of this plugin (HMR, re-enable) owns the sheet. Take it
|
|
609
|
+
// over instead of stacking a duplicate, and give the caller a disposer for it.
|
|
610
|
+
return () => {
|
|
611
|
+
existing.remove?.();
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
const element = document_.createElement('style');
|
|
616
|
+
element.id = STYLE_ELEMENT_ID;
|
|
617
|
+
element.setAttribute(STYLE_PLUGIN_ATTRIBUTE, STYLE_PLUGIN_ID);
|
|
618
|
+
element.textContent = CSS_TEXT;
|
|
619
|
+
const parent = document_.head ?? document_.documentElement ?? document_.body;
|
|
620
|
+
parent.appendChild(element);
|
|
621
|
+
return () => {
|
|
622
|
+
element.remove?.();
|
|
623
|
+
};
|
|
624
|
+
}
|