MCPcopy Index your code
hub / github.com/flet-dev/flet / clone_system

Function clone_system

sdk/python/examples/community/mind_queue/main.py:83–97  ·  view source on GitHub ↗
(system_name: str)

Source from the content-addressed store, hash-verified

81
82 # ---------- System ----------
83 def clone_system(system_name: str):
84 if system_name not in data:
85 return
86
87 base_name = f"Copy of {system_name}"
88 new_name = base_name
89 counter = 2
90
91 while new_name in data:
92 new_name = f"{base_name} ({counter})"
93 counter += 1
94
95 # deep copy to avoid shared references
96 data[new_name] = copy.deepcopy(data[system_name])
97 save_data(data)
98
99 def delete_system(system_name: str):
100 nonlocal current_system

Callers 1

do_cloneFunction · 0.85

Calls 1

save_dataFunction · 0.85

Tested by

no test coverage detected