dsh-remote-plugin 0.8.0 → 0.8.1

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/public/index.html CHANGED
@@ -34,8 +34,12 @@
34
34
  <div class="topbar-right">
35
35
  <button id="btn-donate" class="topbar-btn icon-btn" data-i18n-title="settings.donate" data-i18n-aria="settings.donate"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 8h11v6a4 4 0 0 1-4 4H10a4 4 0 0 1-4-4Z"/><path d="M17 10h1.5a2.5 2.5 0 0 1 0 5H17M9 4c0 1 1 1.2 1 2M13 4c0 1 1 1.2 1 2M5 20h13"/></svg></button>
36
36
  <button id="btn-feedback" class="topbar-btn icon-btn" data-i18n-title="feedback.title" data-i18n-aria="feedback.title" aria-haspopup="menu" aria-expanded="false"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 11.5a7.5 7.5 0 0 1-7.5 7.5H7l-3 2 .8-3.1A7.5 7.5 0 1 1 20 11.5Z"/><path d="M8 11.5h.01M12 11.5h.01M16 11.5h.01"/></svg></button>
37
- <button id="btn-refresh" class="topbar-btn icon-btn" data-i18n-title="a11y.refresh" data-i18n-aria="a11y.refresh"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 11a8 8 0 1 0 1 4"/><path d="M20 5v6h-6"/></svg></button>
38
- <span id="conn-badge" class="topbar-btn conn-badge off" data-i18n="conn.off">未连接</span>
37
+ <div class="ext-shortcuts">
38
+ <button id="btn-plugin-shortcuts" class="topbar-btn icon-btn" type="button" aria-haspopup="menu" aria-controls="plugin-shortcuts-menu" aria-expanded="false" data-i18n-title="nav.plugins" data-i18n-aria="nav.plugins"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="2"/><rect x="14" y="3" width="7" height="7" rx="2"/><rect x="3" y="14" width="7" height="7" rx="2"/><rect x="14" y="14" width="7" height="7" rx="2"/></svg></button>
39
+ <div id="plugin-shortcuts-menu" class="ext-shortcuts-menu hidden" role="menu" data-i18n-aria="nav.plugins"></div>
40
+ </div>
41
+ <button id="conn-badge" type="button" class="topbar-btn conn-badge off" aria-describedby="conn-refresh-hint" data-i18n="conn.off" data-i18n-title="conn.refresh">未连接</button>
42
+ <span id="conn-refresh-hint" class="ext-sr-only" data-i18n="conn.refresh">点击刷新连接与数据</span>
39
43
  </div>
40
44
  </header>
41
45
 
@@ -92,6 +96,7 @@
92
96
  <label for="fs-workspace" data-i18n="fs.workspace">DSH 工作区</label>
93
97
  <select id="fs-workspace" class="workspace-select" data-i18n-aria="workspace.select"></select>
94
98
  </div>
99
+ <section id="file-inbox-files" class="file-inbox-files" aria-label="文件收件箱"></section>
95
100
  <div class="fs-head">
96
101
  <button id="fs-up" class="icon-btn" data-i18n-title="fs.up" data-i18n-aria="fs.up">‹</button>
97
102
  <div id="fs-path" class="fs-path" data-i18n="fs.loading">加载中…</div>
@@ -127,11 +132,16 @@
127
132
  </div>
128
133
 
129
134
  <button id="session-sub" class="session-sub" type="button" aria-haspopup="dialog" aria-controls="session-info"></button>
130
- <div id="session-cards" class="cards"></div>
131
-
132
- <div id="queue-dock" class="queue-dock hidden" aria-live="polite"></div>
133
-
134
- <section id="session-pending" class="session-pending hidden" aria-live="polite"></section>
135
+ <section id="session-deck" class="session-deck">
136
+ <div id="session-deck-stage" class="session-deck-stage">
137
+ <div id="session-cards" class="cards"></div>
138
+ <div id="queue-dock" class="queue-dock hidden" aria-live="polite"></div>
139
+ <div class="session-attention">
140
+ <section id="session-pending" class="session-pending hidden" aria-live="polite"></section>
141
+ <section id="file-inbox-session" class="file-inbox-session" aria-label="待接收文件" aria-live="polite" hidden></section>
142
+ </div>
143
+ </div>
144
+ </section>
135
145
 
136
146
  <div class="section-head small">
137
147
  <span data-i18n="session.history">对话</span>
@@ -967,6 +977,7 @@
967
977
  'conn.reconnectIn': '重连中 {n}s', 'conn.offline': '离线', 'conn.failed': '连接失败',
968
978
  'conn.poll': '轮询', 'conn.pollTitle': '当前网络不支持实时推送,已降级为轮询(延迟数秒)',
969
979
  'conn.titleGroup': '{group} · {url}({ms})',
980
+ 'conn.refresh': '点击刷新连接与数据',
970
981
  'common.refreshing': '刷新中…', 'select.choose': '请选择', 'select.cancel': '取消',
971
982
  'nav.sessions': '会话', 'nav.files': '文件', 'nav.pending': '待办', 'nav.overview': '总览', 'nav.home': '主页', 'nav.plugins': '插件', 'nav.settings': '设置',
972
983
  'overview.eyebrow': 'SYSTEM OVERVIEW', 'overview.title': '主页', 'overview.subtitle': '实时状态与需要你处理的事项',
@@ -1209,7 +1220,7 @@
1209
1220
  'modal.approvalTitle': '工具审批', 'modal.reject': '拒绝', 'modal.allowOnce': '允许一次',
1210
1221
  'modal.questionTitle': 'DSH 需要你回答', 'modal.later': '稍后', 'modal.submit': '提交',
1211
1222
  'modal.goalTitle': '目标控制', 'modal.close': '关闭', 'modal.updateGoal': '更新目标',
1212
- 'announcement.label': '公告', 'announcement.later': '稍后再看', 'announcement.gotIt': '全部知道了', 'announcement.open': '查看详情', 'announcement.previous': '上一条公告', 'announcement.next': '下一条公告', 'announcement.page': '第 {current} / {total} 条', 'announcement.historyLabel': '公告记录', 'announcement.historyTitle': '历史公告', 'announcement.historyEmpty': '暂无历史公告', 'announcement.close': '关闭', 'announcement.noDate': '未标注日期',
1223
+ 'announcement.label': '公告', 'announcement.later': '稍后再看', 'announcement.gotIt': '全部知道了', 'announcement.open': '查看详情', 'announcement.expand': '展开', 'announcement.collapse': '收起', 'announcement.previous': '上一条公告', 'announcement.next': '下一条公告', 'announcement.page': '第 {current} / {total} 条', 'announcement.historyLabel': '公告记录', 'announcement.historyTitle': '历史公告', 'announcement.historyEmpty': '暂无历史公告', 'announcement.close': '关闭', 'announcement.noDate': '未标注日期',
1213
1224
  'announcement.voteSubmit': '提交投票', 'announcement.voteChoose': '请先选择一项', 'announcement.voteThanks': '已投票:{option}', 'announcement.voteFailed': '投票失败:{msg}', 'announcement.voteNetworkError': '网络错误', 'announcement.voteAgainLater': '提交太频繁,请稍后再试', 'announcement.voteFromHistory': '参与投票',
