MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / import_scenes

Method import_scenes

uncommon_route/scene_store.py:257–269  ·  view source on GitHub ↗

Import scenes from a dict (merge, not replace). Returns count added.

(self, data: dict[str, Any])

Source from the content-addressed store, hash-verified

255 }
256
257 def import_scenes(self, data: dict[str, Any]) -> int:
258 """Import scenes from a dict (merge, not replace). Returns count added."""
259 count = 0
260 scenes_data = data.get("scenes", {})
261 if isinstance(scenes_data, dict):
262 for _key, scene_data in scenes_data.items():
263 scene = _deserialize_scene(scene_data)
264 if scene:
265 self._scenes[scene.name] = scene
266 count += 1
267 if count:
268 self._save()
269 return count

Callers 2

handle_scenesFunction · 0.80

Calls 3

_saveMethod · 0.95
_deserialize_sceneFunction · 0.85
getMethod · 0.45

Tested by 1