dsh-remote-plugin 0.8.6 → 0.8.8
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 +169 -63
- package/index.mjs +36 -1
- package/package.json +1 -1
- package/public/activity.js +144 -49
- package/public/admin.html +33 -32
- package/public/admin.js +25 -6
- package/public/app.js +199 -57
- package/public/build.json +2 -2
- package/public/desktop/desktop.html +85 -74
- package/public/desktop/desktop.js +52 -27
- package/public/diagnostics.js +30 -4
- package/public/doctor.css +1 -1
- package/public/e2ee-transport.js +189 -18
- package/public/history.js +15 -2
- package/public/index.html +97 -76
- package/public/operations.js +59 -14
- package/public/plugin.html +27 -26
- package/public/relay-autopair.js +60 -26
- package/public/relay-devices.js +11 -5
- package/public/relay-settings.css +9 -0
- package/public/relay-settings.js +67 -9
- package/public/skins/blue-fish/preview.html +3 -3
- package/public/skins/bocchi/preview.html +5 -5
- package/public/skins/kita/preview.html +6 -6
- package/public/skins/nijika/preview.html +6 -6
- package/public/skins/penguin/preview.html +3 -3
- package/public/skins/penguin-logistics/cargo.svg +4 -0
- package/public/skins/penguin-logistics/console.svg +4 -0
- package/public/skins/penguin-logistics/mark.svg +4 -0
- package/public/skins/penguin-logistics/radio.svg +4 -0
- package/public/skins/penguin-logistics/skin.css +292 -0
- package/public/skins/penguin-logistics/standing.png +0 -0
- package/public/skins/ryo/preview.html +6 -6
- package/public/slash-suggestions.css +43 -0
- package/public/slash-suggestions.js +184 -0
- package/public/subagents.css +2 -0
- package/public/subagents.js +31 -10
- package/public/theme-vars.css +37 -2
- package/public/theme.js +4 -2
- package/public/update.json +12 -12
- package/public/version.json +1 -1
- package/public/workflow.css +19 -11
- package/public/workflow.js +25 -14
- package/skills/dsh-remote-doctor/references/wiki/connection.md +2 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
;(function (root) {
|
|
2
|
+
'use strict'
|
|
3
|
+
|
|
4
|
+
let closeMenu
|
|
5
|
+
let openPanel
|
|
6
|
+
|
|
7
|
+
function mount({ input, context, readSkills, t, panel, chipClass, chipAttribute }) {
|
|
8
|
+
const menu = document.createElement('div')
|
|
9
|
+
menu.id = input.id + '-suggestions'
|
|
10
|
+
menu.className = 'slash-suggestions'
|
|
11
|
+
menu.hidden = true
|
|
12
|
+
menu.setAttribute('role', 'listbox')
|
|
13
|
+
input.setAttribute('aria-autocomplete', 'list')
|
|
14
|
+
input.setAttribute('aria-controls', menu.id)
|
|
15
|
+
input.parentElement.prepend(menu)
|
|
16
|
+
|
|
17
|
+
let catalog = null, matches = [], selected = null
|
|
18
|
+
const query = () => /^[ \t]*\/([a-z0-9_-]*)$/i.exec(input.value)?.[1]?.toLowerCase()
|
|
19
|
+
|
|
20
|
+
function readCommands(scope) {
|
|
21
|
+
const path = '/remote/api/command?sessionId=' + encodeURIComponent(scope.sessionId)
|
|
22
|
+
return fetch(scope.url(path), { headers: scope.headers, signal: AbortSignal.timeout(5000) })
|
|
23
|
+
.then(response => response.ok ? response.json() : null)
|
|
24
|
+
.then(result => Array.isArray(result?.commands) ? result.commands : null)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const named = item => typeof item?.name === 'string' && /^[a-z0-9][a-z0-9_-]{0,199}$/.test(item.name)
|
|
28
|
+
let panelRequest = 0
|
|
29
|
+
const shortcuts = panel ? [...panel.querySelectorAll(`[${chipAttribute}]`)] : []
|
|
30
|
+
openPanel = async () => {
|
|
31
|
+
if (!panel) return
|
|
32
|
+
const request = ++panelRequest
|
|
33
|
+
const scope = context()
|
|
34
|
+
panel.replaceChildren(...shortcuts)
|
|
35
|
+
if (!scope) return
|
|
36
|
+
try {
|
|
37
|
+
const commands = await readCommands(scope)
|
|
38
|
+
if (request !== panelRequest || !scope.valid() || !commands) return
|
|
39
|
+
const entries = new Map(shortcuts.map(chip => [chip.getAttribute(chipAttribute).slice(1), chip]))
|
|
40
|
+
const names = new Set()
|
|
41
|
+
const chips = []
|
|
42
|
+
for (const item of commands) {
|
|
43
|
+
if (!named(item) || item.name === 'permission' || names.has(item.name)) continue
|
|
44
|
+
names.add(item.name)
|
|
45
|
+
const chip = entries.get(item.name) || document.createElement('button')
|
|
46
|
+
if (!entries.has(item.name)) {
|
|
47
|
+
chip.type = 'button'
|
|
48
|
+
chip.className = chipClass
|
|
49
|
+
chip.setAttribute(chipAttribute, '/' + item.name)
|
|
50
|
+
chip.textContent = '/' + item.name + (item.description ? ' ' + item.description : '')
|
|
51
|
+
}
|
|
52
|
+
chips.push(chip)
|
|
53
|
+
}
|
|
54
|
+
panel.replaceChildren(...chips)
|
|
55
|
+
} catch { /* Keep shortcuts available on gateways without a command directory. */ }
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function close() {
|
|
59
|
+
const visible = !menu.hidden
|
|
60
|
+
catalog = null
|
|
61
|
+
matches = []
|
|
62
|
+
selected = null
|
|
63
|
+
menu.hidden = true
|
|
64
|
+
menu.replaceChildren()
|
|
65
|
+
input.removeAttribute('aria-activedescendant')
|
|
66
|
+
return visible
|
|
67
|
+
}
|
|
68
|
+
closeMenu = close
|
|
69
|
+
|
|
70
|
+
function highlight() {
|
|
71
|
+
const index = matches.findIndex(item => item.name === selected)
|
|
72
|
+
for (const [i, option] of [...menu.children].entries()) {
|
|
73
|
+
option.setAttribute('aria-selected', String(index === i))
|
|
74
|
+
}
|
|
75
|
+
const option = menu.children[index]
|
|
76
|
+
if (option) {
|
|
77
|
+
input.setAttribute('aria-activedescendant', option.id)
|
|
78
|
+
option.scrollIntoView({ block: 'nearest' })
|
|
79
|
+
} else input.removeAttribute('aria-activedescendant')
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function render() {
|
|
83
|
+
const prefix = query()
|
|
84
|
+
if (prefix === undefined || !catalog?.valid() || document.activeElement !== input) {
|
|
85
|
+
close()
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
const names = new Map()
|
|
89
|
+
for (const item of [...catalog.commands, ...catalog.skills]) {
|
|
90
|
+
if (!named(item)) continue
|
|
91
|
+
if (!names.has(item.name) && item.name.startsWith(prefix)) names.set(item.name, item)
|
|
92
|
+
}
|
|
93
|
+
matches = [...names.values()]
|
|
94
|
+
menu.setAttribute('aria-label', t('slash.suggestions'))
|
|
95
|
+
menu.replaceChildren(...matches.map((item, index) => {
|
|
96
|
+
const option = document.createElement('button')
|
|
97
|
+
option.type = 'button'
|
|
98
|
+
option.tabIndex = -1
|
|
99
|
+
option.id = menu.id + '-' + index
|
|
100
|
+
option.dataset.index = index
|
|
101
|
+
option.setAttribute('role', 'option')
|
|
102
|
+
const title = document.createElement('span')
|
|
103
|
+
title.className = 'slash-suggestion-title'
|
|
104
|
+
title.textContent = '/' + item.name + (item.hint ? ' ' + item.hint : '')
|
|
105
|
+
const kind = document.createElement('span')
|
|
106
|
+
kind.className = 'slash-suggestion-kind'
|
|
107
|
+
kind.textContent = t(item.kind === 'skill' ? 'slash.skill' : 'slash.command')
|
|
108
|
+
option.append(title, kind)
|
|
109
|
+
if (item.description) {
|
|
110
|
+
const description = document.createElement('span')
|
|
111
|
+
description.className = 'slash-suggestion-description'
|
|
112
|
+
description.textContent = item.description
|
|
113
|
+
option.append(description)
|
|
114
|
+
}
|
|
115
|
+
return option
|
|
116
|
+
}))
|
|
117
|
+
menu.hidden = !matches.length
|
|
118
|
+
highlight()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function refresh(event) {
|
|
122
|
+
if (event.isComposing) return close()
|
|
123
|
+
if (query() === undefined) return close()
|
|
124
|
+
if (!catalog?.valid()) {
|
|
125
|
+
const scope = context()
|
|
126
|
+
if (!scope) return close()
|
|
127
|
+
const pending = { ...scope, commands: [], skills: [] }
|
|
128
|
+
catalog = pending
|
|
129
|
+
function receive(kind, rows) {
|
|
130
|
+
if (catalog !== pending) return
|
|
131
|
+
pending[kind] = Array.isArray(rows) ? rows.map(item => ({
|
|
132
|
+
...item, kind: kind === 'skills' ? 'skill' : 'command',
|
|
133
|
+
})) : []
|
|
134
|
+
render()
|
|
135
|
+
}
|
|
136
|
+
void readCommands(scope).then(rows => receive('commands', rows)).catch(() => {})
|
|
137
|
+
void readSkills(scope.sessionId).then(result => receive('skills', result?.skills)).catch(() => {})
|
|
138
|
+
}
|
|
139
|
+
selected = null
|
|
140
|
+
render()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function choose(item) {
|
|
144
|
+
if (!item || !catalog?.valid() || query() === undefined) return close()
|
|
145
|
+
close()
|
|
146
|
+
input.value = '/' + item.name + ' '
|
|
147
|
+
input.focus()
|
|
148
|
+
input.setSelectionRange(input.value.length, input.value.length)
|
|
149
|
+
input.dispatchEvent(new Event('input', { bubbles: true }))
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
input.addEventListener('input', refresh)
|
|
153
|
+
input.addEventListener('compositionend', refresh)
|
|
154
|
+
input.addEventListener('focus', refresh)
|
|
155
|
+
input.addEventListener('blur', close)
|
|
156
|
+
menu.addEventListener('mousedown', event => event.preventDefault())
|
|
157
|
+
menu.addEventListener('click', event => {
|
|
158
|
+
const option = event.target.closest('[data-index]')
|
|
159
|
+
if (option) choose(matches[Number(option.dataset.index)])
|
|
160
|
+
})
|
|
161
|
+
input.addEventListener('keydown', event => {
|
|
162
|
+
if (event.isComposing || event.defaultPrevented || !catalog) return
|
|
163
|
+
if (event.key === 'Escape') {
|
|
164
|
+
event.preventDefault()
|
|
165
|
+
event.stopPropagation()
|
|
166
|
+
close()
|
|
167
|
+
return
|
|
168
|
+
}
|
|
169
|
+
if (menu.hidden || !catalog.valid() || query() === undefined || event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) return
|
|
170
|
+
const index = matches.findIndex(item => item.name === selected)
|
|
171
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
172
|
+
event.preventDefault()
|
|
173
|
+
const next = event.key === 'ArrowDown' ? index + 1 : index < 0 ? matches.length - 1 : index - 1
|
|
174
|
+
selected = matches[(next + matches.length) % matches.length].name
|
|
175
|
+
highlight()
|
|
176
|
+
} else if (event.key === 'Tab' || (event.key === 'Enter' && index >= 0)) {
|
|
177
|
+
event.preventDefault()
|
|
178
|
+
choose(matches[Math.max(0, index)])
|
|
179
|
+
}
|
|
180
|
+
})
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
root.DshSlashSuggestions = { mount, close: () => closeMenu?.(), openPanel: () => openPanel?.() }
|
|
184
|
+
})(window)
|
package/public/subagents.css
CHANGED
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
.subtree-detail{position:sticky;top:0;min-width:0;padding:21px;border:1px solid var(--dsr-line);border-radius:16px;background:var(--dsr-panel)}
|
|
37
37
|
.subtree-eyebrow{font-size:11px;color:var(--dsr-muted);letter-spacing:.06em}.subtree-detail h3{font-size:18px;line-height:1.4;margin:9px 0 12px;overflow-wrap:anywhere}
|
|
38
38
|
.subtree-detail-badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:20px}.subtree-kind{font-size:11px;color:var(--dsr-muted)}
|
|
39
|
+
.subtree-agent-name{font-size:11px;color:var(--dsr-muted);overflow-wrap:anywhere}
|
|
40
|
+
.subtree-badge[data-activity="completed"]{color:var(--dsr-success)}
|
|
39
41
|
.subtree-field-label{margin-top:16px;font-size:11px;color:var(--dsr-muted)}.subtree-path{font-size:12px;line-height:1.7;margin:5px 0 0;overflow-wrap:anywhere}
|
|
40
42
|
.subtree-id{display:block;font-size:11px;line-height:1.6;margin-top:6px;padding:8px;border-radius:7px;background:var(--dsr-code-bg);overflow-wrap:anywhere;user-select:text}
|
|
41
43
|
.subtree-parent{max-width:100%;min-width:44px;min-height:44px;text-align:start;overflow-wrap:anywhere;padding:4px 0;border:0;background:transparent;color:var(--dsr-accent-strong)!important;font-size:12px!important}
|
package/public/subagents.js
CHANGED
|
@@ -26,32 +26,35 @@
|
|
|
26
26
|
return ({ unsupported: text('当前版本无法识别此任务类型', 'This task type is not supported by the current version'), unavailable: text('记录暂时无法读取,可刷新重试', 'Record unavailable. Refresh to try again'), corrupt: text('任务信息不一致,暂不能打开', 'Task information is inconsistent. This record cannot be opened'), cycle: text('目录关系重复或形成循环', 'The catalog contains a repeated or circular relationship') })[reason] || text('此目录项暂时不可用', 'This catalog entry is unavailable')
|
|
27
27
|
}
|
|
28
28
|
function status(entry, diagnostic) {
|
|
29
|
-
const value = diagnostic ? 'diagnostic' : ['running', 'waiting', 'inactive'].includes(entry.activity) ? entry.activity : 'unknown'
|
|
30
|
-
const el = node('span', diagnostic ? text('目录异常', 'Catalog issue') : activityLabel(value), 'subtree-badge')
|
|
29
|
+
const value = diagnostic ? 'diagnostic' : entry.activity === 'inactive' && entry.completed === true ? 'completed' : ['running', 'waiting', 'inactive'].includes(entry.activity) ? entry.activity : 'unknown'
|
|
30
|
+
const el = node('span', diagnostic ? text('目录异常', 'Catalog issue') : value === 'completed' ? text('已完成', 'Completed') : activityLabel(value), 'subtree-badge')
|
|
31
31
|
el.dataset.activity = value
|
|
32
32
|
return el
|
|
33
33
|
}
|
|
34
34
|
function model(v) {
|
|
35
35
|
const rootItem = { key: 'root', id: v.id, label: v.options.title || v.id, parent: null, depth: 0, entry: { activity: v.options.activity }, children: [] }
|
|
36
36
|
const byKey = new Map([['root', rootItem]])
|
|
37
|
-
let count = 0, running = 0, issues = 0, limited = false
|
|
37
|
+
let count = 0, running = 0, completed = 0, issues = 0, limited = false
|
|
38
38
|
function visit(parent, ancestors) {
|
|
39
39
|
const cached = v.cache.get(parent.id)
|
|
40
40
|
for (const entry of cached?.value?.entries || []) {
|
|
41
41
|
if (byKey.size > 300) { limited = true; break }
|
|
42
|
-
const
|
|
43
|
-
const
|
|
42
|
+
const duplicate = !!entry.id && parent.children.some(item => item.id === entry.id)
|
|
43
|
+
const diagnostic = entry.kind === 'diagnostic' || !entry.id || ancestors.has(entry.id) || duplicate
|
|
44
|
+
const segment = entry.id && !duplicate ? encodeURIComponent(entry.id) : 'issue:' + parent.children.length
|
|
45
|
+
const item = { key: parent.key + '/' + segment, id: entry.id || '', label: entry.label || entry.name || entry.id?.slice(0, 12) || text('异常条目', 'Catalog issue'), entry, parent, depth: parent.depth + 1, diagnostic, reason: duplicate || ancestors.has(entry.id) ? 'cycle' : entry.reason, children: [] }
|
|
44
46
|
byKey.set(item.key, item); parent.children.push(item)
|
|
45
47
|
if (diagnostic) issues++
|
|
46
48
|
else {
|
|
47
49
|
count++; if (entry.activity === 'running') running++
|
|
50
|
+
if (entry.activity === 'inactive' && entry.completed === true) completed++
|
|
48
51
|
if (item.depth < 16) visit(item, new Set([...ancestors, item.id]))
|
|
49
52
|
else if (entry.hasChildren !== false) limited = true
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
visit(rootItem, new Set([v.id]))
|
|
54
|
-
return { rootItem, byKey, count, running, issues, limited }
|
|
57
|
+
return { rootItem, byKey, count, running, completed, issues, limited }
|
|
55
58
|
}
|
|
56
59
|
async function read(v, id, force = false) {
|
|
57
60
|
if (!valid(v)) return
|
|
@@ -126,11 +129,17 @@
|
|
|
126
129
|
}, 'subtree-parent subtree-back-to-tree', 'back-to-tree'))
|
|
127
130
|
box.append(node('div', text('节点详情', 'Node details'), 'subtree-eyebrow'))
|
|
128
131
|
const title = v.detailTitle = node('h3', item.label); title.tabIndex = -1; box.append(title)
|
|
132
|
+
if (item.entry.name && item.entry.name !== item.label) box.append(node('code', item.entry.name, 'subtree-agent-name'))
|
|
129
133
|
if (outsideFilter) box.append(node('p', text('此选中节点不在当前筛选结果中。', 'This selected node is outside the current filter.'), 'subtree-note'))
|
|
130
134
|
const badges = node('div', undefined, 'subtree-detail-badges')
|
|
131
135
|
if (item.key === 'root') badges.append(node('span', text('当前会话', 'Current session'), 'subtree-kind'))
|
|
132
136
|
else badges.append(node('span', item.diagnostic ? text('不可打开', 'Unavailable') : modeLabel(item.entry.mode), 'subtree-kind'))
|
|
133
137
|
badges.append(status(item.entry, item.diagnostic)); box.append(badges)
|
|
138
|
+
if (Number.isFinite(item.entry.durationMs) && item.entry.durationMs >= 0) {
|
|
139
|
+
const seconds = Math.floor(item.entry.durationMs / 1000)
|
|
140
|
+
const duration = seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m ${seconds % 60}s`
|
|
141
|
+
box.append(node('p', text('运行时长 ', 'Run time ') + duration, 'subtree-note'))
|
|
142
|
+
}
|
|
134
143
|
const path = []; for (let p = item; p; p = p.parent) path.unshift(p.label)
|
|
135
144
|
box.append(node('div', text('所在分支', 'Branch'), 'subtree-field-label'), node('p', path.join(' › '), 'subtree-path'))
|
|
136
145
|
if (item.parent) {
|
|
@@ -153,7 +162,15 @@
|
|
|
153
162
|
}, 'subtree-action subtree-primary', 'open:' + item.key))
|
|
154
163
|
const parentCatalog = item.parent && v.cache.get(item.parent.id)?.value
|
|
155
164
|
if (item.entry.mode === 'continuable' && item.entry.activity === 'running' && parentCatalog?.parentAvailable !== false) {
|
|
156
|
-
|
|
165
|
+
const interrupt = button(text('中断任务', 'Interrupt task'), async () => {
|
|
166
|
+
if (!valid(v) || v.stopping.has(item.id)) return
|
|
167
|
+
v.stopping.add(item.id); paint(v)
|
|
168
|
+
try {
|
|
169
|
+
if (await v.options.interrupt(item.id, item.parent.id)) await read(v, item.parent.id, true)
|
|
170
|
+
} finally { v.stopping.delete(item.id); if (valid(v)) paint(v) }
|
|
171
|
+
}, 'subtree-action subtree-danger', 'interrupt:' + item.key)
|
|
172
|
+
interrupt.disabled = v.stopping.has(item.id)
|
|
173
|
+
actions.append(interrupt)
|
|
157
174
|
}
|
|
158
175
|
box.append(actions, node('p', item.parent ? text('打开记录后,返回会进入它的直接父会话。', 'From a record, Back opens its direct parent session.') : text('选择树中的子代理,查看任务详情。', 'Select a subagent in the tree to inspect its details.'), 'subtree-note'))
|
|
159
176
|
}
|
|
@@ -163,7 +180,7 @@
|
|
|
163
180
|
const m = model(v), query = v.query.trim().toLocaleLowerCase(), filtering = !!query || v.filter !== 'all'
|
|
164
181
|
const matches = new Set()
|
|
165
182
|
function match(item) {
|
|
166
|
-
const own = (!query || `${item.label} ${item.id}`.toLocaleLowerCase().includes(query)) && (v.filter === 'all' || (v.filter === 'diagnostic' ? item.diagnostic : !item.diagnostic && item.entry.activity === 'running'))
|
|
183
|
+
const own = (!query || `${item.label} ${item.entry.name || ''} ${item.id}`.toLocaleLowerCase().includes(query)) && (v.filter === 'all' || (v.filter === 'diagnostic' ? item.diagnostic : !item.diagnostic && item.entry.activity === 'running'))
|
|
167
184
|
const descendant = item.children.map(match).some(Boolean)
|
|
168
185
|
if (own || descendant) matches.add(item.key)
|
|
169
186
|
return own || descendant
|
|
@@ -173,7 +190,10 @@
|
|
|
173
190
|
v.collapseButton.disabled = filtering
|
|
174
191
|
v.collapseButton.title = filtering ? text('清除筛选后可收起分支', 'Clear filters to collapse branches') : ''
|
|
175
192
|
for (const [key, b] of v.filters) b.setAttribute('aria-pressed', String(key === v.filter))
|
|
176
|
-
const labels = [text(`已读取 ${m.count} 个子代理`, `${m.count} subagents loaded`)
|
|
193
|
+
const labels = [text(`已读取 ${m.count} 个子代理`, `${m.count} subagents loaded`)]
|
|
194
|
+
if (m.running) labels.push(text(`${m.running} 个运行中`, `${m.running} running`))
|
|
195
|
+
if (m.completed) labels.push(text(`${m.completed} 个已完成`, `${m.completed} completed`))
|
|
196
|
+
if (m.issues) labels.push(text(`${m.issues} 个目录异常`, `${m.issues} catalog issues`))
|
|
177
197
|
if (v.summarySignature !== labels.join('|')) {
|
|
178
198
|
v.summarySignature = labels.join('|'); v.summary.replaceChildren()
|
|
179
199
|
for (const label of labels) v.summary.append(node('span', label))
|
|
@@ -210,6 +230,7 @@
|
|
|
210
230
|
card.setAttribute('aria-pressed', String(item.key === v.selected)); card.title = item.id
|
|
211
231
|
const head = node('span', undefined, 'subtree-node-head'); head.append(node('strong', item.label), status(item.entry, item.diagnostic))
|
|
212
232
|
const meta = node('span', undefined, 'subtree-node-meta')
|
|
233
|
+
if (item.entry.name && item.entry.name !== item.label) meta.append(node('code', item.entry.name, 'subtree-agent-name'))
|
|
213
234
|
meta.append(node('span', item.key === 'root' ? text('当前会话 · 树的起点', 'Current session · Tree root') : item.diagnostic ? reasonLabel(item.reason) : modeLabel(item.entry.mode)))
|
|
214
235
|
if (item.depth >= 4) meta.append(node('span', text(`第 ${item.depth} 层`, `Level ${item.depth}`), 'subtree-depth'))
|
|
215
236
|
if (!item.diagnostic && cached?.value && item.children.length) meta.append(node('span', text(`${item.children.length} 个下级条目`, `${item.children.length} child entries`)))
|
|
@@ -263,7 +284,7 @@
|
|
|
263
284
|
if (!view || view.id !== options.sessionId || !view.options.valid()) {
|
|
264
285
|
if (view) memories.set(view.id, view.expanded)
|
|
265
286
|
if (memories.size > 20) memories.delete(memories.keys().next().value)
|
|
266
|
-
view = { id: options.sessionId, options, expanded: memories.get(options.sessionId) || new Set([options.sessionId]), cache: new Map(), paused: false, query: '', filter: 'all', selected: 'root' }; shell(view)
|
|
287
|
+
view = { id: options.sessionId, options, expanded: memories.get(options.sessionId) || new Set([options.sessionId]), cache: new Map(), stopping: new Set(), paused: false, query: '', filter: 'all', selected: 'root' }; shell(view)
|
|
267
288
|
}
|
|
268
289
|
view.options = options; view.paused = false; target.append(view.el); paint(view)
|
|
269
290
|
const cached = view.cache.get(view.id)
|
package/public/theme-vars.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* DSH Remote · 移动优先
|
|
2
|
-
* 统一 --dsr-*
|
|
1
|
+
/* DSH Remote · 移动优先
|
|
2
|
+
* 统一 --dsr-* 变量。主题由 html[data-theme] 驱动,theme.js 持久化。
|
|
3
3
|
* 红绿色弱友好原则: 状态语义色之外, 品牌色使用蓝/青 + 橙/紫系, 避免红绿配对。
|
|
4
4
|
* 角色皮肤(蓝色大肥鱼/企鹅女管)另有独立皮肤包 public/skins/<name>/skin.css, 只含配色与装饰, 不改布局。 */
|
|
5
5
|
|
|
@@ -812,6 +812,41 @@ html[data-theme="bocchi"] {
|
|
|
812
812
|
color-scheme: light;
|
|
813
813
|
}
|
|
814
814
|
|
|
815
|
+
/* 企鹅物流:夜蓝货站与琥珀信号灯。 */
|
|
816
|
+
html[data-theme="penguin-logistics"] {
|
|
817
|
+
color-scheme: dark;
|
|
818
|
+
--dsr-bg: #12161B;
|
|
819
|
+
--dsr-bg-2: #161D24;
|
|
820
|
+
--dsr-panel: #1D252E;
|
|
821
|
+
--dsr-panel-2: #28343F;
|
|
822
|
+
--dsr-line: #3C4B59;
|
|
823
|
+
--dsr-divider: #A0B9CB30;
|
|
824
|
+
--dsr-text: #F5F1EB;
|
|
825
|
+
--dsr-muted: #B6C3D5;
|
|
826
|
+
--dsr-text-disabled: #8190A5;
|
|
827
|
+
--dsr-accent: #E9B66F;
|
|
828
|
+
--dsr-on-accent: #1C130A;
|
|
829
|
+
--dsr-accent-strong: #F5C78B;
|
|
830
|
+
--dsr-accent-soft: #E9B66F22;
|
|
831
|
+
--dsr-accent-line: #E9B66F70;
|
|
832
|
+
--dsr-accent-2: #8BC0D0;
|
|
833
|
+
--dsr-accent-2-strong: #BDE3EC;
|
|
834
|
+
--dsr-accent-2-soft: #8BC0D020;
|
|
835
|
+
--dsr-accent-2-line: #8BC0D070;
|
|
836
|
+
--dsr-brand-a: #E9B66F;
|
|
837
|
+
--dsr-brand-b: #8BC0D0;
|
|
838
|
+
--dsr-head-bg: #161D24;
|
|
839
|
+
--dsr-nav-bg: #1D252E;
|
|
840
|
+
--dsr-nav-muted: #B6C3D5;
|
|
841
|
+
--dsr-nav-active: #F5C78B;
|
|
842
|
+
--dsr-composer-bg: #1D252E;
|
|
843
|
+
--dsr-head-running-bg: linear-gradient(90deg, #161D24, #263C47, #315463, #263C47, #161D24);
|
|
844
|
+
--dsr-head-running-line: #8BC0D070;
|
|
845
|
+
--dsr-head-interrupted-bg: linear-gradient(90deg, #161D24, #3D2529, #682F32, #3D2529, #161D24);
|
|
846
|
+
--dsr-head-interrupted-line: #FF8F6B85;
|
|
847
|
+
--dsr-glow: #E9B66F50;
|
|
848
|
+
}
|
|
849
|
+
|
|
815
850
|
/* 结束乐队 · 伊地知虹夏:暖金鼓点,独立亮色主题。 */
|
|
816
851
|
html[data-theme="nijika"] {
|
|
817
852
|
--dsr-neutral-0: #FFFFFF;
|
package/public/theme.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* DSH Remote 皮肤系统 · 零依赖
|
|
2
|
-
*
|
|
2
|
+
* 皮肤通过 html[data-theme] 应用。
|
|
3
3
|
* 优先级: localStorage dshTheme > 蓝色大肥鱼(默认)
|
|
4
4
|
* set() 写入用户显式选择; applyCurrent() 只应用,不覆盖已有选择。 */
|
|
5
5
|
'use strict'
|
|
6
6
|
;(function () {
|
|
7
7
|
const KEY = 'dshTheme'
|
|
8
8
|
const DEFAULT = 'fish'
|
|
9
|
-
const VALID = ['default', 'dark', 'light', 'neutral', 'mono', 'fish', 'penguin', 'penguin-night', 'bocchi', 'nijika', 'ryo', 'kita']
|
|
9
|
+
const VALID = ['default', 'dark', 'light', 'neutral', 'mono', 'fish', 'penguin', 'penguin-night', 'bocchi', 'nijika', 'ryo', 'kita', 'penguin-logistics']
|
|
10
10
|
const mq = window.matchMedia('(prefers-color-scheme: light)')
|
|
11
11
|
const store = {
|
|
12
12
|
get(k) { try { return localStorage.getItem(k) } catch { return null } },
|
|
@@ -59,10 +59,12 @@
|
|
|
59
59
|
const GROUPS = [
|
|
60
60
|
{ id: 'basic', zh: '基础配色', en: 'Essentials', themes: ['default', 'dark', 'light', 'neutral', 'mono'] },
|
|
61
61
|
{ id: 'fish', zh: '蓝色大肥鱼', en: 'Blue Fat Fish', themes: ['fish'] },
|
|
62
|
+
{ id: 'arknights', zh: '明日方舟', en: 'Arknights', themes: ['penguin-logistics'] },
|
|
62
63
|
{ id: 'endfield', zh: '明日方舟:终末地', en: 'Arknights: Endfield', themes: ['penguin', 'penguin-night'] },
|
|
63
64
|
{ id: 'bocchi', zh: '孤独摇滚!', en: 'BOCCHI THE ROCK!', themes: ['bocchi', 'nijika', 'ryo', 'kita'] }
|
|
64
65
|
]
|
|
65
66
|
const ART = {
|
|
67
|
+
'penguin-logistics': 'penguin-logistics/standing.png',
|
|
66
68
|
fish: 'blue-fish/mascot.png', penguin: 'penguin/mascot.png', 'penguin-night': 'penguin/mascot.png',
|
|
67
69
|
bocchi: 'bocchi/stand.png', nijika: 'nijika/stand.png', ryo: 'ryo/stand.png', kita: 'kita/stand.png'
|
|
68
70
|
}
|
package/public/update.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.8.
|
|
2
|
+
"version": "0.8.8",
|
|
3
3
|
"apkUrl": "dsh-remote.apk",
|
|
4
|
-
"sha256": "
|
|
5
|
-
"releasedAt": "2026-11-
|
|
6
|
-
"notes": "
|
|
4
|
+
"sha256": "7e95c10ec00567e539f2d89e4f56595f94a9024eabd18192edea0f9aacddf485",
|
|
5
|
+
"releasedAt": "2026-11-14T15:12:16.035Z",
|
|
6
|
+
"notes": "新增《明日方舟》企鹅物流皮肤,支持背景立绘、半透明会话卡与货运纹理。手机和桌面输入框支持斜杠指令与技能补全,改进工具活动、子代理与用时展示。修复 Android 公网加密中转下的发送、回执、历史与客户端更新,并增强 DSH 点号及斜杠 RPC 兼容性和大响应传输完整性。",
|
|
7
7
|
"history": [
|
|
8
|
+
{
|
|
9
|
+
"version": "0.8.8",
|
|
10
|
+
"notes": "新增《明日方舟》企鹅物流皮肤,支持背景立绘、半透明会话卡与货运纹理。手机和桌面输入框支持斜杠指令与技能补全,改进工具活动、子代理与用时展示。修复 Android 公网加密中转下的发送、回执、历史与客户端更新,并增强 DSH 点号及斜杠 RPC 兼容性和大响应传输完整性。"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"version": "0.8.7",
|
|
14
|
+
"notes": "新增主机与手机的公网中转配对引导;修复部分移动网络下实时连接和轮询失败;改进连接切换时的发送状态提示、Android 图片保存及全屏界面。"
|
|
15
|
+
},
|
|
8
16
|
{
|
|
9
17
|
"version": "0.8.6",
|
|
10
18
|
"notes": "0.8.6:加密中转首次连接更快、更稳——回环通道预握手、并发提升到 32、繁忙时可重试、主机预留工作通道;会话列表更轻量,冷启动和回前台提前握手。修复 DSH 远程重启换端口后网关不再跟着重启,中转控制通道与公网入口保持在线。修复审批处理后卡片残留、过期审批重连后反复出现;普通分支返回主页、子代理仍回父会话;重命名和分支标题立即更新;新建会话不再改写会话列表,“按时间”恢复跨工作区;Android 返回键优先关闭指令/图片菜单与诊疗浮层,强制公告不被返回键绕过;切换会话不再串带图片附件并按会话保留草稿;失效提问不再卡住弹窗,通知跳转更准确。聊天图片支持长按保存到手机。输入区新增上下文占用圆环,并移到“模型”按钮右侧。平板横屏和大屏下内容区与输入框放宽,不再被 720px 窄列限制。"
|
|
@@ -36,14 +44,6 @@
|
|
|
36
44
|
{
|
|
37
45
|
"version": "0.7.6",
|
|
38
46
|
"notes": "修复长提问占满会话导致无法回答,支持点击摘要卡片并在独立滚动弹窗中选择;补齐 Android 后台审批与提问通知、请求去重及会话跳转;支持普通相对路径聊天文件下载,并反馈系统下载完成或失败原因。"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"version": "0.7.4",
|
|
42
|
-
"notes": "修复 Windows Desktop 进程核验拖慢健康检查和管理页的问题:后台缓存并合并探测,测速与首页检测使用存活检查,控制操作仍实时核验身份。修复管理代理超时误报认证失败、操作进度参数丢失、状态轮询竞态及禁用后仍探测 Desktop 崩溃日志。修复桌面对话切换时消息发错会话、压缩状态串会话、归档关闭新会话、服务器切换串用 WS 票据、同源会话导出认证、Desktop 管理页网关地址以及不同本地 IP 同号端口误判。同步修复手机端共享的票据、命令与导出逻辑。继续修复连接切换后旧模型、审批、队列和压缩状态残留,测速覆盖手动选择,新建会话跳错服务器,目标编辑串会话,以及工作台绑定和模型密钥保存串服务器。桌面发送失败保留草稿并避免重复提交。优化实时历史插入、事件列表刷新和子代理查询,修复桌面实时消息被误判无变化;连接切换可立即开始新轮询,旧结果不会覆盖新状态。加强弱网传输:历史与前端资源按需 gzip 压缩、ETag 缓存验证,双通道独立长轮询避免互相阻塞,弱网模式减少历史分页并延长只读等待;Android 后台支持 gzip。修复桌面首次连接依赖系统 prompt 的问题。Android 已完成构建,尚未手机真机验收;本次不提供 HarmonyOS HAP。"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"version": "0.7.3",
|
|
46
|
-
"notes": "修复手机对话页输入栏下方空白,标题与工作区独立显示,操作集中到更多菜单。主页系统链路自动检测和重试,新增分段仪表、拖尾扫描与平滑状态切换。对话历史先显示本地缓存,再后台核对云端内容;一致时保留消息与阅读位置,修复持续上翻导致的卡顿,隐藏无意义的标题事件。插件详情原地展开,清理重复入口,完善 DSH Desktop 插件管理。新增 Windows Desktop 远程启动与重启(实验性),以及网关、受控 DSH 与 Desktop 的限次崩溃恢复;本机轮转记录诊断日志,用户可预览并自行选择通过现有反馈通道上传摘要。加强敏感目录访问、设备权限、配对与系统备份保护,新增离线贡献者致谢,更新现有 Capacitor 至 8.5.3。Android 已完成构建与浏览器验收,尚未手机真机验收;本次不提供 HarmonyOS HAP,新增 WebUI 功能尚未同步鸿蒙。"
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
}
|
package/public/version.json
CHANGED
package/public/workflow.css
CHANGED
|
@@ -176,25 +176,33 @@ body.workflow-v8.in-session .history { padding-bottom:calc(var(--composer-height
|
|
|
176
176
|
.activity-body { margin-left:26px; margin-right:6px; }
|
|
177
177
|
}
|
|
178
178
|
@media(prefers-reduced-motion:reduce) { .activity-state i { animation:none; } .activity-state i::after { display:none; } }
|
|
179
|
-
/*
|
|
180
|
-
.chat-activity-
|
|
179
|
+
/* 每段过程保留在回复前,完成的回合由上方耗时开关控制。 */
|
|
180
|
+
.chat-activity-turn { color:var(--dsr-muted); font-size:12px; }
|
|
181
|
+
.chat-activity-turn > summary { display:flex; align-items:center; flex-wrap:wrap; gap:2px 8px; width:fit-content; max-width:100%; min-height:34px; padding:3px 7px; cursor:pointer; list-style:none; border-radius:7px; }
|
|
182
|
+
.chat-activity-turn > summary::-webkit-details-marker { display:none; }
|
|
183
|
+
.chat-activity-turn > summary:hover { background:var(--dsr-panel); }
|
|
184
|
+
.chat-activity-turn > summary:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
185
|
+
.chat-activity-turn > summary > .activity-chevron { flex:none; margin-inline:1px 4px; }
|
|
186
|
+
.chat-activity-turn[open] > summary > .activity-chevron { transform:rotate(45deg); }
|
|
187
|
+
.activity-turn-title { color:var(--dsr-text); font-weight:550; white-space:nowrap; }
|
|
188
|
+
.activity-turn-facts,.activity-turn-time { font-variant-numeric:tabular-nums; }
|
|
189
|
+
.activity-turn-time { padding-inline:6px; border-radius:5px; background:var(--dsr-bg-2); white-space:nowrap; }
|
|
190
|
+
.history-entry[hidden] { display:none!important; }
|
|
191
|
+
.activity-nested-tools { padding-inline-start:10px; border-inline-start:1px solid var(--dsr-divider); }
|
|
192
|
+
.chat-activity-group { box-sizing:border-box; width:100%; max-width:780px; margin:2px 0; border:0; background:transparent; }
|
|
181
193
|
.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; }
|
|
182
194
|
.chat-activity-group > summary::-webkit-details-marker { display:none; }
|
|
183
195
|
.chat-activity-group > summary:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
184
196
|
.chat-activity-group > summary:hover { color:var(--dsr-text); background:var(--dsr-panel); }
|
|
185
197
|
.chat-activity-group .activity-group-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
|
|
186
|
-
.chat-activity-group .activity-group-live { display:inline-flex; align-items:center; flex:none; gap:6px; font-size:11px; color:var(--dsr-accent-strong); }
|
|
187
|
-
.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; }
|
|
188
|
-
.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; }
|
|
189
198
|
/* 运行中只提亮文字与光点,不加边框或底色块。 */
|
|
190
199
|
.chat-activity-group.is-running > summary { color:var(--dsr-accent-strong); }
|
|
191
200
|
.chat-activity-group.is-error > summary { color:var(--dsr-warning); }
|
|
192
|
-
.chat-activity-group .activity-chevron { margin
|
|
201
|
+
.chat-activity-group > summary > .activity-chevron { margin:0 4px 0 1px; flex:none; }
|
|
193
202
|
.chat-activity-group[open] > summary { color:var(--dsr-text); }
|
|
194
|
-
.chat-activity-group[open] .activity-chevron { transform:rotate(45deg); }
|
|
195
|
-
.chat-activity-group .activity-group-body { padding:0
|
|
203
|
+
.chat-activity-group[open] > summary > .activity-chevron { transform:rotate(45deg); }
|
|
204
|
+
.chat-activity-group .activity-group-body { max-height:min(52vh,380px); overflow:auto; overscroll-behavior:contain; margin-inline-start:11px; padding:0 8px 4px 12px; border-inline-start:1px solid var(--dsr-divider); }
|
|
196
205
|
.chat-activity-group .activity-group-body .chat-activity { margin:2px 0; }
|
|
197
|
-
@media (prefers-reduced-motion:reduce) { .chat-activity-group .activity-group-live i { animation:none; } .chat-activity-group .activity-group-live i::after { display:none; } }
|
|
198
206
|
/* Secondary pages use the same title, surface and control rhythm as More. */
|
|
199
207
|
.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; }
|
|
200
208
|
.workflow-subpage-head { padding:8px 0 24px; }
|
|
@@ -323,11 +331,11 @@ body.workflow-v8.in-session .history { padding-bottom:calc(var(--composer-height
|
|
|
323
331
|
.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; }
|
|
324
332
|
.image-lightbox:focus { outline:none; }
|
|
325
333
|
.image-lightbox.hidden { display:none; }
|
|
326
|
-
.image-lightbox-stage { position:absolute; inset:0; box-sizing:border-box; display:flex; align-items:center; justify-content:center; padding:calc(var(--dsr-safe-
|
|
334
|
+
.image-lightbox-stage { position:absolute; inset:0; box-sizing:border-box; display:flex; align-items:center; justify-content:center; padding:calc(var(--dsr-safe-top, 0px) + 56px) 12px calc(var(--dsr-safe-b, 0px) + 44px); overflow:auto; -webkit-overflow-scrolling:touch; }
|
|
327
335
|
.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; }
|
|
328
336
|
.image-lightbox.is-zoomed .image-lightbox-stage { display:block; text-align:center; }
|
|
329
337
|
.image-lightbox.is-zoomed .image-lightbox-stage img { display:inline-block; max-width:none; max-height:none; margin:0 auto; }
|
|
330
|
-
.image-lightbox-close { position:fixed; top:calc(var(--dsr-safe-
|
|
338
|
+
.image-lightbox-close { position:fixed; top:calc(var(--dsr-safe-top, 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; }
|
|
331
339
|
.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; }
|
|
332
340
|
body.image-preview-open { overflow:hidden; }
|
|
333
341
|
@media (prefers-reduced-motion:reduce) { .workflow-v8 * { scroll-behavior:auto!important; } }
|
package/public/workflow.js
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
const content=element('div'),pending=element('section'),receipts=element('section'),records=element('section')
|
|
51
51
|
pending.append(element('h3','',label('待审批与待回答','Approvals and questions')))
|
|
52
52
|
receipts.append(element('h3','',label('操作回执','Operation receipts')),
|
|
53
|
-
element('p','workflow-muted',label('
|
|
53
|
+
element('p','workflow-muted',label('回执用于查询网络中断后尚未确认的操作结果;切换连接后未确认的回执会继续显示,切回原连接后可查询。','Receipts track operation results after a connection interruption. Unconfirmed receipts stay listed after switching connections; switch back to query them.')))
|
|
54
54
|
records.append(element('h3','',label('审批记录','Approval records')))
|
|
55
55
|
const rows=element('div');receipts.append(rows);content.append(pending,records,receipts)
|
|
56
56
|
openSheet(label('审批与操作回执','Approvals and receipts'),content);operationList=rows
|
|
@@ -72,17 +72,29 @@
|
|
|
72
72
|
if(!rows.length)target.append(element('p','workflow-muted',label('没有待确认操作。','No unconfirmed operations.')))
|
|
73
73
|
for(const row of rows){
|
|
74
74
|
const item=element('div','workflow-receipt')
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
const remote=row.current===false
|
|
76
|
+
item.append(element('strong','',row.method),element('code','',row.id),
|
|
77
|
+
element('span','workflow-muted',remote
|
|
78
|
+
? label('结果待确认(来自其他连接,切回后可查询)','Unconfirmed (from another connection; switch back to check)')
|
|
79
|
+
: row.receiptMissing
|
|
80
|
+
? label('网关找不到回执。请核对会话后结束跟踪。','The gateway has no receipt. Check the conversation before ending tracking.')
|
|
81
|
+
: label('结果待确认,不会自动重复提交','Unconfirmed; never automatically submitted again')))
|
|
82
|
+
if(remote&&row.origin)item.append(element('p','workflow-muted',row.origin))
|
|
83
|
+
if(!remote){
|
|
84
|
+
const check=button('查询结果','Check result',async()=>{
|
|
85
|
+
check.disabled=true
|
|
86
|
+
try {
|
|
87
|
+
const value=await root.DshOperations.check(row.id)
|
|
88
|
+
if(!sheet.open||target!==operationList)return
|
|
89
|
+
const status = value?.receiptMissing
|
|
90
|
+
? label('网关找不到回执,请核对会话。','The gateway has no receipt. Check the conversation.')
|
|
91
|
+
: value ? label('当前状态:','Status: ')+value.phase : label('暂时无法确认,请核对会话。','Unable to confirm. Check the conversation.')
|
|
92
|
+
item.append(element('p','',status))
|
|
93
|
+
if(value?.phase==='complete'){config.refresh();config.recover?.(row,value);check.remove()}
|
|
94
|
+
}catch{item.append(element('p','',label('网络不可达,可稍后查询。','Network unavailable. Check later.')))}
|
|
95
|
+
finally{check.disabled=false}
|
|
96
|
+
});item.append(check)
|
|
97
|
+
}
|
|
86
98
|
if(row.phase==='unknown')item.append(button('核对后结束跟踪','Finish tracking after checking',()=>{
|
|
87
99
|
if(!root.confirm(label('请先核对主机会话记录。结束跟踪后,相同操作将作为新请求提交;如果原操作已执行,再次提交会重复。确定结束跟踪?','Check the conversation on the host first. After tracking ends, the same action will create a new request and may duplicate a completed action. Finish tracking?')))return
|
|
88
100
|
if(root.DshOperations.dismiss(row.id))void refreshOperations()
|
|
@@ -241,7 +253,6 @@
|
|
|
241
253
|
button('导出会话','Export conversation',()=>{actions.close();void config.command('/export')}),
|
|
242
254
|
button('压缩上下文','Compact context',()=>{actions.close();void config.command('/compact')}))
|
|
243
255
|
}
|
|
244
|
-
for(const el of document.querySelectorAll('[data-cmd="/compact"],[data-cmd="/export"],[data-ds-cmd="/compact"],[data-ds-cmd="/export"]'))el.remove()
|
|
245
256
|
}
|
|
246
257
|
function setupSecondaryPages() {
|
|
247
258
|
const definitions={
|
|
@@ -366,7 +377,7 @@
|
|
|
366
377
|
sheet.addEventListener('close',()=>{if(!sheet.open){restoreAttention();operationList=null}})
|
|
367
378
|
setupMore();setupStart();setupComposer();config.start?.()
|
|
368
379
|
const relaySettings=$('relay-settings')
|
|
369
|
-
if(relaySettings){$('settings-page-servers')?.append(relaySettings);root.DshRelaySettings?.mount(relaySettings,{connection:config.relay||config.operations});root.DshE2eeTransport?.mount(relaySettings,{connection:config.relay||config.operations,onConnect:config.e2eeConnect,onModeChange:config.e2eeModeChange,onAutoPaired:config.e2eeAutoPaired})}
|
|
380
|
+
if(relaySettings){$('settings-page-servers')?.append(relaySettings);root.DshRelaySettings?.mount(relaySettings,{connection:config.relay||config.operations});root.DshE2eeTransport?.mount(relaySettings,{connection:config.relay||config.operations,onConnect:config.e2eeConnect,onModeChange:config.e2eeModeChange,onAutoPaired:config.e2eeAutoPaired,onScan:config.e2eeScan})}
|
|
370
381
|
setupSecondaryPages()
|
|
371
382
|
const overview=$('view-activity');if(overview)overview.dataset.workflowLegacy='overview'
|
|
372
383
|
if(!config.desktop){
|
|
@@ -63,6 +63,8 @@ curl -sS --max-time 3 http://127.0.0.1:8787/health
|
|
|
63
63
|
|
|
64
64
|
**验收:** 对应认证入口成功,目标接口返回预期数据;检查两条事件流或轮询的实际增量。
|
|
65
65
|
|
|
66
|
+
**写回执:** 发送、创建等写操作在支持 `operations` 的网关上使用持久回执;结果未知时不自动重发。切换连接(地址或令牌变化)后,旧连接的未确认回执仍会显示在“审批与操作回执”和首页提示中,但只有切回原连接才能查询;1006 重连本身不改变回执归属。仓库另有写回执可见性说明 `docs/write-receipt-visibility.md`。
|
|
67
|
+
|
|
66
68
|
## KB-CONN-05:中转 HOST_OFFLINE
|
|
67
69
|
|
|
68
70
|
**先看:** 当前中转配置、主机网关是否已连接正确中转、设备身份与主机归属;再做 KB-CONN-03 的同手机网络对照。
|