@aiyiran/myclaw 1.1.144 → 1.1.146

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.
@@ -30,7 +30,7 @@
30
30
  var panelVisible = false;
31
31
  var cachedData = null;
32
32
  var pollTimer = null;
33
- var lastKnownClawName = null; // 本地环境下从 API 获取,remote 环境每次从 hostname 实时派生
33
+ var lastKnownClawName = null; // 统一从 /api/config 读取并缓存(本地与远程一致)
34
34
  var _preloadCache = {}; // url → Image 对象,防止重复预加载
35
35
  var showHiddenArtifacts = false; // 是否显示被过滤掉的系统/模板内部文件
36
36
  var MYCLAW_API_PORT = 18800;
@@ -1173,7 +1173,8 @@
1173
1173
  iframe.focus();
1174
1174
  // HTML 作品已由服务端注入 debug probe,挂上调试记录收集器开始录制。
1175
1175
  // 其余类型(图片/视频/PDF…)不录制。collector 不存在时静默跳过。
1176
- if (isHtml && typeof window.startDebugRecord === 'function') {
1176
+ var isDebugFile = asset.path && asset.path.replace(/\\/g, '/').indexOf('debug/') === 0;
1177
+ if (isHtml && !isDebugFile && typeof window.startDebugRecord === 'function') {
1177
1178
  var debugContext = {
1178
1179
  claw: lastKnownClawName,
1179
1180
  workspace: getWorkspaceId(),
@@ -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
- // 插入到工具栏最前面:debug、log、prompt 和语音按钮依次靠右
981
- toolbar.insertBefore(voiceBtn, toolbar.firstChild);
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/\u8bed\u97f3\u6309\u94ae\u5df2\u6ce8\u5165");
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.144",
3
+ "version": "1.1.146",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {