dsh-remote-plugin 0.8.2 → 0.8.3

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.
Files changed (105) hide show
  1. package/README.md +1 -1
  2. package/apk/dsh-remote.apk +0 -0
  3. package/gateway.cjs +66 -54
  4. package/insights.mjs +5 -3
  5. package/market.mjs +4 -1
  6. package/package.json +1 -1
  7. package/plugin-center.mjs +120 -7
  8. package/plugin-transaction.mjs +10 -3
  9. package/public/admin.html +11 -14
  10. package/public/admin.js +11 -23
  11. package/public/app.js +63 -37
  12. package/public/build.json +2 -2
  13. package/public/chat-copy.js +46 -0
  14. package/public/desktop/desktop.css +10 -0
  15. package/public/desktop/desktop.html +24 -11
  16. package/public/desktop/desktop.js +57 -13
  17. package/public/history.js +41 -6
  18. package/public/image-cache.js +141 -0
  19. package/public/image-preview.js +48 -5
  20. package/public/index.html +22 -21
  21. package/public/md.js +8 -2
  22. package/public/plugin-center.js +1 -1
  23. package/public/plugin.html +8 -2
  24. package/public/relay-settings.js +7 -6
  25. package/public/skins/blue-fish/DESIGN.md +24 -0
  26. package/public/skins/blue-fish/preview.html +11 -289
  27. package/public/skins/blue-fish/skin.css +95 -585
  28. package/public/skins/blue-fish/sparkles.svg +18 -0
  29. package/public/skins/bocchi/DESIGN.md +99 -0
  30. package/public/skins/bocchi/face.png +0 -0
  31. package/public/skins/bocchi/grain.png +0 -0
  32. package/public/skins/bocchi/icon-blush.png +0 -0
  33. package/public/skins/bocchi/icon-sleep.png +0 -0
  34. package/public/skins/bocchi/icon-smile.png +0 -0
  35. package/public/skins/bocchi/icon-star.png +0 -0
  36. package/public/skins/bocchi/icon-wink.png +0 -0
  37. package/public/skins/bocchi/icon.png +0 -0
  38. package/public/skins/bocchi/pattern-soft.png +0 -0
  39. package/public/skins/bocchi/pattern.png +0 -0
  40. package/public/skins/bocchi/preview.html +54 -0
  41. package/public/skins/bocchi/skin.css +233 -0
  42. package/public/skins/bocchi/stage-bg.png +0 -0
  43. package/public/skins/bocchi/stage-soft.png +0 -0
  44. package/public/skins/bocchi/stand.png +0 -0
  45. package/public/skins/bocchi/sticker-guitar.png +0 -0
  46. package/public/skins/kessoku/DESIGN.md +38 -0
  47. package/public/skins/kessoku/grain.png +0 -0
  48. package/public/skins/kessoku/skin.css +212 -0
  49. package/public/skins/kita/SOURCES.json +51 -0
  50. package/public/skins/kita/face.png +0 -0
  51. package/public/skins/kita/icon-live.png +0 -0
  52. package/public/skins/kita/icon-reddress.png +0 -0
  53. package/public/skins/kita/icon-seifuku.png +0 -0
  54. package/public/skins/kita/pattern.png +0 -0
  55. package/public/skins/kita/preview.html +55 -0
  56. package/public/skins/kita/skin.css +26 -0
  57. package/public/skins/kita/stand.png +0 -0
  58. package/public/skins/kita/sticker-live.png +0 -0
  59. package/public/skins/nijika/SOURCES.json +51 -0
  60. package/public/skins/nijika/face.png +0 -0
  61. package/public/skins/nijika/icon-live.png +0 -0
  62. package/public/skins/nijika/icon-reddress.png +0 -0
  63. package/public/skins/nijika/icon-seifuku.png +0 -0
  64. package/public/skins/nijika/pattern.png +0 -0
  65. package/public/skins/nijika/preview.html +55 -0
  66. package/public/skins/nijika/skin.css +25 -0
  67. package/public/skins/nijika/stand.png +0 -0
  68. package/public/skins/nijika/sticker-live.png +0 -0
  69. package/public/skins/penguin/DESIGN.md +33 -0
  70. package/public/skins/penguin/SOURCES.json +22 -0
  71. package/public/skins/penguin/aic-blueprint.svg +24 -0
  72. package/public/skins/penguin/endfield-triangles.svg +4 -0
  73. package/public/skins/penguin/face.png +0 -0
  74. package/public/skins/penguin/icon-blush.png +0 -0
  75. package/public/skins/penguin/icon-dizzy.png +0 -0
  76. package/public/skins/penguin/icon-laugh.png +0 -0
  77. package/public/skins/penguin/icon-sleep.png +0 -0
  78. package/public/skins/penguin/icon-smile.png +0 -0
  79. package/public/skins/penguin/icon-star.png +0 -0
  80. package/public/skins/penguin/icon-wink.png +0 -0
  81. package/public/skins/penguin/icon.png +0 -0
  82. package/public/skins/penguin/mascot.png +0 -0
  83. package/public/skins/penguin/pattern-night.png +0 -0
  84. package/public/skins/penguin/pattern.png +0 -0
  85. package/public/skins/penguin/preview.html +11 -0
  86. package/public/skins/penguin/skin.css +212 -0
  87. package/public/skins/ryo/SOURCES.json +51 -0
  88. package/public/skins/ryo/face.png +0 -0
  89. package/public/skins/ryo/icon-live.png +0 -0
  90. package/public/skins/ryo/icon-reddress.png +0 -0
  91. package/public/skins/ryo/icon-seifuku.png +0 -0
  92. package/public/skins/ryo/pattern.png +0 -0
  93. package/public/skins/ryo/preview.html +55 -0
  94. package/public/skins/ryo/skin.css +25 -0
  95. package/public/skins/ryo/stand.png +0 -0
  96. package/public/skins/ryo/sticker-live.png +0 -0
  97. package/public/sponsor-entry.js +22 -0
  98. package/public/styles.css +10 -0
  99. package/public/theme-picker.css +58 -0
  100. package/public/theme-vars.css +532 -5
  101. package/public/theme.js +111 -3
  102. package/public/update.json +8 -8
  103. package/public/version.json +1 -1
  104. package/public/workflow.css +2 -1
  105. package/public/workflow.js +24 -1
