Comprehensive analysis of GPT-4-based code editor: GitHub Copilot X
Last Friday, Microsoft added the GPT-4 function to the Office family bucket and brought a new product, Microsoft 365 Copilot.
As the first GitHub Copilot to eat crabs, how can it lose its presence in this wave.
Today, it's finally here.
Last night, GitHub officially tweeted that an AI-driven, cross-age code editor GitHub Copilot X was born, which will bring developers an unprecedented programming experience!
Students who have already opened GitHub Copilot can go to the link below to apply to enter the waitlist.
Apply for internal testing: https://github.com/github-copilot/chat_waitlist_signup/join
The previous generation of GitHub Copilot had an excellent experience when assisting developers to complete programming tasks. In the two years since its birth, 46% of the code has been automatically generated, and the coding speed has been increased by 55%.
What surprises does the updated GitHub Copilot X bring us? Please see:
- Integrated GPT-4 (Microsoft's son, must be arranged);
- GitHub Copilot Chat (talk to AI while writing code);
- Copilot for Pull Requests (AI assists in processing PR);
- Copilot for Docs (intelligent document system);
- Copilot for CLI (make the command line use smarter).
- Copilot Voice (direct voice generation code, awesome!);
Below, let us take a look at one by one, for a developer, how shocking these functions can be.
GitHub Copilot Chat
I believe that you who have been swiped by ChatGPT and Bing Chat these days have no doubts about the true strength of these two products.
So, what if all their functions are added to GitHub Copilot?
That's right, this time GitHub Copilot X will embed a chat window in the product, integrate GPT-4 into the actual development scene, and integrate it into VS Code and Visual Studio.
This chat window is not ordinary. In addition to real-time interactive question and answer, it can also complete operations such as code content identification, error message display, and voice communication.
Through this function, developers can deeply analyze and understand the purpose of each code block, quickly generate unit tests, and even modify bugs with one click, just ask you if you are serious or not!
In the future, perhaps we no longer need to look at the code line by line, find bugs, and write tests, but directly use GitHub Copilot Chat to quickly handle these tasks.
Copilot for Pull Requests
Students who have maintained open source projects or used Git for teamwork should know how important it is for project developers to submit Pull Requests (PRs) in a standardized manner.
A clear and concise PR description information allows code reviewers to understand at a glance, quickly understand your code changes, reduce the possibility of project merging errors, and improve communication efficiency.
Therefore, Copilot introduced the GPT-4 model, trying to make it automatically generate descriptions by dynamically extracting and analyzing code change information.
Developers only need to insert tags in the PR description, and Copilot will automatically recognize it and perform extended supplementary writing.
The supported tags mainly include the following:
- copilot:summary generates a summary summary for a PR.
- copilot:walkthrough Detailed list of changes, including links to relevant code snippets.
- copilot:poem Write a poem describing the change.
- copilot:all automatically generates all of the above.
With the update and iteration of subsequent products, Copilot will also add two new functions named Gentest and Ghost Text .
Gentest: Use AI to identify tests that may be missing in PR, and automatically build and generate tests for you.
Ghost Text: Provides content auto-completion when you write PR descriptions or documents.
Not only that, when you receive an issue submitted by a user, if there is no better solution, AI will give you suggestions. Reviewing code is troublesome, and AI can also help.
It is estimated that in the near future, AI will help you automatically adjust code, improve PR, and fix bugs.
To put it bluntly, this guy is going to start stealing your job...
Copilot for docs
The importance of documentation to a developer is self-evident. Whether you are new to a project or forget how to use an API.
At this time, you will eagerly hope that an excellent technical document will appear in front of you.
In order to help you locate the content of the document faster and obtain the desired information simply and directly, Copilot for docs came into being.
Users can ask questions about project documents, commonly used codes, etc. through an interface similar to ChatGPT, and get answers instantly.
All you need to do is to write down the question you want to know in the input box, press Enter, and Copilot will automatically locate and return the relevant content contained in the document.
Another great thing is that it can return different answers according to the different programming levels of users, the degree of understanding of the document, and the content they want to know.
If necessary, it can also shuttle back and forth between different third-party library documents, stitch their contents together, and return the result to you.
If you are interested, try to turn Copilot for docs into your knowledge base, I believe there will be unexpected gains.
Copilot for CLI
In addition to processing PR requests and writing code mentioned above, the command line terminal is also one of the essential tools for developers' daily work.
I often like to install various command-line productivity tools on iTerm. These tools can help me deal with some problems efficiently most of the time, but those that are used less often will often forget commands.
Whenever this happens, I always type help to get more information about the command.
For command-line tools with more complex functions, you have to go to StackOverflow to find the correct usage from time to time.
It would be great if there is an AI by my side who can understand my demands and help me get everything done quickly.
Ever since, Copilot for CLI came with its 3 shell commands.
These three commands are: ??, git?, gh?.
??It can be used as a general goto for any shell command. Enter the relevant description after the command, and Copilot will list the specific commands that are most suitable for the description.
> ?? list js file
AI will provide reference commands and descriptions, and if not satisfied, can further change the description.
After confirming, select Run this command in the terminal, and then press Enter.
git? is used to specifically search and invoke git.
Compared to ??, it is much more powerful in generating Git commands.
If you explicitly want to use Git commands, you can use this first.
gh? combines the flexibility of GitHub CLI commands with the convenience of the query interface. The combination of the two makes the search faster and the information display clearer.
Internal test application: https://githubnext.com/projects/copilot-cli
Although most scenarios of GitHub Copilot CLI are mainly focused on Git and GitHub, after being combined with AI, the interactivity and coherence have been further improved. In this way, I believe it can also provide some reference ideas for other command-line tool developers.
A few years ago, when GitHub Copilot was first released, some people discussed on the Internet: "AI is so strong, maybe I will use my words later, and it can help me write the code I want."
It is estimated that everyone did not expect that this day came so quickly.
Copilot Voice, an extremely groundbreaking programming tool, appeared.
Users just talk to GitHub Copilot, and it can start writing code immediately, directly freeing your hands!
If you are not satisfied, you can continue to talk and let it make changes.
Through dialogue, Copilot Voice can:
- Code jump (jump to x line, method, function);
- Control the IDE (open zen mode, run programs or other VSCode commands);
- Code summary (you can ask it: 3-10 lines of code, what does it mean);
All the work can be done with an open mouth.
Internal test application: https://githubnext.com/projects/copilot-voice
Linux once said: "Talk is cheap, Show me the code."
But this time, sorry, I want them all.
One day in the future, when you suddenly want to develop a program on a whim, you may only need to shout "Hey, GitHub!", and AI will do everything for you.
write at the end
This GitHub Copilot X, centering on AI dialogue, Pull Request submission processing, document intelligent retrieval and reading, command line transformation, and finally voice generation code, can be said to subvert the traditional programming method in all aspects.
When the robot can accurately understand human natural language, learn from zero to one, and complete the design, development, deployment and other work of the project. In the future, the group of programmers, like telegraph operators, may become an ordinary job that once appeared in history.
Flick off your clothes when it's over, and hide your merit and fame deeply.