@wendongfly/myhi 1.3.73 → 1.3.75

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 (2) hide show
  1. package/dist/chat.html +7 -2
  2. package/package.json +1 -1
package/dist/chat.html CHANGED
@@ -601,7 +601,7 @@
601
601
  <textarea id="va-result" class="slash-inp" rows="6" style="resize:vertical;font-size:0.82rem;line-height:1.5;font-family:monospace"></textarea>
602
602
  </div>
603
603
  <button id="va-record-btn"
604
- style="background:#1f6feb;color:#fff;font-size:1.1rem;font-weight:700;padding:1.1rem;margin:0 0.2rem 0.3rem;border:none;border-radius:12px;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none">
604
+ style="background:#1f6feb;color:#fff;font-size:1.1rem;font-weight:700;padding:1.1rem;margin:0 0.2rem 0.3rem;border:none;border-radius:12px;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none">
605
605
  按住说话
606
606
  </button>
607
607
  <div style="text-align:center;margin:0 0.2rem 0.3rem">
@@ -3292,11 +3292,15 @@
3292
3292
  try {
3293
3293
  const fd = new FormData();
3294
3294
  fd.append('audio', file, file.name);
3295
- const resp = await fetch('/api/voice-transcribe', { method: 'POST', body: fd });
3295
+ const resp = await fetch(`/api/voice-transcribe?sessionId=${SESSION_ID}`, { method: 'POST', body: fd });
3296
3296
  if (resp.status === 503) {
3297
3297
  _vaSetStatus('ASR 服务未配置,请在设置中填写语音识别地址', '#f85149');
3298
3298
  return;
3299
3299
  }
3300
+ if (!resp.ok && resp.headers.get('content-type')?.includes('text/html')) {
3301
+ _vaSetStatus('认证失败,请刷新页面重新登录', '#f85149');
3302
+ return;
3303
+ }
3300
3304
  const data = await resp.json();
3301
3305
  if (data.text?.trim()) {
3302
3306
  _vaLines.push(data.text.trim());
@@ -3315,6 +3319,7 @@
3315
3319
  };
3316
3320
 
3317
3321
  // 大录音按钮:手机长按、桌面单击切换
3322
+ _vaBtn.addEventListener('contextmenu', e => e.preventDefault());
3318
3323
  _vaBtn.addEventListener('pointerdown', (e) => {
3319
3324
  if (!_isTouchDevice()) return; // 桌面由 click 事件处理,pointer 不介入
3320
3325
  e.preventDefault();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wendongfly/myhi",
3
- "version": "1.3.73",
3
+ "version": "1.3.75",
4
4
  "description": "Web-based terminal sharing with chat UI — control your terminal from phone via LAN/Tailscale",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",