-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing current repo context in jetbrains #6649
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be useful to know exactly why this works now, I'm assuming it didn't work at the time, unless this was just a mistake we missed.
Have we verified that the context is correctly included in the chat message too?
I verified it works now. I took some time to read sqs PR so I can tell you exactly what happened: Look at vscode/src/chat/initialContext.ts:201 That said I think entering that first branch is right, we have remote repos.
So giving up just because VSC git extension is not initialised is in fact incorrect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking into it! Makes sense from my perspective 👍
5bdaa0d
to
3a4f2a3
Compare
I added one small improvement: |
@pkukielka LGTM! |
Fixes https://linear.app/sourcegraph/issue/CODY-3906/agent-allow-use-of-existing-fallback-that-looks-at-gitconfig-to-get
Fixes https://linear.app/sourcegraph/issue/CODY-4140/jetbrains-cody-current-repo-no-longer-available-as-context
I think that was a simple mistake introduced by https://linear.app/sourcegraph/issue/CODY-3906/agent-allow-use-of-existing-fallback-that-looks-at-gitconfig-to-get
If I remove code you can see in the diff it simply works.
All git based methods themselves check if they can be executed so this safeguard was not adding any value there from what I can see.
Test plan
Current Repository
should be visible in the chat context by defaultCurrent Repository
@
and then Start typingCurrent Repository
- suggestion to add should appear and you should be able to accept it