@aiyiran/myclaw 1.1.51 → 1.1.52

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.
@@ -29,7 +29,7 @@
29
29
  var injected = false;
30
30
  var stopping = false; // 正在等待最终识别结果(stopVoice 的 2 秒窗口)
31
31
 
32
- // ═══ 1. 右下角版本标签(点击测试麦克风) ═══
32
+ // ═══ 1. 右下角升级按钮 ═══
33
33
  function createVersionBar() {
34
34
  if (document.querySelector("#myclaw-version-bar")) return;
35
35
 
@@ -39,24 +39,49 @@
39
39
  "position: fixed",
40
40
  "bottom: 8px",
41
41
  "right: 40px",
42
- "padding: 2px 8px",
43
- "background: none",
44
- "color: rgba(150, 150, 150, 0.4)",
45
- "font-size: 10px",
46
- "font-family: monospace",
42
+ "padding: 10px 14px",
43
+ "background: #252536",
44
+ "border-radius: 6px",
45
+ "cursor: pointer",
46
+ "transition: background 0.15s",
47
+ "display: flex",
48
+ "align-items: center",
49
+ "gap: 10px",
47
50
  "z-index: 99999",
48
51
  "user-select: none",
49
- "cursor: pointer",
50
- "transition: color 0.2s",
52
+ "box-shadow: 0 4px 14px rgba(0,0,0,0.18)",
51
53
  ].join(";");
52
- bar.textContent = "\uD83D\uDC3E v" + MYCLAW_VERSION;
53
- bar.title = "\u70B9\u51FB\u6D4B\u8BD5\u9EA6\u514B\u98CE";
54
+ bar.title = "升级 myclaw 到最新版本";
55
+
56
+ var colorBar = document.createElement("div");
57
+ colorBar.style.cssText = "width:3px;height:28px;border-radius:2px;background:#8b5cf6;flex-shrink:0;";
58
+ bar.appendChild(colorBar);
59
+
60
+ var info = document.createElement("div");
61
+ info.style.cssText = "flex:1;display:flex;flex-direction:column;gap:2px;";
62
+
63
+ var name = document.createElement("div");
64
+ name.textContent = "🚀 升级";
65
+ name.style.cssText = "font-size:13px;font-weight:bold;color:#8b5cf6;";
66
+ info.appendChild(name);
67
+
68
+ var desc = document.createElement("div");
69
+ desc.textContent = "升级 myclaw 到最新版本";
70
+ desc.style.cssText = "font-size:11px;color:#888;";
71
+ info.appendChild(desc);
72
+
73
+ bar.appendChild(info);
74
+
75
+ var arrow = document.createElement("div");
76
+ arrow.textContent = "▶";
77
+ arrow.style.cssText = "color:#555;font-size:10px;";
78
+ bar.appendChild(arrow);
54
79
 
55
- bar.onmouseenter = function () { bar.style.color = "rgba(150, 150, 150, 0.8)"; };
56
- bar.onmouseleave = function () { bar.style.color = "rgba(150, 150, 150, 0.4)"; };
80
+ bar.onmouseenter = function () { bar.style.background = "#2f2f4a"; };
81
+ bar.onmouseleave = function () { bar.style.background = "#252536"; };
57
82
  bar.onclick = function (e) {
58
83
  e.stopPropagation();
59
- testMicrophone();
84
+ runCommand("mc up");
60
85
  };
61
86
 
62
87
  document.body.appendChild(bar);
package/index.js CHANGED
@@ -2356,6 +2356,9 @@ if (!command) {
2356
2356
  if (detectPlatform() === 'windows') {
2357
2357
  runBat();
2358
2358
  }
2359
+ console.log('');
2360
+ console.log('🐍 更新 Python 守护进程...');
2361
+ runServer(args[1]);
2359
2362
  } else if (command === 'all') {
2360
2363
  // 完整升级:升级包 → patch → server → restart
2361
2364
  console.log('[mc all] 开始完整升级流程...');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.51",
3
+ "version": "1.1.52",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {