In this lab, you will set up your development environment using GitHub Codespaces. This environment will allow you to work on your Copilot extension directly in the cloud without needing to install anything locally.
We'll begin by launching a Codespace on the main branch of the repository. Use the quick link below to get started:
- You should be directed to a page where your Codespace environment is automatically set up.
- This may take a few moments, as Codespaces provisions the environment and pulls in the required dependencies.
Once your Codespace is ready, you will be dropped into a fully-configured development environment. Take a few minutes to familiarize yourself with the tools and layout.
- You should see a terminal, file explorer, and code editor ready for action.
- The repository files are pre-loaded, and you can start editing right away.
Before proceeding, verify that you are working on the main
branch.
-
Open the terminal in Codespaces and run the following command to check the current branch:
git branch
-
Ensure that
main
is highlighted. If you're not on themain
branch, switch to it using:git checkout main
-
Ensure that you have the latest code by pulling any changes:
git pull
We need to start the agent in your codespace. You can do this by running the following command in your codespace terminal:
```bash
npm run dev
```
In order for copilot to access your extension, you need to make the application port publicly accessible.
- Navigate to the
ports
tab
- Right click on port 3000 (This agent's API), select
Port Visibility
and thenPublic
Note: You will need this URL later, you are able to right click and select "Copy Local Address" to make it available to paste when required.
With the Codespace set up and ready, you're now prepared to begin working on your Copilot extension. In the next lab, we will create the foundation for your extension.
Continue to Lab 1.2 - Configuring an Agent