Innovation lessons from GitHub Chat and GitHub Copilot Labs
Tags: opensource, ai, openai, machinelearning
Published: 2024-02-02 07:58:00

In one of the recent blogs, I mentioned how Vercel can benefit from and adopt some techniques from GitHub Copilot Labs to improve its products. 

In this article, I will explain GitHub Copilot Labs as an extension, mentioning its value and how companies can have a similar path for themselves. The main idea is to have a reference that talks about the extension and has it in the history since GitHub Next decided not to continue supporting it.  

## What is GitHub Copilot Labs?

[GitHub Copilot Labs](https://githubnext.com/projects/copilot-labs) is a tool run by the [GitHub Next](https://githubnext.com/) team, the R&D team of GitHub, to figure out new paths and methods to enable developers to benefit from Copilot in a new way. 

On the 15th of December, 2023, GitHub stopped supporting GitHub Copilot Labs and merged it into the GitHub Copilot chat. The merge will enable easier usage, but those who have not used Copilot Labs or knew about it would miss a priceless piece related to the technology development.

GitHub Copilot Labs started after GitHub Copilot as a research project for GitHub Next; they had a few tools with preset prompts that used an open chatbot to generate the related codes. One of the advantages they had was the integration with VS Code, which allowed for a great development experience. The presets clarified how to use Copilot in the pre-chatGPT area and how that would help developers. 

An example of Copilot Labs is the code explanation, which you can ask to clarify the code and see the results in human-readable text. I will explain the features further in the next section:


![Example of the GitHub Copilot sidebar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gh2vnzwugx0s1runbbe8.png)

## The Design and how it works? 

The design of the extension is pretty simple. The extension adds a sidebar to VsCode, allowing you to generate code based on the presets. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwezp3y1mm269q0lnlqu.png)



Those presets are: 
- Language Translation: this allows you to translate from one specific programming language to another. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vce04uhexs33z18endz3.png)



- Brushes: these are a few functions that would be helpful for coding, like adding types, improving readability, and adding documentation. Here is a [video example](https://www.youtube.com/shorts/gb1Jf1Huxs4) by VS Code that explains the custom features.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vim93gybe7juiyhw8yrt.png)



- Explain: to explain the code with preset explanation examples:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5u7dutrs8d1ztkqyots.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/09gak7o586d6a3z21v51.png)



- Test Generation: Looking at the options they provided, you will feel that it’s just a prompt engineering extension, which is correct based on their explanation in discussions and on the website. The innovation side of the extension was to enable the user to have a multiple option for a new tool that was not clear how to use since GitHub Next announced it in [2021](https://github.com/orgs/community/discussions/8308). 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xcg4ysbdwjnnag2nmjdg.png)



## Early adopters and innovation

With every innovation, you might need early adopters to explain it and get people excited to use it or even advocate for it. With GitHub Copilot Labs, the company had an opportunity to experience that at an early stage and gain insights about what is the most important for them to use. They collected stats from the extension on the most used features and, at the same time, were in a conversation with developers through discussions, beta, and alpha trials. The early conversations enabled them to find the direction they wanted to develop a tool to help developers. 

The extension used to work by getting a selected text and writing the code based on the selections, which enabled more accurate data and results from having a general talk. With that collected data and insights, they [integrated similar features](https://gist.github.com/idan/325676d192b32f169b032fde2d866c2c) to GitHub Chat and open-sourced the [test generation functions](https://github.com/githubnext/testpilot). 

## GitHub Copilot Chat 

GitHub Copilot Chat is the successor of GitHub Copilot Labs. Chat is more intuitive and functions similarly to the one experienced in the GitHub Copilot Labs, such as the code selection features, the test generation, etc. Another benefit is the ability to converse with the AI model. Chat Extension would make it easier for users to understand how to use it and benefit from the 

If you are using GitHub Chat for the first time, you will notice the ability to have a conversation within the code editor, which feels like talking to an actual human. You can ask for code explanations or even fix your bugs. Here is a simple example: 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/89ix468ytlyi7e40zst4.png)



Besides the conversation, you can use special functions in GitHub Copilot Chat as commands. This function is similar to the GitHub Copilot Labs functions, yet instead of having them through user interface buttons, you will have them as a conversation. Such development touches the new wave of LLM and provides a good user experience. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xxoer6gkf770vz8a2cg5.png)


Another great thing in the Copilot Chat is the ability to add code with one button: 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckcbj72w594homrjiawt.png)



This button lets you insert the code immediately from the extension to the cursor position, making it easier than copy-pasting. 

## GitHub Copilot Labs Vs GitHub Chat

If we compare both products, we can notice that both rely on GitHub Copilot and OpenAI models. Replying on OpenAI models makes them similar in logic. 

GitHub Copilot and GitHub Copilot chats are getting the file extension and name and then adding that information to the prompts they are sending to the GPT engine; with this, they make a better and more robust code generation. 

The main difference is that GitHub Copilot Labs was used as an experiment before having a fully working product. The prompts to the OpenAI model were preset and defined by GitHub, and the program was not able to have an entire conversation or save the history. On the other hand, GitHub Copilot Chat has enabled the users to use their prompts with the conversation's history. This enablement gives the user more power to explore AI's potential and write creative prompts. 

## Lessons

By looking at the development of the GitHub Copilot Chat and GitHub Copilot Labs, we can notice the following: 

- GitHub had agile and made a few experiments to get the best for the market. They learned from those experiments and created products that help.
- They have a different company for R&D, which aims to get products from 0 to 1. After that, they graduate the project with a different team, moving the product from 1 to 100, which means scaling the product to scale for the whole market. 
- Early adopters of new tools and technologies always have an advantage. 
- Other companies could have a similar path for their products. Going back to the V0.dev article, I believe that Vercel could have an extension that could create code from a selected file, understand the design system by analyzing the file structure and file names, and even provide a minified ready-to-work user interface first, then move that to a full product that runs on the more intuitive creative aspect. 

In the end, the development in the AI world is going fast. We have had a product for two years, and seeing massive hype around it will only push us forward to find the best for humanity. 

Finally, can you share if you have used any of those tools in the comments? And how do you see the future of developers' tools?