Every reference I can find, including ChatGPT AND Cody Chat itself, says there’s some “Repository” item that can be clicked on under settings to add specific repositories, but there is no such item. It baffles me that I’ve spent hours trying to get this tool to see my repos when that’s, like, the main thing it’s supposed to be able to do.
Hey @SmatchyLaPaglia
You have two ways to use the repository as context in Cody Chat.
- You simply input the
@
symbol. - You click the
@ Context
below the chat box.
Then a menu opens where you choose the Repository
menu item.
The same applies to all supported IDEs.
I hope that helps.
Ok I see the confusion: my repos don’t appear in the repository list there. They’re on GitHub and they’re public. How do I get my repos to appear there?
I am asking here about a different repo than the one I’m asking about on Discord BTW. That one is private and this one is public. And I’m trying to access that one through VSCode and this one through the web interface.
Hey @4midori
Thank you for your report.
You need to initialize your project as a git repository. Cody can only index the project locally if it is properly initialized.
I work on my sites via an sFTP drive mapper, so I am editing ‘live’ on the dev server with VSCode. However, I do have my code in a repo. Is there some way to point Cody towards that repo?
To clarify, my entire repository is available on a local drive. Can I point Cody to that drive and have it index all the code?
Hey @4midori
Project code will only get indexed if it is available as public repository. Sourcegraph needs access to the code for a full index.
For local-only code, Cody provides the Agentic Context Engine, which can comprehend your code based on your prompt with advanced capabilities, like direct code search via keywords or symbol-based search, shell command utilization through executing commands like tree
, git grep
etc, and such.
Ok. So if make my repo public, but still access it via local mapped drive, how would I point Cody to it for indexing?
Could you please advise on the above question?
Sorry for the late reply.
Indexing happens on the Sourcegraph backend. Locally, there is a ‘symf’ binary installed with Cody for keyword search. Usually when you open your workspace directory, you can use `@-current repository’ in the context dropdown and ask a specific question. Cody will automatically fetch the context based on the prompt and with the index retrieval from the remote.