1214
1225
  'modal.statsTitle': '本轮统计',
1215
1226
  'time.justNow': '刚刚', 'time.minAgo': ' 分钟前', 'time.hourAgo': ' 小时前'
@@ -1231,6 +1242,7 @@
1231
1242
  'conn.reconnectIn': 'Reconnecting {n}s', 'conn.offline': 'Offline', 'conn.failed': 'Connection failed',
1232
1243
  'conn.poll': 'Polling', 'conn.pollTitle': 'Realtime push is unavailable on this network; degraded to polling (a few seconds delay)',
1233
1244
  'conn.titleGroup': '{group} · {url} ({ms})',
1245
+ 'conn.refresh': 'Click to refresh connection and data',
1234
1246
  'common.refreshing': 'Refreshing…', 'select.choose': 'Choose an option', 'select.cancel': 'Cancel',
1235
1247
  'nav.sessions': 'Sessions', 'nav.files': 'Files', 'nav.pending': 'Inbox', 'nav.overview': 'Overview', 'nav.home': 'Home', 'nav.plugins': 'Plugins', 'nav.settings': 'Settings',
1236
1248
  'overview.eyebrow': 'SYSTEM OVERVIEW', 'overview.title': 'Home', 'overview.subtitle': 'Live status and items needing your attention',
@@ -1473,7 +1485,7 @@
1473
1485
  'modal.approvalTitle': 'Tool approval', 'modal.reject': 'Reject', 'modal.allowOnce': 'Allow once',
1474
1486
  'modal.questionTitle': 'DSH needs your answer', 'modal.later': 'Later', 'modal.submit': 'Submit',
1475
1487
  'modal.goalTitle': 'Goal control', 'modal.close': 'Close', 'modal.updateGoal': 'Update goal',
1476
- 'announcement.label': 'Announcement', 'announcement.later': 'Later', 'announcement.gotIt': 'Mark all read', 'announcement.open': 'View details', 'announcement.previous': 'Previous announcement', 'announcement.next': 'Next announcement', 'announcement.page': 'Announcement {current} of {total}', 'announcement.historyLabel': 'Announcement archive', 'announcement.historyTitle': 'Announcement history', 'announcement.historyEmpty': 'No announcement history', 'announcement.close': 'Close', 'announcement.noDate': 'No date',
1488
+ 'announcement.label': 'Announcement', 'announcement.later': 'Later', 'announcement.gotIt': 'Mark all read', 'announcement.open': 'View details', 'announcement.expand': 'Expand', 'announcement.collapse': 'Collapse', 'announcement.previous': 'Previous announcement', 'announcement.next': 'Next announcement', 'announcement.page': 'Announcement {current} of {total}', 'announcement.historyLabel': 'Announcement archive', 'announcement.historyTitle': 'Announcement history', 'announcement.historyEmpty': 'No announcement history', 'announcement.close': 'Close', 'announcement.noDate': 'No date',
1477
1489
  'announcement.voteSubmit': 'Submit vote', 'announcement.voteChoose': 'Choose an option first', 'announcement.voteThanks': 'Voted: {option}', 'announcement.voteFailed': 'Vote failed: {msg}', 'announcement.voteNetworkError': 'Network error', 'announcement.voteAgainLater': 'Too many submissions; try again later', 'announcement.voteFromHistory': 'Vote now',
1478
1490
  'modal.statsTitle': 'This round',
1479
1491
  'time.justNow': 'just now', 'time.minAgo': ' min ago', 'time.hourAgo': ' hr ago'
@@ -1514,6 +1526,10 @@
1514
1526
  <script src="approval-records.js"></script>
1515
1527
  <script src="doctor-entry.js"></script>
1516
1528
  <script src="onboarding.js"></script>
1529
+ <link rel="stylesheet" href="file-inbox.css">
1530
+ <script src="file-inbox.js"></script>
1531
+ <link rel="stylesheet" href="session-deck.css">
1532
+ <script src="session-deck.js"></script>
1517
1533
  <script src="app.js"></script>
1518
1534
  </body>
1519
1535
  </html>
