@aiyiran/myclaw 1.1.141 → 1.1.142

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.
@@ -948,37 +948,68 @@ btn.addEventListener("click", function () {
948
948
  " animation: myclaw-fade-in 0.15s ease;",
949
949
  "}",
950
950
  ".myclaw-debug-box {",
951
- " background: #fff; border-radius: 16px;",
952
- " padding: 24px 28px 20px; width: 420px; max-width: 92vw;",
953
- " box-shadow: 0 8px 32px rgba(0,0,0,0.18);",
954
- " display: flex; flex-direction: column; gap: 12px;",
951
+ " width: 560px; max-width: 96vw; max-height: 92vh;",
952
+ " background: #1e1e2e; border-radius: 12px; overflow: hidden;",
953
+ " box-shadow: 0 12px 48px rgba(0,0,0,0.6);",
954
+ " display: flex; flex-direction: column;",
955
955
  "}",
956
- ".myclaw-debug-title {",
957
- " font-size: 18px; font-weight: 700; color: #222;",
956
+ ".myclaw-debug-header {",
957
+ " display: flex; align-items: center; justify-content: space-between;",
958
+ " padding: 13px 18px;",
959
+ " background: linear-gradient(135deg,#ef4444,#f59e0b);",
960
+ " color: #fff; font-size: 15px; font-weight: bold;",
961
+ " font-family: -apple-system,sans-serif; user-select: none; flex-shrink: 0;",
958
962
  "}",
959
- ".myclaw-debug-hint {",
960
- " font-size: 13px; color: #888;",
963
+ ".myclaw-debug-close {",
964
+ " cursor: pointer; padding: 2px 8px; border-radius: 4px; font-size: 15px;",
961
965
  "}",
962
- ".myclaw-debug-textarea {",
963
- " width: 100%; box-sizing: border-box;",
964
- " border: 1.5px solid #e0e0e0; border-radius: 10px;",
965
- " padding: 12px; font-size: 14px; line-height: 1.7;",
966
- " resize: vertical; outline: none; font-family: inherit; color: #333;",
966
+ ".myclaw-debug-close:hover { background: rgba(255,255,255,0.2); }",
967
+ ".myclaw-debug-scroll {",
968
+ " flex: 1; overflow-y: auto; padding: 20px 20px 8px;",
969
+ " display: flex; flex-direction: column; gap: 18px;",
970
+ "}",
971
+ ".myclaw-debug-label {",
972
+ " font-size: 12px; color: #f59e0b; font-weight: bold;",
973
+ " margin-bottom: 8px; font-family: -apple-system,sans-serif;",
974
+ "}",
975
+ ".myclaw-debug-guide {",
976
+ " display: flex; gap: 8px; flex-wrap: wrap;",
977
+ "}",
978
+ ".myclaw-debug-guide span {",
979
+ " padding: 7px 10px; border-radius: 999px;",
980
+ " background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35);",
981
+ " color: #fbbf24; font-size: 12px; font-family: -apple-system,sans-serif;",
982
+ "}",
983
+ ".myclaw-debug-preview {",
984
+ " padding: 12px 14px; background: #252536; border-radius: 8px;",
985
+ " border-left: 3px solid #f59e0b;",
986
+ "}",
987
+ ".myclaw-debug-preview-label {",
988
+ " font-size: 11px; color: #f59e0b; font-weight: bold;",
989
+ " margin-bottom: 6px; font-family: monospace; letter-spacing: 0.3px;",
990
+ "}",
991
+ ".myclaw-debug-preview-text {",
992
+ " font-size: 13px; line-height: 1.7; white-space: pre-wrap;",
993
+ " font-family: -apple-system,sans-serif; word-break: break-all;",
967
994
  "}",
968
- ".myclaw-debug-textarea:focus { border-color: #4f6ef7; }",
969
995
  ".myclaw-debug-footer {",
970
- " display: flex; justify-content: flex-end; gap: 10px;",
996
+ " display: flex; gap: 10px; padding: 14px 20px;",
997
+ " border-top: 1px solid #2d2d3f; flex-shrink: 0; background: #1e1e2e;",
971
998
  "}",
972
- ".myclaw-debug-cancel {",
973
- " padding: 8px 18px; border-radius: 8px; border: 1.5px solid #e0e0e0;",
974
- " background: #fff; color: #666; font-size: 14px; cursor: pointer;",
999
+ ".myclaw-debug-cancel, .myclaw-debug-insert, .myclaw-debug-submit {",
1000
+ " flex: 1; padding: 11px 0; border: none; border-radius: 8px;",
1001
+ " color: #fff; font-size: 14px; font-weight: bold;",
1002
+ " font-family: -apple-system,sans-serif; cursor: pointer; transition: all 0.15s;",
975
1003
  "}",
976
- ".myclaw-debug-submit {",
977
- " padding: 8px 20px; border-radius: 8px; border: none;",
978
- " background: #4f6ef7; color: #fff; font-size: 14px;",
979
- " font-weight: 600; cursor: pointer;",
1004
+ ".myclaw-debug-cancel { background: #3d3d5c; color: #cdd6f4; }",
1005
+ ".myclaw-debug-insert { background: #6366f1; }",
1006
+ ".myclaw-debug-submit { background: #10b981; }",
1007
+ ".myclaw-debug-insert:hover:not(:disabled) { background: #4f46e5; }",
1008
+ ".myclaw-debug-submit:hover:not(:disabled) { background: #059669; }",
1009
+ ".myclaw-debug-cancel:hover { background: #4b4b6a; }",
1010
+ ".myclaw-debug-insert:disabled, .myclaw-debug-submit:disabled {",
1011
+ " cursor: not-allowed;",
980
1012
  "}",
981
- ".myclaw-debug-submit:hover { background: #3a58d6; }",
982
1013
  ].join("\n");
983
1014
  document.head.appendChild(style);
984
1015
  }
package/index.js CHANGED
@@ -2101,6 +2101,10 @@ async function runServer(name) {
2101
2101
  // 2. 覆盖 py 文件 & guard 脚本(确保最新)
2102
2102
  fs.copyFileSync(sourcePyPath, targetPyPath);
2103
2103
  fs.copyFileSync(sourceSchemaPath, path.join(targetDir, 'artifacts_schema.py'));
2104
+ const sourceDebugRecordPath = path.join(__dirname, 'server', 'debug_record.py');
2105
+ if (fs.existsSync(sourceDebugRecordPath)) {
2106
+ fs.copyFileSync(sourceDebugRecordPath, path.join(targetDir, 'debug_record.py'));
2107
+ }
2104
2108
  console.log('[Server] 同步脚本: ' + targetPyPath);
2105
2109
  fs.copyFileSync(sourceGuardPath, targetGuardPath);
2106
2110
  fs.chmodSync(targetGuardPath, 0o755);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.141",
3
+ "version": "1.1.142",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {