@aiyiran/myclaw 1.1.52 → 1.1.54
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.
- package/assets/myclaw-inject.js +23 -40
- package/index.js +0 -3
- package/package.json +1 -1
package/assets/myclaw-inject.js
CHANGED
|
@@ -38,50 +38,33 @@
|
|
|
38
38
|
bar.style.cssText = [
|
|
39
39
|
"position: fixed",
|
|
40
40
|
"bottom: 8px",
|
|
41
|
-
"right:
|
|
42
|
-
"padding: 10px
|
|
43
|
-
"background:
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"gap: 10px",
|
|
41
|
+
"right: 5px",
|
|
42
|
+
"padding: 3px 10px",
|
|
43
|
+
"background: rgba(120, 120, 120, 0.18)",
|
|
44
|
+
"color: rgba(170, 170, 170, 0.9)",
|
|
45
|
+
"font-size: 11px",
|
|
46
|
+
"font-weight: bold",
|
|
47
|
+
"font-family: monospace",
|
|
48
|
+
"border-radius: 4px",
|
|
50
49
|
"z-index: 99999",
|
|
51
50
|
"user-select: none",
|
|
52
|
-
"
|
|
51
|
+
"cursor: pointer",
|
|
52
|
+
"transition: all 0.2s",
|
|
53
|
+
"letter-spacing: 0.5px",
|
|
54
|
+
"transform: scale(1)",
|
|
55
|
+
"border: 1px solid rgba(120, 120, 120, 0.25)",
|
|
53
56
|
].join(";");
|
|
54
|
-
bar.
|
|
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);
|
|
57
|
+
bar.textContent = "🐾 v" + MYCLAW_VERSION;
|
|
58
|
+
bar.title = "点击升级 myclaw 到最新版本";
|
|
67
59
|
|
|
68
|
-
|
|
69
|
-
|
|
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);
|
|
79
|
-
|
|
80
|
-
bar.onmouseenter = function () { bar.style.background = "#2f2f4a"; };
|
|
81
|
-
bar.onmouseleave = function () { bar.style.background = "#252536"; };
|
|
60
|
+
bar.onmouseenter = function () { bar.style.background = "rgba(120, 120, 120, 0.3)"; bar.style.color = "rgba(220, 220, 220, 0.95)"; bar.style.transform = "scale(1.05)"; };
|
|
61
|
+
bar.onmouseleave = function () { bar.style.background = "rgba(120, 120, 120, 0.18)"; bar.style.color = "rgba(170, 170, 170, 0.9)"; bar.style.transform = "scale(1)"; };
|
|
82
62
|
bar.onclick = function (e) {
|
|
83
63
|
e.stopPropagation();
|
|
84
64
|
runCommand("mc up");
|
|
65
|
+
setTimeout(function () {
|
|
66
|
+
window.location.reload();
|
|
67
|
+
}, 10000);
|
|
85
68
|
};
|
|
86
69
|
|
|
87
70
|
document.body.appendChild(bar);
|
|
@@ -96,7 +79,7 @@
|
|
|
96
79
|
btn.style.cssText = [
|
|
97
80
|
"position: fixed",
|
|
98
81
|
"bottom: 8px",
|
|
99
|
-
"right:
|
|
82
|
+
"right: 175px",
|
|
100
83
|
"padding: 2px 8px",
|
|
101
84
|
"background: none",
|
|
102
85
|
"color: rgba(150, 150, 150, 0.4)",
|
|
@@ -131,7 +114,7 @@
|
|
|
131
114
|
btn.style.cssText = [
|
|
132
115
|
"position: fixed",
|
|
133
116
|
"bottom: 8px",
|
|
134
|
-
"right:
|
|
117
|
+
"right: 90px",
|
|
135
118
|
"padding: 3px 10px",
|
|
136
119
|
"background: rgba(59, 130, 246, 0.85)",
|
|
137
120
|
"color: #fff",
|
|
@@ -1489,7 +1472,7 @@ btn.addEventListener("click", function () {
|
|
|
1489
1472
|
// ── 按钮列表 ──
|
|
1490
1473
|
var btns = [
|
|
1491
1474
|
{ 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" },
|
|
1492
|
-
{ label: "\uD83D\uDE80 \u5347\u7EA7", desc: "\u5347\u7EA7 myclaw \u5230\u6700\u65B0\u7248\u672C", hasInput: false, cmd: "mc
|
|
1475
|
+
{ label: "\uD83D\uDE80 \u5347\u7EA7", desc: "\u5347\u7EA7 myclaw \u5230\u6700\u65B0\u7248\u672C", hasInput: false, cmd: "mc server", color: "#8b5cf6" },
|
|
1493
1476
|
{ 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" },
|
|
1494
1477
|
{ 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" },
|
|
1495
1478
|
];
|
package/index.js
CHANGED
|
@@ -2356,9 +2356,6 @@ if (!command) {
|
|
|
2356
2356
|
if (detectPlatform() === 'windows') {
|
|
2357
2357
|
runBat();
|
|
2358
2358
|
}
|
|
2359
|
-
console.log('');
|
|
2360
|
-
console.log('🐍 更新 Python 守护进程...');
|
|
2361
|
-
runServer(args[1]);
|
|
2362
2359
|
} else if (command === 'all') {
|
|
2363
2360
|
// 完整升级:升级包 → patch → server → restart
|
|
2364
2361
|
console.log('[mc all] 开始完整升级流程...');
|