GitHub's Copilot goes beyond code completion, adds a chat mode and more

GitHub is announcing its Copilot X initiative today, an extension of its work on its popular Copilot code completion tool, which originally launched into preview all the way back in 2021. With this, the Microsoft-owned company is launching a code-centric chat mode for Copilot that helps developers write and debug their code, as well as Copilot for pull requests, AI-generated answers about documentation and more. Unsurprisingly, these new features are powered by OpenAI's GPT-4, though it's worth noting that, mostly for latency reasons, the code completion tool remains on GitHub's Codex model, which it derived from GPT-3.

"With the new model coming online, we asked ourselves: what's the next step? What's the next step for Copilot? We believe that for auto completion, we nailed that scenario," GitHub CEO Thomas Dohmke told me.

Image Credits: GitHub

The natural next step for GitHub -- and this doesn't come as a huge surprise -- is to add chat to the developer experience. Launching in preview today, Copilot Chat will be available in Visual Studio and VS Code, with support for other IDEs coming later.

As Dohmke noted, this doesn't just bring ChatGPT into the IDE, but also brings the context of the IDE to ChatGPT. That means you can highlight code in the editor, for example, and then ask Copilot about those code snippets, use it to refactor this code and ask it to help you debug it, if necessary (because it also knows about the output in the terminal). GitHub achieves at least part of this through some clever prompt engineering that stuffs the prompt with as much context as possible.

Of course, you can also ask Chat to write code for you. In a demo, GitHub is showing off how you can ask it to build the classic Snake game, for example.

Image Credits: GitHub

"I'm a developer, but I'm also CEO. So the time I have for actually developing code is fairly limited. And I played with it the last couple of nights and it's really fun. It brings the fun back to programming because you don't have to find a tutorial and don't have to figure out which one is the right tutorial, you just keep going," Dohmke said. "I'm sure students and kids are going to be blown away when you give them access. It becomes this addictive thing, because you have something that you can constantly ask questions."

Unsurprisingly, Copilot Chat will focus solely on programming questions. It will quickly shut down questions about anything else.

Dohmke argues that while autocomplete already allows developers to greatly improve their productivity, this new Copilot will 10x developer productivity.

Image Credits: GitHub

As part of the overall Copilot X initiative, GitHub is also bringing Copilot to the command line. Similar to what Warp is doing with its terminal, GitHub is now also helping developers use the command line by helping them compose commands and loops -- and to find those obscure feature flags that are often buried deep in a manual (or at least a Stack Overflow search or two away).

And there's more. Developers can also now sign up for a technical preview of a new Copilot feature that generates descriptions of pull requests and automatically tags them, too. "Nobody likes boilerplate," Dohmke said. "This is boring and it's menial work, whether it's in the code layer, with Copilot, or in the pull request layer." This, he noted, is just the beginning. Because the tool already scans the code, it can also automatically find missing tests and generate those, and Dohmke promised that we'll see more along these lines in the future.

Image Credits: GitHub

Also new is Copilot for docs, which enriches ChatGPT's existing database, which you can already query about framework and language docs, for example. But ChatGPT's cutoff date in 2021 means this information isn't always up to date, so GitHub is augmenting it with more recent data (similar to what Microsoft's Bing is doing for search with its Prometheus model). GitHub is starting with documentation for React and from the Azure Docs and Mozilla's MDN and developers will be able to query those docs in a ChatGPT-like interface. What's maybe more interesting, though, is that GitHub plans to allow organizations to use this tool on top of their repositories and internal documentation. That's not quite ready for public consumption, though.

"Once you have a Copilot in every single application -- whether that's in Outlook, Word or your code editor, you can leverage the things you wrote in those environments, but you can also leverage the information from other workers in your organization, whether that's other developers or maybe the marketing person, who now has an easier time writing the announcement blog post, because they have seen -- in their Copilot -- the release notes that the developer has put into their git repo. [...] It removes the silos in companies and I think that's where we will unlock potentially even more than 10x in productivity."