Back to the room

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

Code Observatory / function

hit_to_dict

codeintel.context.hit_to_dict

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 (1)
SymbolFileResolved by
web_file_urlgit_source.pythrough an import
Called by (3)
SymbolFileResolved by
assemble_contextcontext.pysame file
search_coderouter.pythrough an import
build_mcp_servernative_server.pythrough an import
Inside (1)
SymbolFileResolved by
contextcontext.pysame file
codeintel.context.hit_to_dictbackend/app/codeintel/context.py, lines 91–113Open source
def hit_to_dict(h: Hit, rank: int) -> dict:    return {        "rank": rank,        "chunk_id": h.chunk_id,        "score": round(h.score, 6),        "repository": {"id": h.repository_id, "name": h.repository_name, "url": h.repository_url},        "path": h.path,        "language": h.language,        "kind": h.kind,        "symbol": h.symbol,        "start_line": h.start_line,        "end_line": h.end_line,        "commit_sha": h.commit_sha,        "parser": h.parser,        "fallback_reason": h.fallback_reason,        "summary": h.summary,        "evidence": h.evidence.as_dict(),        "source_url": (            web_file_url(h.repository_url, h.commit_sha, h.path, h.start_line, h.end_line)            if h.commit_sha            else None        ),    }

What the index recorded

Signature
def hit_to_dict(h: Hit, rank: int) -> dict:
File
backend/app/codeintel/context.py
Lines
91–113
Parser
python-ast
Git blob
0c4a7dd4639651a5c13142d168630e344439f22a
Call sites
3 named, 1 resolved, 2 left unlinked
Outside this subset
1 more edges reach code outside the graph shown here

Read it on GitHub at this commit