@wendongfly/myhi 1.3.68 → 1.3.70

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 +27 -5
  2. package/package.json +1 -1
package/dist/chat.html CHANGED
@@ -604,10 +604,14 @@
604
604
  </button>
605
605
  <div id="va-status" style="text-align:center;font-size:0.78rem;color:#8b949e;min-height:1.3em;margin-bottom:0.2rem"></div>
606
606
  <div style="display:flex;gap:0.4rem;padding:0 0.2rem">
607
+ <button id="va-direct-btn" class="action-sheet-cancel" onclick="vaDirectSend()"
608
+ style="flex:1;background:#238636;color:#fff;font-weight:600;margin-bottom:0">直接发送</button>
607
609
  <button id="va-organize-btn" class="action-sheet-cancel" onclick="vaOrganize()"
608
610
  style="flex:1;background:#7c3aed;color:#fff;font-weight:600;margin-bottom:0">整理成需求</button>
611
+ </div>
612
+ <div id="va-result-action" style="display:none;padding:0 0.2rem">
609
613
  <button id="va-send-btn" class="action-sheet-cancel" onclick="vaSend()"
610
- style="flex:1;background:#1f6feb;color:#fff;font-weight:600;margin-bottom:0;display:none">发送到对话</button>
614
+ style="background:#1f6feb;color:#fff;font-weight:600;margin-bottom:0">发送到对话</button>
611
615
  </div>
612
616
  <button class="action-sheet-cancel" onclick="closeVaSheet()" style="margin-top:0.4rem">关闭</button>
613
617
  </div>
@@ -3132,11 +3136,23 @@
3132
3136
  : '点击大按钮开始录音,再次点击停止,多轮累积后整理成需求...';
3133
3137
  el.innerHTML = `<span style="color:#8b949e">${hint}</span>`;
3134
3138
  } else {
3135
- el.textContent = _vaLines.map((t, i) => `[${i + 1}] ${t}`).join('\n\n');
3139
+ el.innerHTML = _vaLines.map((t, i) =>
3140
+ `<div style="display:flex;gap:0.4rem;margin-bottom:0.45rem;align-items:flex-start">` +
3141
+ `<span style="color:#8b949e;font-size:0.72rem;min-width:1.6em;padding-top:0.15rem;flex-shrink:0">[${i+1}]</span>` +
3142
+ `<span style="flex:1;word-break:break-all;line-height:1.55">${escHtml(t)}</span>` +
3143
+ `<button onclick="vaDeleteLine(${i})" style="background:none;border:none;color:#6e7681;font-size:1rem;cursor:pointer;padding:0 0.15rem;flex-shrink:0;line-height:1" title="删除此段">×</button>` +
3144
+ `</div>`
3145
+ ).join('');
3136
3146
  el.scrollTop = el.scrollHeight;
3137
3147
  }
3138
3148
  }
3139
3149
 
3150
+ window.vaDeleteLine = function(i) {
3151
+ _vaLines.splice(i, 1);
3152
+ _vaRender();
3153
+ _vaSetStatus(_vaLines.length ? `已删除,剩余 ${_vaLines.length} 段` : '');
3154
+ };
3155
+
3140
3156
  async function _vaStart() {
3141
3157
  if (_vaActive) return;
3142
3158
  if (!navigator.mediaDevices?.getUserMedia) {
@@ -3205,11 +3221,17 @@
3205
3221
  window.vaClear = function() {
3206
3222
  _vaLines = [];
3207
3223
  document.getElementById('va-result-wrap').style.display = 'none';
3208
- document.getElementById('va-send-btn').style.display = 'none';
3209
- document.getElementById('va-organize-btn').style.display = '';
3224
+ document.getElementById('va-result-action').style.display = 'none';
3210
3225
  _vaRender();
3211
3226
  _vaSetStatus('');
3212
3227
  };
3228
+
3229
+ window.vaDirectSend = function() {
3230
+ if (_vaLines.length === 0) { _vaSetStatus('请先录入语音内容'); return; }
3231
+ cmdInput.value = _vaLines.join('\n');
3232
+ window.closeVaSheet();
3233
+ if (!_isTouchDevice()) cmdInput.focus();
3234
+ };
3213
3235
  window.vaOrganize = async function() {
3214
3236
  if (_vaLines.length === 0) { _vaSetStatus('请先录入语音内容'); return; }
3215
3237
  const btn = document.getElementById('va-organize-btn');
@@ -3225,7 +3247,7 @@
3225
3247
  if (data.requirement) {
3226
3248
  document.getElementById('va-result').value = data.requirement;
3227
3249
  document.getElementById('va-result-wrap').style.display = '';
3228
- document.getElementById('va-send-btn').style.display = '';
3250
+ document.getElementById('va-result-action').style.display = '';
3229
3251
  _vaSetStatus('整理完成,可编辑后点"发送到对话"');
3230
3252
  } else {
3231
3253
  _vaSetStatus('整理失败: ' + (data.error || '未知错误'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wendongfly/myhi",
3
- "version": "1.3.68",
3
+ "version": "1.3.70",
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",