sourcegraph / app

Issue tracker for the Sourcegraph app - a lightweight single-binary version of Sourcegraph for your local machine
27 stars 2 forks source link

Embedded repo that is not being indexed #51

Open pahalie opened 1 year ago

pahalie commented 1 year ago

Hi,

I have given the Cody App through the Advanced Settings Embeddings job for a private GitHub repo. Repository embeddings jobs state that it was completed, however, when I ask a specific question about a file in the repo the output is wrong and starts with the following: Based on the code snippets you provided from the api/app.py file in the github/..../... repository, some of the endpoints defined in that file are: ... (wrong)

How do I fix it and make repo indexed properly? Also VSCode extention states that repo is not indexed and Request failed: Could not connect to Cody. Please ensure that Cody app is running or that you are connected to the Sourcegraph server.

Chat in VSCode extension: What is in app.py? I apologize, but I do not have access to an app.py file or its contents in this context. Could you please provide the relevant code from app.py that you would like me to explain? Without seeing the code, I cannot determine what is contained in that file.

chwarwick commented 12 months ago

@pahalie You can find some resources here to help with the not index issue. Typically this occurs if the repository does not have a git remote or it has a difficult time matching the git remote to a repository that is in the Cody app. There is a cody.codebase setting within VS Code where you can force the association.

As for your question about the chat in the extension, I would suggest using the chat recipe "Explain selected code" with the app.py file open. Using the recipe will directly add the file to the chat context with some specific prompting, where as asking specifically about app.py will attempt to search for snippets of content that appear to be related to the question so the results are not likely to be as specific.