VS Code does not support absolute file path in github.copilot.chat.codeGeneration.instructions #150959
Replies: 3 comments 1 reply
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
A clear motivating example for this sort of functionality would be style guides. Yes, it makes total sense to override some things on a per-project basis, but at the same time when writing lots of crappy little scripts or jumping between many projects, it becomes a pain constantly having to overwrite the style the model defaults to, and I also don't want to litter my folders with redundant markdown files just for getting it to make small edits here and there. Also another usecase might be to mark code written by the model. The flipside is that when I see snake case, I at least know I didn't write that and so to be more cautious and skeptical when coming back to something after a year and not being able to remember what the hell was going on. Might be nice to instruct it to mark code sections it has written with a comment or similar so that projects can differentiate between something written by a programmer and something written by the model. |
Beta Was this translation helpful? Give feedback.
-
|
Copilot in VS Code reads prompt files from your workspace root. If you want shared defaults across projects, the options are: About the namespaces in settings: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
I'm trying to set up Copilot in VS Code to have some default instructions for all the projects I work on. The
github.copilot.chat.codeGeneration.instructionssetting says I can reference an external file to give instructions. It does work if I give it a path relative to the project, but does not work if I give it an absolute path.{ "github.copilot.chat.codeGeneration.instructions": [ { // This works, but is relative to the project root, so cannot be shared across my projects: "file": "test-instructions.md" }, { // This does not work: "file": "/home/my-account/test-instructions.md" }, { // I would expect this to be how it should work, but https://github.com/Microsoft/vscode/issues/2809 says extension authors need to handle `~` themselves until it's resolved: "file": "~/test-instructions.md" }, ] }I note that the
chat.promptFilesspecifically calls out that it supports absolute paths in its example (although I have not tried it yet). So it seems like referencing files with absolute paths should be the norm. It'd also be great if you supported paths starting with~. And if I can have a 🦄, variables in file paths.PS. Why are some of the settings namespaced in
github.copilot.chatand some inchat? Prompt files are definitely specific to Copilot chats.Beta Was this translation helpful? Give feedback.
All reactions