dsh-remote-plugin 0.7.1 → 0.7.2
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 +9 -1
- package/index.mjs +10 -0
- package/insights.mjs +73 -0
- package/package.json +3 -2
- package/plugin-center.mjs +118 -21
- package/public/admin.html +3 -0
- package/public/admin.js +1 -0
- package/public/app.js +100 -174
- package/public/desktop/desktop.html +5 -0
- package/public/desktop/desktop.js +71 -5
- package/public/index.html +14 -64
- package/public/insights.css +14 -0
- package/public/insights.js +228 -0
- package/public/plugin-center.css +89 -1
- package/public/plugin-center.js +148 -39
- package/public/plugin.js +7 -1
- package/public/styles.css +0 -93
- package/public/update.json +8 -8
- package/public/version.json +1 -1
package/public/plugin.js
CHANGED
|
@@ -10,7 +10,12 @@ let usageLoadedAt = 0
|
|
|
10
10
|
|
|
11
11
|
function text(id, value) { const el = $(id); if (el) el.textContent = value == null ? '—' : String(value) }
|
|
12
12
|
function escapeText(value) { return String(value ?? '').replace(/[<>&"]/g, c => ({ '<': '<', '>': '>', '&': '&', '"': '"' }[c])) }
|
|
13
|
-
function openConsole() {
|
|
13
|
+
function openConsole(event) {
|
|
14
|
+
event?.preventDefault()
|
|
15
|
+
// Desktop 拒绝 dsh-app: 弹窗;在当前 iframe 导航,沿用宿主认证与抽屉。
|
|
16
|
+
if (location.protocol === 'dsh-app:') location.assign('/remote/admin/')
|
|
17
|
+
else window.open('/remote/admin/', '_blank', 'noopener')
|
|
18
|
+
}
|
|
14
19
|
function closePanel() { window.parent.postMessage({ source: 'dsh-remote-plugin', type: 'close' }, location.origin) }
|
|
15
20
|
function fmtTokens(value) {
|
|
16
21
|
const n = Number(value) || 0
|
|
@@ -170,6 +175,7 @@ async function copyToken() {
|
|
|
170
175
|
|
|
171
176
|
$('plugin-close').addEventListener('click', closePanel)
|
|
172
177
|
$('plugin-console').addEventListener('click', openConsole)
|
|
178
|
+
if (location.protocol === 'dsh-app:') $('plugin-about').addEventListener('click', openConsole)
|
|
173
179
|
$('plugin-toggle').addEventListener('click', toggleGateway)
|
|
174
180
|
$('plugin-copy').addEventListener('click', copyToken)
|
|
175
181
|
$('plugin-primary').addEventListener('click', () => {
|
package/public/styles.css
CHANGED
|
@@ -201,99 +201,6 @@ a.mini-btn { text-decoration: none; display: inline-flex; align-items: center; }
|
|
|
201
201
|
}
|
|
202
202
|
.workspace-path-block { display: grid; gap: 6px; margin-top: 2px; color: var(--dsr-muted); font-size: 12px; }
|
|
203
203
|
|
|
204
|
-
/* ---------- Token 统计(移动端) ---------- */
|
|
205
|
-
.stats-view { padding-bottom: 16px; }
|
|
206
|
-
.stats-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 2px 17px; }
|
|
207
|
-
.stats-page-copy { min-width: 0; }
|
|
208
|
-
.stats-eyebrow, .stats-panel-kicker { color: var(--dsr-accent-strong); font-size: 10px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; }
|
|
209
|
-
.stats-page-head h1 { margin: 4px 0 4px; font-size: 26px; line-height: 1.15; letter-spacing: -.04em; text-wrap: balance; }
|
|
210
|
-
.stats-page-subtitle { margin: 0; color: var(--dsr-muted); font-size: 12px; line-height: 1.5; }
|
|
211
|
-
.stats-date-wrap { display: grid; gap: 2px; flex: 0 0 auto; justify-items: end; padding: 7px 10px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: 12px; }
|
|
212
|
-
.stats-date-label { color: var(--dsr-muted); font-size: 10px; white-space: nowrap; }
|
|
213
|
-
.stats-date { color: var(--dsr-text); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
214
|
-
.stats-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 12px; }
|
|
215
|
-
.stats-toolbar-label { color: var(--dsr-muted); font-size: 11px; font-weight: 650; }
|
|
216
|
-
.stats-mode-picker { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: 11px; }
|
|
217
|
-
.stats-mode-btn { min-height: 30px; padding: 5px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--dsr-muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
|
|
218
|
-
.stats-mode-btn.active { color: var(--dsr-text); background: var(--dsr-accent-soft); border-color: var(--dsr-accent-line); box-shadow: 0 2px 8px var(--dsr-shadow); }
|
|
219
|
-
.stats-mode-btn:active { background: var(--dsr-panel-2); }
|
|
220
|
-
.stats-mode-btn:focus-visible { position: relative; z-index: 1; }
|
|
221
|
-
.stats-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
|
|
222
|
-
.scard { position: relative; min-width: 0; overflow: hidden; padding: 14px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: 18px; box-shadow: 0 8px 24px var(--dsr-shadow); }
|
|
223
|
-
.scard::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--dsr-line); }
|
|
224
|
-
.scard-primary { grid-column: 1 / -1; background: linear-gradient(140deg, var(--dsr-panel), var(--dsr-accent-soft)); }
|
|
225
|
-
.scard-primary::before { background: linear-gradient(90deg, var(--dsr-accent), var(--dsr-accent-2)); }
|
|
226
|
-
.scard-cost::before { background: var(--dsr-accent-2); }
|
|
227
|
-
.scard-share::before { background: var(--dsr-info); }
|
|
228
|
-
.scard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
|
|
229
|
-
.scard-label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--dsr-muted); font-size: 11px; font-weight: 700; }
|
|
230
|
-
.scard-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
231
|
-
.scard-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; color: var(--dsr-accent-strong); background: var(--dsr-accent-soft); font-size: 14px; font-weight: 800; }
|
|
232
|
-
.scard-icon.cost { color: var(--dsr-accent-2); background: var(--dsr-accent-2-soft); font-size: 12px; }
|
|
233
|
-
.scard-icon.share { color: var(--dsr-info); background: var(--dsr-info-soft); font-size: 12px; }
|
|
234
|
-
.scard-badge { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsr-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
|
|
235
|
-
.scard-value { margin-top: 11px; color: var(--dsr-text); font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
236
|
-
.scard-primary .scard-value { font-size: clamp(32px, 9vw, 42px); }
|
|
237
|
-
.scard-unit { margin-left: 6px; color: var(--dsr-muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }
|
|
238
|
-
.scard-helper { margin-top: 7px; color: var(--dsr-muted); font-size: 10px; line-height: 1.4; }
|
|
239
|
-
.bucket-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--dsr-line); }
|
|
240
|
-
.bucket-grid .b { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 5px; min-width: 0; }
|
|
241
|
-
.bucket-dot { width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; background: var(--dsr-accent); }
|
|
242
|
-
.bucket-dot.input { background: var(--dsr-accent-strong); }
|
|
243
|
-
.bucket-dot.cache-read { background: var(--dsr-info); }
|
|
244
|
-
.bucket-dot.cache-write { background: var(--dsr-accent-2); }
|
|
245
|
-
.bucket-dot.output { background: var(--dsr-warning); }
|
|
246
|
-
.bucket-grid .n { min-width: 0; overflow: hidden; color: var(--dsr-muted); font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
|
|
247
|
-
.bucket-grid .t { grid-column: 2; min-width: 0; overflow: hidden; color: var(--dsr-text); font-size: 12px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
|
|
248
|
-
.stats-split { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }
|
|
249
|
-
.stats-split-item { display: grid; gap: 5px; min-width: 0; padding: 8px; background: var(--dsr-bg-2); border: 1px solid var(--dsr-line); border-radius: 10px; }
|
|
250
|
-
.stats-split-item span { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--dsr-muted); font-size: 10px; white-space: nowrap; }
|
|
251
|
-
.stats-split-item strong { overflow: hidden; color: var(--dsr-text); font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
|
|
252
|
-
.split-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--dsr-accent-strong); }
|
|
253
|
-
.split-dot.off { background: var(--dsr-accent-2); }
|
|
254
|
-
.share-layout { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
|
|
255
|
-
.share-ring { position: relative; display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--dsr-info) var(--share), var(--dsr-bg-2) 0); }
|
|
256
|
-
.share-ring::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--dsr-panel); }
|
|
257
|
-
.share-ring span { position: relative; z-index: 1; color: var(--dsr-text); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
|
|
258
|
-
.share-copy { display: grid; gap: 2px; min-width: 0; }
|
|
259
|
-
.share-copy strong { font-size: 13px; }
|
|
260
|
-
.share-copy span, .share-copy small { color: var(--dsr-muted); font-size: 10px; line-height: 1.35; }
|
|
261
|
-
.share-copy small { font-variant-numeric: tabular-nums; }
|
|
262
|
-
.stats-panel { margin-top: 14px; padding: 14px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: 18px; box-shadow: 0 8px 24px var(--dsr-shadow); }
|
|
263
|
-
.stats-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; margin-bottom: 12px; }
|
|
264
|
-
.stats-panel-title { margin: 3px 0 0; font-size: 16px; line-height: 1.2; letter-spacing: -.02em; }
|
|
265
|
-
.stats-legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; min-width: 0; margin-top: 1px; color: var(--dsr-muted); font-size: 10px; }
|
|
266
|
-
.stats-legend .lg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
|
|
267
|
-
.stats-legend .sw { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
|
|
268
|
-
.stats-legend .sw.peak { background: var(--dsr-accent-strong); }
|
|
269
|
-
.stats-legend .sw.off { background: var(--dsr-accent-2); }
|
|
270
|
-
.stats-legend .sw.token { background: var(--dsr-accent); }
|
|
271
|
-
.stats-chart { display: flex; align-items: flex-end; gap: 7px; height: 190px; padding: 21px 2px 20px; overflow-x: auto; overflow-y: hidden; background-image: linear-gradient(to top, var(--dsr-line) 1px, transparent 1px); background-size: 100% 25%; border-radius: 10px; }
|
|
272
|
-
.stats-bar { display: flex; flex: 1 0 30px; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 30px; }
|
|
273
|
-
.stats-bar .bars { display: flex; width: 100%; max-width: 40px; height: 100%; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: 7px 7px 3px 3px; background: var(--dsr-accent-soft); box-shadow: 0 4px 12px var(--dsr-shadow); }
|
|
274
|
-
.stats-bar .seg { width: 100%; }
|
|
275
|
-
.stats-bar .seg.peak { background: var(--dsr-accent-strong); }
|
|
276
|
-
.stats-bar .seg.off { background: var(--dsr-accent-2); }
|
|
277
|
-
.stats-bar .bars.token { background: linear-gradient(180deg, var(--dsr-accent-strong), var(--dsr-accent)); }
|
|
278
|
-
.stats-bar .lbl { color: var(--dsr-muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
279
|
-
.stats-bar .val { min-height: 12px; color: var(--dsr-text); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
280
|
-
.stats-empty { display: grid; flex: 1; place-items: center; min-height: 145px; color: var(--dsr-muted); text-align: center; font-size: 12px; }
|
|
281
|
-
.stats-note { margin: 14px 2px 0; padding: 10px 12px; color: var(--dsr-muted); background: var(--dsr-info-soft); border-left: 3px solid var(--dsr-info); border-radius: 0 10px 10px 0; font-size: 11px; line-height: 1.6; }
|
|
282
|
-
|
|
283
|
-
@media (max-width: 380px) {
|
|
284
|
-
.stats-page-head { gap: 8px; }
|
|
285
|
-
.stats-page-head h1 { font-size: 23px; }
|
|
286
|
-
.stats-date-wrap { padding: 6px 8px; }
|
|
287
|
-
.stats-toolbar { align-items: flex-start; flex-direction: column; gap: 6px; }
|
|
288
|
-
.stats-mode-picker { width: 100%; }
|
|
289
|
-
.stats-mode-btn { width: 100%; }
|
|
290
|
-
.scard { padding: 12px; }
|
|
291
|
-
.bucket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
292
|
-
.stats-panel { padding: 12px; }
|
|
293
|
-
.stats-panel-head { display: block; }
|
|
294
|
-
.stats-legend { justify-content: flex-start; margin-top: 8px; }
|
|
295
|
-
}
|
|
296
|
-
|
|
297
204
|
/* ---------- 会话列表 ---------- */
|
|
298
205
|
.session-list { display: flex; flex-direction: column; gap: 8px; }
|
|
299
206
|
.session-card {
|
package/public/update.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.7.
|
|
2
|
+
"version": "0.7.2",
|
|
3
3
|
"apkUrl": "dsh-remote.apk",
|
|
4
|
-
"sha256": "
|
|
5
|
-
"releasedAt": "2026-10-
|
|
6
|
-
"notes": "
|
|
4
|
+
"sha256": "b95f258d72e63e1bbdfecd9023f11cb05e4820581f02349dffd108f7cc00c94f",
|
|
5
|
+
"releasedAt": "2026-10-07T05:43:56.417Z",
|
|
6
|
+
"notes": "补齐 DSH Desktop 的插件管理接入,使用桌面版自带管理入口,支持安装、更新、卸载及配置启停,修复后台任务启动和 pnpm 11 卸载参数兼容。新增手机与桌面的上下文、费用和额度面板,适配 dsh-context 与 dsh-cost-meter;需要主机安装并启用对应插件。修复设备密钥访问插件管理接口的越权、切换连接竞态、插件任务残留锁和 Desktop 打开控制台无响应。提供 Android 本地测试安装包(未做手机真机安装验证);鸿蒙本批未同步上下文与费用面板。",
|
|
7
7
|
"history": [
|
|
8
|
+
{
|
|
9
|
+
"version": "0.7.2",
|
|
10
|
+
"notes": "补齐 DSH Desktop 的插件管理接入,使用桌面版自带管理入口,支持安装、更新、卸载及配置启停,修复后台任务启动和 pnpm 11 卸载参数兼容。新增手机与桌面的上下文、费用和额度面板,适配 dsh-context 与 dsh-cost-meter;需要主机安装并启用对应插件。修复设备密钥访问插件管理接口的越权、切换连接竞态、插件任务残留锁和 Desktop 打开控制台无响应。提供 Android 本地测试安装包(未做手机真机安装验证);鸿蒙本批未同步上下文与费用面板。"
|
|
11
|
+
},
|
|
8
12
|
{
|
|
9
13
|
"version": "0.7.1",
|
|
10
14
|
"notes": "适配 DSH 0.2.0-rc.2 的 Inbox 队列、后台任务流与子代理目录,修复子代理接口 404 和归档后刷新状态滞后,保留旧版实时通道兼容;修复 Desktop 插件面板被标题栏遮挡、收起后阴影残留及更新说明响应校验。合入鸿蒙插件中心、长按发送和主题改进,并修复切换连接时的旧确认卡、误发送及迟到回执问题;鸿蒙本次仅更新源码,暂不提供安装包。"
|
|
@@ -40,10 +44,6 @@
|
|
|
40
44
|
{
|
|
41
45
|
"version": "0.6.20",
|
|
42
46
|
"notes": "0.6.20:适配 DSH 0.1.2-alpha.1 的新版客户端模块、认证、斜杠 RPC 与 remote.mux 实时协议,同时保留旧版 DSH 的自动回退;修复斜杠命令因 commands.execute 参数变化触发 aborted 报错,以及新版历史、工作区、模型、目标和子代理等接口不兼容问题;审批与用户提问现在会在所属对话内完整显示并可直接处理,主页仍保留全局待办入口,长工具参数、原因和调用标识不再被截断。"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"version": "0.6.19",
|
|
46
|
-
"notes": "0.6.19:全面优化手机端、桌面端、管理页和插件页的布局、动效与响应式体验,并支持减少动态效果偏好;重做蓝色、草原、音乐厅等主题的明暗层级和文字图标对比度,新增利落的黑白配色;统一主页图标配色并修正设置齿轮中心孔偏移;目标面板支持收起为始终可见的侧边入口,保留运行状态、可随时恢复,并按会话与目标在本地记忆。"
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
}
|
package/public/version.json
CHANGED