dsh-remote-plugin 0.8.7 → 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 +134 -54
- package/index.mjs +32 -1
- package/package.json +1 -1
- package/public/activity.js +144 -49
- package/public/admin.html +33 -32
- package/public/admin.js +2 -1
- package/public/app.js +139 -51
- package/public/build.json +2 -2
- package/public/desktop/desktop.html +83 -74
- package/public/desktop/desktop.js +39 -26
- package/public/diagnostics.js +30 -4
- package/public/e2ee-transport.js +154 -7
- package/public/history.js +15 -2
- package/public/index.html +93 -76
- package/public/operations.js +22 -9
- package/public/plugin.html +27 -26
- 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 +8 -8
- package/public/version.json +1 -1
- package/public/workflow.css +17 -9
- package/public/workflow.js +7 -3
package/public/e2ee-transport.js
CHANGED
|
@@ -5,25 +5,172 @@
|
|
|
5
5
|
if (!bridge?.resolve) return
|
|
6
6
|
const active = new Set()
|
|
7
7
|
function changed(origin) { for (const request of [...active]) if (request.origin === origin) request.cancel() }
|
|
8
|
-
function
|
|
8
|
+
function resolveMapping(input) {
|
|
9
9
|
const original = String(input), value = JSON.parse(bridge.resolve(original))
|
|
10
10
|
if (value.error || typeof value.url !== 'string') throw new Error('E2EE_TRANSPORT_UNAVAILABLE')
|
|
11
11
|
if ((value.secure || value.paired) && !/^(?:http|ws):\/\/127\.0\.0\.1:\d+\/e2ee-[a-f0-9]{48}\//.test(value.url)) throw new Error('E2EE_TRANSPORT_UNAVAILABLE')
|
|
12
|
-
return value
|
|
12
|
+
return value
|
|
13
|
+
}
|
|
14
|
+
const resolve = input => resolveMapping(input).url
|
|
15
|
+
function listenerState(mapped) {
|
|
16
|
+
try { return JSON.parse(bridge.localHttpState?.(mapped) || '{}') || {} } catch { return {} }
|
|
17
|
+
}
|
|
18
|
+
function listenerFacts(mapped, initial) {
|
|
19
|
+
if (!initial) return {}
|
|
20
|
+
const current = listenerState(mapped)
|
|
21
|
+
return {
|
|
22
|
+
relayProxyId: initial.relayProxyId,
|
|
23
|
+
relayListenerBefore: initial.relayListener,
|
|
24
|
+
relayListenerAfter: current.relayListener,
|
|
25
|
+
relayAcceptBefore: initial.relayAcceptCount,
|
|
26
|
+
relayAcceptAfter: current.relayAcceptCount,
|
|
27
|
+
relaySlotLimit: initial.relaySlotLimit,
|
|
28
|
+
relaySlotsUsedBefore: initial.relaySlotsUsed,
|
|
29
|
+
relaySlotsUsedAfter: current.relaySlotsUsed,
|
|
30
|
+
relayBusyBefore: initial.relayBusyCount,
|
|
31
|
+
relayBusyAfter: current.relayBusyCount,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async function nativeHttp({ mapped, init, signal, traceId, route, method, timeout, start, read }) {
|
|
35
|
+
const initial = listenerState(mapped)
|
|
36
|
+
const started = Date.now()
|
|
37
|
+
let id, status, stage = 'native-unavailable', response
|
|
38
|
+
try {
|
|
39
|
+
if (signal.aborted) { stage = 'native-aborted'; return null }
|
|
40
|
+
const headers = new Headers(init.headers)
|
|
41
|
+
id = start(headers.get('authorization') || '', headers.get('x-dsh-remote-client-id') || '')
|
|
42
|
+
if (!id) return null
|
|
43
|
+
stage = 'native-timeout'
|
|
44
|
+
while (!signal.aborted && Date.now() - started < timeout) {
|
|
45
|
+
const raw = bridge.pollHttpRequest(id)
|
|
46
|
+
if (raw) {
|
|
47
|
+
const result = JSON.parse(raw)
|
|
48
|
+
stage = result.outcome
|
|
49
|
+
status = result.status || undefined
|
|
50
|
+
if (stage === 'native-response') {
|
|
51
|
+
stage = 'native-invalid'
|
|
52
|
+
response = read(result)
|
|
53
|
+
if (response) stage = 'native-response'
|
|
54
|
+
}
|
|
55
|
+
return response || null
|
|
56
|
+
}
|
|
57
|
+
await new Promise(resolve => setTimeout(resolve, 60))
|
|
58
|
+
}
|
|
59
|
+
if (signal.aborted) stage = 'native-aborted'
|
|
60
|
+
return null
|
|
61
|
+
} catch {
|
|
62
|
+
if (stage !== 'native-invalid') stage = 'native-network'
|
|
63
|
+
return null
|
|
64
|
+
} finally {
|
|
65
|
+
if (id) { try { bridge.cancelHttpRequest(id) } catch {} }
|
|
66
|
+
root.DshDiagnostics?.record('relay.native', {
|
|
67
|
+
...listenerFacts(mapped, initial), phase: response?.ok ? 'response' : 'failed', relayStage: stage, relayMode: 'mapped',
|
|
68
|
+
relayRoute: route, httpMethod: method, traceId, httpStatus: status, durationMs: Date.now() - started,
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function jsonResponse(body, status) {
|
|
73
|
+
return new Response([204, 205, 304].includes(status) ? null : body, { status, headers: { 'content-type': 'application/json' } })
|
|
74
|
+
}
|
|
75
|
+
function nativeSessionList(mapped, init, signal, traceId) {
|
|
76
|
+
if (typeof bridge.startListProbe !== 'function' || signal.aborted || typeof init?.body !== 'string') return null
|
|
77
|
+
let body
|
|
78
|
+
try { body = JSON.parse(init.body) } catch { return null }
|
|
79
|
+
if (body?.type !== 'client-request' || body.method !== 'session.list' || typeof body.rpcId !== 'string'
|
|
80
|
+
|| !body.payload || typeof body.payload !== 'object' || Array.isArray(body.payload) || Object.keys(body.payload).length) return null
|
|
81
|
+
return nativeHttp({ mapped, init, signal, traceId, route: 'session.list', method: 'POST', timeout: 6000,
|
|
82
|
+
start: (auth, clientId) => bridge.startListProbe(mapped, auth, clientId, body.rpcId),
|
|
83
|
+
read: ({ status, body }) => {
|
|
84
|
+
if (status !== 200) return null
|
|
85
|
+
const rpc = JSON.parse(body)?.result
|
|
86
|
+
return rpc?.ok === true && Array.isArray(rpc.value?.items) ? jsonResponse(body, status) : null
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
function nativeHistory(mapped, init, signal, traceId) {
|
|
91
|
+
return nativeHttp({ mapped, init, signal, traceId, route: 'session.history', method: 'POST', timeout: 13000,
|
|
92
|
+
start: (auth, clientId) => bridge.startHistoryRequest(mapped, auth, clientId, init.body),
|
|
93
|
+
read: ({ status, body }) => jsonResponse(body, status),
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
async function nativeOperation(mapped, method, init, signal) {
|
|
97
|
+
if (signal.aborted) throw signal.reason
|
|
98
|
+
const body = method === 'POST' ? init.body : null
|
|
99
|
+
if (body?.length > 4 * 1024 * 1024) return jsonResponse('{"error":"body-too-large"}', 413)
|
|
100
|
+
const response = await nativeHttp({ mapped, init, signal, route: 'operations', method, timeout: 15000,
|
|
101
|
+
start: (auth, clientId) => bridge.startOperationRequest(mapped, method, auth, clientId, body),
|
|
102
|
+
read: ({ status, body }) => jsonResponse(body, status),
|
|
103
|
+
})
|
|
104
|
+
if (signal.aborted) throw signal.reason
|
|
105
|
+
if (!response) throw new TypeError('E2EE_OPERATION_TRANSPORT_FAILED')
|
|
106
|
+
return response
|
|
13
107
|
}
|
|
14
108
|
const fetch = root.fetch.bind(root)
|
|
15
109
|
root.fetch = function(input, init) {
|
|
110
|
+
let diagnostic, diagnosticRoute, relayMode, mapped, initialListener, cleanup
|
|
16
111
|
try {
|
|
17
112
|
const request = typeof root.Request === 'function' && input instanceof root.Request
|
|
18
113
|
const url = request ? input.url : new URL(String(input), root.location.href).href
|
|
19
|
-
const
|
|
114
|
+
const parsed = new URL(url)
|
|
115
|
+
const method = String(init?.method || (request ? input.method : 'GET')).toUpperCase()
|
|
116
|
+
if (typeof bridge.httpDiagnostics === 'function' && method === 'POST') {
|
|
117
|
+
const route = parsed.pathname.slice(5)
|
|
118
|
+
if (parsed.pathname.startsWith('/api/') && ['session.list', 'session.history', 'ws-ticket', 'operations'].includes(route)) diagnosticRoute = route
|
|
119
|
+
}
|
|
120
|
+
const mapping = resolveMapping(url)
|
|
121
|
+
mapped = mapping.url
|
|
122
|
+
relayMode = mapped === url ? 'direct' : 'mapped'
|
|
123
|
+
const useNativeOperation = relayMode === 'mapped' && mapping.secure === true && !request
|
|
124
|
+
&& typeof bridge.startOperationRequest === 'function' && parsed.pathname === '/api/operations'
|
|
125
|
+
&& /^\?id=[A-Za-z0-9_-]{16,80}$/.test(parsed.search)
|
|
126
|
+
&& (method === 'POST' ? typeof init?.body === 'string' : method === 'GET' && init?.body == null)
|
|
127
|
+
const useNativeTicket = relayMode === 'mapped' && mapping.secure === true && !request && method === 'POST'
|
|
128
|
+
&& parsed.pathname === '/api/ws-ticket' && !parsed.search && init?.body == null && typeof bridge.startTicketRequest === 'function'
|
|
129
|
+
const useNativeHistory = relayMode === 'mapped' && mapping.secure === true && !request && method === 'POST'
|
|
130
|
+
&& parsed.pathname === '/api/session.history' && !parsed.search && typeof init?.body === 'string'
|
|
131
|
+
&& init.body.length <= 8192 && typeof bridge.startHistoryRequest === 'function'
|
|
132
|
+
if (!useNativeOperation && !useNativeTicket && diagnosticRoute) diagnostic = root.DshDiagnostics?.start('relay.fetch', { relayRoute: diagnosticRoute, httpMethod: method })
|
|
133
|
+
if (diagnostic && relayMode === 'mapped') initialListener = listenerState(mapped)
|
|
20
134
|
const controller = new root.AbortController(), signal = init?.signal || (request ? input.signal : null)
|
|
21
|
-
const cancel = () => controller.abort(signal?.reason), entry = { origin:
|
|
135
|
+
const cancel = () => controller.abort(signal?.reason), entry = { origin: parsed.origin, cancel: () => controller.abort() }
|
|
22
136
|
if (signal?.aborted) cancel(); else signal?.addEventListener('abort', cancel, { once: true })
|
|
23
137
|
active.add(entry)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
138
|
+
cleanup = () => { active.delete(entry); signal?.removeEventListener('abort', cancel) }
|
|
139
|
+
if (useNativeOperation) return nativeOperation(mapped, method, init || {}, controller.signal).finally(cleanup)
|
|
140
|
+
const browserFetch = () => fetch(mapped === url ? input : request ? new root.Request(mapped, input) : mapped, { ...init, signal: controller.signal })
|
|
141
|
+
if (useNativeTicket) {
|
|
142
|
+
return nativeHttp({ mapped, init, signal: controller.signal, route: 'ws-ticket', method, timeout: 6000,
|
|
143
|
+
start: (auth, clientId) => bridge.startTicketRequest(mapped, auth, clientId),
|
|
144
|
+
read: ({ status, body }) => jsonResponse(body, status),
|
|
145
|
+
}).then(response => {
|
|
146
|
+
if (controller.signal.aborted) throw controller.signal.reason
|
|
147
|
+
return response || browserFetch()
|
|
148
|
+
}).finally(cleanup)
|
|
149
|
+
}
|
|
150
|
+
const result = browserFetch()
|
|
151
|
+
if (!diagnostic && !useNativeHistory) return result.finally(cleanup)
|
|
152
|
+
return result.then(response => {
|
|
153
|
+
diagnostic?.end({ ...listenerFacts(mapped, initialListener), phase: response.ok ? 'response' : 'failed', relayStage: 'response', relayMode, httpStatus: response.status })
|
|
154
|
+
return response
|
|
155
|
+
}, async error => {
|
|
156
|
+
diagnostic?.end({ ...root.DshDiagnostics.errorFacts(error), ...listenerFacts(mapped, initialListener), phase: 'failed', relayStage: 'fetch-failed', relayMode })
|
|
157
|
+
if (error.name === 'TypeError' && !controller.signal.aborted) {
|
|
158
|
+
let recovered
|
|
159
|
+
if (useNativeHistory) recovered = await nativeHistory(mapped, init, controller.signal, diagnostic?.traceId)
|
|
160
|
+
else if (relayMode === 'mapped' && !request && method === 'POST' && parsed.pathname === '/api/session.list' && !parsed.search) {
|
|
161
|
+
recovered = await nativeSessionList(mapped, init, controller.signal, diagnostic?.traceId)
|
|
162
|
+
}
|
|
163
|
+
if (controller.signal.aborted) throw controller.signal.reason || error
|
|
164
|
+
if (recovered) return recovered
|
|
165
|
+
}
|
|
166
|
+
throw error
|
|
167
|
+
}).finally(cleanup)
|
|
168
|
+
} catch (error) {
|
|
169
|
+
cleanup?.()
|
|
170
|
+
if (!mapped && diagnosticRoute) diagnostic = root.DshDiagnostics?.start('relay.fetch', { relayRoute: diagnosticRoute, httpMethod: 'POST' })
|
|
171
|
+
diagnostic?.end({ ...root.DshDiagnostics.errorFacts(error), ...listenerFacts(mapped, initialListener), phase: 'failed', relayStage: relayMode ? 'fetch-failed' : 'resolve-failed', relayMode })
|
|
172
|
+
return Promise.reject(error)
|
|
173
|
+
}
|
|
27
174
|
}
|
|
28
175
|
if (root.WebSocket) {
|
|
29
176
|
const WebSocket = root.WebSocket
|
package/public/history.js
CHANGED
|
@@ -31,7 +31,11 @@
|
|
|
31
31
|
this.retry=document.createElement('button');this.retry.type='button';this.retry.className='history-page-control';this.retry.textContent=options.retryLabel?.()||'Retry'
|
|
32
32
|
this.retry.addEventListener('click',()=>options.retry?.())
|
|
33
33
|
this.live=document.createElement('div'); this.live.className='history-live'
|
|
34
|
-
box.addEventListener('toggle',event=>{
|
|
34
|
+
box.addEventListener('toggle',event=>{
|
|
35
|
+
const detail=event.target
|
|
36
|
+
if(detail?.dataset?.activityKey)this.rememberDisclosure(detail)
|
|
37
|
+
if(detail?.dataset?.activitySummary!=null)this.updateActivityRows()
|
|
38
|
+
},true)
|
|
35
39
|
const intent=()=>{this.intentUntil=Date.now()+1200}
|
|
36
40
|
const hold=()=>{intent();this.reading=true;this.options.changed?.(this)}
|
|
37
41
|
box.addEventListener('wheel',event=>{intent();if(event.deltaY<0)hold()},{passive:true})
|
|
@@ -48,7 +52,7 @@
|
|
|
48
52
|
}
|
|
49
53
|
anchor() {
|
|
50
54
|
const top=this.box.getBoundingClientRect().top
|
|
51
|
-
for(const node of this.box.querySelectorAll('.history-entry'))if(node.getBoundingClientRect().bottom>=top+1)return {seq:Number(node.dataset.historySeq),top:node.getBoundingClientRect().top}
|
|
55
|
+
for(const node of this.box.querySelectorAll('.history-entry'))if(!node.hidden&&node.getBoundingClientRect().bottom>=top+1)return {seq:Number(node.dataset.historySeq),top:node.getBoundingClientRect().top}
|
|
52
56
|
return null
|
|
53
57
|
}
|
|
54
58
|
get unread() {return Math.max(0,this.entries.length-this.end)}
|
|
@@ -88,6 +92,14 @@
|
|
|
88
92
|
}
|
|
89
93
|
captureDisclosures(node) {for(const detail of node.querySelectorAll('details[data-activity-key]'))this.rememberDisclosure(detail)}
|
|
90
94
|
restoreDisclosures(node) {for(const detail of node.querySelectorAll('details[data-activity-key]'))if(this.disclosures.has(detail.dataset.activityKey))detail.open=this.disclosures.get(detail.dataset.activityKey)}
|
|
95
|
+
updateActivityRows() {
|
|
96
|
+
const rendered = new Map([...this.box.querySelectorAll('[data-activity-summary]')].map(el=>[el.dataset.activitySummary,el]))
|
|
97
|
+
for(const detail of this.box.querySelectorAll('[data-activity-turn]')){
|
|
98
|
+
const id=detail.dataset.activityTurn, controller=rendered.get(id), row=detail.parentNode
|
|
99
|
+
// If the summary has scrolled out of the rendered page, keep this group reachable.
|
|
100
|
+
row.hidden=!!controller&&!controller.open
|
|
101
|
+
}
|
|
102
|
+
}
|
|
91
103
|
render(anchor, bottom=false) {
|
|
92
104
|
const box=this.box, slice=this.entries.slice(this.start,Math.min(this.end,this.start+WINDOW_SIZE)), desired=[]
|
|
93
105
|
this.captureDisclosures(box)
|
|
@@ -112,6 +124,7 @@
|
|
|
112
124
|
if(this.more.parentNode!==box)box.prepend(this.more)
|
|
113
125
|
let cursor=this.more.nextSibling
|
|
114
126
|
for(const node of desired){if(node===cursor)cursor=cursor.nextSibling;else box.insertBefore(node,cursor)}
|
|
127
|
+
this.updateActivityRows()
|
|
115
128
|
const empty=!desired.length&&!this.liveHtml, unreadable=empty&&slice.length>0
|
|
116
129
|
this.empty.textContent=unreadable?(this.options.unreadableLabel?.()||this.emptyLabel):this.emptyLabel
|
|
117
130
|
if(empty){if(this.empty.parentNode!==box)box.append(this.empty)}else this.empty.remove()
|
package/public/index.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="zh-CN">
|
|
3
3
|
<head>
|
|
4
|
-
<meta name="dsh-remote-build" content="
|
|
4
|
+
<meta name="dsh-remote-build" content="84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
7
7
|
<meta name="theme-color" content="#0D1117">
|
|
@@ -9,28 +9,30 @@
|
|
|
9
9
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
10
10
|
<title>DSH Remote</title>
|
|
11
11
|
<script>/* 统一入口: 桌面浏览器(宽屏且 UA 非移动)访问根地址自动切换到桌面端, 手机/窄窗口继续 App 界面 */ (function(){try{if(new URLSearchParams(location.search).get('layout')==='mobile'){sessionStorage.setItem('dshRemoteLayout','mobile');return}if(sessionStorage.getItem('dshRemoteLayout')==='mobile')return;var proto=location.protocol;var ua=navigator.userAgent||'';var mobile=/Android|iPhone|iPad|iPod|Mobile|Windows Phone/i.test(ua);if((proto==='http:'||proto==='https:')&&!mobile&&window.innerWidth>=1024){var p=location.pathname;if(p==='/'||/\/index\.html$/.test(p)){location.replace('desktop/desktop.html'+location.search)}}}catch(e){}})()</script>
|
|
12
|
-
<script>/* 首帧前应用皮肤, 避免闪白/闪黑 */ (function(){try{var t=localStorage.getItem('dshTheme');if(t!=='default'&&t!=='dark'&&t!=='light'&&t!=='neutral'&&t!=='mono'&&t!=='fish'&&t!=='penguin'&&t!=='penguin-night'&&t!=='bocchi'&&t!=='nijika'&&t!=='ryo'&&t!=='kita'){t='fish'}}catch(e){t='fish'}document.documentElement.setAttribute('data-theme',t)})()</script>
|
|
12
|
+
<script>/* 首帧前应用皮肤, 避免闪白/闪黑 */ (function(){try{var t=localStorage.getItem('dshTheme');if(t!=='default'&&t!=='dark'&&t!=='light'&&t!=='neutral'&&t!=='mono'&&t!=='fish'&&t!=='penguin'&&t!=='penguin-night'&&t!=='bocchi'&&t!=='nijika'&&t!=='ryo'&&t!=='kita'&&t!=='penguin-logistics'){t='fish'}}catch(e){t='fish'}document.documentElement.setAttribute('data-theme',t)})()</script>
|
|
13
13
|
<link rel="manifest" href="manifest.webmanifest">
|
|
14
14
|
<link rel="icon" href="icon.svg" type="image/svg+xml">
|
|
15
|
-
<link rel="stylesheet" href="styles.css?dsr-build=
|
|
16
|
-
<link rel="stylesheet" href="
|
|
17
|
-
<link rel="stylesheet" href="
|
|
18
|
-
<link rel="stylesheet" href="
|
|
19
|
-
<link rel="stylesheet" href="
|
|
20
|
-
<link rel="stylesheet" href="
|
|
21
|
-
<link rel="stylesheet" href="
|
|
22
|
-
<link rel="stylesheet" href="
|
|
23
|
-
<link rel="stylesheet" href="
|
|
24
|
-
<link rel="stylesheet" href="
|
|
25
|
-
<link rel="stylesheet" href="
|
|
26
|
-
<link rel="stylesheet" href="
|
|
27
|
-
<link rel="stylesheet" href="skins/
|
|
28
|
-
<link rel="stylesheet" href="skins/
|
|
29
|
-
<link rel="stylesheet" href="skins/
|
|
30
|
-
<link rel="stylesheet" href="skins/
|
|
31
|
-
<link rel="stylesheet" href="skins/
|
|
32
|
-
<link rel="stylesheet" href="skins/
|
|
33
|
-
<link rel="stylesheet" href="
|
|
15
|
+
<link rel="stylesheet" href="styles.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
16
|
+
<link rel="stylesheet" href="slash-suggestions.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
17
|
+
<link rel="stylesheet" href="genui.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
18
|
+
<link rel="stylesheet" href="plugin-center.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
19
|
+
<link rel="stylesheet" href="skills.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
20
|
+
<link rel="stylesheet" href="doctor.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
21
|
+
<link rel="stylesheet" href="onboarding.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
22
|
+
<link rel="stylesheet" href="extensions.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
23
|
+
<link rel="stylesheet" href="insights.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
24
|
+
<link rel="stylesheet" href="workflow.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
25
|
+
<link rel="stylesheet" href="relay-settings.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
26
|
+
<link rel="stylesheet" href="subagents.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
27
|
+
<link rel="stylesheet" href="skins/blue-fish/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
28
|
+
<link rel="stylesheet" href="skins/penguin/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
29
|
+
<link rel="stylesheet" href="skins/bocchi/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
30
|
+
<link rel="stylesheet" href="skins/kessoku/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
31
|
+
<link rel="stylesheet" href="skins/nijika/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
32
|
+
<link rel="stylesheet" href="skins/ryo/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
33
|
+
<link rel="stylesheet" href="skins/kita/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
34
|
+
<link rel="stylesheet" href="skins/penguin-logistics/skin.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
35
|
+
<link rel="stylesheet" href="theme-picker.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
34
36
|
</head>
|
|
35
37
|
<body>
|
|
36
38
|
<header class="topbar">
|
|
@@ -170,7 +172,7 @@
|
|
|
170
172
|
<div id="composer-menu" class="composer-menu hidden">
|
|
171
173
|
<div class="menu-group">
|
|
172
174
|
<div class="menu-title" data-i18n="menu.commandsTitle">输入指令</div>
|
|
173
|
-
<div class="menu-chips">
|
|
175
|
+
<div id="composer-command-list" class="menu-chips">
|
|
174
176
|
<button class="menu-chip" data-cmd="/compact" data-i18n="menu.compact">/compact 压缩对话历史</button>
|
|
175
177
|
<button class="menu-chip" data-cmd="/export" data-i18n="menu.export">/export 导出会话日志 ZIP</button>
|
|
176
178
|
<button class="menu-chip" data-cmd="/feedback" data-i18n="menu.feedback">/feedback 反馈当前会话</button>
|
|
@@ -952,6 +954,7 @@
|
|
|
952
954
|
'send.steerAccepted': 'DSH 已接受插队请求;不代表当前工具已中断。',
|
|
953
955
|
'send.steerUnconfirmed': '插队结果未确认,消息可能已送达。请先检查会话与队列,勿直接重复发送。',
|
|
954
956
|
'send.resultUnconfirmed': '发送结果未确认,消息可能已生效。请先核对会话,勿直接重复发送。',
|
|
957
|
+
'send.receiptMissing': '网关找不到回执。请先核对会话,再到「查看回执」结束跟踪,然后重新提交。',
|
|
955
958
|
'send.unconfirmedSwitched': '连接已切换(原连接:{host})。上次操作结果未确认,可能已生效;请核对会话,并可在首页“查看回执”中查询。',
|
|
956
959
|
'send.steerRejected': '插队未成功:{msg}。未自动改为排队。',
|
|
957
960
|
'send.steerSlash': '斜杠命令不支持插队发送,请使用排队发送执行命令。',
|
|
@@ -1070,6 +1073,7 @@
|
|
|
1070
1073
|
'approval.whyPending': '仍在等待你的决定。', 'approval.whyAutoDenied': '自动审查判定风险过高且会话禁止人工放行,工具未执行。',
|
|
1071
1074
|
'approval.noReason': '主机未给出原因', 'approval.justNow': '刚刚', 'approval.minutesAgo': '{n} 分钟前', 'approval.hoursAgo': '{n} 小时前',
|
|
1072
1075
|
'menu.modelTitle': '模型切换', 'menu.refresh': '刷新', 'menu.modelAuto': '点开时自动加载', 'menu.effortTitle': '思考深度',
|
|
1076
|
+
'slash.suggestions': '命令和技能', 'slash.command': '命令', 'slash.skill': '技能',
|
|
1073
1077
|
'composer.placeholder': '给 DSH 发消息…', 'composer.running': '运行中…', 'composer.send': '发送', 'composer.fullscreen': '全屏编辑', 'composer.exitFullscreen': '退出全屏编辑', 'composer.addImage': '添加图片', 'composer.takePhoto': '拍照', 'composer.choosePhoto': '相册', 'composer.imageAdded': '已添加图片', 'composer.imageRemoved': '已移除图片', 'composer.removeImage': '移除图片', 'composer.imageUnsupported': '仅支持 PNG、JPEG、WebP 或 GIF 图片', 'composer.imageTooLarge': '单张图片不能超过 {size}', 'composer.imageLimit': '最多添加 {count} 张图片', 'composer.imageSlashUnsupported': '带图片时不能发送斜杠命令', 'composer.imageReadFailed': '图片读取失败:{msg}',
|
|
1074
1078
|
'pending.title': '待处理', 'pending.count': '{n} 项', 'pending.approvalTitle': '🔧 {tool} 请求批准', 'pending.noReason': '无说明',
|
|
1075
1079
|
'pending.allow': '允许', 'pending.reject': '拒绝', 'pending.question': '❓ {question}',
|
|
@@ -1102,7 +1106,12 @@
|
|
|
1102
1106
|
'update.latestV': '已是最新 v{version}', 'update.latestRemote': '最新版本 v{version}', 'update.latestToast': '已是最新版本',
|
|
1103
1107
|
'update.checkFailedDesc': '检查失败:{msg}', 'update.checkFailed': '检查更新失败:{msg}',
|
|
1104
1108
|
'update.phase.downloading': '正在下载…', 'update.phase.verifying': '正在校验安装包…', 'update.phase.complete': '下载完成', 'update.phase.legacy': '系统正在下载安装包;安装新版后可显示完整进度', 'update.busy': '已有更新下载正在进行',
|
|
1105
|
-
'update.downloadStarted': '开始下载,完成后会弹出安装页', 'update.downloadFailed': '
|
|
1109
|
+
'update.downloadStarted': '开始下载,完成后会弹出安装页', 'update.downloadFailed': '更新下载失败:{msg}',
|
|
1110
|
+
'update.checkingOfficial': '正在检查 GitHub 正式版…', 'update.foundOfficial': 'GitHub 正式版 v{version} 可下载',
|
|
1111
|
+
'update.officialUnavailable': '暂时无法获取 GitHub 正式版,请检查网络后重试',
|
|
1112
|
+
'update.phase.official': '正在从 GitHub 下载…', 'update.phase.installer': '已打开系统安装器,请按提示完成更新',
|
|
1113
|
+
'update.installerFailed': '无法打开系统安装器,请检查安装权限后重试', 'update.storageFailed': '无法保存安装包,请检查存储空间',
|
|
1114
|
+
'update.checkAgain': '主机已切换,请重新检查更新',
|
|
1106
1115
|
'update.phase.checking': '正在获取主机安装包信息…', 'settings.redownloadApk': '重新下载安装包', 'settings.redownloadApkDesc': '同版本补丁也可重新下载,以当前主机提供的安装包为准。',
|
|
1107
1116
|
'update.patchMismatch': '安装包与校验信息不一致,请同步主机安装包后重试。',
|
|
1108
1117
|
'update.corrupted': '下载文件损坏,请重试', 'update.serverFileMissing': '服务器上还没有对应版本的文件,请稍后再试',
|
|
@@ -1168,8 +1177,8 @@
|
|
|
1168
1177
|
'settings.toolsTitle': '显示工具调用', 'settings.toolsDesc': '关闭后隐藏 🔧/📦 工具调用与结果',
|
|
1169
1178
|
'settings.mobileEnterTitle': '手机回车行为', 'settings.mobileEnterDesc': '选择手机端按 Enter 时换行或直接发送', 'settings.mobileEnterNewline': '回车换行', 'settings.mobileEnterSend': '回车发送',
|
|
1170
1179
|
'settings.langTitle': '语言 / Language', 'settings.langDesc': '界面语言,跟随系统或手动切换',
|
|
1171
|
-
'settings.themeTitle': '皮肤', 'settings.themeDesc': '默认深空 / 落日 / 易北爱乐厅 / 草原孤塔 / 黑曜白 / 蓝色大肥鱼 / 企鹅女管·白昼 / 企鹅女管·极夜 / 波奇酱 / 伊地知虹夏 / 山田凉 / 喜多郁代',
|
|
1172
|
-
'theme.default': '默认深空', 'theme.dark': '落日', 'theme.light': '易北爱乐厅', 'theme.neutral': '草原孤塔', 'theme.mono': '黑曜白', 'theme.fish': '蓝色大肥鱼', 'theme.penguin': '企鹅女管·白昼', 'theme.penguin-night': '企鹅女管·极夜', 'theme.bocchi': '波奇酱', 'theme.nijika': '伊地知虹夏', 'theme.ryo': '山田凉', 'theme.kita': '喜多郁代',
|
|
1180
|
+
'settings.themeTitle': '皮肤', 'settings.themeDesc': '默认深空 / 落日 / 易北爱乐厅 / 草原孤塔 / 黑曜白 / 蓝色大肥鱼 / 企鹅女管·白昼 / 企鹅女管·极夜 / 波奇酱 / 伊地知虹夏 / 山田凉 / 喜多郁代 / 企鹅物流',
|
|
1181
|
+
'theme.default': '默认深空', 'theme.dark': '落日', 'theme.light': '易北爱乐厅', 'theme.neutral': '草原孤塔', 'theme.mono': '黑曜白', 'theme.fish': '蓝色大肥鱼', 'theme.penguin': '企鹅女管·白昼', 'theme.penguin-night': '企鹅女管·极夜', 'theme.bocchi': '波奇酱', 'theme.nijika': '伊地知虹夏', 'theme.ryo': '山田凉', 'theme.kita': '喜多郁代', 'theme.penguin-logistics': '企鹅物流',
|
|
1173
1182
|
'theme.panelTitle': '选择配色', 'theme.close': '关闭',
|
|
1174
1183
|
'settings.tokenTitle': '访问令牌', 'settings.change': '更换',
|
|
1175
1184
|
'settings.unknown': '未知', 'settings.dshRecovering': '正在等待网关恢复并核验操作结果…',
|
|
@@ -1219,6 +1228,7 @@
|
|
|
1219
1228
|
'send.steerAccepted': 'DSH accepted the steering request. The current tool may still be running.',
|
|
1220
1229
|
'send.steerUnconfirmed': 'Steering is unconfirmed; the message may have arrived. Check the conversation and queue before resending.',
|
|
1221
1230
|
'send.resultUnconfirmed': 'Send result unconfirmed; the message may have arrived. Check the conversation before resending.',
|
|
1231
|
+
'send.receiptMissing': 'The gateway has no receipt. Check the conversation, then use Check receipts to finish tracking before resending.',
|
|
1222
1232
|
'send.unconfirmedSwitched': 'The connection changed (previous host: {host}). The last operation is unconfirmed and may have been applied. Check the conversation or open “Check receipts” on Home.',
|
|
1223
1233
|
'send.steerRejected': 'Steering failed: {msg}. Not automatically queued.',
|
|
1224
1234
|
'send.steerSlash': 'Slash commands cannot be sent as steering. Use queue mode to execute the command.',
|
|
@@ -1337,6 +1347,7 @@
|
|
|
1337
1347
|
'approval.whyPending': 'Waiting for your decision.', 'approval.whyAutoDenied': 'Auto review judged the call too risky and the session forbids manual approval, so it did not run.',
|
|
1338
1348
|
'approval.noReason': 'The host gave no reason', 'approval.justNow': 'just now', 'approval.minutesAgo': '{n} min ago', 'approval.hoursAgo': '{n} h ago',
|
|
1339
1349
|
'menu.modelTitle': 'Model', 'menu.refresh': 'Refresh', 'menu.modelAuto': 'Auto-loads when opened', 'menu.effortTitle': 'Reasoning effort',
|
|
1350
|
+
'slash.suggestions': 'Commands and skills', 'slash.command': 'Command', 'slash.skill': 'Skill',
|
|
1340
1351
|
'composer.placeholder': 'Message DSH…', 'composer.running': 'Running…', 'composer.send': 'Send', 'composer.fullscreen': 'Fullscreen editor', 'composer.exitFullscreen': 'Exit fullscreen editor', 'composer.addImage': 'Add image', 'composer.takePhoto': 'Camera', 'composer.choosePhoto': 'Gallery', 'composer.imageAdded': 'Image added', 'composer.imageRemoved': 'Image removed', 'composer.removeImage': 'Remove image', 'composer.imageUnsupported': 'Only PNG, JPEG, WebP or GIF images are supported', 'composer.imageTooLarge': 'Each image must be under {size}', 'composer.imageLimit': 'You can add up to {count} images', 'composer.imageSlashUnsupported': 'Slash commands cannot include images', 'composer.imageReadFailed': 'Could not read image: {msg}',
|
|
1341
1352
|
'pending.title': 'Inbox', 'pending.count': '{n} items', 'pending.approvalTitle': '🔧 {tool} requests approval', 'pending.noReason': 'No reason given',
|
|
1342
1353
|
'pending.allow': 'Allow', 'pending.reject': 'Reject', 'pending.question': '❓ {question}',
|
|
@@ -1369,7 +1380,12 @@
|
|
|
1369
1380
|
'update.latestV': 'Up to date v{version}', 'update.latestRemote': 'Latest version v{version}', 'update.latestToast': 'Already up to date',
|
|
1370
1381
|
'update.checkFailedDesc': 'Check failed: {msg}', 'update.checkFailed': 'Update check failed: {msg}',
|
|
1371
1382
|
'update.phase.downloading': 'Downloading…', 'update.phase.verifying': 'Verifying APK…', 'update.phase.complete': 'Download complete', 'update.phase.legacy': 'System download started; install this update for full progress', 'update.busy': 'An update is already downloading',
|
|
1372
|
-
'update.downloadStarted': 'Downloading, the install page will open when ready', 'update.downloadFailed': '
|
|
1383
|
+
'update.downloadStarted': 'Downloading, the install page will open when ready', 'update.downloadFailed': 'Update download failed: {msg}',
|
|
1384
|
+
'update.checkingOfficial': 'Checking the stable release on GitHub…', 'update.foundOfficial': 'Stable release v{version} is available on GitHub',
|
|
1385
|
+
'update.officialUnavailable': 'Could not get the stable release from GitHub. Check your connection and try again.',
|
|
1386
|
+
'update.phase.official': 'Downloading from GitHub…', 'update.phase.installer': 'System installer opened. Follow its prompts to finish updating.',
|
|
1387
|
+
'update.installerFailed': 'Could not open the system installer. Check installation permissions and try again.', 'update.storageFailed': 'Could not save the package. Check available storage.',
|
|
1388
|
+
'update.checkAgain': 'The host changed. Check for updates again.',
|
|
1373
1389
|
'update.phase.checking': 'Fetching the host package information…', 'settings.redownloadApk': 'Download package again', 'settings.redownloadApkDesc': 'Download same-version patches too. The package comes from the current host.',
|
|
1374
1390
|
'update.patchMismatch': 'Package checksum mismatch. Refresh the package on the host, then try again.',
|
|
1375
1391
|
'update.corrupted': 'Downloaded file is corrupted, please retry', 'update.serverFileMissing': 'The file for this version is not on the server yet, please try again later',
|
|
@@ -1435,8 +1451,8 @@
|
|
|
1435
1451
|
'settings.toolsTitle': 'Show tool calls', 'settings.toolsDesc': 'Hide 🔧/📦 tool calls and results when off',
|
|
1436
1452
|
'settings.mobileEnterTitle': 'Mobile Enter behavior', 'settings.mobileEnterDesc': 'Choose whether Enter inserts a newline or sends', 'settings.mobileEnterNewline': 'Enter = newline', 'settings.mobileEnterSend': 'Enter = send',
|
|
1437
1453
|
'settings.langTitle': 'Language / 语言', 'settings.langDesc': 'UI language, follows system or switch manually',
|
|
1438
|
-
'settings.themeTitle': 'Theme', 'settings.themeDesc': 'Deep Space / Sunset / Elbphilharmonie / Prairie Tower / Monochrome / Blue Fat Fish / Penguin Admin Day / Penguin Admin Night / Bocchi / Nijika / Ryo / Kita',
|
|
1439
|
-
'theme.default': 'Default', 'theme.dark': 'Sunset', 'theme.light': 'Elbphilharmonie', 'theme.neutral': 'Prairie Tower', 'theme.mono': 'Monochrome', 'theme.fish': 'Blue Fat Fish', 'theme.penguin': 'Penguin Admin Day', 'theme.penguin-night': 'Penguin Admin Night', 'theme.bocchi': 'Bocchi', 'theme.nijika': 'Nijika', 'theme.ryo': 'Ryo', 'theme.kita': 'Kita',
|
|
1454
|
+
'settings.themeTitle': 'Theme', 'settings.themeDesc': 'Deep Space / Sunset / Elbphilharmonie / Prairie Tower / Monochrome / Blue Fat Fish / Penguin Admin Day / Penguin Admin Night / Bocchi / Nijika / Ryo / Kita / Penguin Logistics',
|
|
1455
|
+
'theme.default': 'Default', 'theme.dark': 'Sunset', 'theme.light': 'Elbphilharmonie', 'theme.neutral': 'Prairie Tower', 'theme.mono': 'Monochrome', 'theme.fish': 'Blue Fat Fish', 'theme.penguin': 'Penguin Admin Day', 'theme.penguin-night': 'Penguin Admin Night', 'theme.bocchi': 'Bocchi', 'theme.nijika': 'Nijika', 'theme.ryo': 'Ryo', 'theme.kita': 'Kita', 'theme.penguin-logistics': 'Penguin Logistics',
|
|
1440
1456
|
'theme.panelTitle': 'Choose theme', 'theme.close': 'Close',
|
|
1441
1457
|
'settings.tokenTitle': 'Access token', 'settings.change': 'Change',
|
|
1442
1458
|
'settings.unknown': 'Unknown', 'settings.dshRecovering': 'Waiting for the gateway and verifying the operation…',
|
|
@@ -1478,53 +1494,54 @@
|
|
|
1478
1494
|
}
|
|
1479
1495
|
}
|
|
1480
1496
|
</script>
|
|
1481
|
-
<script src="relay-autopair.js?dsr-build=
|
|
1482
|
-
<script src="e2ee-transport.js?dsr-build=
|
|
1483
|
-
<script src="sha256.js?dsr-build=
|
|
1484
|
-
<script src="jsqr.min.js?dsr-build=
|
|
1485
|
-
<script src="i18n.js?dsr-build=
|
|
1486
|
-
<script src="theme.js?dsr-build=
|
|
1487
|
-
<script src="genui.js?dsr-build=
|
|
1488
|
-
<script src="chat-files.js?dsr-build=
|
|
1489
|
-
<script src="md.js?dsr-build=
|
|
1490
|
-
<script src="vendor/gsap/gsap.min.js?dsr-build=
|
|
1491
|
-
<script src="motion.js?dsr-build=
|
|
1492
|
-
<script type="module" src="morphicons-init.js?dsr-build=
|
|
1493
|
-
<script src="plugin-center.js?dsr-build=
|
|
1494
|
-
<script src="skills.js?dsr-build=
|
|
1495
|
-
<script src="insights.js?dsr-build=
|
|
1496
|
-
<script src="teams.js?dsr-build=
|
|
1497
|
-
<script src="task-board.js?dsr-build=
|
|
1498
|
-
<script src="extensions.js?dsr-build=
|
|
1499
|
-
<script src="diagnostics.js?dsr-build=
|
|
1500
|
-
<script src="doctor.js?dsr-build=
|
|
1501
|
-
<script src="history.js?dsr-build=
|
|
1502
|
-
<script src="announcement-forms.js?dsr-build=
|
|
1503
|
-
<script src="activity.js?dsr-build=
|
|
1504
|
-
<script src="turn-results.js?dsr-build=
|
|
1505
|
-
<script src="image-cache.js?dsr-build=
|
|
1506
|
-
<script src="chat-copy.js?dsr-build=
|
|
1507
|
-
<script src="image-preview.js?dsr-build=
|
|
1508
|
-
<script src="link-check.js?dsr-build=
|
|
1509
|
-
<script src="network.js?dsr-build=
|
|
1510
|
-
<script src="operations.js?dsr-build=
|
|
1511
|
-
<script src="workflow.js?dsr-build=
|
|
1512
|
-
<script src="sponsor-entry.js?dsr-build=
|
|
1513
|
-
<script src="relay-devices.js?dsr-build=
|
|
1514
|
-
<script src="relay-settings.js?dsr-build=
|
|
1515
|
-
<script src="subagents.js?dsr-build=
|
|
1516
|
-
<script src="session-presets.js?dsr-build=
|
|
1517
|
-
<script src="permission-presets.js?dsr-build=
|
|
1518
|
-
<script src="approval-records.js?dsr-build=
|
|
1519
|
-
<script src="approval-summary.js?dsr-build=
|
|
1520
|
-
<script src="doctor-entry.js?dsr-build=
|
|
1521
|
-
<script src="onboarding.js?dsr-build=
|
|
1522
|
-
<link rel="stylesheet" href="file-inbox.css?dsr-build=
|
|
1523
|
-
<script src="file-inbox.js?dsr-build=
|
|
1524
|
-
<link rel="stylesheet" href="session-deck.css?dsr-build=
|
|
1525
|
-
<script src="session-deck.js?dsr-build=
|
|
1526
|
-
<script src="lan-discovery.js?dsr-build=
|
|
1527
|
-
<script src="cache-upgrade.js?dsr-build=
|
|
1528
|
-
<script src="
|
|
1497
|
+
<script src="relay-autopair.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1498
|
+
<script src="e2ee-transport.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1499
|
+
<script src="sha256.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1500
|
+
<script src="jsqr.min.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1501
|
+
<script src="i18n.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1502
|
+
<script src="theme.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1503
|
+
<script src="genui.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1504
|
+
<script src="chat-files.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1505
|
+
<script src="md.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1506
|
+
<script src="vendor/gsap/gsap.min.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1507
|
+
<script src="motion.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1508
|
+
<script type="module" src="morphicons-init.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1509
|
+
<script src="plugin-center.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1510
|
+
<script src="skills.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1511
|
+
<script src="insights.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1512
|
+
<script src="teams.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1513
|
+
<script src="task-board.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1514
|
+
<script src="extensions.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1515
|
+
<script src="diagnostics.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1516
|
+
<script src="doctor.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1517
|
+
<script src="history.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1518
|
+
<script src="announcement-forms.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1519
|
+
<script src="activity.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1520
|
+
<script src="turn-results.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1521
|
+
<script src="image-cache.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1522
|
+
<script src="chat-copy.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1523
|
+
<script src="image-preview.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1524
|
+
<script src="link-check.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1525
|
+
<script src="network.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1526
|
+
<script src="operations.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1527
|
+
<script src="workflow.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1528
|
+
<script src="sponsor-entry.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1529
|
+
<script src="relay-devices.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1530
|
+
<script src="relay-settings.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1531
|
+
<script src="subagents.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1532
|
+
<script src="session-presets.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1533
|
+
<script src="permission-presets.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1534
|
+
<script src="approval-records.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1535
|
+
<script src="approval-summary.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1536
|
+
<script src="doctor-entry.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1537
|
+
<script src="onboarding.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1538
|
+
<link rel="stylesheet" href="file-inbox.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
1539
|
+
<script src="file-inbox.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1540
|
+
<link rel="stylesheet" href="session-deck.css?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184">
|
|
1541
|
+
<script src="session-deck.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1542
|
+
<script src="lan-discovery.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1543
|
+
<script src="cache-upgrade.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1544
|
+
<script src="slash-suggestions.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1545
|
+
<script src="app.js?dsr-build=84d998ae3a1302b3e1d02d3cdde5d8f3ad3f8bd963ec0323fd18a675015e1184"></script>
|
|
1529
1546
|
</body>
|
|
1530
1547
|
</html>
|
package/public/operations.js
CHANGED
|
@@ -52,18 +52,27 @@
|
|
|
52
52
|
return scope
|
|
53
53
|
}
|
|
54
54
|
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
|
|
55
|
-
function unknown(id) {
|
|
56
|
-
const
|
|
57
|
-
|
|
55
|
+
function unknown(id, receiptMissing = false) {
|
|
56
|
+
const en = root.I18N?.lang === 'en'
|
|
57
|
+
const message = receiptMissing
|
|
58
|
+
? (en ? 'The gateway has no receipt for this operation. Check the conversation, then use Check receipts to finish tracking before resending. Operation: '
|
|
59
|
+
: '网关找不到这笔操作的回执。请先核对会话,再到「查看回执」结束跟踪,然后重新提交。操作编号:')
|
|
60
|
+
: (en ? 'Result unconfirmed. The operation may already have been applied. Check before trying again. Operation: '
|
|
61
|
+
: '结果未确认,操作可能已生效。请先核对会话,再决定是否重试。操作编号:')
|
|
62
|
+
const error = new Error(message + id)
|
|
63
|
+
error.operationId = id; error.operationPending = true; error.receiptMissing = receiptMissing
|
|
58
64
|
return error
|
|
59
65
|
}
|
|
66
|
+
const isMissingReceipt = (response, body) => response.status === 404 && body?.error === 'operation-not-found'
|
|
60
67
|
async function execute(config) {
|
|
61
68
|
const scope=await restore(config),intent=await digest(JSON.stringify([config.method,config.payload]))
|
|
62
69
|
if(!config.valid())throw unknown('connection-changed')
|
|
63
70
|
const existing=[...pending.values()].find(row=>row.scope===scope&&row.intent===intent)
|
|
64
71
|
const id = existing?.id || newId(), createdAt = Date.now()
|
|
72
|
+
if (existing?.inFlight) throw unknown(id)
|
|
65
73
|
const entry = existing || { id, scope, intent, method: config.method, sessionId: config.payload.sessionId || '', origin: originOf(config), createdAt, phase: 'running', config }
|
|
66
74
|
if (!entry.origin) entry.origin = originOf(config)
|
|
75
|
+
entry.inFlight = true
|
|
67
76
|
pending.set(id, entry)
|
|
68
77
|
persist()
|
|
69
78
|
const statusUrl = config.url('/api/operations?id=' + encodeURIComponent(id))
|
|
@@ -76,7 +85,7 @@
|
|
|
76
85
|
if (!config.valid()) throw unknown(id)
|
|
77
86
|
if (response.status >= 400) {
|
|
78
87
|
if (response.status >= 500) throw unknown(id)
|
|
79
|
-
if (method === 'GET' && response.status === 404) throw unknown(id)
|
|
88
|
+
if (method === 'GET' && response.status === 404) throw unknown(id, isMissingReceipt(response, value))
|
|
80
89
|
const error = new Error(value.error || ('HTTP ' + response.status)); error.rpcRejected = true; throw error
|
|
81
90
|
}
|
|
82
91
|
return value
|
|
@@ -84,7 +93,7 @@
|
|
|
84
93
|
let status
|
|
85
94
|
try {
|
|
86
95
|
try { status = existing ? await request('GET') : await request('POST', { method: config.method, payload: config.payload }) }
|
|
87
|
-
catch (error) { if (error.message === 'AUTH' || error.rpcRejected || !config.valid()) throw error }
|
|
96
|
+
catch (error) { if (error.message === 'AUTH' || error.rpcRejected || (existing && error.receiptMissing) || !config.valid()) throw error }
|
|
88
97
|
for (let attempt = 0; config.valid() && Date.now() - createdAt < 90000; attempt++) {
|
|
89
98
|
if (status?.phase === 'complete' || status?.phase === 'rejected') {
|
|
90
99
|
entry.phase = status.phase; forget(id)
|
|
@@ -93,14 +102,16 @@
|
|
|
93
102
|
if (status?.phase === 'unknown') { entry.phase = 'unknown'; throw unknown(id) }
|
|
94
103
|
await sleep(Math.min(3000, 400 + attempt * 250))
|
|
95
104
|
try { status = await request('GET') }
|
|
96
|
-
catch (error) { if (error.message === 'AUTH' || error.rpcRejected) throw error }
|
|
105
|
+
catch (error) { if (error.message === 'AUTH' || error.rpcRejected || (existing && error.receiptMissing)) throw error }
|
|
97
106
|
}
|
|
98
107
|
throw unknown(id)
|
|
99
108
|
} catch (error) {
|
|
100
109
|
if (error.rpcRejected || error.message === 'AUTH') forget(id)
|
|
101
|
-
else entry.phase = 'unknown'
|
|
110
|
+
else { entry.phase = 'unknown'; entry.receiptMissing = error.receiptMissing === true }
|
|
102
111
|
persist()
|
|
103
112
|
throw error
|
|
113
|
+
} finally {
|
|
114
|
+
entry.inFlight = false
|
|
104
115
|
}
|
|
105
116
|
}
|
|
106
117
|
async function check(id) {
|
|
@@ -111,13 +122,15 @@
|
|
|
111
122
|
if (!entry.config.valid()) return null
|
|
112
123
|
const value = await response.json()
|
|
113
124
|
if (!entry.config.valid()) return null
|
|
125
|
+
if (isMissingReceipt(response, value)) return { receiptMissing: true }
|
|
114
126
|
if (response.ok) { entry.phase = value.phase; if (['complete','rejected'].includes(value.phase)) forget(id) }
|
|
115
127
|
return response.ok ? value : null
|
|
116
128
|
}
|
|
117
129
|
function pendingRows() {
|
|
118
130
|
const rows = new Map()
|
|
119
131
|
for (const row of pending.values()) rows.set(row.id, { id: row.id, method: row.method, sessionId: row.sessionId,
|
|
120
|
-
createdAt: row.createdAt, phase: row.phase, origin: row.origin || '',
|
|
132
|
+
createdAt: row.createdAt, phase: row.phase, origin: row.origin || '', receiptMissing: row.receiptMissing === true,
|
|
133
|
+
current: !!(row.config && row.config.valid()) })
|
|
121
134
|
// Receipts persisted for another address/token are still shown, as unknown.
|
|
122
135
|
// They cannot be queried until the user switches back to that connection,
|
|
123
136
|
// but hiding them would let an ambiguous write disappear from the UI.
|
|
@@ -131,7 +144,7 @@
|
|
|
131
144
|
const api = { supports: method => methods.has(method), execute, check, restore,
|
|
132
145
|
dismiss: id => {
|
|
133
146
|
const row = pending.get(id) || saved().find(value => value.id === id)
|
|
134
|
-
if (!row || (row.phase && row.phase !== 'unknown')) return false
|
|
147
|
+
if (!row || row.inFlight || (row.phase && row.phase !== 'unknown')) return false
|
|
135
148
|
forget(id)
|
|
136
149
|
return true
|
|
137
150
|
},
|