Full AWS Practitioner Certification Question

How does GitHub Copilot determine the context used to generate a code suggestion in an IDE environment?