Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_render_memory
codeintel.context._render_memory
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
codeintel.context._render_memorybackend/app/codeintel/context.py, lines 293–308Open source
def _render_memory(memory: dict, limit: int) -> str: """The memory block, at most ``limit`` characters: briefs first, then items, then playbooks.""" out = "" for brief in memory.get("briefs", []): out += "\n" + brief["text"].rstrip() + "\n" lines = [] for item in memory.get("items", []): cites = ", ".join([c for e in item.get("evidence", []) if (c := _cite(e))][:2]) lines.append(f"- {item['body']}" + (f" [{cites}]" if cites else "") + "\n") if lines: out += "\n## Learned about the retrieved code\n" + "".join(lines) skills = memory.get("skills", []) if skills: out += "\n## Playbooks (get_skill for the steps)\n" + "".join( f"- {s['name']}: {s['description']}\n" for s in skills) return out if len(out) <= limit else out[:limit - 1] + "…"What the index recorded
- Signature
def _render_memory(memory: dict, limit: int) -> str:- File
backend/app/codeintel/context.py- Lines
- 293–308
- Parser
- python-ast
- Git blob
0c4a7dd4639651a5c13142d168630e344439f22a- Call sites
- 6 named, 1 resolved, 5 left unlinked
