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

Function update_context

s15_agent_teams/code.py:842–853  ·  view source on GitHub ↗

Derive context from real state.

(context: dict, messages: list)

Source from the content-addressed store, hash-verified

840# ── Context ──
841
842def update_context(context: dict, messages: list) -> dict:
843 """Derive context from real state."""
844 memories = ""
845 if MEMORY_INDEX.exists():
846 content = MEMORY_INDEX.read_text().strip()
847 if content:
848 memories = content
849 return {
850 "enabled_tools": [t["name"] for t in TOOLS],
851 "workspace": str(WORKDIR),
852 "memories": memories,
853 }
854
855
856# ── Agent Loop ──

Callers 2

agent_loopFunction · 0.70
code.pyFile · 0.70

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected