@aiyiran/myclaw 1.1.144 → 1.1.145
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-artifacts.js +1 -1
- package/assets/myclaw-inject.js +4 -4
- package/index.js +6 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
var panelVisible = false;
|
|
31
31
|
var cachedData = null;
|
|
32
32
|
var pollTimer = null;
|
|
33
|
-
var lastKnownClawName = null; //
|
|
33
|
+
var lastKnownClawName = null; // 统一从 /api/config 读取并缓存(本地与远程一致)
|
|
34
34
|
var _preloadCache = {}; // url → Image 对象,防止重复预加载
|
|
35
35
|
var showHiddenArtifacts = false; // 是否显示被过滤掉的系统/模板内部文件
|
|
36
36
|
var MYCLAW_API_PORT = 18800;
|
package/assets/myclaw-inject.js
CHANGED
|
@@ -977,14 +977,14 @@ btn.addEventListener("click", function () {
|
|
|
977
977
|
var promptBtn = document.querySelector("#myclaw-prompt-btn") || createPromptButton();
|
|
978
978
|
var voiceBtn = document.querySelector("#myclaw-voice-btn") || createVoiceButton();
|
|
979
979
|
|
|
980
|
-
//
|
|
981
|
-
toolbar.insertBefore(
|
|
982
|
-
toolbar.insertBefore(promptBtn, voiceBtn);
|
|
980
|
+
// 插入到工具栏最前面:语音、debug、log、prompt 依次靠右
|
|
981
|
+
toolbar.insertBefore(promptBtn, toolbar.firstChild);
|
|
983
982
|
toolbar.insertBefore(logBtn, promptBtn);
|
|
984
983
|
toolbar.insertBefore(debugBtn, logBtn);
|
|
984
|
+
toolbar.insertBefore(voiceBtn, debugBtn);
|
|
985
985
|
|
|
986
986
|
injected = true;
|
|
987
|
-
console.log("[myclaw-inject] \u2705 debug/log/prompt
|
|
987
|
+
console.log("[myclaw-inject] \u2705 \u8bed\u97f3/debug/log/prompt\u6309\u94ae\u5df2\u6ce8\u5165");
|
|
988
988
|
}
|
|
989
989
|
|
|
990
990
|
// ═══ 注入录音态样式 ═══
|
package/index.js
CHANGED
|
@@ -2105,6 +2105,12 @@ async function runServer(name) {
|
|
|
2105
2105
|
if (fs.existsSync(sourceDebugRecordPath)) {
|
|
2106
2106
|
fs.copyFileSync(sourceDebugRecordPath, path.join(targetDir, 'debug_record.py'));
|
|
2107
2107
|
}
|
|
2108
|
+
const sourceProbeJsPath = path.join(__dirname, 'assets', 'debug-probe.js');
|
|
2109
|
+
const targetAssetsDir = path.join(os.homedir(), '.openclaw', 'myclaw', 'assets');
|
|
2110
|
+
if (!fs.existsSync(targetAssetsDir)) fs.mkdirSync(targetAssetsDir, { recursive: true });
|
|
2111
|
+
if (fs.existsSync(sourceProbeJsPath)) {
|
|
2112
|
+
fs.copyFileSync(sourceProbeJsPath, path.join(targetAssetsDir, 'debug-probe.js'));
|
|
2113
|
+
}
|
|
2108
2114
|
console.log('[Server] 同步脚本: ' + targetPyPath);
|
|
2109
2115
|
fs.copyFileSync(sourceGuardPath, targetGuardPath);
|
|
2110
2116
|
fs.chmodSync(targetGuardPath, 0o755);
|