-
Notifications
You must be signed in to change notification settings - Fork 294
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
Intelligent Cody: MVP using VSCode API #692
Conversation
9dfc085
to
64c4703
Compare
7d3a64f
to
d2e0d30
Compare
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.
Can you provide some screenshots and/or illustrative examples of where this improves response quality and where it hurts response quality?
Is it targeted at autocomplete, chat, or all of the above?
Sure, will gather some and post in a comment on the PR.
Right now it's only set up for chat, but I'm currently working (between a few other tasks) to thread the graph context fetcher through autocomplete as well. |
For the name, I'm trying to move to a single bit of UI that summarises all the context prep Cody did and was included (vs the separate drop-downs we're adding here). The name would sit alongside "Embeddings". My ranked naming suggestions (instead of "Intelligent Cody"… Cody is already intelligent in lots of ways 😉)
imo from a product design POV calling it "Symbol Context" and using the word "Symbols" is probably best, alongside "Embeddings". And we can have other single-word bits of context, like "Ownership"and what-have-you. |
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.
That's awesome! Since all the changes are behind the experimental flag, we can merge this one safely and iterate on improvements in follow-up PRs.
preciseContext?: PreciseContext | ||
} | ||
|
||
export interface PreciseContext { |
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.
Is this structure based on the work that's happening on the server-side? (should we keep in sync with something?)
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's meant to conform to the GraphQL schema we've defined here, so keeping it in the same shape will make the Remote API integration easier since we can just return the same type directly.
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.
Would it be helpful to leave a comment on that?
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.
Also, we should add an entry about the new experimental setting to vscode/CHANGELOG.md
.
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
@beyang Here's a quick example. I highlighted the part of the code I wanted precise symbols to be extracted from, then asked something about the shape of the type of one of the struct members (defined in the stdlib). Clicking on the sidebar jumps me to |
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
@toolmantim we should not use "embeddings" anywhere that's visible to the end user. Embeddings are an implementation detail and we need another descriptor for it, like "AI-enabled search" or "Intelligent search". |
There's an extension setting, mentioned in the changelog. It's not reactive so you'll need to reload the extension once you enable it (for now). |
This is an experimental (currently internal) MVP of fetching first-order definitions of symbols available in the current file. See the Intelligent Cody update for additional context.
This PR supplements the context fetching mechanism used to grab embeddings to also utilize the local VSCode API to emulate what we've been doing in the server-side implementation https://github.com/sourcegraph/sourcegraph/pull/51690.
Note: much of this code is shared from Cesar's work in #78, and my hackathon project in #472.
Test plan
Tested locally, and gated all changed code with an experimental VSCode extension setting feature flag.