@aiyiran/myclaw 1.1.67 → 1.1.68
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 -4
package/package.json
CHANGED
package/server/sync_workspace.py
CHANGED
|
@@ -627,15 +627,16 @@ def _download_from_cdn(key, local_path):
|
|
|
627
627
|
def _do_fork(job_id, src_clawname, src_workspace, src_version, entry_rel_path=None):
|
|
628
628
|
"""在后台线程中执行 fork"""
|
|
629
629
|
try:
|
|
630
|
-
|
|
630
|
+
now = datetime.now()
|
|
631
|
+
time_id = now.strftime('%d') + 'D' + now.strftime('%M') + 'M'
|
|
631
632
|
|
|
632
633
|
# create_agent.js 会自动加 "workspace-" 前缀,所以这里只传去掉前缀的名字
|
|
633
|
-
# 例:src_workspace="workspace-fangshunhe" → agent_name="fangshunhe-v1-fork-
|
|
634
|
-
# mc new 创建目录 → workspace-fangshunhe-v1-fork-
|
|
634
|
+
# 例:src_workspace="workspace-fangshunhe" → agent_name="fangshunhe-v1-fork-15D30M"
|
|
635
|
+
# mc new 创建目录 → workspace-fangshunhe-v1-fork-15D30M ✓
|
|
635
636
|
base_name = src_workspace
|
|
636
637
|
if base_name.startswith("workspace-"):
|
|
637
638
|
base_name = base_name[len("workspace-"):]
|
|
638
|
-
agent_name = f"{base_name}-v{src_version}-fork-{
|
|
639
|
+
agent_name = f"{base_name}-v{src_version}-fork-{time_id}"
|
|
639
640
|
new_workspace = f"workspace-{agent_name}"
|
|
640
641
|
|
|
641
642
|
print(f"[Fork] 开始: {src_workspace} v{src_version} → {new_workspace}")
|