Cody – The AI that knows your entire codebase
about.sourcegraph.com
about.sourcegraph.com
The key things I love are:
1. It really knows how to summarise a code blocks, this can be helpful to review code in other projects, or provide a refresher to your own, it misses very little!
2. It is very smart when it comes to filling in gaps in log statements, error messages or code comments.
3. Copy and paste is mostly dead, given a small hint it fills in the gaps for common patterns and is way less error-prone, and follows my prevailing style once the project is up and running.
4. Writing tests, this really surprised me but a lot of trivial, and some not so trivial ones are generated by Cody.
Things which annoy me when using Cody:
1. Suggests when writing in markdown are not very helpful, most are wordy, and always positive, it is almost impossible to get a negative or even snarky sentence out of it...
2. Inline suggestions are a bit annoying at times, it really doesn't "know your code", or that of your libraries, for common std library calls it is great, but anything more complex or obscure it is mostly wrong.
3. It is somewhat bolted onto VSCode using some creative solutions, with VSCode only allowing more fit for purpose APIs to be used by GitHub Copilot, which is sad.
Overall it is doing a lot of the heavy lifting turning my code into English, and either entirely building tests, or fleshing out enough for me to just tweak the code a little so big from me.
On the other parts you mentioned:
Overly positive English prose in Markdown is probably a function of the underlying LLM in use (Claude/GPT-4, plus experimental support for others). I guess the risk is that we overcorrect too far and suddenly the Markdown suggestions are off-putting. If you have any specific examples you'd feel comfortable posting to https://github.com/sourcegraph/cody/discussions/358, that would be helpful.
On inline suggestions (autocomplete), we are under much tighter latency constraints than for chat or commands, so the context used for autocomplete is lighter right now. This is a huge area of effort for us, and we're watching completion acceptance rate really closely. We are making autocomplete use embeddings for context in more cases, and @beyang is adding a fast local context search path as well.
On the VS Code extension APIs used, yes, there are some new proposed APIs that are not yet freely available to extensions that will help. For now, the new `Cody: Fixup` command is much smoother UX than the inline comment `+` icon then typing `/fix whatever`—give that a try and let us know if that is better.
Thanks!
I wonder if you have tried tools that are dedicated to Code Integrity, e.g. generating tests?
I wrote a blog about it: https://www.codium.ai/blog/code-integrity-supercharges-code-...
disclaimer: I'm the co-maker of PR-Agent and CodiumAI
Also there are several typos on the linked page, you might want to read it over a few more times
https://about.sourcegraph.com/terms/cody-notice seems generally reasonable though, so that's appreciated. Wouldn't mind a more transparency/confirmation on who the partner LLM entities are (Anthropic?), and some verbiage on the downstream impacts of their terms.
Should be interesting to give it a test-run with some embedded projects.
We should have this in our docs, but for now you can read this whitepaper if you are interested: https://about.sourcegraph.com/whitepaper/cody-context-archit...
"Cody has one third-party dependency, which is Anthropic's Claude API. In the config, this can be replaced with OpenAI API."
I miss sublime for how slick the ui feels, but I abandoned for the same reasons as you.
open vsc> 22 update popups and notifications + permission nags. > mojo gone
There's an extension for that too: "Mojo Post-upgrade AutoReloader" /s
The only notification upon init is Copilot requesting Github login which probably uses an OAuth token that expires quickly.
It's hard to tell if "knows your entire codebase" refers to small-context-window retrieval-augmented generation or something like loading all your code into Claude 100k.
Also, an ask: a voice-to-text input would be earthshatteringly cool. I am waiting with bated breath for the coming moment where it becomes possible to code for extended periods by rubberducking alone.
https://aider.chat/docs/voice.html
Plus it also "knows your entire codebase" too:
Even some versions of "I want to do this, how would I modify the code to make it happen" works pretty good
./cody_2023.7.11+1384.7d20a90ce7_amd64.AppImage
cody: error while loading shared libraries: libOpenGL.so.0: cannot open shared object file: No such file or directory
Solution:
sudo dnf install libglvnd-opengl
I’m looking forward to being able to form opinions on AI models at some point, but I’m not there yet. I can only try them and see how well they work, but as yet have no objective basis of comparison.
I’m sure folks more entrenched in the research are better equipped…
I use it constantly (probably accepting a suggestion for every few seconds of typing), to the point where I'm starting to just not think about it anymore like I previously didn't think about normal autocomplete. It has written hundreds of perfect unit tests for me (perfect as in I have read the code and it matches virtually exactly what I would have written down to comments and variable names). That's so much mundane low-value typing that I just didn't have to do. Write the name of the test, hit tab, review, and move to the next.
It's certainly not perfect, and you must ALWAYS review what it suggests rather than blindly accepting, but it's incredibly valuable imo.
For reference, I use Copilot in both Rider and VS Code.
If I put a single swear word in my code it refuses to complete anymore
The premise of cody is the ability to pass entire repos in via embeddings and only highlight the relevant functions in various code snippets to pass into the LLM prompt.
When marketing Cody ideally it would have a comparison and statements per the ease of switching from copilot. Happy copilot customers are your most likely adopters.
What's the catch?