dsh-remote-plugin 0.8.0-rc.2 → 0.8.0-rc.3
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/apk/dsh-remote.apk +0 -0
- package/gateway.cjs +21 -6
- package/package.json +1 -1
- package/public/activity.js +126 -0
- package/public/announcements.json +8 -0
- package/public/app.js +195 -113
- package/public/desktop/desktop.css +10 -10
- package/public/desktop/desktop.html +25 -9
- package/public/desktop/desktop.js +133 -47
- package/public/extensions.js +3 -2
- package/public/history.js +32 -11
- package/public/image-preview.js +132 -0
- package/public/index.html +32 -10
- package/public/md.js +41 -1
- package/public/network.js +29 -5
- package/public/relay-settings.js +19 -10
- package/public/styles.css +15 -15
- package/public/subagents.css +61 -0
- package/public/subagents.js +275 -0
- package/public/update.json +4 -4
- package/public/version.json +1 -1
- package/public/workflow.css +177 -1
- package/public/workflow.js +88 -8
package/public/workflow.css
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
.workflow-v8 .composer-wrap:not(.fs) .send-btn { grid-column:4; }
|
|
99
99
|
.workflow-v8 .composer-wrap:not(.fs) .workflow-steer { grid-column:5; }
|
|
100
100
|
.workflow-v8 .composer-wrap:not(.fs) .composer:has(.workflow-steer:not([hidden])) { grid-template-columns:44px minmax(0,1fr) 40px auto auto; }
|
|
101
|
-
.workflow-v8 .composer textarea { min-height:
|
|
101
|
+
.workflow-v8 .composer textarea { box-sizing:border-box; min-height:40px; border-radius:16px; border:0; background:transparent; padding:8px; font-size:16px; }
|
|
102
102
|
.workflow-v8 .composer :is(.plus-btn,.composer-image-btn) { min-width:44px; min-height:44px; border:0; border-radius:12px; background:transparent; color:var(--dsr-muted); }
|
|
103
103
|
.workflow-v8 #btn-plus { width:auto; padding-inline:10px; font-size:12px; }
|
|
104
104
|
.workflow-v8 .send-btn { width:auto; min-height:44px; min-width:60px; padding-inline:12px; border-radius:12px; background:var(--dsr-accent); color:var(--dsr-on-accent); font-size:13px; font-weight:600; white-space:nowrap; box-shadow:none; }
|
|
@@ -138,14 +138,190 @@ body.workflow-v8.in-session .history { padding-bottom:calc(var(--composer-height
|
|
|
138
138
|
.workflow-v8 .ds-composer-right .workflow-steer { margin-left:6px; }
|
|
139
139
|
.workflow-v8.workflow-at-start #notif-stack { display:none; }
|
|
140
140
|
.workflow-v8 .ds-new-session .ds-btn { background:var(--dsr-accent); color:var(--dsr-on-accent); border:0; box-shadow:none; }
|
|
141
|
+
/* Activity stays subordinate to the reply; details are disclosed on demand. */
|
|
142
|
+
.workflow-v8 .ds-msg.assistant { max-width:100%; border:0; background:transparent; box-shadow:none; padding:8px 4px; line-height:1.75; }
|
|
143
|
+
.chat-activity { box-sizing:border-box; width:100%; max-width:780px; margin:3px 0; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--dsr-muted); font-size:13px; line-height:1.5; }
|
|
144
|
+
.chat-activity > summary { display:flex; align-items:center; gap:10px; min-height:44px; padding:5px 10px; box-sizing:border-box; list-style:none; cursor:pointer; border-radius:12px; user-select:none; }
|
|
145
|
+
.chat-activity > summary::-webkit-details-marker { display:none; }
|
|
146
|
+
.chat-activity > summary:hover { background:var(--dsr-panel); color:var(--dsr-text); }
|
|
147
|
+
.chat-activity > summary:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
148
|
+
.activity-icon { width:17px; height:17px; flex:none; opacity:.85; }
|
|
149
|
+
.activity-copy { display:flex; flex:1; min-width:0; gap:10px; align-items:baseline; }
|
|
150
|
+
.activity-title { flex:0 1 auto; max-width:60%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; font-weight:550; }
|
|
151
|
+
.activity-hint { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; opacity:.8; font-weight:400; }
|
|
152
|
+
.activity-state { display:inline-flex; align-items:center; flex:none; gap:6px; font-size:11px; font-weight:400; white-space:nowrap; }
|
|
153
|
+
.activity-state:empty { display:none; }
|
|
154
|
+
.activity-state i { width:6px; height:6px; position:relative; border-radius:50%; background:currentColor; box-shadow:0 0 7px currentColor; animation:activity-pulse 1.6s ease-in-out infinite; }
|
|
155
|
+
.activity-state i::after { content:''; position:absolute; inset:-4px; border-radius:50%; border:1px solid currentColor; opacity:0; animation:activity-ring 1.9s ease-out infinite; }
|
|
156
|
+
.activity-chevron { flex:none; width:5px; height:5px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); opacity:.65; margin:0 3px; }
|
|
157
|
+
.chat-activity[open] > summary { color:var(--dsr-text); }
|
|
158
|
+
.chat-activity[open] > summary .activity-chevron { transform:rotate(45deg); }
|
|
159
|
+
.activity-body { min-width:0; margin:0 10px 12px 36px; padding:4px 0 0; color:var(--dsr-text); }
|
|
160
|
+
.activity-body section + section { margin-top:14px; }
|
|
161
|
+
.activity-body h4 { margin:0 0 6px; color:var(--dsr-muted); font-size:11px; font-weight:500; }
|
|
162
|
+
.activity-body pre { box-sizing:border-box; max-width:100%; max-height:280px; margin:0; padding:12px; border:1px solid var(--dsr-divider); border-radius:12px; background:var(--dsr-code-bg); color:var(--dsr-text); font:12px/1.65 ui-monospace,monospace; white-space:pre-wrap; overflow-wrap:anywhere; word-break:normal; overflow:auto; }
|
|
163
|
+
.activity-reasoning-text { max-height:320px; overflow:auto; padding:2px 0 2px 12px; border-left:1px solid var(--dsr-divider); color:var(--dsr-muted); white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.75; }
|
|
164
|
+
.activity-note { margin:0; color:var(--dsr-muted); font-size:12px; }
|
|
165
|
+
.chat-activity.is-live > summary { color:var(--dsr-accent-strong); }
|
|
166
|
+
.chat-activity.is-error { border-color:var(--dsr-error-line); background:var(--dsr-error-soft); }
|
|
167
|
+
.chat-activity.is-error > summary { color:var(--dsr-error); }
|
|
168
|
+
@keyframes activity-pulse { 0%,100% { opacity:.45; } 50% { opacity:1; } }
|
|
169
|
+
@keyframes activity-ring { 0% { transform:scale(.45); opacity:.55; } 75% { transform:scale(2.1); opacity:0; } 100% { opacity:0; } }
|
|
170
|
+
@media(max-width:560px) {
|
|
171
|
+
.chat-activity > summary { padding-inline:6px; gap:8px; }
|
|
172
|
+
.activity-title { max-width:100%; }
|
|
173
|
+
.activity-hint { display:none; }
|
|
174
|
+
.activity-body { margin-left:26px; margin-right:6px; }
|
|
175
|
+
}
|
|
176
|
+
@media(prefers-reduced-motion:reduce) { .activity-state i { animation:none; } .activity-state i::after { display:none; } }
|
|
177
|
+
/* 回合内的工具与思考合并成一行;不用卡片,靠缩进表示归属,保持轻量。 */
|
|
178
|
+
.chat-activity-group { box-sizing:border-box; width:100%; max-width:780px; margin:2px 0; padding-left:10px; border:0; background:transparent; }
|
|
179
|
+
.chat-activity-group > summary { display:flex; align-items:center; gap:8px; min-height:36px; padding:0 8px 0 6px; box-sizing:border-box; list-style:none; cursor:pointer; color:var(--dsr-muted); font-size:12.5px; line-height:1.5; user-select:none; border-radius:10px; }
|
|
180
|
+
.chat-activity-group > summary::-webkit-details-marker { display:none; }
|
|
181
|
+
.chat-activity-group > summary:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
182
|
+
.chat-activity-group > summary:hover { color:var(--dsr-text); background:var(--dsr-panel); }
|
|
183
|
+
.chat-activity-group .activity-group-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
|
|
184
|
+
.chat-activity-group .activity-group-live { display:inline-flex; align-items:center; flex:none; gap:6px; font-size:11px; color:var(--dsr-accent-strong); }
|
|
185
|
+
.chat-activity-group .activity-group-live i { width:6px; height:6px; position:relative; border-radius:50%; background:currentColor; box-shadow:0 0 8px currentColor; animation:activity-pulse 1.6s ease-in-out infinite; }
|
|
186
|
+
.chat-activity-group .activity-group-live i::after { content:''; position:absolute; inset:-4px; border-radius:50%; border:1px solid currentColor; opacity:0; animation:activity-ring 1.9s ease-out infinite; }
|
|
187
|
+
/* 运行中只提亮文字与光点,不加边框或底色块。 */
|
|
188
|
+
.chat-activity-group.is-running > summary { color:var(--dsr-accent-strong); }
|
|
189
|
+
.chat-activity-group.is-error > summary { color:var(--dsr-warning); }
|
|
190
|
+
.chat-activity-group .activity-chevron { margin-left:auto; }
|
|
191
|
+
.chat-activity-group[open] > summary { color:var(--dsr-text); }
|
|
192
|
+
.chat-activity-group[open] .activity-chevron { transform:rotate(45deg); }
|
|
193
|
+
.chat-activity-group .activity-group-body { padding:0 0 4px 6px; }
|
|
194
|
+
.chat-activity-group .activity-group-body .chat-activity { margin:2px 0; }
|
|
195
|
+
@media (prefers-reduced-motion:reduce) { .chat-activity-group .activity-group-live i { animation:none; } .chat-activity-group .activity-group-live i::after { display:none; } }
|
|
196
|
+
/* Secondary pages use the same title, surface and control rhythm as More. */
|
|
197
|
+
.workflow-v8 .workflow-subpage { box-sizing:border-box; width:100%; max-width:760px; margin-inline:auto; padding:0 0 24px; border:0; border-radius:0; background:transparent; gap:0; }
|
|
198
|
+
.workflow-subpage-head { padding:8px 0 24px; }
|
|
199
|
+
.workflow-back { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:8px 10px; margin:0 0 12px -10px; border:0; border-radius:var(--flow-control-radius); background:transparent; color:var(--dsr-muted); font:inherit; font-size:13px; cursor:pointer; text-decoration:none; }
|
|
200
|
+
.workflow-back:hover { background:var(--dsr-panel); color:var(--dsr-text); }
|
|
201
|
+
.workflow-back-arrow { font-size:25px; line-height:1; }
|
|
202
|
+
.workflow-subpage-identity { display:flex; align-items:flex-start; gap:12px; }
|
|
203
|
+
.workflow-subpage-identity > div { min-width:0; }
|
|
204
|
+
.workflow-subpage-identity .workflow-setting-icon { width:40px; height:40px; border-radius:12px; margin-top:2px; }
|
|
205
|
+
.workflow-subpage h1 { margin:0; font-size:24px; font-weight:650; letter-spacing:-.025em; line-height:1.3; overflow-wrap:anywhere; }
|
|
206
|
+
.workflow-subpage-intro { margin:8px 0 0; color:var(--dsr-muted); font-size:13px; line-height:1.65; }
|
|
207
|
+
.workflow-subpage-body { display:grid; gap:24px; min-width:0; }
|
|
208
|
+
.workflow-settings-section { min-width:0; }
|
|
209
|
+
.workflow-settings-section > h2 { margin:0 0 10px 4px; color:var(--dsr-muted); font-size:12px; font-weight:500; line-height:1.5; }
|
|
210
|
+
.workflow-settings-card { min-width:0; border:0; border-radius:var(--flow-radius); background:var(--dsr-panel); }
|
|
211
|
+
.workflow-settings-card > :first-child { border-top-left-radius:inherit; border-top-right-radius:inherit; }
|
|
212
|
+
.workflow-settings-card > :last-child { border-bottom-left-radius:inherit; border-bottom-right-radius:inherit; }
|
|
213
|
+
.workflow-v8 .workflow-subpage :is(.setting-row,.ds-setting-row) { box-sizing:border-box; display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-height:72px; margin:0; padding:16px; border:0; border-radius:0; background:transparent; }
|
|
214
|
+
.workflow-v8 .workflow-subpage :is(.setting-row,.ds-setting-row) + :is(.setting-row,.ds-setting-row) { border-top:1px solid var(--dsr-divider); }
|
|
215
|
+
.workflow-v8 .workflow-subpage :is(.setting-row,.ds-setting-row) > div:first-child { flex:1; min-width:min(100%,150px); }
|
|
216
|
+
.workflow-v8 .workflow-subpage :is(.setting-name,.ds-setting-name) { white-space:normal; overflow:visible; font-size:14px; line-height:1.45; font-weight:550; overflow-wrap:anywhere; }
|
|
217
|
+
.workflow-v8 .workflow-subpage :is(.setting-desc,.ds-setting-desc) { margin-top:5px; white-space:normal; overflow:visible; text-overflow:clip; word-break:normal; overflow-wrap:anywhere; font-size:12px; line-height:1.65; }
|
|
218
|
+
.workflow-v8 .workflow-subpage :is(.mini-btn,.ds-btn,.custom-select-trigger,.setting-select,.group-select-btn,.ds-select-btn) { min-height:44px; padding:10px 12px; border:1px solid var(--dsr-divider); border-radius:var(--flow-control-radius); box-shadow:none; font-size:13px; line-height:1.4; }
|
|
219
|
+
.workflow-v8 .workflow-subpage :is(.mini-btn,.ds-btn) { white-space:normal; }
|
|
220
|
+
.workflow-v8 .workflow-subpage button { min-width:44px; min-height:44px; }
|
|
221
|
+
.workflow-v8 .workflow-subpage :is(.setting-select,input:not([type=checkbox])) { box-sizing:border-box; max-width:100%; color:var(--dsr-text); background:var(--dsr-bg); border:1px solid var(--dsr-divider); border-radius:var(--flow-control-radius); }
|
|
222
|
+
.workflow-v8 .workflow-subpage :is(.setting-actions,.custom-select) { max-width:100%; }
|
|
223
|
+
.workflow-v8 .workflow-subpage .setting-actions { gap:8px; }
|
|
224
|
+
.workflow-v8 .workflow-subpage .switch { min-width:44px; height:44px; }
|
|
225
|
+
.workflow-v8 .workflow-subpage .switch .slider { top:8px; bottom:9px; }
|
|
226
|
+
.workflow-v8 .workflow-subpage .switch:focus-within { outline:2px solid var(--dsr-accent); outline-offset:3px; border-radius:12px; }
|
|
227
|
+
.workflow-v8 .workflow-subpage :is(.settings-group,.feedback-card) { margin:0; border:0; border-radius:var(--flow-radius); box-shadow:none; background:transparent; }
|
|
228
|
+
.workflow-v8 .workflow-subpage :is(.group-bar,.ds-group-bar,.server-list,.ds-server-list,.server-add,.ds-server-add) { box-sizing:border-box; padding:0 16px 16px; }
|
|
229
|
+
.workflow-v8 .workflow-subpage :is(.server-add,.ds-server-add) { flex-wrap:wrap; gap:8px; }
|
|
230
|
+
.workflow-v8 .workflow-subpage :is(.server-add,.ds-server-add) input { min-height:44px; min-width:120px; flex:1; border-radius:var(--flow-control-radius); font-size:16px; }
|
|
231
|
+
/* 主机与连接:分组标题和地址行里的图标控件保持紧凑。
|
|
232
|
+
通用 44px 触摸规则会把分组名挤成一字一行,图标按钮也会把地址挤成竖排。 */
|
|
233
|
+
.workflow-v8 .workflow-subpage :is(.srv-group-head,.ds-srv-head) :is(.srv-group-speed,.srv-group-del,.ds-mini) { min-width:32px; min-height:32px; width:32px; height:32px; padding:0; display:inline-grid; place-items:center; font-size:12px; }
|
|
234
|
+
.workflow-v8 .workflow-subpage :is(.srv-group-name,.ds-srv-name) { min-width:0; min-height:32px; }
|
|
235
|
+
.workflow-v8 .workflow-subpage :is(.server-edit,.server-del) { min-width:34px; min-height:34px; }
|
|
236
|
+
.workflow-v8 .workflow-subpage :is(.server-row,.ds-server-row) .ds-mini { min-width:34px; min-height:34px; width:34px; height:34px; padding:0; display:inline-grid; place-items:center; font-size:13px; }
|
|
237
|
+
.workflow-v8 .workflow-subpage :is(.srv-group-head,.ds-srv-head) :is(.switch.small,.ds-switch) { min-width:34px; min-height:20px; width:34px; height:20px; }
|
|
238
|
+
.workflow-v8 .workflow-subpage :is(.srv-group-head,.ds-srv-head) :is(.switch.small,.ds-switch) :is(.slider,.ds-slider) { top:0; bottom:0; }
|
|
239
|
+
.workflow-v8 .workflow-subpage :is(.srv-group-head,.ds-srv-head) :is(.switch.small,.ds-switch) :is(.slider,.ds-slider)::before { width:14px; height:14px; left:2px; top:2px; }
|
|
240
|
+
.workflow-v8 .workflow-subpage :is(.srv-group-head,.ds-srv-head) :is(.switch.small,.ds-switch) input:checked + :is(.slider,.ds-slider)::before { transform:translateX(14px); }
|
|
241
|
+
.workflow-v8 .workflow-subpage .workflow-technical { margin:0; padding:0 16px 16px; border:0; }
|
|
242
|
+
.workflow-v8 .workflow-subpage .workflow-technical > summary { display:list-item; align-content:center; padding-block:12px; line-height:1.5; cursor:pointer; }
|
|
243
|
+
.workflow-v8 .workflow-subpage .workflow-technical :is(.setting-row,.ds-setting-row) { padding-inline:0; }
|
|
244
|
+
.workflow-settings-card > .workflow-button { margin:12px 16px; }
|
|
245
|
+
.workflow-v8 .workflow-subpage .workflow-data-settings { margin:0; padding:16px; }
|
|
246
|
+
.workflow-data-settings > h3 { display:none; }
|
|
247
|
+
.workflow-v8 .workflow-subpage .relay-settings { margin:0; padding:16px; border:0; border-radius:var(--flow-radius); background:transparent; }
|
|
248
|
+
.workflow-v8 .workflow-subpage .relay-settings :is(button,input) { border-radius:var(--flow-control-radius); }
|
|
249
|
+
.workflow-v8 .workflow-subpage .relay-primary { color:var(--dsr-on-accent); }
|
|
250
|
+
.workflow-v8 .workflow-subpage .model-settings-shell { padding:16px; }
|
|
251
|
+
.workflow-v8 .workflow-subpage .model-settings-head { flex-wrap:wrap; gap:12px; border-color:var(--dsr-divider); }
|
|
252
|
+
.workflow-v8 .workflow-subpage .model-settings-head .setting-actions { flex-wrap:wrap; }
|
|
253
|
+
.workflow-v8 .workflow-subpage .model-provider-card { background:var(--dsr-bg); border-color:var(--dsr-divider); border-radius:var(--flow-control-radius); }
|
|
254
|
+
.workflow-v8 .workflow-subpage #overview-announcement-board { margin:0; padding:16px; border:0; box-shadow:none; background:transparent; }
|
|
255
|
+
.workflow-v8 .workflow-subpage .workflow-settings-card #token-desc { white-space:normal; }
|
|
256
|
+
/* Plugin pages share the same surface vocabulary without changing their controllers. */
|
|
257
|
+
.workflow-v8 #view-plugins { box-sizing:border-box; width:100%; max-width:1080px; margin-inline:auto; }
|
|
258
|
+
.workflow-v8 .ext-page { box-sizing:border-box; padding:0; }
|
|
259
|
+
.workflow-v8 .ext-header { gap:8px 16px; margin:0 0 12px; }
|
|
260
|
+
.workflow-v8 .ext-header button { min-height:44px; padding:8px 10px; margin-left:-10px; border:0; background:transparent; color:var(--dsr-muted); font-size:13px; }
|
|
261
|
+
.workflow-v8 :is(.pc-page,.sc-page,.ins-page) { box-sizing:border-box; border-radius:0; padding-top:0; }
|
|
262
|
+
.workflow-v8 :is(.pc-title h2,.sc-heading > h3,.ins-page .ins-header h2) { font-size:24px; font-weight:650; letter-spacing:-.025em; line-height:1.3; }
|
|
263
|
+
.workflow-v8 :is(.pc-intro,.sc-intro,.ins-header p) { font-size:13px; line-height:1.65; }
|
|
264
|
+
.workflow-v8 :is(.pc-card,.sc-card,.sc-detail,.ins-section,.pc-controls) { border-color:transparent; border-radius:var(--flow-radius); background:var(--dsr-panel); box-shadow:none; }
|
|
265
|
+
.workflow-v8 .sc-card.is-selected { border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); }
|
|
266
|
+
.workflow-v8 .sc-detail:empty { display:none; }
|
|
267
|
+
.workflow-v8 :is(.pc-dialog button:not(.pc-toggle),.pc-dialog input,.pc-dialog select,.ins-dialog button,.sc-filters input,.sc-filters select,.sc-filters button) { min-height:44px; border-radius:var(--flow-control-radius); }
|
|
268
|
+
.workflow-v8 .pc-dialog :is(input,select) { font-size:16px; }
|
|
269
|
+
.workflow-v8 .pc-tabs { max-width:100%; }
|
|
270
|
+
.workflow-v8 .pc-tabs button { font-size:13px; }
|
|
271
|
+
.workflow-v8 .pc-page .pc-heading { padding:0 0 4px; }
|
|
272
|
+
.workflow-v8 .ins-page { height:auto; max-height:none; margin:0; box-shadow:none; }
|
|
273
|
+
.workflow-v8 .ins-page .ins-content { max-height:none; overflow:visible; }
|
|
274
|
+
.workflow-v8 .workflow-sheet { background:var(--dsr-bg); }
|
|
275
|
+
.workflow-v8 .workflow-sheet-head { background:var(--dsr-bg); padding:12px 16px; }
|
|
276
|
+
.workflow-v8 .workflow-sheet-head h2 { font-size:18px; }
|
|
277
|
+
.workflow-v8 .workflow-sheet-body > div > section + section { margin-top:24px; }
|
|
278
|
+
.workflow-v8 .workflow-sheet-body h3 { font-size:14px; font-weight:550; line-height:1.5; }
|
|
279
|
+
.workflow-v8 .workflow-receipt { margin-top:12px; padding:16px; border:0; border-radius:var(--flow-radius); background:var(--dsr-panel); }
|
|
141
280
|
@media (max-width:480px) {
|
|
142
281
|
.workflow-v8 [data-overview-approval],.workflow-v8 [data-ds-overview-approval] { display:grid; grid-template-columns:26px minmax(0,1fr); }
|
|
143
282
|
.workflow-v8 :is(.overview-item-actions,.ds-overview-actions) { grid-column:2; justify-content:flex-end; }
|
|
144
283
|
.workflow-v8 .section-head { align-items:center; }
|
|
145
284
|
.workflow-v8 #session-sort { max-width:86px; }
|
|
285
|
+
.workflow-subpage-head { padding-bottom:20px; }
|
|
286
|
+
.workflow-subpage-body { gap:20px; }
|
|
287
|
+
.workflow-v8 .workflow-subpage .setting-actions { width:100%; justify-content:flex-end; }
|
|
288
|
+
.workflow-v8 .workflow-subpage #desktop-token-input { flex-basis:100%; }
|
|
289
|
+
.workflow-v8 .workflow-subpage :is(.group-bar,.ds-group-bar) { flex-wrap:nowrap; }
|
|
290
|
+
.workflow-v8 .workflow-subpage :is(.group-select,.ds-group-select) { min-width:0; }
|
|
291
|
+
.workflow-v8 .workflow-subpage :is(.group-select-btn,.ds-select-btn) { padding-inline:10px; }
|
|
292
|
+
.workflow-v8 .pc-card { padding:16px; }
|
|
293
|
+
.workflow-v8 .sc-filters { gap:8px; }
|
|
146
294
|
.workflow-sheet { margin:auto auto max(8px,var(--dsr-safe-b)); width:calc(100vw - 16px); max-height:88dvh; border-radius:20px; }
|
|
147
295
|
}
|
|
296
|
+
@media (max-width:360px) {
|
|
297
|
+
/* 极窄屏:状态与操作各占一行,避免地址列被挤成竖排。 */
|
|
298
|
+
.workflow-v8 .workflow-subpage :is(.server-edit,.server-del) { min-width:30px; min-height:30px; width:30px; height:30px; font-size:12px; }
|
|
299
|
+
.workflow-v8 .workflow-subpage .server-row { grid-template-columns:minmax(0,1fr) auto auto; grid-template-areas:"note badge badge" "url edit del"; gap:2px 6px; }
|
|
300
|
+
.workflow-v8 .workflow-subpage .server-row .server-main { display:contents; }
|
|
301
|
+
.workflow-v8 .workflow-subpage .server-row .server-note { grid-area:note; }
|
|
302
|
+
.workflow-v8 .workflow-subpage .server-row .server-url { grid-area:url; }
|
|
303
|
+
.workflow-v8 .workflow-subpage .server-row .server-badge { grid-area:badge; }
|
|
304
|
+
.workflow-v8 .workflow-subpage .server-row .server-edit { grid-area:edit; }
|
|
305
|
+
.workflow-v8 .workflow-subpage .server-row .server-del { grid-area:del; }
|
|
306
|
+
.workflow-v8 .workflow-subpage :is(.group-bar,.ds-group-bar) > label { display:none; }
|
|
307
|
+
}
|
|
148
308
|
@supports ((backdrop-filter:blur(12px)) or (-webkit-backdrop-filter:blur(12px))) {
|
|
149
309
|
.workflow-v8 .bottom-nav,.workflow-sheet { -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); }
|
|
150
310
|
}
|
|
311
|
+
/* 对话内图片:缩略按钮 + 全屏预览(双击放大/还原,点空白或 × 关闭)。 */
|
|
312
|
+
.chat-image { display:block; box-sizing:border-box; max-width:min(100%,560px); margin:8px 0; padding:0; border:1px solid var(--dsr-divider); border-radius:14px; background:var(--dsr-panel); overflow:hidden; cursor:zoom-in; }
|
|
313
|
+
.chat-image.is-loading { display:flex; align-items:center; justify-content:center; min-height:88px; padding:14px; border-style:dashed; color:var(--dsr-muted); font-size:12px; cursor:default; }
|
|
314
|
+
.chat-image.is-error { display:flex; align-items:center; justify-content:center; min-height:64px; padding:12px; border-color:var(--dsr-warning-line); color:var(--dsr-warning); background:var(--dsr-warning-soft); font-size:12px; cursor:default; }
|
|
315
|
+
.chat-image img { display:block; max-width:100%; height:auto; border-radius:inherit; }
|
|
316
|
+
.chat-image:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
317
|
+
.image-lightbox { position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center; background:rgba(3,7,12,.96); outline:none; }
|
|
318
|
+
.image-lightbox:focus { outline:none; }
|
|
319
|
+
.image-lightbox.hidden { display:none; }
|
|
320
|
+
.image-lightbox-stage { position:absolute; inset:0; box-sizing:border-box; display:flex; align-items:center; justify-content:center; padding:calc(var(--dsr-safe-t, 0px) + 56px) 12px calc(var(--dsr-safe-b, 0px) + 44px); overflow:auto; -webkit-overflow-scrolling:touch; }
|
|
321
|
+
.image-lightbox-stage img { display:block; max-width:100%; max-height:100%; object-fit:contain; border-radius:12px; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
|
|
322
|
+
.image-lightbox.is-zoomed .image-lightbox-stage { display:block; text-align:center; }
|
|
323
|
+
.image-lightbox.is-zoomed .image-lightbox-stage img { display:inline-block; max-width:none; max-height:none; margin:0 auto; }
|
|
324
|
+
.image-lightbox-close { position:fixed; top:calc(var(--dsr-safe-t, 0px) + 10px); right:12px; z-index:2; width:44px; height:44px; display:grid; place-items:center; border-radius:50%; border:1px solid rgba(255,255,255,.26); background:rgba(16,23,32,.78); color:#eef4fb; font-size:20px; line-height:1; }
|
|
325
|
+
.image-lightbox-hint { position:fixed; left:0; right:0; bottom:calc(var(--dsr-safe-b, 0px) + 10px); z-index:2; text-align:center; color:rgba(226,236,247,.78); font-size:12px; pointer-events:none; }
|
|
326
|
+
body.image-preview-open { overflow:hidden; }
|
|
151
327
|
@media (prefers-reduced-motion:reduce) { .workflow-v8 * { scroll-behavior:auto!important; } }
|
package/public/workflow.js
CHANGED
|
@@ -22,7 +22,13 @@
|
|
|
22
22
|
if(!target)return
|
|
23
23
|
target.removeAttribute('data-i18n');target.dataset.flowZh=zh;target.dataset.flowEn=en
|
|
24
24
|
}
|
|
25
|
+
function restoreAttention() {
|
|
26
|
+
const list=$(config?.desktop?'ds-overview-attention-list':'overview-attention-list')
|
|
27
|
+
if(list&&attention&&!attention.contains(list))attention.append(list)
|
|
28
|
+
}
|
|
25
29
|
function openSheet(title,content) {
|
|
30
|
+
restoreAttention()
|
|
31
|
+
operationList=null
|
|
26
32
|
sheet.querySelector('h2').textContent=title
|
|
27
33
|
const body=sheet.querySelector('.workflow-sheet-body')
|
|
28
34
|
for(const child of [...body.children])if(child.id==='workflow-model-content'){child.hidden=true;document.body.append(child)}
|
|
@@ -30,17 +36,27 @@
|
|
|
30
36
|
body.replaceChildren(content)
|
|
31
37
|
if(!sheet.open)sheet.showModal()
|
|
32
38
|
}
|
|
33
|
-
function close() { sheet?.close() }
|
|
39
|
+
function close() { restoreAttention();operationList=null;sheet?.close() }
|
|
34
40
|
function openModels() {
|
|
35
41
|
const content=$('workflow-model-content')
|
|
36
42
|
if(content)openSheet(label('模型与思考深度','Model and reasoning'),content)
|
|
37
43
|
config.models?.()
|
|
38
44
|
}
|
|
39
45
|
async function showOperations() {
|
|
40
|
-
const content=element('div')
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
const content=element('div'),pending=element('section'),receipts=element('section')
|
|
47
|
+
pending.append(element('h3','',label('待审批与待回答','Approvals and questions')))
|
|
48
|
+
receipts.append(element('h3','',label('操作回执','Operation receipts')),
|
|
49
|
+
element('p','workflow-muted',label('回执用于查询网络中断后尚未确认的操作结果。','Receipts track operation results after a connection interruption.')))
|
|
50
|
+
const rows=element('div');receipts.append(rows);content.append(pending,receipts)
|
|
51
|
+
openSheet(label('审批与操作回执','Approvals and receipts'),content);operationList=rows
|
|
52
|
+
const list=$(config.desktop?'ds-overview-attention-list':'overview-attention-list')
|
|
53
|
+
if(list)pending.append(list)
|
|
54
|
+
// Question dialogs use the existing modal controller, above the page.
|
|
55
|
+
pending.addEventListener('click',event=>{if(event.target.closest('[data-overview-question],[data-ds-overview-question]'))close()},true)
|
|
43
56
|
void refreshOperations()
|
|
57
|
+
try { if(config.operations)await root.DshOperations?.restore(config.operations()) }
|
|
58
|
+
catch { if(operationList===rows)rows.append(element('p','workflow-muted',label('暂时无法读取回执,可稍后重新打开。','Unable to read receipts. Try again shortly.')));return }
|
|
59
|
+
if(operationList===rows)void refreshOperations()
|
|
44
60
|
}
|
|
45
61
|
async function refreshOperations() {
|
|
46
62
|
if(!operationList||!sheet.open)return
|
|
@@ -108,12 +124,14 @@
|
|
|
108
124
|
const home=$('settings-home');if(!home)return
|
|
109
125
|
const intro=element('div','workflow-page-head');const heading=element('h1');rename(heading,'更多','More');intro.append(heading);home.prepend(intro)
|
|
110
126
|
const plugins=button('主机插件','Host plugins',()=>config.plugins(),'workflow-setting-link')
|
|
111
|
-
const receipts=button('
|
|
127
|
+
const receipts=button('审批与操作回执','Approvals and receipts',showOperations,'workflow-setting-link')
|
|
112
128
|
const main=home.querySelector('.settings-group,.ds-settings');main?.prepend(plugins);main?.append(receipts)
|
|
113
129
|
const names={servers:['主机与连接','Hosts and connections'],general:['外观与输入','Appearance and input'],model:['模型与提供方','Models and providers'],notify:['通知与后台','Notifications and background'],about:['关于与维护','About and maintenance']}
|
|
130
|
+
const descriptions={servers:['连接地址、访问令牌与公网中转','Addresses, access tokens and cloud relay'],general:['主题、语言、输入与常用提示词','Theme, language, input and reusable prompts'],model:['提供方、访问凭据与模型目录','Providers, credentials and model catalog'],notify:['消息提醒与后台接收','Event notifications and background delivery'],about:['版本、公告、反馈与本地数据','Version, announcements, feedback and local data']}
|
|
114
131
|
for(const [key,nameset] of Object.entries(names)){
|
|
115
132
|
const row=home.querySelector(`[data-settings-group="${key}"]`)
|
|
116
133
|
rename(row?.querySelector('.setting-name,.ds-setting-name'),...nameset)
|
|
134
|
+
rename(row?.querySelector('.setting-desc,.ds-setting-desc'),...descriptions[key])
|
|
117
135
|
const page=$('settings-page-'+key)
|
|
118
136
|
rename(page?.querySelector('[data-settings-back] .setting-name,[data-settings-back] .ds-setting-name'),...nameset)
|
|
119
137
|
if(row){const mark=element('span','workflow-setting-icon');mark.append(icon(key==='servers'?'host':key));row.prepend(mark)}
|
|
@@ -167,7 +185,7 @@
|
|
|
167
185
|
const notify=$('settings-page-notify')
|
|
168
186
|
if(notify){
|
|
169
187
|
const more=element('details','workflow-technical');more.append(element('summary','',label('后台间隔与通知排障','Background interval and diagnostics')))
|
|
170
|
-
for(const id of ['bg-interval','btn-test-notify'
|
|
188
|
+
for(const id of ['bg-interval','btn-test-notify']){const row=$(id)?.closest('.setting-row');if(row)more.append(row)}
|
|
171
189
|
notify.append(more)
|
|
172
190
|
}
|
|
173
191
|
}
|
|
@@ -192,6 +210,66 @@
|
|
|
192
210
|
}
|
|
193
211
|
for(const el of document.querySelectorAll('[data-cmd="/compact"],[data-cmd="/export"],[data-ds-cmd="/compact"],[data-ds-cmd="/export"]'))el.remove()
|
|
194
212
|
}
|
|
213
|
+
function setupSecondaryPages() {
|
|
214
|
+
const definitions={
|
|
215
|
+
general:{title:['外观与输入','Appearance and input'],intro:['按你的习惯调整显示、输入与常用提示词。','Adjust display, input and reusable prompts to suit your workflow.'],icon:'general',groups:[['input','对话与输入','Conversation and input'],['appearance','外观与语言','Appearance and language'],['presets','预设提示词','Reusable prompts']]},
|
|
216
|
+
servers:{title:['主机与连接','Hosts and connections'],intro:['管理连接地址、访问令牌与公网中转。','Manage host addresses, access tokens and relay connections.'],icon:'host',groups:[['local','连接地址','Host addresses'],['access','访问令牌','Access token'],['relay','云服务器中转','Cloud relay'],['host','主机管理','Host management'],['advanced','高级选项','Advanced options']]},
|
|
217
|
+
model:{title:['模型与提供方','Models and providers'],intro:['配置当前主机的模型提供方与访问凭据。','Configure model providers and credentials on the current host.'],icon:'model',groups:[['main','提供方配置','Provider configuration']]},
|
|
218
|
+
notify:{title:['通知与后台','Notifications and background'],intro:['选择需要提醒的事项,并管理后台接收方式。','Choose which events to hear about and how to receive them in the background.'],icon:'notify',groups:[['main','消息与提醒','Messages and reminders'],['advanced','后台与排障','Background and diagnostics']]},
|
|
219
|
+
about:{title:['关于与维护','About and maintenance'],intro:['查看版本与公告,获取帮助或管理本地数据。','Find version information, announcements, help and local data controls.'],icon:'about',groups:[['main','版本与项目','Version and project'],['announcements','公告','Announcements'],['support','反馈与支持','Feedback and support'],['data','本地数据','Local data']]},
|
|
220
|
+
theme:{title:['外观','Appearance'],intro:['选择你喜欢的配色。','Choose your preferred color palette.'],icon:'general',groups:[['main','配色','Color palette']]},
|
|
221
|
+
tests:{title:['功能测试','Diagnostics'],intro:['检查当前设备与主机的可用能力。','Check the capabilities of this device and host.'],icon:'host',groups:[['main','功能检查','Capability checks']]},
|
|
222
|
+
}
|
|
223
|
+
const includes=(node,selector)=>node.matches(selector)||!!node.querySelector(selector)
|
|
224
|
+
for(const [key,definition] of Object.entries(definitions)){
|
|
225
|
+
const page=$('settings-page-'+key);if(!page||page.classList.contains('workflow-subpage'))continue
|
|
226
|
+
const oldBack=page.querySelector('[data-settings-back]'),oldGroup=oldBack?.parentElement
|
|
227
|
+
oldBack?.remove()
|
|
228
|
+
if(oldGroup!==page&&oldGroup?.classList.contains('settings-group')&&!oldGroup.children.length)oldGroup.remove()
|
|
229
|
+
const parts=[]
|
|
230
|
+
for(const node of [...page.children]){
|
|
231
|
+
if(node.matches('.settings-group:not(.model-settings-shell):not(.feedback-card)')){parts.push(...node.children);node.remove()}
|
|
232
|
+
else parts.push(node)
|
|
233
|
+
}
|
|
234
|
+
const header=element('header','workflow-subpage-head'),back=element('button','workflow-back'),backLabel=element('span')
|
|
235
|
+
back.type='button';rename(backLabel,'返回更多','Back to More');back.dataset.settingsBack=''
|
|
236
|
+
back.append(element('span','workflow-back-arrow','‹'),backLabel)
|
|
237
|
+
const title=element('h1');rename(title,...definition.title);title.id='workflow-title-'+key
|
|
238
|
+
const intro=element('p','workflow-subpage-intro');rename(intro,...definition.intro)
|
|
239
|
+
const mark=element('span','workflow-setting-icon');mark.append(icon(definition.icon))
|
|
240
|
+
const identity=element('div','workflow-subpage-identity'),copy=element('div');copy.append(title,intro);identity.append(mark,copy)
|
|
241
|
+
header.append(back,identity)
|
|
242
|
+
const body=element('div','workflow-subpage-body'),cards=new Map()
|
|
243
|
+
for(const [id,zh,en] of definition.groups){
|
|
244
|
+
const section=element('section','workflow-settings-section'),heading=element('h2'),card=element('div','workflow-settings-card')
|
|
245
|
+
rename(heading,zh,en);heading.id='workflow-group-'+key+'-'+id;section.setAttribute('aria-labelledby',heading.id);card.dataset.workflowSettingsSlot=id
|
|
246
|
+
section.append(heading,card);cards.set(id,{section,card});body.append(section)
|
|
247
|
+
}
|
|
248
|
+
for(const node of parts){
|
|
249
|
+
let group=definition.groups[0][0]
|
|
250
|
+
if(key==='general'){
|
|
251
|
+
if(includes(node,'#btn-theme,#btn-lang'))group='appearance'
|
|
252
|
+
else if(includes(node,'#btn-preset-add,#btn-manage-presets,#preset-list'))group='presets'
|
|
253
|
+
}else if(key==='servers'){
|
|
254
|
+
if(node.id==='relay-settings')group='relay'
|
|
255
|
+
else if(includes(node,'#token-desc,#desktop-token-input'))group='access'
|
|
256
|
+
else if(node.matches('.workflow-technical'))group='advanced'
|
|
257
|
+
else if(includes(node,'#btn-host-describe,#btn-dsh-start')||node.matches('.workflow-button'))group='host'
|
|
258
|
+
}else if(key==='notify'&&node.matches('.workflow-technical'))group='advanced'
|
|
259
|
+
else if(key==='about'){
|
|
260
|
+
if(node.matches('.workflow-data-settings'))group='data'
|
|
261
|
+
else if(node.id==='overview-announcement-board')group='announcements'
|
|
262
|
+
else if(node.matches('.feedback-card,.workflow-button')||includes(node,'[data-donate-open],#btn-donate-about'))group='support'
|
|
263
|
+
}
|
|
264
|
+
cards.get(group).card.append(node)
|
|
265
|
+
}
|
|
266
|
+
// Move existing controls rather than rebuilding them: listeners, form state
|
|
267
|
+
// and asynchronously updated regions keep their original DOM identities.
|
|
268
|
+
for(const {section,card} of cards.values())if(!card.children.length||[...card.children].every(node=>node.hidden||node.classList.contains('hidden')))section.hidden=true
|
|
269
|
+
page.classList.add('workflow-subpage');page.setAttribute('aria-labelledby',title.id)
|
|
270
|
+
page.replaceChildren(header,body)
|
|
271
|
+
}
|
|
272
|
+
}
|
|
195
273
|
function setupStart() {
|
|
196
274
|
const desktop=config.desktop,home=$(desktop?'view-sessions':'view-home');if(!home)return
|
|
197
275
|
const head=element('section','workflow-start')
|
|
@@ -249,9 +327,11 @@
|
|
|
249
327
|
sheet=element('dialog','workflow-sheet');sheet.id='workflow-sheet'
|
|
250
328
|
const header=element('header','workflow-sheet-head');header.append(element('h2'),button('关闭','Close',close));sheet.append(header,element('div','workflow-sheet-body'));document.body.append(sheet)
|
|
251
329
|
sheet.addEventListener('click',event=>{if(event.target===sheet)close()})
|
|
330
|
+
sheet.addEventListener('close',()=>{if(!sheet.open){restoreAttention();operationList=null}})
|
|
252
331
|
setupMore();setupStart();setupComposer();config.start?.()
|
|
253
332
|
const relaySettings=$('relay-settings')
|
|
254
|
-
if(relaySettings){$('settings-page-servers')?.append(relaySettings);root.DshRelaySettings?.mount(relaySettings,{connection:config.operations})}
|
|
333
|
+
if(relaySettings){$('settings-page-servers')?.append(relaySettings);root.DshRelaySettings?.mount(relaySettings,{connection:config.relay||config.operations})}
|
|
334
|
+
setupSecondaryPages()
|
|
255
335
|
const overview=$('view-activity');if(overview)overview.dataset.workflowLegacy='overview'
|
|
256
336
|
if(!config.desktop){
|
|
257
337
|
const badge=$('nav-pending')
|
|
@@ -273,7 +353,7 @@
|
|
|
273
353
|
}
|
|
274
354
|
function clearStorage() {
|
|
275
355
|
const keys=new Set(['activeServer','busySendMode','dsShowArchivedV1','dshAdminDoctorCollapsed','dshAdminToken',
|
|
276
|
-
'dshLang','dshNetworkModeV1','dshTheme','fsWorkspaceIdV1','lastNewSessionWorkspaceV1','mobileEnterAction',
|
|
356
|
+
'dshLang','dshNetworkModeV1','dshWeakStreamOff','dshTheme','fsWorkspaceIdV1','lastNewSessionWorkspaceV1','mobileEnterAction',
|
|
277
357
|
'notify','peakRemind','server','servers','servers-v1','servers-v2','sessionSort','showArchivedV1','showTools',
|
|
278
358
|
'steerSendingEnabled','token','workspaceFilterV1','dshRemoteClientIdV2','dshPromptPresets','seenNotesVersion',
|
|
279
359
|
'dshCollapsedGoalsV1','workbenchOrderV1','seenAnnouncementsV1','announcementHistoryV1','announcementVotesV1',
|