package/public/plugin.js CHANGED
@@ -55,6 +55,16 @@ function setBusy(value) {
55
55
  function render(st) {
56
56
  latest = st
57
57
  setup?.update(st)
58
+ /** 网关解释器来源说明:Windows 上必须位于 DSH 安装目录之外,否则 DSH 更新会被占用。 */
59
+ function runtimeNote(runtime) {
60
+ if (!runtime) return ''
61
+ if (runtime.source === 'unknown') return ' · 网关解释器待确认'
62
+ if (runtime.insideInstallDir) return ' · 网关解释器位于 DSH 安装目录内,DSH 更新可能失败'
63
+ const label = runtime.source === 'env' ? 'DSH_REMOTE_NODE'
64
+ : runtime.source === 'path' ? 'PATH'
65
+ : runtime.source === 'desktop-runtime' ? '内置副本' : runtime.source === 'external' ? '外部 node' : '宿主 node'
66
+ return ' · node ' + (runtime.version || '?') + '(' + label + ')'
67
+ }
58
68
  const gateway = st.mode === 'gateway' || st.gatewayRunning === true
59
69
  const authError = st.gatewayAuthError || ''
60
70
  const healthy = st.mode === 'gateway' && !authError && st.upstream?.reachable === true
@@ -80,7 +90,10 @@ function render(st) {
80
90
  $('plugin-toggle-icon')?.setAttribute('data-morph-state', gateway ? 'open' : 'closed')
81
91
  $('plugin-toggle')?.classList.toggle('hidden', !installed)
82
92
 
83
- text('plugin-version', st.version ? 'v' + st.version : '—')
93
+ text('plugin-version', (st.version ? 'v' + st.version : '—') + runtimeNote(st.gatewayRuntime))
94
+ if ($('plugin-version')) {
95
+ $('plugin-version').title = st.gatewayRuntime?.warning || st.gatewayRuntime?.executable || ''
96
+ }
84
97
  text('plugin-gateway-version', gateway ? ('v' + (st.gatewayVersion || st.version || '未知')) : '未运行')
85
98
  text('plugin-devices', `${st.onlineCount || 0} / ${st.deviceCount || 0}`)
86
99
  text('plugin-host', (st.lanIPs || []).find(x => x && x !== '127.0.0.1') || st.host || '127.0.0.1')
@@ -188,9 +201,11 @@ $('plugin-primary').addEventListener('click', () => {
188
201
  else openConsole()
189
202
  })
190
203
 
191
- load()
192
- setInterval(load, 5000)
204
+ const panelIsVisible = () => document.visibilityState !== 'hidden'
205
+ if (panelIsVisible()) load()
206
+ setInterval(() => { if (panelIsVisible()) void load() }, 5000)
193
207
  $('plugin-usage-refresh').addEventListener('click', loadUsage)
194
- loadUsage()
195
- setInterval(() => { if (document.visibilityState !== 'hidden' && Date.now() - usageLoadedAt >= 30000) void loadUsage() }, 30000)
196
- document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'visible' && Date.now() - usageLoadedAt >= 30000) void loadUsage() })
208
+ if (panelIsVisible()) loadUsage()
209
+ setInterval(() => { if (panelIsVisible() && Date.now() - usageLoadedAt >= 30000) void loadUsage() }, 30000)
210
+ const resumePanel = () => { if (panelIsVisible()) { void load(); if (Date.now() - usageLoadedAt >= 30000) void loadUsage() } }
211
+ document.addEventListener('visibilitychange', resumePanel)
@@ -0,0 +1,73 @@
1
+ /* One visible context card, with the rest suggested by the stacked edges. */
2
+ .session-deck,.session-deck-stage { display:contents; }
3
+ .session-deck[hidden],.session-deck-stage[hidden] { display:none !important; }
4
+ .session-deck[data-mounted] { --deck-card-height:156px; display:block; flex:none; min-width:0; margin:0 0 8px; }
5
+ .ds-view .session-deck[data-mounted] { margin:10px 22px 12px; }
6
+ .session-deck-head { display:flex; align-items:center; gap:6px; min-height:36px; margin-bottom:4px; }
7
+ .session-deck-tabs { display:flex; flex:1; min-width:0; gap:5px; overflow-x:auto; scrollbar-width:none; padding:2px; }
8
+ .session-deck-tabs::-webkit-scrollbar { display:none; }
9
+ .session-deck-tab,.session-deck-control { flex:none; display:inline-flex; align-items:center; justify-content:center; gap:4px; min-height:36px; padding:5px 9px; border:1px solid var(--dsr-line); border-radius:10px; background:var(--dsr-panel); color:var(--dsr-muted); font:inherit; font-size:12px; cursor:pointer; touch-action:manipulation; }
10
+ .session-deck-tab small { min-width:16px; padding:1px 4px; border-radius:6px; background:var(--dsr-bg-2); font-size:10px; }
11
+ .session-deck-tab.needs-action { color:var(--dsr-warning); border-color:var(--dsr-warning-line); }
12
+ .session-deck-tab[aria-pressed="true"] { color:var(--dsr-accent-strong); border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); font-weight:700; }
13
+ .session-deck-controls { display:flex; align-items:center; flex:none; gap:2px; }
14
+ .session-deck-control { width:30px; padding:2px; font-size:19px; background:transparent; border-color:transparent; }
15
+ .session-deck-position { min-width:28px; text-align:center; color:var(--dsr-muted); font-size:10px; font-variant-numeric:tabular-nums; }
16
+ .session-deck-control:disabled { opacity:.28; cursor:default; }
17
+ .session-deck-tab:focus-visible,.session-deck-control:focus-visible,.session-deck-stage:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
18
+ .session-deck[data-mounted] .session-deck-stage { display:block; position:relative; min-width:0; isolation:isolate; touch-action:pan-y pinch-zoom; }
19
+ .session-deck[data-multiple="true"][data-folded="false"] { padding-bottom:8px; }
20
+ .session-deck[data-multiple="true"] .session-deck-stage::before,.session-deck[data-multiple="true"] .session-deck-stage::after { content:""; position:absolute; z-index:-1; inset:7px 7px -4px; border:1px solid var(--dsr-line); border-radius:13px; background:var(--dsr-bg-2); pointer-events:none; }
21
+ .session-deck[data-multiple="true"] .session-deck-stage::before { inset:12px 14px -8px; opacity:.65; }
22
+ .session-deck[data-mounted] #session-cards,.session-deck[data-mounted] .session-attention,.session-deck[data-mounted] #session-pending:not(.hidden),.session-deck[data-mounted] #file-inbox-session:not([hidden]),.session-deck[data-mounted] .session-pending-list,.session-deck[data-mounted] .ds-session-pending-list,.session-deck[data-mounted] #file-inbox-session > .file-inbox-list { display:contents; }
23
+ .session-deck[data-mounted] .session-pending-head,.session-deck[data-mounted] .ds-session-pending-head,.session-deck[data-mounted] #file-inbox-session > .file-inbox-head { display:none; }
24
+ .session-deck[data-mounted] [data-deck-card] { display:none !important; }
25
+ .session-deck[data-mounted] [data-deck-card][data-deck-active] { display:block !important; position:relative; width:100%; min-width:0; max-height:var(--deck-card-height); overflow-y:auto; overscroll-behavior:contain; box-sizing:border-box; margin:0; transform:translateX(var(--deck-drag,0px)); border-radius:13px; scrollbar-width:thin; }
26
+ /* A scroll container terminates touch-action ancestor lookup: include cards and nested scrollers. */
27
+ .session-deck [data-deck-card],.session-deck [data-deck-card] * { touch-action:pan-y pinch-zoom; }
28
+ .session-deck [data-deck-kind="goal"] > .goal-card,.session-deck [data-deck-kind="goal"] > .ds-goal-card { margin:0; box-sizing:border-box; }
29
+ .session-deck[data-mounted] [data-deck-kind="goal"][data-deck-active] { display:flex !important; justify-content:flex-end; }
30
+ .session-deck[data-mounted] [data-deck-card][data-deck-active]:has(details[open]) { max-height:min(48dvh,360px); }
31
+ .session-deck #queue-dock .queue-dock-list,.session-deck #queue-dock .ds-queue-dock-list { max-height:none; }
32
+ .session-deck [data-deck-card] .pc-desc,.session-deck [data-deck-card] .ds-notif-body { max-height:72px; overflow-y:auto; }
33
+ .session-deck .goal-card,.session-deck .ds-goal-card,.session-deck .pending-card,.session-deck .ds-notif-card { padding:10px; }
34
+ .session-deck .goal-obj,.session-deck .ds-goal-obj,.deck-summary-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
35
+ .session-deck .goal-card-head,.session-deck .ds-goal-card-head { margin-bottom:4px; }
36
+ .session-deck .goal-card-head .card-title,.session-deck .ds-goal-card-head .ds-card-title { font-size:11px; color:var(--dsr-muted); text-transform:none; }
37
+ .session-deck .goal-actions,.session-deck .ds-goal-actions { gap:6px; margin-top:6px; align-items:flex-start; }
38
+ .session-deck .goal-actions > [data-goal],.session-deck .ds-goal-actions > [data-goal] { flex:none; min-height:34px; padding:5px 11px; }
39
+ .deck-context-head { display:flex; align-items:center; gap:8px; margin-bottom:4px; color:var(--dsr-muted); font-size:11px; }
40
+ .deck-more { min-width:0; margin:0; font-size:11px; color:var(--dsr-muted); }
41
+ .deck-more > summary { display:flex; align-items:center; justify-content:center; min-height:34px; padding:0 6px; cursor:pointer; color:var(--dsr-muted); list-style:none; }
42
+ .deck-more > summary::-webkit-details-marker { display:none; }
43
+ .deck-more > summary::after { content:'⌄'; margin-left:5px; }
44
+ .deck-more[open] > summary::after { content:'⌃'; }
45
+ .deck-more[open] { flex-basis:100%; order:3; }
46
+ .session-deck .goal-actions > .deck-more,.session-deck .ds-goal-actions > .deck-more { margin-left:auto; }
47
+ .deck-full-content { margin:5px 0 0; max-height:240px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.6; text-align:left; color:var(--dsr-text); }
48
+ .deck-full-content p { margin:4px 0; }
49
+ .deck-task-state { display:inline-block; margin-right:6px; color:var(--dsr-muted); font-size:11px; }
50
+ .deck-review-head { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:13px; }
51
+ .deck-review-head strong { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
52
+ .deck-review-badge { flex:none; color:var(--dsr-warning); font-size:10px; }
53
+ .deck-review-reason { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin:4px 0; font-size:12px; line-height:1.45; color:var(--dsr-text); overflow-wrap:anywhere; }
54
+ .deck-argument-preview { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsr-muted); font-size:11px; line-height:1.5; }
55
+ .deck-review-footer { display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px; margin-top:7px; }
56
+ .deck-review-footer > .deck-more { margin-left:auto; }
57
+ .deck-decision { min-height:36px; padding:5px 11px; border:1px solid var(--dsr-line); border-radius:9px; background:var(--dsr-panel); color:var(--dsr-text); font:inherit; font-size:12px; cursor:pointer; }
58
+ .deck-decision.primary { color:var(--dsr-accent-strong); background:var(--dsr-accent-soft); border-color:var(--dsr-accent-line); }
59
+ .deck-decision:focus-visible,.deck-more > summary:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
60
+ .session-deck .question-summary,.session-deck .ds-question-summary { -webkit-line-clamp:2; }
61
+ @media(min-width:900px) {
62
+ .ds-view .session-deck [data-session-approval][data-deck-active]:not(:has(details[open])) { display:grid !important; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; }
63
+ .ds-view .session-deck .deck-review-head,.ds-view .session-deck .deck-review-reason,.ds-view .session-deck .deck-argument-preview { grid-column:1; }
64
+ .ds-view .session-deck .deck-review-footer { grid-column:2; grid-row:1 / 4; align-self:center; margin:0; }
65
+ .ds-view .session-deck .goal-card:not(:has(details[open])),.ds-view .session-deck .ds-goal-card:not(:has(details[open])) { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; }
66
+ .ds-view .session-deck .ds-goal-card-head,.ds-view .session-deck .ds-goal-obj { grid-column:1; }
67
+ .ds-view .session-deck .ds-goal-card > .ds-goal-actions { grid-column:2; grid-row:1 / 3; align-self:center; margin:0; }
68
+ .ds-view .session-deck [data-deck-kind="todos"][data-deck-active]:not(:has(details[open])) { display:grid !important; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; }
69
+ .ds-view .session-deck [data-deck-kind="todos"] > .deck-context-head,.ds-view .session-deck [data-deck-kind="todos"] > .deck-summary-text { grid-column:1; }
70
+ .ds-view .session-deck [data-deck-kind="todos"] > .deck-more { grid-column:2; grid-row:1 / 3; align-self:center; }
71
+ }
72
+ .session-deck-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
73
+ @media(max-width:360px) { .session-deck-tab { padding:5px 7px; font-size:11px; } .session-deck-control { width:26px; } }
@@ -0,0 +1,180 @@
1
+ /* Conversation context cards. Original nodes and their action handlers stay in place. */
2
+ ;(function (root) {
3
+ 'use strict'
4
+ const priority = { approval: 0, question: 1, file: 2, queue: 3, goal: 4, todos: 5 }
5
+ function createSelection() {
6
+ let rows = [], selected = '', scope = '', scopeSet = false
7
+ const remembered = new Map()
8
+ return {
9
+ get rows() { return rows }, get index() { return rows.findIndex(row => row.key === selected) },
10
+ sync(next, nextScope) {
11
+ const previousIndex = this.index, previousKind = rows[previousIndex]?.kind, changed = !scopeSet || scope !== nextScope
12
+ if (changed) {
13
+ if (scopeSet && selected) remembered.set(scope, selected)
14
+ while (remembered.size > 12) remembered.delete(remembered.keys().next().value)
15
+ scope = nextScope; scopeSet = true; selected = remembered.get(scope) || ''
16
+ }
17
+ rows = next
18
+ if (!rows.some(row => row.key === selected)) {
19
+ const sameKind = !changed && rows.find(row => row.kind === previousKind)
20
+ const preferred = changed || previousIndex < 0 ? [...rows].sort((a, b) => priority[a.kind] - priority[b.kind])[0] : rows[Math.min(previousIndex, rows.length - 1)]
21
+ selected = (sameKind || preferred)?.key || ''
22
+ }
23
+ return this.index
24
+ },
25
+ select(index) { if (rows.length) selected = rows[Math.max(0, Math.min(index, rows.length - 1))].key; return this.index },
26
+ reset() { rows = []; selected = ''; scope = ''; scopeSet = false; remembered.clear() },
27
+ }
28
+ }
29
+ const text = (zh, en) => root.I18N?.lang === 'en' ? en : zh
30
+ const esc = value => String(value ?? '').replace(/[&<>"']/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]))
31
+ const goalState = phase => ({ active: text('进行中', 'In progress'), paused: text('已暂停', 'Paused'), blocked: text('等待处理', 'Blocked'), complete: text('已完成', 'Complete') })[phase] || String(phase || text('状态未知', 'Unknown state'))
32
+ function taskView(items) {
33
+ const done = items.filter(item => item.status === 'completed').length
34
+ return { done, total: items.length, current: items.find(item => item.status === 'in_progress') || items.find(item => item.status !== 'completed') }
35
+ }
36
+ function taskHtml(items) {
37
+ const view = taskView(items), status = value => ({ completed: text('已完成', 'Done'), in_progress: text('进行中', 'In progress'), pending: text('待开始', 'Pending') })[value] || value
38
+ return `<div class="deck-context-head"><strong>${view.done}/${view.total} ${text('已完成', 'done')}</strong></div><div class="deck-summary-text">${view.current ? esc((view.current.status === 'in_progress' ? text('正在:', 'Now: ') : text('下一步:', 'Next: ')) + (view.current.content || text('未命名任务', 'Untitled task'))) : text('全部任务已完成', 'All tasks completed')}</div><details class="deck-more" data-deck-details="tasks"><summary>${text('全部任务', 'All tasks')}</summary><div class="deck-full-content">${items.map(item => `<p><span class="deck-task-state">${esc(status(item.status))}</span>${esc(item.content || '')}</p>`).join('')}</div></details>`
39
+ }
40
+ function approvalHtml(item, fullDetail) {
41
+ const info = root.DshApprovalRecords?.summary(item) || { kind: 'request', text: item.reason || '' }
42
+ const reason = info.kind === 'auto' && root.I18N?.lang !== 'en' ? root.DshApprovalRecords?.chineseReference(info.text) || info.text : info.text
43
+ const permission = info.target ? ({ 'danger-full-access': text('完整访问', 'Full access'), 'workspace-write': text('工作区写入', 'Workspace write'), 'read-only': text('只读', 'Read only') })[info.target] || info.target : ''
44
+ const badge = info.kind === 'auto' ? text('审查未通过', 'Review denied') : info.kind === 'escalation' ? text('申请:', 'Request: ') + permission : ''
45
+ const args = item.arguments
46
+ let preview = ''
47
+ if (args && typeof args === 'object') {
48
+ for (const key of ['command', 'cmd', 'script', 'path', 'file_path', 'url']) if (typeof args[key] === 'string' && args[key]) { preview = (['command', 'cmd', 'script'].includes(key) ? text('命令', 'Command') : key === 'url' ? text('地址', 'URL') : text('路径', 'Path')) + ': ' + args[key]; break }
49
+ } else if (typeof args === 'string') preview = args
50
+ return `<div class="deck-review-head"><strong>${esc(item.toolName || text('工具调用', 'Tool call'))}</strong>${badge ? `<span class="deck-review-badge">${esc(badge)}</span>` : ''}</div><p class="deck-review-reason">${esc(reason || text('主机未提供申请原因', 'The host provided no reason'))}</p>${preview ? `<div class="deck-argument-preview" title="${esc(preview)}">${esc(preview)}</div>` : ''}<div class="deck-review-footer"><button type="button" class="deck-decision primary" data-session-approve="1">${text('允许一次', 'Allow once')}</button><button type="button" class="deck-decision" data-session-approve="0">${text('拒绝', 'Reject')}</button><details class="deck-more" data-deck-details="approval"><summary>${text('完整请求', 'Full request')}</summary><pre class="deck-full-content">${esc(text('工具:', 'Tool: ') + (item.toolName || '') + '\n' + fullDetail)}</pre></details></div>`
51
+ }
52
+ let instance
53
+ function mount(config) {
54
+ if (instance || !root.document) return instance
55
+ const doc = root.document, deck = doc.getElementById('session-deck')
56
+ if (!deck) return
57
+ const stage = deck.querySelector('.session-deck-stage'), sources = ['session-cards', 'queue-dock', 'session-pending', 'file-inbox-session'].map(id => doc.getElementById(id)).filter(Boolean)
58
+ const selection = createSelection(), labels = () => ({ goal: text('目标', 'Goal'), todos: text('任务', 'Tasks'), approval: text('审批', 'Approvals'), question: text('提问', 'Questions'), file: text('文件', 'Files'), queue: text('队列', 'Queue') })
59
+ const make = (tag, cls, value) => { const el = doc.createElement(tag); el.className = cls; if (value != null) el.textContent = value; return el }
60
+ const control = (name, value, fn) => { const el = make('button', 'session-deck-control', value); el.type = 'button'; el.setAttribute('aria-label', name); el.addEventListener('click', fn); return el }
61
+ const header = make('div', 'session-deck-head'), tabs = make('div', 'session-deck-tabs'), controls = make('div', 'session-deck-controls'), count = make('span', 'session-deck-position')
62
+ const notice = make('span', 'session-deck-sr'); notice.setAttribute('role', 'status'); notice.setAttribute('aria-live', 'polite')
63
+ tabs.setAttribute('role', 'group'); tabs.setAttribute('aria-label', text('会话卡片分类', 'Conversation card categories'))
64
+ const previous = control(text('上一张卡片', 'Previous card'), '‹', () => move(-1)), next = control(text('下一张卡片', 'Next card'), '›', () => move(1))
65
+ const fold = control(text('收起卡片', 'Collapse cards'), '⌃', () => { folded = !folded; paint() }); fold.setAttribute('aria-controls', 'session-deck-stage')
66
+ controls.append(previous, count, next, fold); header.append(tabs, controls); deck.prepend(header, notice)
67
+ deck.setAttribute('role', 'region'); deck.setAttribute('aria-label', text('会话卡片,可左右切换', 'Conversation cards, switch left or right')); stage.tabIndex = 0
68
+ let folded = false, lastScope = '', lastTabs = '', destroyed = false, queued = false, gesture = null, suppressClickUntil = 0
69
+ const disclosures = new Map()
70
+ const visibleSource = el => el && !el.hidden && !el.classList.contains('hidden')
71
+ function collect() {
72
+ const rows = []
73
+ const add = (el, kind, id) => rows.push({ el, kind, key: kind + ':' + id })
74
+ const cards = doc.getElementById('session-cards')
75
+ for (const el of cards?.children || []) add(el, el.dataset.deckKind || 'todos', el.dataset.deckKind || 'todos')
76
+ const pending = doc.getElementById('session-pending')
77
+ if (visibleSource(pending)) for (const el of pending.querySelectorAll('[data-session-approval],[data-session-question]')) {
78
+ const approval = el.dataset.sessionApproval
79
+ add(el, approval != null ? 'approval' : 'question', approval ?? el.dataset.sessionQuestion)
80
+ }
81
+ const files = doc.getElementById('file-inbox-session')
82
+ if (visibleSource(files)) for (const el of files.querySelectorAll('[data-transfer-id]')) add(el, 'file', el.dataset.transferId)
83
+ const queue = doc.getElementById('queue-dock')
84
+ if (visibleSource(queue) && queue.children.length) { add(queue, 'queue', 'queue'); rows[rows.length - 1].count = queue.querySelectorAll('[data-queue-steer]').length || 1 }
85
+ return rows
86
+ }
87
+ function refresh() {
88
+ if (destroyed) return
89
+ const context = config.context()
90
+ if (!context.inChat || !context.sessionId) { deck.hidden = true; return }
91
+ const changed = lastScope !== context.sessionId
92
+ if (changed) { folded = false; lastScope = context.sessionId; cancelGesture() }
93
+ const rows = collect(); selection.sync(rows, context.sessionId)
94
+ deck.hidden = !rows.length
95
+ if (rows.length) paint()
96
+ }
97
+ function paint() {
98
+ const rows = selection.rows, index = selection.index, names = labels(), counts = {}
99
+ for (const [i, row] of rows.entries()) {
100
+ row.el.dataset.deckCard = row.key
101
+ row.el.toggleAttribute('data-deck-active', i === index)
102
+ row.el.inert = i !== index || folded
103
+ row.el.setAttribute('aria-hidden', String(i !== index || folded))
104
+ for (const detail of row.el.querySelectorAll('details[data-deck-details]')) detail.open = disclosures.has(lastScope + ':' + row.key + ':' + detail.dataset.deckDetails)
105
+ counts[row.kind] = (counts[row.kind] || 0) + (row.count || 1)
106
+ }
107
+ deck.dataset.folded = String(folded); stage.hidden = folded; deck.dataset.multiple = String(rows.length > 1)
108
+ previous.disabled = index <= 0; next.disabled = index >= rows.length - 1
109
+ count.textContent = rows.length ? (index + 1) + '/' + rows.length : ''
110
+ fold.textContent = folded ? '⌄' : '⌃'; fold.setAttribute('aria-expanded', String(!folded)); fold.setAttribute('aria-label', folded ? text('展开卡片', 'Expand cards') : text('收起卡片', 'Collapse cards'))
111
+ const signature = JSON.stringify([counts, rows[index]?.kind, root.I18N?.lang])
112
+ if (signature !== lastTabs) {
113
+ const focused = tabs.contains(doc.activeElement) ? doc.activeElement?.dataset.deckTab : ''
114
+ tabs.replaceChildren()
115
+ for (const kind of ['approval', 'question', 'file', 'goal', 'todos', 'queue']) if (counts[kind]) {
116
+ const el = control(names[kind], '', () => { folded = false; select(selection.rows.findIndex(row => row.kind === kind)) })
117
+ el.className = 'session-deck-tab' + (priority[kind] < 3 ? ' needs-action' : ''); el.dataset.deckTab = kind
118
+ el.setAttribute('aria-pressed', String(rows[index]?.kind === kind)); el.append(make('span', '', names[kind]))
119
+ if (priority[kind] < 3 || kind === 'queue') el.append(make('small', '', String(counts[kind])))
120
+ tabs.append(el)
121
+ }
122
+ tabs.querySelectorAll('[data-deck-tab]').forEach(el => { if (el.dataset.deckTab === focused) el.focus({ preventScroll: true }) })
123
+ lastTabs = signature
124
+ }
125
+ notice.textContent = Object.entries(counts).filter(([kind]) => priority[kind] < 3).map(([kind, n]) => names[kind] + ' ' + n).join(',')
126
+ }
127
+ function select(index) { cancelGesture(); selection.select(index); paint() }
128
+ function move(delta) { folded = false; select(selection.index + delta) }
129
+ function cancelGesture() { gesture = null; stage.style.removeProperty('--deck-drag') }
130
+ function down(event) {
131
+ if (selection.rows.length < 2 || event.isPrimary === false || event.button > 0 || event.target.closest('input,textarea,select,a,[contenteditable="true"]')) return
132
+ gesture = { id: event.pointerId, x: event.clientX, y: event.clientY, dx: 0, claimed: false }
133
+ }
134
+ function drag(event) {
135
+ if (!gesture || event.pointerId !== gesture.id) return
136
+ const dx = event.clientX - gesture.x, dy = event.clientY - gesture.y
137
+ if (!gesture.claimed) {
138
+ if (Math.abs(dy) > 10 && Math.abs(dy) >= Math.abs(dx)) { cancelGesture(); return }
139
+ if (Math.abs(dx) < 10 || Math.abs(dx) < Math.abs(dy) * 1.2) return
140
+ gesture.claimed = true; stage.setPointerCapture?.(event.pointerId)
141
+ }
142
+ gesture.dx = dx
143
+ if (event.cancelable) event.preventDefault()
144
+ stage.style.setProperty('--deck-drag', Math.max(-72, Math.min(72, dx)) + 'px')
145
+ }
146
+ function up(event) {
147
+ if (!gesture || event.pointerId !== gesture.id) return
148
+ const { dx, claimed } = gesture
149
+ cancelGesture()
150
+ if (stage.hasPointerCapture?.(event.pointerId)) stage.releasePointerCapture(event.pointerId)
151
+ if (claimed) { suppressClickUntil = Date.now() + 400; if (Math.abs(dx) >= 42) move(dx < 0 ? 1 : -1) }
152
+ }
153
+ function click(event) { if (Date.now() < suppressClickUntil) { event.preventDefault(); event.stopPropagation() } }
154
+ function disclosure(event) {
155
+ const detail = event.target, card = detail.closest('[data-deck-card]')
156
+ if (!detail.dataset.deckDetails || !card) return
157
+ const key = lastScope + ':' + card.dataset.deckCard + ':' + detail.dataset.deckDetails
158
+ if (detail.open) disclosures.set(key, true); else disclosures.delete(key)
159
+ while (disclosures.size > 64) disclosures.delete(disclosures.keys().next().value)
160
+ }
161
+ function key(event) {
162
+ if (event.target !== stage && !tabs.contains(event.target)) return
163
+ const index = event.key === 'ArrowLeft' ? selection.index - 1 : event.key === 'ArrowRight' ? selection.index + 1 : event.key === 'Home' ? 0 : event.key === 'End' ? selection.rows.length - 1 : null
164
+ if (index != null) { event.preventDefault(); folded = false; select(index) }
165
+ }
166
+ const observer = new root.MutationObserver(() => { if (!queued) { queued = true; root.queueMicrotask(() => { queued = false; refresh() }) } })
167
+ for (const source of sources) observer.observe(source, { childList: true, subtree: true, attributes: true, attributeFilter: ['hidden', 'class'], characterData: true })
168
+ stage.addEventListener('pointerdown', down); stage.addEventListener('pointermove', drag); stage.addEventListener('pointerup', up); stage.addEventListener('pointercancel', cancelGesture); stage.addEventListener('click', click, true); stage.addEventListener('toggle', disclosure, true); deck.addEventListener('keydown', key)
169
+ deck.dataset.mounted = 'true'
170
+ instance = { refresh, reset() { selection.reset(); disclosures.clear(); lastScope = ''; lastTabs = ''; folded = false; cancelGesture(); deck.hidden = true }, destroy() {
171
+ destroyed = true; observer.disconnect(); cancelGesture(); header.remove(); notice.remove(); delete deck.dataset.mounted
172
+ for (const row of selection.rows) { delete row.el.dataset.deckCard; delete row.el.dataset.deckActive; row.el.inert = false; row.el.removeAttribute('aria-hidden') }
173
+ for (const [name, handler] of [['pointerdown', down], ['pointermove', drag], ['pointerup', up], ['pointercancel', cancelGesture]]) stage.removeEventListener(name, handler)
174
+ stage.removeEventListener('click', click, true); stage.removeEventListener('toggle', disclosure, true); deck.removeEventListener('keydown', key); stage.hidden = false; instance = null
175
+ } }
176
+ refresh(); return instance
177
+ }
178
+ root.DshSessionDeck = { createSelection, goalState, taskView, taskHtml, approvalHtml, mount, refresh: () => instance?.refresh(), reset: () => instance?.reset() }
179
+ if (typeof module !== 'undefined') module.exports = root.DshSessionDeck
180
+ })(typeof window !== 'undefined' ? window : globalThis)
package/public/styles.css CHANGED
@@ -74,7 +74,7 @@ button {
74
74
  }
75
75
  .icon-btn svg { width: 19px; height: 19px; display: block; }
76
76
  .icon-btn:active { background: var(--dsr-panel-2); }
77
- /* 顶栏按钮统一: 反馈/刷新/连接徽章同高同基线 */
77
+ /* 顶栏按钮统一: 反馈/插件/连接状态同高同基线;点击状态刷新。 */
78
78
  .topbar-btn {
79
79
  height: 44px; box-sizing: border-box;
80
80
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
@@ -83,7 +83,8 @@ button {
83
83
  .topbar-right .topbar-btn.icon-btn { width: 44px; padding: 0; font-size: 19px; border-radius: 12px; }
84
84
  .topbar-right #btn-donate { color: var(--dsr-accent-2); }
85
85
  .topbar-right #btn-feedback { color: var(--dsr-info); }
86
- .topbar-right #btn-refresh { color: var(--dsr-success); }
86
+ .topbar-right #btn-plugin-shortcuts { color: var(--dsr-accent-strong); }
87
+ .topbar-right .conn-badge:active { filter: brightness(.92); }
87
88
  .topbar-right .topbar-btn.conn-badge { padding: 0 14px; border-radius: 999px; font-size: 12.5px; }
88
89
 
89
90
  /* ---------- 顶栏组切换抽屉 ---------- */
@@ -646,6 +647,12 @@ body.composer-fullscreen { overflow: hidden; }
646
647
  .approval-record-badge.pending, .approval-event-badge.pending { color: var(--dsr-warning); border-color: var(--dsr-warning-line); border-style: dashed; }
647
648
  .approval-record-reason { display: flex; gap: 6px; font-size: 12px; line-height: 1.5; color: var(--dsr-text); }
648
649
  .approval-record-kind { flex: none; font-size: 10.5px; font-weight: 700; color: var(--dsr-muted); border: 1px solid var(--dsr-line); border-radius: 6px; padding: 0 5px; }
650
+ .approval-record-kind { align-self:flex-start; }
651
+ .approval-record-copy { min-width:0; flex:1; overflow-wrap:anywhere; }
652
+ .approval-original { margin-top:6px; color:var(--dsr-muted); font-size:11px; }
653
+ .approval-original summary { cursor:pointer; }
654
+ .approval-original div { margin-top:6px; white-space:pre-wrap; }
655
+ .approval-translation p { white-space:pre-wrap; overflow-wrap:anywhere; }
649
656
  .approval-record-why { font-size: 11.5px; line-height: 1.45; color: var(--dsr-muted); }
650
657
  .approval-record-meta { font-size: 10.5px; color: var(--dsr-muted); }
651
658
  .approval-event { font-size: 12.5px; color: var(--dsr-text); padding: 4px 0; }
@@ -1204,6 +1211,19 @@ button.overview-attention-item, button.overview-session-item { cursor:pointer; }
1204
1211
  .announcement-history-item summary small { flex: 0 0 auto; color: var(--dsr-muted); font-size: 11px; font-weight: 400; }
1205
1212
  .announcement-history-item .announcement-history-content { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--dsr-line); line-height: 1.65; overflow-wrap: anywhere; word-break: break-word; }
1206
1213
  .announcement-history-item .announcement-action { margin-top: 8px; }
1214
+ .announcement-sections { display:grid; gap:9px; margin-top:16px; }
1215
+ .announcement-section { min-width:0; border:1px solid var(--dsr-line); border-radius:12px; background:var(--dsr-panel); }
1216
+ .announcement-section > summary { display:flex; align-items:center; gap:9px; min-height:44px; padding:10px 12px; list-style:none; cursor:pointer; font-size:13px; line-height:1.55; font-weight:650; color:var(--dsr-text); overflow-wrap:anywhere; }
1217
+ .announcement-section > summary::-webkit-details-marker { display:none; }
1218
+ .announcement-section > summary::marker { content:''; }
1219
+ .announcement-section > summary::before { content:'›'; flex:0 0 auto; font-size:20px; line-height:1; color:var(--dsr-accent-strong); }
1220
+ .announcement-section[open] > summary::before { transform:rotate(90deg); }
1221
+ .announcement-section > summary:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; border-radius:10px; }
1222
+ .announcement-section-title { flex:1; min-width:0; }
1223
+ .announcement-section-expand, .announcement-section-collapse { flex:0 0 auto; color:var(--dsr-accent-strong); font-size:11px; font-weight:500; }
1224
+ .announcement-section-collapse, .announcement-section[open] > summary .announcement-section-expand { display:none; }
1225
+ .announcement-section[open] > summary .announcement-section-collapse { display:inline; }
1226
+ .announcement-section-body { padding:0 12px 12px; font-size:13px; line-height:1.75; overflow-wrap:anywhere; word-break:break-word; }
1207
1227
  .kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
1208
1228
  .kv .k { color: var(--dsr-muted); } .kv .v { word-break: break-all; text-align: right; }
1209
1229
 
@@ -1,10 +1,14 @@
1
1
  {
2
- "version": "0.8.0",
2
+ "version": "0.8.1",
3
3
  "apkUrl": "dsh-remote.apk",
4
- "sha256": "4848357a9447ade5a5f719d632091b95b11a050f4ce3ed76e6dd32d08ae9cbdd",
5
- "releasedAt": "2026-10-24T05:03:08.350Z",
6
- "notes": "0.8.0:整理手机与桌面操作入口,新增新手引导与插件排障知识库;优化智能体团队、任务看板及蓝色大肥鱼皮肤,改善窄屏排版;补充插件适配诊断、自定义渠道余额与额度、计划审查和交付阻断信息;实验性插件默认折叠并正确显示安装状态;增强发送回执、防重复发送、会话恢复与弱网历史加载;修复文件上传、续传、插件远程自更新及 macOS 网关启动问题;修复含 CRLF 文本的会话与缓存历史渲染卡死;完善权限与审批记录,Android 版本码改为独立递增计数。",
4
+ "sha256": "0019d620b16539caf4d2c68035b42e1567a74a2cbf100c78b467359759db4ebb",
5
+ "releasedAt": "2026-10-26T01:09:29.360Z",
6
+ "notes": "0.8.1:修复 Windows 常驻插件网关占用 DSH 安装目录导致 DSH 更新失败,完善解释器回退、真实路径检查与运行状态显示;修复网关输出流断开引发的重启;手机连接入口移至 DSH「更多」,增加首次使用提示;点击顶栏连接状态即可刷新,并可快捷打开已适配插件界面;会话目标、任务、审批、提问、文件和队列改为可切换卡片,精简摘要并保留完整详情,隐藏无内容消息气泡;自动审查反馈提供本地中文参考并保留原文;公告支持摘要及分段展开、收起;新增文件收件箱,DSH 可向指定设备投递单个文件,经用户确认后接收并查询结果,修复系统下载任务失踪后的重试和接收完成后的键盘焦点。",
7
7
  "history": [
8
+ {
9
+ "version": "0.8.1",
10
+ "notes": "0.8.1:修复 Windows 常驻插件网关占用 DSH 安装目录导致 DSH 更新失败,完善解释器回退、真实路径检查与运行状态显示;修复网关输出流断开引发的重启;手机连接入口移至 DSH「更多」,增加首次使用提示;点击顶栏连接状态即可刷新,并可快捷打开已适配插件界面;会话目标、任务、审批、提问、文件和队列改为可切换卡片,精简摘要并保留完整详情,隐藏无内容消息气泡;自动审查反馈提供本地中文参考并保留原文;公告支持摘要及分段展开、收起;新增文件收件箱,DSH 可向指定设备投递单个文件,经用户确认后接收并查询结果,修复系统下载任务失踪后的重试和接收完成后的键盘焦点。"
11
+ },
8
12
  {
9
13
  "version": "0.8.0",
10
14
  "notes": "0.8.0:整理手机与桌面操作入口,新增新手引导与插件排障知识库;优化智能体团队、任务看板及蓝色大肥鱼皮肤,改善窄屏排版;补充插件适配诊断、自定义渠道余额与额度、计划审查和交付阻断信息;实验性插件默认折叠并正确显示安装状态;增强发送回执、防重复发送、会话恢复与弱网历史加载;修复文件上传、续传、插件远程自更新及 macOS 网关启动问题;修复含 CRLF 文本的会话与缓存历史渲染卡死;完善权限与审批记录,Android 版本码改为独立递增计数。"
@@ -40,10 +44,6 @@
40
44
  {
41
45
  "version": "0.6.25",
42
46
  "notes": "0.6.25:适配 DSH 0.1.5 的实时思考、文件消息与 V3 会话统计;修复 Windows 跨盘文件访问和空会话持久归档;完善 APK 下载进度与校验;新增 dsh-ui 常用组件及柱状图、折线图、环形图只读预览,HTML 代码块支持隔离预览,未支持的高级组件保留原始规格。"
43
- },
44
- {
45
- "version": "0.6.24",
46
- "notes": "0.6.24:同步 App 与宽屏客户端的会话命名体验;未命名会话显示为“新会话”并保留短标识,创建会话时可选择指定工作区;补充空会话清理与相关回归验证。"
47
47
  }
48
48
  ]
49
49
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.8.0"
2
+ "version": "0.8.1"
3
3
  }
@@ -66,4 +66,25 @@
66
66
 
67
67
  **验收:** 对应主机/工作区/币种/时间和状态一致,切换工作区后不残留旧数据,刷新失败明确保留旧结果,返回插件列表能查看适配诊断。详细源码/模拟证据位于仓库 `docs/plugin-adaptation-2026-10-23.md`;这些功能尚未公开分发。
68
68
 
69
- 依据:仓库 `packages/plugin/plugin-center.mjs`、`plugin-transaction.mjs`、`task-board.mjs`、`insights.mjs`、`public/plugin-center.js`、`public/task-board.js`,以及 `docs/plugin-center.md`、`docs/plugin-update-transaction.md`。
69
+ ## KB-PLUGIN-06:Windows 上 DSH 更新失败 / 被插件网关占用
70
+
71
+ **先看:** 安装是否真的执行过(安装目录当天是否有写入)、`resources\app.asar` 与卸载登记项版本是否更新,以及安装目录内的 `DeepSeek Harness.exe` 是否仍被进程占用。更新前 DSH 会退出,但 Remote 插件的常驻网关按设计继续运行。本条目依据 2026-10-24 在 Windows 10 + DSH Desktop 0.2.1-rc.3 上的实际事件核对,插件为修复前版本。
72
+
73
+ | 证据 | 意味着什么 | 下一步 |
74
+ | --- | --- | --- |
75
+ | DSH 已退出时,对 `<DSH 安装目录>\DeepSeek Harness.exe` 做 `r+` 打开仍报 `EBUSY`/`EPERM` | 仍有进程以该 exe 运行,Windows 无法替换;旧插件网关常用 `process.execPath` 启动 | 查网关进程与解释器路径,核对归属后停止或由新插件接管 |
76
+ | 安装器或更新流程提示占用/失败,Restart Manager 点名同一 exe 或 `gateway.cjs` | 插件网关持有安装目录内 exe,NSIS 原地替换被阻塞 | 不要反复重试安装;先解除占用 |
77
+ | Prefetch 有安装器记录、`%TEMP%` 有 `nsr*.tmp`,但安装目录当天 0 个文件更新 | 安装器运行过但未写入,不能当作下载或校验失败 | 按占用处理,再重试更新 |
78
+ | 卸载登记项 `DisplayVersion` 与 `resources\app.asar` 修改时间仍是旧值 | 新版本没有落盘 | 解除占用并重试后,再核对这两项 |
79
+
80
+ **0.8.1 起的行为:** 插件按 `DSH_REMOTE_NODE` → PATH `node` → 内置运行时副本 → `process.execPath` 的顺序选择网关解释器;旧插件需升级后才能获得。所选来源与告警显示在插件面板版本号旁,跳过原因写入 `~/.dsh-remote/plugin-gateway.log`。
81
+
82
+ 外部解释器通过版本检测但启动失败时,仍会先尝试内置副本再回退宿主。路径按真实位置检查,目录联接不能把安装目录内的 exe 伪装成外部候选。面板只显示当前网关 PID 对应的实际解释器;旧网关无法报告时显示「网关解释器待确认」,停止再启动后确认。重启桌面插件后,可认证迁移同版本遗留网关;已尝试并回退的实例不会被反复重启。
83
+
84
+ **判断:** 反直觉的是,更新时 DSH 本体已经关闭,所以「DSH 还在运行」通常不是占用源;遗留的插件网关才是常见阻塞者。Windows 不允许覆盖正在运行的 exe,而 NSIS 更新器会替换整个安装目录;Linux/macOS 的运行中可执行文件可以替换,不受影响。
85
+
86
+ **下一步:** 升级到含网关解释器修复的插件版本;重启 DSH 或从插件面板停止/启动网关,让旧网关被认证关闭并拉起新网关;确认网关解释器不在安装目录内,再重试内置更新。旧版插件遗留的网关可在插件面板停止。进程核对命令与选择顺序见仓库 `docs/troubleshooting.md` 的「Windows:DSH 更新点了没反应 / 提示安装更新失败」;`DSH_REMOTE_NODE` 等配置见仓库 `docs/configuration.md` 的「网关解释器」。
87
+
88
+ **验收:** 卸载登记项版本与 `resources\app.asar` 已更新,安装目录有实际写入;网关继续运行且 `ExecutablePath` 为 PATH node 或 `~/.dsh-remote/runtime/node-<版本>.exe`,不在安装目录内;插件面板不再显示「网关解释器位于 DSH 安装目录内,DSH 更新可能失败」告警。仍显示告警说明当前回退到安装目录内 exe,需按配置参考改用合格 Node。
89
+
90
+ 依据:仓库 `packages/plugin/plugin-center.mjs`、`plugin-transaction.mjs`、`task-board.mjs`、`insights.mjs`、`index.mjs`、`public/plugin-center.js`、`public/task-board.js`,以及 `docs/plugin-center.md`、`docs/plugin-update-transaction.md`。