We split it into syntactically relevant chunks (using tree-sitter), then store the embeddings in our vector database, while never storing any of your code on our servers.
We use the local state of your codebase as the source of truth for the text corresponding to a given vector in the database.