@aiyiran/myclaw 1.1.164 → 1.1.166
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/package.json +1 -1
- package/server/sync_workspace.py +5 -3
package/package.json
CHANGED
package/server/sync_workspace.py
CHANGED
|
@@ -477,9 +477,11 @@ def _put_file_to_qiniu(token, key, abs_path):
|
|
|
477
477
|
"""统一上传入口。HTML 文件注入 probe 后以字节上传;其余走原始文件上传。"""
|
|
478
478
|
ext = os.path.splitext(abs_path)[1].lower()
|
|
479
479
|
if ext in (".html", ".htm"):
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
# debug-record.html 是展示壳,不是学生作品,跳过 probe 注入
|
|
481
|
+
if os.path.basename(abs_path) != "debug-record.html":
|
|
482
|
+
with open(abs_path, "rb") as f:
|
|
483
|
+
data = inject_probe_into_html(f.read())
|
|
484
|
+
return put_data(token, key, data, mime_type="text/html")
|
|
483
485
|
return put_file_v2(token, key, abs_path)
|
|
484
486
|
|
|
485
487
|
|