package/public/admin.js CHANGED
@@ -1052,7 +1052,13 @@ const THEME_META = [
1052
1052
  { id: 'light', sw: ['#F5F7F8', '#FFFFFF', '#176B87'] },
1053
1053
  { id: 'neutral', sw: ['#EEF1E8', '#FAFBF6', '#47643C'] },
1054
1054
  { id: 'mono', sw: ['#050505', '#333333', '#F5F5F5'] },
1055
- { id: 'fish', sw: ['#EAF6FF', '#FFFFFF', '#2F52D0'] }
1055
+ { id: 'fish', sw: ['#EAF6FF', '#FFFFFF', '#2F52D0'] },
1056
+ { id: 'penguin', sw: ['#EDF3FA', '#FFFFFF', '#2B6CB0'] },
1057
+ { id: 'penguin-night', sw: ['#10151B', '#1A222C', '#F2C230'] },
1058
+ { id: 'bocchi', sw: ['#FFD9E8', '#FFFFFF', '#D0105A'] },
1059
+ { id: 'nijika', sw: ['#FFF3D5', '#FFFFFF', '#94600C'] },
1060
+ { id: 'ryo', sw: ['#E9F1FA', '#FFFFFF', '#315D91'] },
1061
+ { id: 'kita', sw: ['#FFE9E5', '#FFFFFF', '#B6373C'] }
1056
1062
  ]
1057
1063
 
