Skip to content
Discussion options

You must be logged in to vote

Yeah, #file is the right idea, just a couple gotchas:

#file:path/to/file.js works best when you give it the actual relative path, not just the filename, especially in bigger repos where names might clash.
It doesn't need the file open in a tab, just referencing it with #file should pull it into context even if it's closed.
You can stack multiple #file refs in one message, so #file:utils.js #file:api.js explain how these interact actually does pull both in, it's not limited to one.
If it still feels like it's ignoring one of them, it's usually a length/context thing, really big files can get truncated so it prioritizes the most relevant chunks rather than the whole file.
#codebase is also …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nextyze-lgtm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Copilot Code accurately and faster with your AI powered pair-programmer. Copilot in GitHub Copilot functionality in GitHub Copilot Chat and in github.com Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
2 participants