dsh-remote-plugin 0.6.16 → 0.6.18

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.
@@ -334,6 +334,7 @@ button.ds-overview-attention-item, button.ds-overview-session-item { cursor:poin
334
334
 
335
335
  /* 文件传输 */
336
336
  .ds-fs-bar { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
337
+ .ds-fs-root { max-width: 260px; min-width: 120px; border: 1px solid var(--dsr-line); border-radius: 9px; background: var(--dsr-panel); color: var(--dsr-text); padding: 7px 9px; }
337
338
  .ds-fs-path { flex: 1; min-width: 0; font-size: 12.5px; color: var(--dsr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
338
339
  .ds-fs-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--dsr-line); border-radius: 12px; background: var(--dsr-panel); }
339
340
  .ds-fs-row { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--dsr-divider); font-size: 13px; }
@@ -386,6 +387,7 @@ button.ds-overview-attention-item, button.ds-overview-session-item { cursor:poin
386
387
  .ds-server-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
387
388
  .ds-server-note { font-size: 13px; word-break: break-all; }
388
389
  .ds-server-url { font-size: 11.5px; color: var(--dsr-muted); word-break: break-all; }
390
+ .ds-server-token-badge { color: var(--dsr-muted); font-size: 10px; }
389
391
  .ds-server-badge { flex-shrink: 0; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--dsr-accent-soft); color: var(--dsr-accent-strong); border: 1px solid var(--dsr-accent-line); white-space: nowrap; }
390
392
  .ds-server-badge.good { background: var(--dsr-success-soft); color: var(--dsr-success); border-color: var(--dsr-success-line); }
391
393
  .ds-server-badge.bad { background: var(--dsr-warning-soft); color: var(--dsr-warning); border-color: var(--dsr-warning-line); }
@@ -413,12 +415,15 @@ button.ds-overview-attention-item, button.ds-overview-session-item { cursor:poin
413
415
  .ds-stats-legend .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 4px; }
414
416
  .ds-stats-legend .sw.peak { background: var(--dsr-accent-strong); }
415
417
  .ds-stats-legend .sw.off { background: var(--dsr-accent-2); }
418
+ .ds-stats-legend .sw.token { background: var(--dsr-accent); }
419
+ .ds-stats-chart-title { margin-top: 13px; font-size: 11px; font-weight: 650; color: var(--dsr-muted); }
416
420
  .ds-stats-chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 12px 14px 10px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: 12px; overflow-x: auto; }