1058
1064
  function renderThemeBtn() {
@@ -1066,28 +1072,11 @@ function renderThemeBtn() {
1066
1072
  if (btn) btn.title = t('theme.' + cur)
1067
1073
  }
1068
1074
 
1069
- function renderThemeOptions() {
1070
- const box = $('theme-options')
1071
- if (!box) return
1072
- const cur = window.DSHTheme.get()
1073
- box.innerHTML = THEME_META.map(m => `
1074
- <button type="button" class="theme-option ${m.id === cur ? 'current' : ''}" data-theme="${m.id}" aria-pressed="${m.id === cur}" title="${t('theme.' + m.id)}">
1075
- <span class="theme-swatches">${m.sw.map(c => `<i style="background:${c}"></i>`).join('')}</span>
1076
- <span class="theme-name">${t('theme.' + m.id)}</span>
1077
- <span class="theme-check">${m.id === cur ? '✓' : ''}</span>
1078
- </button>`).join('')
1079
- box.querySelectorAll('.theme-option').forEach(btn =>
1080
- btn.addEventListener('click', () => {
1081
- window.DSHTheme.set(btn.dataset.theme)
1082
- renderThemeBtn()
1083
- renderThemeOptions()
1084
- $('modal-theme').classList.add('hidden')
1085
- }))
1086
- }
1087
-
1088
1075
  function openThemePanel() {
1089
- renderThemeOptions()
1090
- $('modal-theme').classList.remove('hidden')
1076
+ window.DSHTheme.openPicker({
1077
+ themes: THEME_META, label: id => t('theme.' + id), lang: I18N.lang,
1078
+ onSelect: id => { window.DSHTheme.set(id); renderThemeBtn() }
1079
+ })
1091
1080
  }
1092
1081
 
1093
1082
  function openDonateModal() {
@@ -1105,7 +1094,6 @@ $('btn-lang').addEventListener('click', () => {
1105
1094
  })
1106
1095
 
1107
1096
  $('btn-theme').addEventListener('click', openThemePanel)
1108
- $('theme-close').addEventListener('click', () => $('modal-theme').classList.add('hidden'))
1109
1097
  // 赞赏支持
1110
1098
  $('btn-donate').addEventListener('click', openDonateModal)
1111
1099
  $('donate-close').addEventListener('click', () => $('modal-donate').classList.add('hidden'))
package/public/app.js CHANGED
@@ -33,9 +33,9 @@ const CACHE = {
33
33
  get sessions() { return connectionCacheKey('sessions') },
34
34
  get history() { return connectionCacheKey('history') }
35
35
  }
36
- function connectionCacheKey(kind) {
36
+ function connectionCacheKey(kind, server=state.server, token=state.token) {
37
37
  const hash = new SHA256()
38
- hash.update(new TextEncoder().encode(JSON.stringify([state.server || location.origin, state.token])))
38
+ hash.update(new TextEncoder().encode(JSON.stringify([server || location.origin, token])))
39
39
  return kind + 'CacheV2:' + hash.hex()
40
40
  }
41
41
  function cacheRead(key, d = null) {
@@ -120,6 +120,7 @@ for (const key of ['server', 'token']) {
120
120
  if (next === value) return
121
121
  cancelHistoryLoad()
122
122
  value = next; connectionGeneration++
123
+ window.DshImagePreview?.reset?.()
123
124
  clearTimeout(state.refreshTimer); state.refreshTimer = null
124
125
  state.sessions = []; state.byId.clear(); state.pendingProjections.clear(); state.runtimeErrors = new Map()
125
126
  state.hostInfo = null
@@ -393,6 +394,7 @@ function openFeedbackModal(options = {}) {
393
394
  $('fb-include-crashes').checked = false
394
395
  $('fb-crash-details').open = false
395
396
  }
397
+ updateFeedbackLength()
396
398
  void loadCrashPreview()
397
399
  $('modal-feedback').classList.remove('hidden')
398
400
  setTimeout(() => $('fb-msg').focus(), 50)
@@ -418,6 +420,12 @@ async function loadCrashPreview() {
418
420
  if(crashes){const data=await read('/crash-logs');evidence.crashes=data.upload||data}
419
421
  if(connection.valid()&&generation===loadCrashPreview.generation)preview.textContent=JSON.stringify(evidence,null,2)
420
422
  }
423
+ function updateFeedbackLength() {
424
+ const length = $('fb-msg').value.trim().length, over = length > 20000
425
+ $('fb-length').textContent = I18N.lang === 'en' ? length + ' / 20000 characters' + (over ? ' — shorten before submitting; your text is preserved.' : '') : length + ' / 20000 字符' + (over ? ',请精简后提交;全文已保留。' : '')
426
+ $('fb-msg').setAttribute('aria-invalid', String(over))
427
+ $('fb-copy-draft').textContent = I18N.lang === 'en' ? 'Copy text' : '复制全文'
428
+ }
421
429
  async function submitFeedback() {
422
430
  const type = state.feedbackType || 'bug'
423
431
  const message = $('fb-msg').value.trim()
@@ -426,7 +434,7 @@ async function submitFeedback() {
426
434
  const includeCrashLogs = $('fb-include-crashes').checked
427
435
  const clientDiagnostics=includeDiagnostics?globalThis.DshDiagnostics?.report():null
428
436
  if (!message) { toast(t('feedback.empty'), 'err'); return }
429
- if (message.length > 2000) { toast(t('feedback.tooLong'), 'err'); return }
437
+ if (message.length > 20000) { toast(t('feedback.tooLong'), 'err'); return }
430
438
  const btn = $('fb-submit')
431
439
  btn.disabled = true
432
440
  const diagnostic=globalThis.DshDiagnostics?.start('feedback.submit')
@@ -447,10 +455,15 @@ async function submitFeedback() {
447
455
  status.classList.toggle('hidden',!clientDiagnostics)
448
456
  }
449
457
  else if (res.status === 429) { toast(json.retryAfter ? t('feedback.rateLimitedAt', { n: json.retryAfter }) : t('feedback.rateLimited'), 'err') }
458
+ else if (json.error === 'message too long' && Number.isSafeInteger(json.max)) { toast(I18N.lang === 'en' ? 'This gateway limits feedback to ' + json.max + ' characters. Your full text is preserved; update the host gateway.' : '当前网关正文上限为 ' + json.max + ' 字符,全文已保留;请更新主机网关。', 'err') }
459
+ else if (json.error === 'collector-message-limit') { toast(I18N.lang === 'en' ? 'The collector still limits feedback to ' + json.max + ' characters. Your full text is preserved; copy it before updating the collector.' : '收集器仍只支持 ' + json.max + ' 字符,全文已保留;可先复制全文,待收集器升级后再提交。', 'err') }
460
+ else if (json.error === 'collector-body-limit') { toast(I18N.lang === 'en' ? 'The collector rejected the request size. Your full text is preserved; copy it before updating the collector.' : '收集器请求体超限,全文已保留;请先复制,待收集器升级后再提交。', 'err') }
461
+ else if (json.error === 'feedback_service_unavailable') { toast(I18N.lang === 'en' ? 'Delivery is unconfirmed; it may have been received. Your text is preserved. Check before resubmitting.' : '发送结果未确认,可能已收到。全文已保留,请先核对,勿重复提交。', 'err') }
462
+ else if (json.error === 'feedback-content-unconfirmed') { toast(I18N.lang === 'en' ? 'The content receipt did not match. It may have been received; check before resubmitting. Your text is preserved.' : '正文保存回执不一致,可能已收到;请先核对,勿重复提交。全文已保留。', 'err') }
450
463
  else { toast(t('feedback.submitFailed', { msg: json.error || res.status }), 'err') }
451
464
  } catch(error) {
452
465
  diagnostic?.fail(error)
453
- toast(t('feedback.submitFailed', { msg: t('feedback.networkError') }), 'err')
466
+ toast(I18N.lang === 'en' ? 'Delivery is unconfirmed; it may have been received. Your text is preserved. Check before resubmitting.' : '发送结果未确认,可能已收到。全文已保留,请先核对,勿重复提交。', 'err')
454
467
  } finally {
455
468
  btn.disabled = false
456
469
  }
@@ -1184,6 +1197,8 @@ function editServer(id) {
1184
1197
  function removeServer(id) {
1185
1198
  const s = state.servers.find(x => x.id === id)
1186
1199
  if (!s) return
1200
+ void window.DshImageCache?.clear(historyCacheScope(s.url,serverToken(s)))
1201
+ void window.DshHistory.cacheClear(historyCacheScope(s.url,serverToken(s)))
1187
1202
  state.servers = state.servers.filter(x => x.id !== id)
1188
1203
  const wasActive = state.server === s.url && state.token === serverToken(s)
1189
1204
  // 清理该组手动指定
@@ -2785,7 +2800,11 @@ function restoreCachedSessionList() {
2785
2800
  }
2786
2801
 
2787
2802
  let conversationView = null
2788
- function historyCacheScope() { return CACHE.history }
2803
+ function historyCacheScope(server=state.server,token=state.token) { return connectionCacheKey('history',server,token) }
2804
+ function captureChatImage() {
2805
+ const connection=captureConnection(),sessionId=state.current
2806
+ return {scope:historyCacheScope(),valid:()=>connection.valid()&&state.current===sessionId}
2807
+ }
2789
2808
  function historySource(value) {
2790
2809
  state.history.source=value
2791
2810
  const el=$('history-source')
@@ -2965,6 +2984,10 @@ function canForkTurnResult() {
2965
2984
  return !!session && session.origin !== 'subagent' && session.formatStatus !== 'migration-required' && activeGatewayCapability('operations') === true
2966
2985
  }
2967
2986
  function bindTurnResultActions() {
2987
+ window.DshChatCopy?.bind($('history'), {
2988
+ capture: () => { const connection = captureConnection(), sessionId = state.current, history = state.history; return { history, valid: () => connection.valid() && state.current === sessionId && state.history === history } },
2989
+ copy: copyText, notice: toast,
2990
+ })
2968
2991
  window.DshTurnResults.bind($('history'), {
2969
2992
  capture: () => {
2970
2993
  const connection = captureConnection(), sessionId = state.current, history = state.history
@@ -3140,7 +3163,7 @@ function eventHtml(entry, ctx = {}) {
3140
3163
  // Inline tool blocks duplicate the separated tool events; when those events exist the
3141
3164
  // calls live in the activity group, so an assistant message with nothing else disappears.
3142
3165
  if (!body) return ''
3143
- inner = `<div class="msg ${esc(role)}" data-seq="${seq}"><div class="role">${esc(role === 'user' ? t('role.me') : t('role.dsh'))}</div>${body}</div>`
3166
+ inner = `<div class="msg ${esc(role)}" data-seq="${seq}"><div class="role">${esc(role === 'user' ? t('role.me') : t('role.dsh'))}${blocks.some(block => block?.type === 'text' && String(block.text ?? '').trim()) ? window.DshChatCopy?.button(seq, state.history) || '' : ''}</div>${body}</div>`
3144
3167
  }
3145
3168
  } else if (type === 'tool/call') {
3146
3169
  const name = data.name || data.toolName || t('tool.default')
@@ -3177,7 +3200,7 @@ function blockHtml(b,index=0,context={}) {
3177
3200
  if (b.type==='tool-call'||b.type==='tool-result') return window.DshActivity.tool({key,name:b.name||b.toolName,...(b.type==='tool-call'?{args:b.arguments??b.args??b.input}:{result:b.result??b.output??b.content??b,error:!!(b.error||b.ok===false||b.isError)})})
3178
3201
  }
3179
3202
  switch (b.type) {
3180
- case 'text': return window.DshActivity.hasVisibleText(b.text) ? `<div class="md">${window.mdToHtml ? window.mdToHtml(b.text ?? '', { fileLinks: true, imageLabel: t('block.image') }) : esc(b.text ?? '')}</div>` : ''
3203
+ case 'text': return window.DshActivity.hasVisibleText(b.text) ? `<div class="md">${window.mdToHtml ? window.mdToHtml(b.text ?? '', { fileLinks: true, imageLabel: t('block.image'), copyCode: true, copyCodeLabel: window.I18N?.lang === 'en' ? 'Copy code' : '复制代码' }) : esc(b.text ?? '')}</div>` : ''
3181
3204
  case 'file': if (typeof window !== 'undefined' && window.DshChatFiles) return window.DshChatFiles.render(b); return `<div class="tool">📎 ${esc(b.attachment?.name || b.name || 'file')} <small>${esc(b.attachment?.bytes ?? b.bytes ?? '')} bytes</small></div>`
3182
3205
  case 'image': {
3183
3206
  if (b.attachment && window.DshImagePreview) return window.DshImagePreview.attachmentHtml(b.attachment, t('block.image'), state.current)
@@ -3187,7 +3210,7 @@ function blockHtml(b,index=0,context={}) {
3187
3210
  case 'thinking':
3188
3211
  case 'reasoning':
3189
3212
  return `<details class="tool"><summary>${t('block.thinking')}</summary><div class="tool-text">${esc(truncate(String(b.text ?? b.content ?? safeJson(b)), 6000))}</div></details>`
3190
- case 'code': return `<pre>${esc(b.content ?? b.code ?? '')}</pre>`
3213
+ case 'code': return window.DshChatCopy?.code(b.content ?? b.code ?? '') || `<pre>${esc(b.content ?? b.code ?? '')}</pre>`
3191
3214
  case 'tool-call':
3192
3215
  return `<details class="tool"><summary>🔧 ${esc(b.name || b.toolName || t('block.toolCall'))}</summary><pre>${esc(truncate(safeJson(b.arguments ?? b), 4000))}</pre></details>`
3193
3216
  case 'tool-result':
@@ -7768,7 +7791,13 @@ const THEME_META = [
7768
7791
  { id: 'light', sw: ['#F5F7F8', '#FFFFFF', '#176B87'] },
7769
7792
  { id: 'neutral', sw: ['#EEF1E8', '#FAFBF6', '#47643C'] },
7770
7793
  { id: 'mono', sw: ['#050505', '#333333', '#F5F5F5'] },
7771
- { id: 'fish', sw: ['#EAF6FF', '#FFFFFF', '#2F52D0'] }
7794
+ { id: 'fish', sw: ['#EAF6FF', '#FFFFFF', '#2F52D0'] },
7795
+ { id: 'penguin', sw: ['#EDF3FA', '#FFFFFF', '#2B6CB0'] },
7796
+ { id: 'penguin-night', sw: ['#10151B', '#1A222C', '#F2C230'] },
7797
+ { id: 'bocchi', sw: ['#FFD9E8', '#FFFFFF', '#D0105A'] },
7798
+ { id: 'nijika', sw: ['#FFF3D5', '#FFFFFF', '#94600C'] },
7799
+ { id: 'ryo', sw: ['#E9F1FA', '#FFFFFF', '#315D91'] },
7800
+ { id: 'kita', sw: ['#FFE9E5', '#FFFFFF', '#B6373C'] }
7772
7801
  ]
7773
7802
 
7774
7803
  function renderThemeBtn() {
@@ -7776,28 +7805,11 @@ function renderThemeBtn() {
7776
7805
  if (btn) btn.textContent = t('theme.' + window.DSHTheme.get())
7777
7806
  }
7778
7807
 
7779
- function renderThemeOptions() {
7780
- const box = $('theme-options')
7781
- if (!box) return
7782
- const cur = window.DSHTheme.get()
7783
- box.innerHTML = THEME_META.map(m => `
7784
- <button type="button" class="theme-option ${m.id === cur ? 'current' : ''}" data-theme="${m.id}" aria-pressed="${m.id === cur}" title="${t('theme.' + m.id)}">
7785
- <span class="theme-swatches">${m.sw.map(c => `<i style="background:${c}"></i>`).join('')}</span>
7786
- <span class="theme-name">${t('theme.' + m.id)}</span>
7787
- <span class="theme-check">${m.id === cur ? '✓' : ''}</span>
7788
- </button>`).join('')
7789
- box.querySelectorAll('.theme-option').forEach(btn =>
7790
- btn.addEventListener('click', () => {
7791
- window.DSHTheme.set(btn.dataset.theme)
7792
- renderThemeBtn()
7793
- renderThemeOptions()
7794
- $('modal-theme').classList.add('hidden')
7795
- }))
7796
- }
7797
-
7798
7808
  function openThemePanel() {
7799
- renderThemeOptions()
7800
- $('modal-theme').classList.remove('hidden')
7809
+ window.DSHTheme.openPicker({
7810
+ themes: THEME_META, label: id => t('theme.' + id), lang: I18N.lang,
7811
+ onSelect: id => { window.DSHTheme.set(id); renderThemeBtn() }
7812
+ })
7801
7813
  }
7802
7814
 
7803
7815
  function openDonateModal() {
@@ -7851,7 +7863,6 @@ function bindUi() {
7851
7863
  $('token-desc').textContent = state.token ? t('token.savedLocal') : t('token.notSet')
7852
7864
  })
7853
7865
  $('btn-theme').addEventListener('click', openThemePanel)
7854
- $('theme-close').addEventListener('click', () => $('modal-theme').classList.add('hidden'))
7855
7866
  $('btn-donate').addEventListener('click', openDonateModal)
7856
7867
  $('donate-close').addEventListener('click', () => $('modal-donate').classList.add('hidden'))
7857
7868
  document.addEventListener('click', (e) => {
@@ -7964,6 +7975,8 @@ function bindUi() {
7964
7975
  $('home-doctor').addEventListener('click', openDoctor)
7965
7976
  $('fb-cancel').addEventListener('click', closeFeedbackModal)
7966
7977
  $('fb-submit').addEventListener('click', submitFeedback)
7978
+ $('fb-msg').addEventListener('input', updateFeedbackLength)
7979
+ $('fb-copy-draft').addEventListener('click', async () => { const ok = await copyText($('fb-msg').value); toast(I18N.lang === 'en' ? (ok ? 'Copied' : 'Copy failed') : (ok ? '已复制全文' : '复制失败,请重试'), ok ? 'ok' : 'err') })
7967
7980
  $('fb-include-diagnostics').addEventListener('change',()=>{void loadCrashPreview()})
7968
7981
  $('fb-include-crashes').addEventListener('change',()=>{void loadCrashPreview()})
7969
7982
  $('feedback-success-confirm').addEventListener('click', closeFeedbackSuccess)
@@ -8220,6 +8233,7 @@ function bindUi() {
8220
8233
  if (!confirm(t('settings.confirmReset'))) return
8221
8234
  clearTimeout(scheduleHistoryCacheSave._t)
8222
8235
  await window.DshHistory.cacheClear()
8236
+ await window.DshImageCache?.clear()
8223
8237
  LS.del('token'); LS.del('notify'); LS.del('server'); LS.del('mobileEnterAction'); LS.del('steerSendingEnabled'); LS.del('busySendMode'); resetAnnouncementStorage()
8224
8238
  if (bgBridge()?.saveBackgroundConfig) saveBgConfig(false)
8225
8239
  location.reload()
@@ -8319,7 +8333,7 @@ function bindUi() {
8319
8333
  bindFsPullRefresh()
8320
8334
 
8321
8335
  bindRail()
8322
- window.DshImagePreview?.configure?.({ resolvePath: chatImageRequest, resolveAttachment: chatImageAttachment })
8336
+ window.DshImagePreview?.configure?.({ resolvePath: chatImageRequest, resolveAttachment: chatImageAttachment, capture: captureChatImage })
8323
8337
 
8324
8338
  for (const id of ['history', 'question-body']) window.DshChatFiles?.bind($(id), () => {
8325
8339
  const c=captureConnection(),sessionId=id==='history'?state.current:state.questionModal?.sessionId
@@ -8467,19 +8481,29 @@ function mountOnboarding() {
8467
8481
  async function clearWorkflowData(kind) {
8468
8482
  const english = window.I18N?.lang === 'en'
8469
8483
  const messages = { history: english ? 'Clear cached conversation history on this device?' : '清除这台设备的会话历史缓存?主机记录保留。',
8470
- connection: english ? 'Remove the current address and its saved credential? Other addresses remain.' : '移除当前地址和保存的凭证?其他连接条目保留。',
8484
+ images: english ? 'Clear cached images on this device? Images will download again when viewed.' : '清除本机图片缓存?再次查看时会重新下载。',
8485
+ caches: english ? 'Clear history and image caches? Connections and preferences will be kept.' : '清除本机历史和图片缓存?保留连接、凭证与偏好设置。',
8486
+ connection: english ? 'Remove this connection, credential and its caches? Other connections will be kept.' : '移除当前地址、保存的凭证及其缓存?其他连接条目保留。',
8471
8487
  all: english ? 'Clear all Remote settings and credentials on this device and stop background reminders?' : '清除本机全部 Remote 配置与凭证,并停止后台轮询和提醒?主机数据保留。' }
8472
8488
  if (!confirm(messages[kind])) return
8473
- if (kind === 'history') {
8489
+ if (['history','images','caches'].includes(kind)) {
8474
8490
  clearTimeout(scheduleHistoryCacheSave._t)
8475
- await window.DshHistory.cacheClear()
8476
- for (let i=localStorage.length-1;i>=0;i--) { const key=localStorage.key(i); if (/^dsh-remote-(?:sessions|history)/.test(key)) localStorage.removeItem(key) }
8477
- return toast(english ? 'History cache cleared' : '历史缓存已清除', 'ok')
8491
+ if(kind!=='images')cancelHistoryLoad()
8492
+ const results=[]
8493
+ if(kind!=='images')results.push(await window.DshHistory.cacheClear())
8494
+ if(kind!=='history')results.push(await window.DshImageCache.clear())
8495
+ if(results.includes(false))return toast(english?'Some caches could not be cleared. Retry shortly.':'部分缓存未能清除,请稍后重试。','err')
8496
+ return toast(english ? 'Cache cleared' : '缓存已清除', 'ok')
8478
8497
  }
8479
8498
  window.NativeBackground?.saveBackgroundConfig?.(JSON.stringify({ enabled:false, base:'', token:'', clientId:'', intervalMin:1, notifyTaskDone:false }))
8480
8499
  window.NativeBackground?.savePeakReminderConfig?.(JSON.stringify({ enabled:false }))
8481
8500
  window.NativeBackground?.setPendingNotificationsEnabled?.(false)
8482
8501
  if (kind === 'connection') {
8502
+ const connection=captureConnection(),scope=historyCacheScope()
8503
+ cancelHistoryLoad()
8504
+ await window.DshImageCache.clear(scope)
8505
+ await window.DshHistory.cacheClear(scope)
8506
+ if(!connection.valid())return
8483
8507
  const current = currentServerEntry()
8484
8508
  if (current) state.servers = state.servers.filter(server => server.id !== current.id)
8485
8509
  state.groupActive[state.activeGroup] = ''
@@ -8488,8 +8512,10 @@ async function clearWorkflowData(kind) {
8488
8512
  return
8489
8513
  }
8490
8514
  await cancelPeakReminders()
8515
+ cancelHistoryLoad()
8491
8516
  clearTimeout(scheduleHistoryCacheSave._t)
8492
8517
  await window.DshHistory.cacheClear()
8518
+ await window.DshImageCache.clear()
8493
8519
  resetAnnouncementStorage()
8494
8520
  window.DshWorkflow.clearStorage()
8495
8521
  location.reload()
package/public/build.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "schema": 1,
3
- "version": "0.8.2",
4
- "buildId": "8377f1e6974af85893b9a4ad046207f61aad317ec44a1cc8d56460d758109bb9"
3
+ "version": "0.8.3",
4
+ "buildId": "3fded6fb0396b7b688f815ad40b1c440c512b3aac9ca322bcfb187fe4be6ef65"
5
5
  }
@@ -0,0 +1,46 @@
1
+ /* Explicit clipboard actions over the loaded history; no duplicate source cache. */
2
+ ;(function(root) {
3
+ 'use strict'
4
+ const scopes = new WeakMap(); let nextScope = 0
5
+ const label = (zh, en) => root.I18N?.lang === 'en' ? en : zh
6
+ const esc = value => String(value ?? '').replace(/[&<>"']/g, c => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]))
7
+ function scope(history) { if (!scopes.has(history)) scopes.set(history, String(++nextScope)); return scopes.get(history) }
8
+ function messageText(entries, seq) {
9
+ const entry = entries.find(row => String(row.seq) === String(seq))
10
+ if (!['user/message', 'assistant/message'].includes(entry?.event?.type)) return ''
11
+ const data = entry.event.data || {}, blocks = data.message?.content || data.content || []
12
+ return Array.isArray(blocks) ? blocks.filter(block => block?.type === 'text').map(block => String(block.text ?? '')).join('\n\n') : ''
13
+ }
14
+ function button(seq, history) {
15
+ return `<button type="button" class="chat-copy-button" data-chat-copy-markdown="${esc(seq)}" data-chat-copy-scope="${scope(history)}">${esc(label('复制 Markdown', 'Copy Markdown'))}</button>`
16
+ }
17
+ function code(source) {
18
+ return `<div class="chat-code"><button type="button" class="chat-copy-button" data-chat-copy-code>${esc(label('复制代码', 'Copy code'))}</button><pre><code>${esc(source)}</code></pre></div>`
19
+ }
20
+ function bind(box, host) {
21
+ if (!box || box.dataset.chatCopyBound) return
22
+ box.dataset.chatCopyBound = '1'
23
+ box.addEventListener('click', async event => {
24
+ const button = event.target.closest?.('[data-chat-copy-markdown],[data-chat-copy-code]')
25
+ if (!button || !box.contains(button) || button.disabled) return
26
+ const context = host.capture()
27
+ if (!context.valid()) return
28
+ let source
29
+ if (button.hasAttribute('data-chat-copy-markdown')) {
30
+ if (button.dataset.chatCopyScope !== scope(context.history)) return
31
+ source = messageText(context.history.visible, button.dataset.chatCopyMarkdown)
32
+ } else source = button.closest('.chat-code')?.querySelector('pre code')?.textContent
33
+ if (source == null || source === '') return
34
+ event.preventDefault(); event.stopPropagation()
35
+ button.disabled = true
36
+ try {
37
+ const ok = await host.copy(source)
38
+ if (context.valid()) host.notice(label(ok ? '已复制' : '复制失败,请重试', ok ? 'Copied' : 'Copy failed. Please retry.'), ok ? 'ok' : 'err')
39
+ } catch { if (context.valid()) host.notice(label('复制失败,请重试', 'Copy failed. Please retry.'), 'err') }
40
+ finally { button.disabled = false }
41
+ })
42
+ }
43
+ const api = { scope, messageText, button, code, bind }
44
+ if (typeof module !== 'undefined' && module.exports) module.exports = api
45
+ else root.DshChatCopy = api
46
+ })(typeof window === 'undefined' ? globalThis : window)
@@ -825,3 +825,13 @@ input:focus-visible, select:focus-visible, textarea:focus-visible {
825
825
  .chat-file { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:12px; border:1px solid var(--dsr-line); border-radius:12px; margin:8px 0; }
826
826
  .chat-file-name { min-width:0; flex:1; overflow-wrap:break-word; }.chat-file small { color:var(--dsr-muted); }
827
827
  .chat-file button { flex-shrink:0; min-height:44px; padding:8px 12px; border:1px solid var(--dsr-accent-line); border-radius:10px; color:var(--dsr-accent-strong); background:var(--dsr-accent-soft); font:inherit; cursor:pointer; }
828
+
829
+ /* Conversation copy controls remain reachable on touch and keyboard. */
830
+ .ds-msg .role { display:flex; align-items:center; justify-content:space-between; gap:12px; opacity:1; }
831
+ .chat-copy-button { min-height:36px; padding:4px 9px; border:1px solid var(--dsr-line); border-radius:8px; background:var(--dsr-panel); color:var(--dsr-muted); font:inherit; font-size:11px; cursor:pointer; }
832
+ .chat-copy-button:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
833
+ .chat-copy-button:disabled { opacity:.6; cursor:wait; }
834
+ .chat-code { position:relative; margin:8px 0; }
835
+ .chat-code > .chat-copy-button { display:block; margin-left:auto; margin-bottom:3px; }
836
+ .feedback-length { margin:4px 0; color:var(--dsr-muted); font-size:12px; }
837
+ #fb-msg[aria-invalid="true"] { outline:2px solid var(--dsr-danger, #dc4444); }
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>DSH Remote · 桌面</title>
7
- <script>/* 首帧前应用皮肤 */ (function(){try{var t=localStorage.getItem('dshTheme');if(t!=='default'&&t!=='dark'&&t!=='light'&&t!=='neutral'&&t!=='mono'&&t!=='fish'){t='fish'}}catch(e){t='fish'}document.documentElement.setAttribute('data-theme',t)})()</script>
7
+ <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>
8
8
  <link rel="stylesheet" href="../theme-vars.css">
9
9
  <link rel="stylesheet" href="desktop.css">
10
10
  <link rel="stylesheet" href="../plugin-center.css">
@@ -16,6 +16,13 @@
16
16
  <link rel="stylesheet" href="../relay-settings.css">
17
17
  <link rel="stylesheet" href="../subagents.css">
18
18
  <link rel="stylesheet" href="../skins/blue-fish/skin.css">
19
+ <link rel="stylesheet" href="../skins/penguin/skin.css">
20
+ <link rel="stylesheet" href="../skins/bocchi/skin.css">
21
+ <link rel="stylesheet" href="../skins/kessoku/skin.css">
22
+ <link rel="stylesheet" href="../skins/nijika/skin.css">
23
+ <link rel="stylesheet" href="../skins/ryo/skin.css">
24
+ <link rel="stylesheet" href="../skins/kita/skin.css">
25
+ <link rel="stylesheet" href="../theme-picker.css">
19
26
  </head>
20
27
  <body>
21
28
  <div class="ds-app" id="ds-app">
@@ -326,7 +333,7 @@
326
333
  <div class="ds-setting-name" data-i18n="ds.groupTheme">皮肤</div>
327
334
  </div>
328
335
  <div class="ds-setting-row">
329
- <div><div class="ds-setting-name" data-i18n="ds.themeTitle">皮肤</div><div class="ds-setting-desc" data-i18n="ds.themeDesc">六套皮肤</div></div>
336
+ <div><div class="ds-setting-name" data-i18n="ds.themeTitle">皮肤</div><div class="ds-setting-desc" data-i18n="ds.themeDesc">十二套皮肤</div></div>
330
337
  <button id="btn-theme" class="ds-btn">默认深空</button>
331
338
  </div>
332
339
  </div>
@@ -435,7 +442,9 @@
435
442
  <button class="ds-fb-chip" data-fb-type="suggestion" data-i18n="ds.feedbackTypeSuggestion">建议</button>
436
443
  <button class="ds-fb-chip" data-fb-type="other" data-i18n="ds.feedbackTypeOther">其他</button>
437
444
  </div>
438
- <textarea id="fb-msg" class="ds-fb-textarea" rows="5" maxlength="2000" data-i18n-placeholder="ds.feedbackMessagePlaceholder" placeholder="请描述遇到的问题或建议(必填,≤2000 字)"></textarea>
445
+ <textarea id="fb-msg" class="ds-fb-textarea" rows="5" aria-describedby="fb-length" data-i18n-placeholder="ds.feedbackMessagePlaceholder" placeholder="请描述遇到的问题或建议(必填,最多 20000 字符)"></textarea>
446
+ <p id="fb-length" class="feedback-length" role="status" aria-live="polite"></p>
447
+ <button id="fb-copy-draft" type="button" class="ds-btn ds-fb-copy-draft">复制全文</button>
439
448
  <input id="fb-contact" class="ds-fb-input" maxlength="200" data-i18n-placeholder="ds.feedbackContactPlaceholder" placeholder="联系方式(可选):邮箱 / 微信 / B站 ID">
440
449
  <label class="ds-fb-diagnostics"><input id="fb-include-diagnostics" type="checkbox"> <span data-i18n="ds.feedbackIncludeDiagnostics">附带客户端与网关诊断(可选)</span><small data-i18n="ds.feedbackDiagnosticsPrivacy">上传客户端操作与错误位置、存储占用、版本和网关链路状态;不含令牌、Cookie、对话正文、答案或完整路径。可在下方预览。</small></label>
441
450
  <label class="ds-fb-diagnostics"><input id="fb-include-crashes" type="checkbox"> <span data-i18n="ds.feedbackIncludeCrashes">附带崩溃日志摘要(可选)</span><small data-i18n="ds.feedbackCrashPrivacy">默认仅在本机记录。勾选后上传最近 3 条退出、重启和错误位置摘要,不含对话、密钥或完整路径。</small></label>
@@ -537,6 +546,7 @@
537
546
  </div>
538
547
 
539
548
  <!-- 赞赏支持模态 -->
549
+ <script src="../sponsor-entry.js" defer></script>
540
550
  <div id="modal-donate" class="ds-modal hidden" role="dialog" aria-modal="true">
541
551
  <div class="ds-modal-card">
542
552
  <div class="ds-modal-title" data-i18n="ds.donate">赞赏支持</div>
@@ -618,7 +628,7 @@
618
628
  'ds.back': '‹ 返回', 'ds.emptyGroup': '暂无设置项',
619
629
  'ds.serversTitle': '服务器(分组)', 'ds.speedTest': '测速', 'ds.currentGroup': '当前组',
620
630
  'ds.addGroup': '+ 组', 'ds.addServer': '添加', 'ds.saveToken': '保存并连接', 'ds.tokenTitle': '访问令牌', 'ds.copyToken': '复制',
621
- 'ds.themeTitle': '皮肤', 'ds.themeDesc': '默认深空 / 落日 / 易北爱乐厅 / 草原孤塔 / 黑曜白 / 蓝色大肥鱼', 'ds.langTitle': '语言 / Language',
631
+ 'ds.themeTitle': '皮肤', 'ds.themeDesc': '默认深空 / 落日 / 易北爱乐厅 / 草原孤塔 / 黑曜白 / 蓝色大肥鱼 / 企鹅女管·白昼 / 企鹅女管·极夜 / 波奇酱 / 伊地知虹夏 / 山田凉 / 喜多郁代', 'ds.langTitle': '语言 / Language',
622
632
  'ds.feedbackTitle': '反馈渠道', 'ds.feedbackDesc': 'GitHub / Gitee / B站:反馈 bug、提建议、唠嗑',
623
633
  'ds.feedback': '反馈', 'ds.feedbackGithubDesc': '反馈 bug / 提建议', 'ds.feedbackGiteeDesc': '国内镜像,无需代理',
624
634
  'ds.feedbackDoctor': 'AI 排查问题', 'ds.feedbackDoctorDesc': '使用你的 DSH 和模型,只读诊断',
@@ -626,10 +636,10 @@
626
636
  'ds.feedbackCopied': '项目链接已复制', 'ds.feedbackCopyFailed': '复制失败,请手动复制',
627
637
  'ds.feedbackWrite': '写反馈', 'ds.feedbackWriteDesc': 'App 内直接提交', 'ds.feedbackModalTitle': '写反馈', 'ds.feedbackIncludeDiagnostics': '附带客户端与网关诊断(可选)', 'ds.feedbackDiagnosticsPrivacy': '上传客户端操作与错误位置、存储占用、版本和网关链路状态;不含令牌、Cookie、对话正文、答案或完整路径。可在下方预览。', 'ds.feedbackIncludeCrashes': '附带崩溃日志摘要(可选)', 'ds.feedbackCrashPrivacy': '默认仅在本机记录。勾选后上传最近 3 条退出、重启和错误位置摘要,不含对话、密钥或完整路径。', 'ds.feedbackCrashPreview': '查看拟上传的日志摘要', 'ds.feedbackCrashLoading': '读取本机日志…', 'ds.feedbackCrashUnavailable': '当前网关暂时无法读取日志,请更新网关或稍后重试。',
628
638
  'ds.feedbackTypeBug': 'Bug', 'ds.feedbackTypeSuggestion': '建议', 'ds.feedbackTypeOther': '其他',
629
- 'ds.feedbackMessagePlaceholder': '请描述遇到的问题或建议(必填,≤2000 字)',
639
+ 'ds.feedbackMessagePlaceholder': '请描述遇到的问题或建议(必填,最多 20000 字符)',
630
640
  'ds.feedbackContactPlaceholder': '联系方式(可选):邮箱 / 微信 / B站 ID',
631
641
  'ds.feedbackCancel': '取消', 'ds.feedbackSubmit': '提交',
632
- 'ds.feedbackEmpty': '请填写描述内容', 'ds.feedbackTooLong': '描述不能超过 2000 字',
642
+ 'ds.feedbackEmpty': '请填写描述内容', 'ds.feedbackTooLong': '描述不能超过 20000 字符,全文已保留',
633
643
  'ds.feedbackSubmitted': '已提交,感谢反馈',
634
644
  'ds.feedbackRateLimited': '提交太频繁,请 5 分钟后再试', 'ds.feedbackSubmitFailed': '提交失败:{msg}', 'ds.feedbackNetworkError': '网络错误',
635
645
  'ds.questionTitle': '回答问题', 'ds.ignore': '忽略', 'ds.submit': '提交',
@@ -673,7 +683,7 @@
673
683
  'ds.groupsConfirmDelete': '删除组「{group}」?组内服务器将归入默认组。', 'ds.groupsDeleted': '组已删除',
674
684
  'ds.groupsDrawerOpen': '切换服务器组', 'ds.groupsDrawerClose': '关闭组列表', 'ds.groupsDrawerEyebrow': '快速切换', 'ds.groupsDrawerTitle': '切换服务器组', 'ds.groupsDrawerCurrent': '当前连接组',
675
685
  'ds.groupsDrawerManage': '管理服务器与组', 'ds.groupsDrawerManageDesc': '编辑、测速和调整组', 'ds.groupsServerCount': '{count} 台服务器',
676
- 'ds.theme.default': '默认深空', 'ds.theme.dark': '落日', 'ds.theme.light': '易北爱乐厅', 'ds.theme.neutral': '草原孤塔', 'ds.theme.mono': '黑曜白', 'ds.theme.fish': '蓝色大肥鱼',
686
+ 'ds.theme.default': '默认深空', 'ds.theme.dark': '落日', 'ds.theme.light': '易北爱乐厅', 'ds.theme.neutral': '草原孤塔', 'ds.theme.mono': '黑曜白', 'ds.theme.fish': '蓝色大肥鱼', 'ds.theme.penguin': '企鹅女管·白昼', 'ds.theme.penguin-night': '企鹅女管·极夜', 'ds.theme.bocchi': '波奇酱', 'ds.theme.nijika': '伊地知虹夏', 'ds.theme.ryo': '山田凉', 'ds.theme.kita': '喜多郁代',
677
687
  'ds.role.me': '我', 'ds.role.dsh': 'DSH', 'ds.toolDefault': '工具',
678
688
  'ds.eventSystemReminder': '系统提示',
679
689
  'ds.questionOptions': '选项', 'ds.questionCustom': '自定义回答',
@@ -747,7 +757,7 @@
747
757
  'ds.back': '‹ Back', 'ds.emptyGroup': 'No settings here',
748
758
  'ds.serversTitle': 'Servers (groups)', 'ds.speedTest': 'Test', 'ds.currentGroup': 'Current group',
749
759
  'ds.addGroup': '+ Group', 'ds.addServer': 'Add', 'ds.saveToken': 'Save and connect', 'ds.tokenTitle': 'Access token', 'ds.copyToken': 'Copy',
750
- 'ds.themeTitle': 'Theme', 'ds.themeDesc': 'Deep Space / Sunset / Elbphilharmonie / Prairie Tower / Monochrome / Blue Fat Fish', 'ds.langTitle': 'Language',
760
+ 'ds.themeTitle': 'Theme', 'ds.themeDesc': 'Deep Space / Sunset / Elbphilharmonie / Prairie Tower / Monochrome / Blue Fat Fish / Penguin Admin Day / Penguin Admin Night / Bocchi / Nijika / Ryo / Kita', 'ds.langTitle': 'Language',
751
761
  'ds.feedbackTitle': 'Feedback', 'ds.feedbackDesc': 'GitHub / Gitee / Bilibili: report bugs, suggest features, or just chat',
752
762
  'ds.feedback': 'Feedback', 'ds.feedbackGithubDesc': 'Report bugs · suggest features', 'ds.feedbackGiteeDesc': 'Mirror in China, no proxy needed',
753
763
  'ds.feedbackDoctor': 'AI diagnosis', 'ds.feedbackDoctorDesc': 'Read-only diagnosis with your own DSH and model',
@@ -756,10 +766,10 @@
756
766
  'ds.contributors': 'Contributors', 'ds.contributorsThanks': 'Thank you to everyone who helps make DSH Remote better.', 'ds.contributorsAll': 'View all contributions ↗',
757
767
  'ds.feedbackWrite': 'Write feedback', 'ds.feedbackWriteDesc': 'Submit from the app', 'ds.feedbackModalTitle': 'Write feedback', 'ds.feedbackIncludeDiagnostics': 'Include client and gateway diagnostics (optional)', 'ds.feedbackDiagnosticsPrivacy': 'Uploads operation stages, error locations, storage sizes, versions and gateway status. No credentials, conversation bodies, answers or full paths. Preview below.', 'ds.feedbackIncludeCrashes': 'Include crash summary (optional)', 'ds.feedbackCrashPrivacy': 'Recorded locally by default. Opt in to upload up to 3 recent exit, restart and error-location records. No conversations, credentials or full paths.', 'ds.feedbackCrashPreview': 'Preview the log summary to upload', 'ds.feedbackCrashLoading': 'Reading local logs…', 'ds.feedbackCrashUnavailable': 'Logs are unavailable. Update the gateway or try again later.',
758
768
  'ds.feedbackTypeBug': 'Bug', 'ds.feedbackTypeSuggestion': 'Suggestion', 'ds.feedbackTypeOther': 'Other',
759
- 'ds.feedbackMessagePlaceholder': 'Describe the bug or suggestion (required, ≤2000 chars)',
769
+ 'ds.feedbackMessagePlaceholder': 'Describe the bug or suggestion (required, up to 20000 characters)',
760
770
  'ds.feedbackContactPlaceholder': 'Contact (optional): email / WeChat / Bilibili ID',
761
771
  'ds.feedbackCancel': 'Cancel', 'ds.feedbackSubmit': 'Submit',
762
- 'ds.feedbackEmpty': 'Please fill in the description', 'ds.feedbackTooLong': 'Description must be ≤2000 characters',
772
+ 'ds.feedbackEmpty': 'Please fill in the description', 'ds.feedbackTooLong': 'Description must be within 20000 characters; your text is preserved',
763
773
  'ds.feedbackSubmitted': 'Submitted — thanks!',
764
774
  'ds.feedbackRateLimited': 'Too frequent, try again in 5 minutes', 'ds.feedbackSubmitFailed': 'Submit failed: {msg}', 'ds.feedbackNetworkError': 'Network error',
765
775
  'ds.questionTitle': 'Answer question', 'ds.ignore': 'Ignore', 'ds.submit': 'Submit',
@@ -803,7 +813,7 @@
803
813
  'ds.groupsConfirmDelete': 'Delete group "{group}"? Its servers move to the default group.', 'ds.groupsDeleted': 'Group deleted',
804
814
  'ds.groupsDrawerOpen': 'Switch server group', 'ds.groupsDrawerClose': 'Close group list', 'ds.groupsDrawerEyebrow': 'QUICK SWITCH', 'ds.groupsDrawerTitle': 'Switch server group', 'ds.groupsDrawerCurrent': 'Current connection group',
805
815
  'ds.groupsDrawerManage': 'Manage servers and groups', 'ds.groupsDrawerManageDesc': 'Edit, test, and organize groups', 'ds.groupsServerCount': '{count} servers',
806
- 'ds.theme.default': 'Deep Space', 'ds.theme.dark': 'Sunset', 'ds.theme.light': 'Elbphilharmonie', 'ds.theme.neutral': 'Prairie Tower', 'ds.theme.mono': 'Monochrome', 'ds.theme.fish': 'Blue Fat Fish',
816
+ 'ds.theme.default': 'Deep Space', 'ds.theme.dark': 'Sunset', 'ds.theme.light': 'Elbphilharmonie', 'ds.theme.neutral': 'Prairie Tower', 'ds.theme.mono': 'Monochrome', 'ds.theme.fish': 'Blue Fat Fish', 'ds.theme.penguin': 'Penguin Admin Day', 'ds.theme.penguin-night': 'Penguin Admin Night', 'ds.theme.bocchi': 'Bocchi', 'ds.theme.nijika': 'Nijika', 'ds.theme.ryo': 'Ryo', 'ds.theme.kita': 'Kita',
807
817
  'ds.role.me': 'Me', 'ds.role.dsh': 'DSH', 'ds.toolDefault': 'tool',
808
818
  'ds.eventSystemReminder': 'System reminder',
809
819
  'ds.questionOptions': 'Options', 'ds.questionCustom': 'Custom answer',
@@ -862,6 +872,8 @@
862
872
  <script src="../history.js"></script>
863
873
  <script src="../activity.js"></script>
864
874
  <script src="../turn-results.js"></script>
875
+ <script src="../image-cache.js"></script>
876
+ <script src="../chat-copy.js"></script>
865
877
  <script src="../image-preview.js"></script>
866
878
  <script src="../link-check.js"></script>
867
879
  <script src="../network.js"></script>
@@ -877,6 +889,7 @@
877
889
  <script src="../file-inbox.js"></script>
878
890
  <link rel="stylesheet" href="../session-deck.css">
879
891
  <script src="../session-deck.js"></script>
892
+ <script src="../theme.js"></script>
880
893
  <script src="desktop.js"></script>
881
894
  </body>
882
895
  </html>