There are YouTube videos that go into detail. From what I can remember, it first creates an embedding of your full code, it then refers to your open file and the files next to your current tab, it then extracts the most useful code related to your question.