MCPcopy Index your code
hub / github.com/shareAI-lab/learn-claude-code / update_context

Function update_context

s16_team_protocols/code.py:790–801  ·  view source on GitHub ↗

Derive context from real state.

(context: dict, messages: list)

Source from the content-addressed store, hash-verified

788# ── Context ──
789
790def update_context(context: dict, messages: list) -> dict:
791 """Derive context from real state."""
792 memories = ""
793 if MEMORY_INDEX.exists():
794 content = MEMORY_INDEX.read_text().strip()
795 if content:
796 memories = content
797 return {
798 "enabled_tools": [t["name"] for t in TOOLS],
799 "workspace": str(WORKDIR),
800 "memories": memories,
801 }
802
803
804# ── Agent Loop ──

Callers 2

agent_loopFunction · 0.70
code.pyFile · 0.70

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected