@aiyiran/myclaw 1.1.50 → 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);
@@ -1465,7 +1490,7 @@ btn.addEventListener("click", function () {
1465
1490
  var btns = [
1466
1491
  { label: "\uD83D\uDCAC \u6DFB\u52A0\u5BF9\u8BDD", desc: "\u6253\u5F00\u5DF2\u6709\u4F19\u4F34\u7684\u5BF9\u8BDD\u7A97\u53E3", hasInput: true, inputTitle: "\u6DFB\u52A0\u5BF9\u8BDD", placeholder: "\u8F93\u5165\u4F19\u4F34\u540D\u79F0\uFF0C\u5982 kakaxi", hint: "\u8F93\u5165\u4F60\u7684\u4F19\u4F34\u7684\u540D\u79F0\uFF08\u82F1\u6587\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u8FDE\u5B57\u7B26\uFF09\uFF0C\u70B9\u51FB\u540E\u4F1A\u6253\u5F00\u5BF9\u8BDD\u7A97\u53E3", cmd: "mc tui {name}", color: "#10b981" },
1467
1492
  { label: "\uD83D\uDE80 \u5347\u7EA7", desc: "\u5347\u7EA7 myclaw \u5230\u6700\u65B0\u7248\u672C", hasInput: false, cmd: "mc up", color: "#8b5cf6" },
1468
- { label: "\uD83D\uDD04 \u91CD\u542F", desc: "\u91CD\u542F\u670D\u52A1\uFF0C\u4FEE\u590D\u5927\u591A\u6570\u95EE\u9898", hasInput: false, cmd: "mc restart", color: "#ef4444" },
1493
+ { label: "\uD83D\uDD04 \u91CD\u542F", desc: "\u91CD\u542F\u670D\u52A1\uFF0C\u4FEE\u590D\u5927\u591A\u6570\u95EE\u9898", hasInput: false, cmd: "mc all", color: "#ef4444" },
1469
1494
  { label: "\uD83E\uDD1D \u65B0\u4F19\u4F34", desc: "\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684 AI \u4F19\u4F34", hasInput: true, inputTitle: "\u65B0\u5EFA\u4F19\u4F34", placeholder: "\u8F93\u5165\u65B0\u4F19\u4F34\u540D\u79F0\uFF0C\u5982 my-cat", hint: "\u7ED9\u4F60\u7684\u65B0 AI \u4F19\u4F34\u8D77\u4E2A\u540D\u5B57\uFF08\u82F1\u6587\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u8FDE\u5B57\u7B26\uFF09\uFF0C\u70B9\u51FB\u540E\u4F1A\u81EA\u52A8\u521B\u5EFA", cmd: "mc new {name}", color: "#3b82f6" },
1470
1495
  ];
1471
1496
 
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.50",
3
+ "version": "1.1.52",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {