Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

retrieve_context

modules.code.router.retrieve_context

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 symbols

Loading

Calls (5)
SymbolFileResolved by
assemble_contextcontext.pythrough an import
ContextRequestcontext.pythrough an import
get_embedderembeddings.pythrough an import
secretruntime.pythrough an import
_mode_unavailablerouter.pysame file
Inside (1)
SymbolFileResolved by
routerrouter.pysame file
modules.code.router.retrieve_contextbackend/app/modules/code/router.py, lines 241–256Open source
@router.post("/context/retrieve", response_model=ContextResponse)def retrieve_context(body: ContextRequestIn, db: Session = Depends(get_sync_db)):    """Everything an assistant needs to answer ``query``: ranked code with    verified source, callers/callees, coding rules and a Markdown rendering."""    settings = get_settings()    try:        return assemble_context(            db,            get_embedder(),            ContextRequest(**body.model_dump()),            fetch_token=secret(settings.GIT_CLONE_TOKEN),        )    except RepositoryNotFound as exc:        raise HTTPException(status_code=404, detail={"error": "repository_not_found", "detail": str(exc)}) from exc    except ModeUnavailable as exc:        raise _mode_unavailable(exc) from exc

What the index recorded

Signature
def retrieve_context(body: ContextRequestIn, db: Session):
File
backend/app/modules/code/router.py
Lines
241–256
Parser
python-ast
Git blob
d914024790aaafe7234adda557677b76e4ad73d5
Call sites
10 named, 6 resolved, 4 left unlinked
Outside this subset
1 more edges reach code outside the graph shown here

Read it on GitHub at this commit