417
421
  .ds-stats-bar { flex: 1; min-width: 40px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
418
422
  .ds-stats-bar .bars { width: 100%; max-width: 46px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 6px 6px 0 0; overflow: hidden; background: var(--dsr-accent-soft); }
419
423
  .ds-stats-bar .seg { width: 100%; }
420
424
  .ds-stats-bar .seg.peak { background: var(--dsr-accent-strong); }
421
425
  .ds-stats-bar .seg.off { background: var(--dsr-accent-2); }
426
+ .ds-stats-bar .bars.token { background: var(--dsr-accent); }
422
427
  .ds-stats-bar .lbl { font-size: 10px; color: var(--dsr-muted); white-space: nowrap; }
423
428
  .ds-stats-bar .val { font-size: 10px; white-space: nowrap; }
424
429
  .ds-stats-note { font-size: 11px; color: var(--dsr-muted); line-height: 1.6; margin-top: 8px; }
@@ -189,7 +189,8 @@
189
189
  <div class="ds-section-label" data-i18n="ds.files">文件传输</div>
190
190
  <div class="ds-fs-bar">
191
191
  <button id="fs-up" class="ds-btn" data-i18n="ds.fsUp">上级</button>
192
- <span id="fs-path" class="ds-fs-path">/</span>
192
+ <select id="fs-root" class="ds-fs-root hidden" data-i18n-aria="ds.fsRoot" aria-label="允许根目录"></select>
193
+ <span id="fs-path" class="ds-fs-path">~</span>
193
194
  <button id="fs-new-workspace" class="ds-btn" data-i18n="ds.fsNewWorkspace">新建工作区</button>
194
195
  <button id="fs-refresh" class="ds-btn" data-i18n="ds.fsRefresh">刷新</button>
195
196
  </div>
@@ -302,8 +303,12 @@
302
303
  </div>
303
304
  <div class="ds-drawer-body">
304
305
  <div class="ds-stat-grid" id="stats-cards"></div>
306
+ <div class="ds-stats-chart-title" data-i18n="ds.statsCostTrend">费用趋势</div>
305
307
  <div id="stats-legend" class="ds-stats-legend"></div>
306
308
  <div id="stats-chart" class="ds-stats-chart"></div>
309
+ <div class="ds-stats-chart-title" data-i18n="ds.statsTokenTrend">Token 量趋势</div>
310
+ <div id="stats-token-legend" class="ds-stats-legend"></div>
311
+ <div id="stats-token-chart" class="ds-stats-chart"></div>
307
312
  <div id="stats-note" class="ds-stats-note"></div>
308
313
  </div>
309
314
  </div>
@@ -458,10 +463,10 @@
458
463
  'ds.cmdCompact': '/compact 压缩对话历史', 'ds.cmdExport': '/export 导出会话日志 ZIP',
459
464
  'ds.cmdFeedback': '/feedback 反馈当前会话', 'ds.cmdGoal': '/goal 设置/查看任务目标',
460
465
  'ds.cmdPermission': '/permission 切换权限预设', 'ds.cmdPlan': '/plan 进入/退出计划模式',
461
- 'ds.fsUp': '上级', 'ds.fsNewWorkspace': '新建工作区', 'ds.fsRefresh': '刷新', 'ds.fsEmpty': '目录为空',
466
+ 'ds.fsUp': '上级', 'ds.fsRoot': '允许根目录', 'ds.fsNewWorkspace': '新建工作区', 'ds.fsRefresh': '刷新', 'ds.fsEmpty': '目录为空',
462
467
  'ds.workspaceCreateTitle': '新建工作区', 'ds.workspaceCreateDesc': '将在当前文件目录下创建文件夹,并自动打开新会话。', 'ds.workspaceParent': '父目录', 'ds.workspaceNamePlaceholder': '例如:my-project', 'ds.workspaceCreate': '创建并打开', 'ds.cancel': '取消', 'ds.workspaceNameRequired': '请输入工作区名称', 'ds.workspaceExists': '该目录已存在', 'ds.workspaceInvalidName': '名称不能包含路径分隔符', 'ds.workspaceCreateFailed': '创建工作区失败', 'ds.workspaceCreated': '工作区已创建', 'ds.workspaceCreatedNoSession': '工作区已创建,但新会话未能打开',
463
468
  'ds.groupGeneral': '通用', 'ds.groupGeneralDesc': '工具调用、预设提示词',
464
- 'ds.groupServers': '服务器', 'ds.groupServersDesc': '服务器地址',
469
+ 'ds.groupServers': '服务器', 'ds.groupServersDesc': '服务器地址与令牌',
465
470
  'ds.groupNotify': '通知', 'ds.groupNotifyDesc': '通知与提醒',
466
471
  'ds.groupTheme': '皮肤', 'ds.groupThemeDesc': '配色主题',
467
472
  'ds.groupAbout': '关于', 'ds.groupAboutDesc': '版本信息',
@@ -497,18 +502,18 @@
497
502
  'ds.approvalBody': '{tool} · {server}', 'ds.approvalReason': '原因:{reason}',
498
503
  'ds.allowed': '已允许', 'ds.rejected': '已拒绝', 'ds.ignored': '已忽略',
499
504
  'ds.stale': '请求已失效', 'ds.pendingSubmitFailed': '提交失败:{msg}',
500
- 'ds.statsTodayTokens': '今日 Token', 'ds.statsTodayCost': '今日费用', 'ds.statsPeakShare': '高峰占比',
505
+ 'ds.statsTodayTokens': '今日 Token', 'ds.statsTodayCost': '今日费用', 'ds.statsPeakShare': '高峰占比', 'ds.statsCostTrend': '费用趋势', 'ds.statsTokenTrend': 'Token 量趋势', 'ds.statsTokenTotal': 'Token 总量',
501
506
  'ds.statsInput': '未缓存输入', 'ds.statsCacheRead': '缓存命中', 'ds.statsCacheWrite': '缓存写入', 'ds.statsOutput': '输出',
502
507
  'ds.statsPeak': '高峰', 'ds.statsOff': '空闲', 'ds.statsDays': '近 {n} 天',
503
508
  'ds.statsGatewayDown': '统计需要网关运行', 'ds.statsEmpty': '暂无统计',
504
- 'ds.statsNote': '注:本数据仅在使用 DeepSeek 官方 API 时估算;基于 token 计算,与官网账单可能有出入,一切以官网为准。统计自 2026-08-17 定价生效日起。',
505
- 'ds.serversEmpty': '未添加备用服务器', 'ds.serversUntested': '未测速', 'ds.serversCurrent': ' · 当前',
509
+ 'ds.statsNote': '注:Token 量按 DSH usage 事件记录,第三方 provider 需提供 usage 才能计入;费用仅对已知 DeepSeek 模型估算,与官网账单可能有出入,一切以官网为准。统计自 2026-08-17 定价生效日起。',
510
+ 'ds.serversEmpty': '未添加备用服务器', 'ds.serversUntested': '未测速', 'ds.serversCurrent': ' · 当前', 'ds.serversTokenSet': '令牌已配置', 'ds.serversTokenMissing': '未配置令牌',
506
511
  'ds.serversUnreachable': '不可达', 'ds.serversDelete': '删除', 'ds.serversEdit': '编辑',
507
512
  'ds.serversNeedAddress': '请输入服务器地址', 'ds.serversBadProtocol': '地址需以 http:// 或 https:// 开头',
508
- 'ds.serversDuplicate': '该地址已存在', 'ds.serversAdded': '已添加', 'ds.serversEdited': '已更新',
513
+ 'ds.serversDuplicate': '相同地址和令牌已存在', 'ds.serversAdded': '已添加', 'ds.serversEdited': '已更新',
509
514
  'ds.serversRemovedActive': '已删除当前服务器,重新测速…',
510
515
  'ds.serversCurrentDesc': '当前:{group} · {url}({ms})',
511
- 'ds.serversPromptNote': '服务器备注(可留空):', 'ds.serversPromptEditUrl': '编辑服务器地址:',
516
+ 'ds.serversPromptNote': '服务器备注(可留空):', 'ds.serversPromptEditUrl': '编辑服务器地址:', 'ds.serversPromptEditToken': '编辑服务器令牌(留空保持不变):',
512
517
  'ds.serversPromptEditNote': '编辑备注({url}):', 'ds.serversPromptEditGroup': '所属组:',
513
518
  'ds.serversManualSelected': '已切换至:{url}',
514
519
  'ds.speedTesting': '正在测速…', 'ds.speedSwitched': '已切换到:{url}({ms}ms)',
@@ -560,10 +565,10 @@
560
565
  'ds.cmdCompact': '/compact Compress conversation history', 'ds.cmdExport': '/export Export session log ZIP',
561
566
  'ds.cmdFeedback': '/feedback Feedback current session', 'ds.cmdGoal': '/goal Set/view task goal',
562
567
  'ds.cmdPermission': '/permission Switch permission preset', 'ds.cmdPlan': '/plan Enter/exit plan mode',
563
- 'ds.fsUp': 'Up', 'ds.fsNewWorkspace': 'New workspace', 'ds.fsRefresh': 'Refresh', 'ds.fsEmpty': 'Empty directory',
568
+ 'ds.fsUp': 'Up', 'ds.fsRoot': 'Allowed root', 'ds.fsNewWorkspace': 'New workspace', 'ds.fsRefresh': 'Refresh', 'ds.fsEmpty': 'Empty directory',
564
569
  'ds.workspaceCreateTitle': 'New workspace', 'ds.workspaceCreateDesc': 'Create a folder in the current file directory and open a new session there.', 'ds.workspaceParent': 'Parent folder', 'ds.workspaceNamePlaceholder': 'For example: my-project', 'ds.workspaceCreate': 'Create & open', 'ds.cancel': 'Cancel', 'ds.workspaceNameRequired': 'Enter a workspace name', 'ds.workspaceExists': 'That folder already exists', 'ds.workspaceInvalidName': 'The name cannot contain path separators', 'ds.workspaceCreateFailed': 'Could not create workspace', 'ds.workspaceCreated': 'Workspace created', 'ds.workspaceCreatedNoSession': 'Workspace created, but the new session could not be opened',
565
570
  'ds.groupGeneral': 'General', 'ds.groupGeneralDesc': 'Tool calls, prompt presets',
566
- 'ds.groupServers': 'Servers', 'ds.groupServersDesc': 'Server address',
571
+ 'ds.groupServers': 'Servers', 'ds.groupServersDesc': 'Server address and token',
567
572
  'ds.groupNotify': 'Notifications', 'ds.groupNotifyDesc': 'Notifications & reminders',
568
573
  'ds.groupTheme': 'Theme', 'ds.groupThemeDesc': 'Color themes',
569
574
  'ds.groupAbout': 'About', 'ds.groupAboutDesc': 'Version info',
@@ -599,18 +604,18 @@
599
604
  'ds.approvalBody': '{tool} · {server}', 'ds.approvalReason': 'Reason: {reason}',
600
605
  'ds.allowed': 'Allowed', 'ds.rejected': 'Rejected', 'ds.ignored': 'Ignored',
601
606
  'ds.stale': 'Request is stale', 'ds.pendingSubmitFailed': 'Submit failed: {msg}',
602
- 'ds.statsTodayTokens': 'Tokens today', 'ds.statsTodayCost': 'Cost today', 'ds.statsPeakShare': 'Peak share',
607
+ 'ds.statsTodayTokens': 'Tokens today', 'ds.statsTodayCost': 'Cost today', 'ds.statsPeakShare': 'Peak share', 'ds.statsCostTrend': 'Cost trend', 'ds.statsTokenTrend': 'Token volume trend', 'ds.statsTokenTotal': 'Total tokens',
603
608
  'ds.statsInput': 'Uncached input', 'ds.statsCacheRead': 'Cache read', 'ds.statsCacheWrite': 'Cache write', 'ds.statsOutput': 'Output',
604
609
  'ds.statsPeak': 'Peak', 'ds.statsOff': 'Off-peak', 'ds.statsDays': 'Last {n} days',
605
610
  'ds.statsGatewayDown': 'Stats require the gateway', 'ds.statsEmpty': 'No stats yet',
606
- 'ds.statsNote': 'Note: estimates assume the official DeepSeek API. Token-based calculation may differ from the official bill; always defer to deepseek.com. Stats start from the 2026-08-17 pricing date.',
607
- 'ds.serversEmpty': 'No backup servers', 'ds.serversUntested': 'Untested', 'ds.serversCurrent': ' · current',
611
+ 'ds.statsNote': 'Note: token volume uses DSH usage events; a third-party provider must expose usage to be counted. Costs are estimates for known DeepSeek models and may differ from the official bill; always defer to deepseek.com. Stats start from the 2026-08-17 pricing date.',
612
+ 'ds.serversEmpty': 'No backup servers', 'ds.serversUntested': 'Untested', 'ds.serversCurrent': ' · current', 'ds.serversTokenSet': 'Token set', 'ds.serversTokenMissing': 'No token',
608
613
  'ds.serversUnreachable': 'Unreachable', 'ds.serversDelete': 'Delete', 'ds.serversEdit': 'Edit',
609
614
  'ds.serversNeedAddress': 'Enter a server address', 'ds.serversBadProtocol': 'Address must start with http:// or https://',
610
- 'ds.serversDuplicate': 'Address already exists', 'ds.serversAdded': 'Added', 'ds.serversEdited': 'Updated',
615
+ 'ds.serversDuplicate': 'The same address and token already exist', 'ds.serversAdded': 'Added', 'ds.serversEdited': 'Updated',
611
616
  'ds.serversRemovedActive': 'Removed active server, re-testing…',
612
617
  'ds.serversCurrentDesc': 'Current: {group} · {url} ({ms})',
613
- 'ds.serversPromptNote': 'Server note (optional):', 'ds.serversPromptEditUrl': 'Edit server URL:',
618
+ 'ds.serversPromptNote': 'Server note (optional):', 'ds.serversPromptEditUrl': 'Edit server URL:', 'ds.serversPromptEditToken': 'Edit server token (blank keeps the current token):',
614
619
  'ds.serversPromptEditNote': 'Edit note ({url}):', 'ds.serversPromptEditGroup': 'Group:',
615
620
  'ds.serversManualSelected': 'Switched to: {url}',
616
621
  'ds.speedTesting': 'Testing servers…', 'ds.speedSwitched': 'Switched to: {url} ({ms}ms)',