@wendongfly/myhi 1.0.55 → 1.0.56

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 +8 -2
  2. package/package.json +1 -1
package/dist/chat.html CHANGED
@@ -355,7 +355,10 @@
355
355
  cmdInput.style.height = 'auto';
356
356
  cmdInput.style.height = Math.min(cmdInput.scrollHeight, 120) + 'px';
357
357
  });
358
- cmdInput.addEventListener('focus', () => inputBox.classList.add('focused'));
358
+ cmdInput.addEventListener('focus', () => {
359
+ inputBox.classList.add('focused');
360
+ if (!isController && canTakeControl()) socket.emit('take-control', { sessionId: SESSION_ID });
361
+ });
359
362
  cmdInput.addEventListener('blur', () => inputBox.classList.remove('focused'));
360
363
 
361
364
  let currentSession = null;
@@ -1165,7 +1168,10 @@
1165
1168
  return;
1166
1169
  }
1167
1170
 
1168
- if (!isController) { addStatusMessage('请先获取控制权'); return; }
1171
+ if (!isController) {
1172
+ if (canTakeControl()) { socket.emit('take-control', { sessionId: SESSION_ID }); }
1173
+ else { addStatusMessage('其他用户控制中,无法发送'); return; }
1174
+ }
1169
1175
  endStream();
1170
1176
 
1171
1177
  const imgPath = _pendingImage?.path || null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wendongfly/myhi",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
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",