MCPcopy Create free account
hub / github.com/anthropics/claude-code / _restore

Function _restore

plugins/security-guidance/hooks/diffstate.py:129–136  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

127 return
128
129 def _restore(state):
130 existing = state.get("touched_paths", [])
131 merged = list(dict.fromkeys(list(paths) + list(existing)))
132 if len(merged) > 200:
133 merged = merged[:200]
134 state["touched_paths"] = merged
135 if baseline_sha and not state.get("baseline_sha"):
136 state["baseline_sha"] = baseline_sha
137 with_locked_state(session_id, _restore)
138
139

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected