Home > Technology peripherals > AI > Getting Started with GitHub Copilot Workspace

Getting Started with GitHub Copilot Workspace

William Shakespeare
Release: 2025-03-10 09:16:09
Original
878 people have browsed it

GitHub Copilot Workspace (CW) Technology Preview Edition is now available! CW is a task-centric development environment that allows you to define tasks for your code base in natural language and collaborate with AI to complete these tasks. This guide will walk you through multiple entry points to get started with Copilot Workspace.

Catalog

  • Task Start Entry Point
    • GitHub Issue
    • Create ad-hoc tasks with CW dashboard
    • Create ad-hoc tasks through codebase page
  • Create a code base from a template
    • Use "Use this template" on GitHub.com
    • Use "New Session" on the dashboard
    • Use URL
  • GitHub Copilot Workspace's code base maintainer feature
  • Limit the use of GitHub Copilot Workspace in the code base
  • Known issues and future improvements
    • Rewrite large files
    • Code generation
    • Content selection
    • Web search
    • Build/test fix
    • Small tasks and large tasks
    • Authorization
  • Summary
  • FAQ

Task Start Entry Point

Efficient start of tasks is essential to maintain productivity and simplify workflows. Whether you are based on an existing GitHub issue or creating a new task from scratch, CW provides multiple entry points to help you start a task easily. By leveraging these flexible options, you can quickly transition from identifying tasks to actively handling tasks, ensuring a smooth and organized workflow to suit your needs.

1. GitHub Issue

If you already have a GitHub issue that describes the task you want to perform, it's very easy to start with that issue. Please follow the steps below:

  • Open GitHub issue.
  • In the "Development" section of the right panel, click the "Open in Workspace" button.

This operation opens the issue in Copilot Workspace and starts the process of analyzing and resolving the issue.

Getting Started with GitHub Copilot Workspace

2. Create ad-hoc tasks with CW dashboard

You can also start tasks directly from the CW dashboard:

  • Open the CW dashboard.
  • Click on the "Select Code Base" option under the "New Session" section.
  • Search for the code base you want to process.
  • Select the code base and define a new task from scratch, similar to drafting an issue.

After you execute a task for the code base, it will be displayed in the session list under the New Session section to facilitate you to select new tasks for your ongoing projects.

Getting Started with GitHub Copilot Workspace

3. Create ad-hoc tasks through codebase page

Another way to start a task is to start it directly from the code base page:

  • Navigate to the codebase page of the project you want to work on.
  • Click the green "Code" button.
  • Enter a new task in the Copilot tab.
  • Submit task.

This will take you into the CW and begin the process of analyzing and solving tasks.

Getting Started with GitHub Copilot Workspace

Create a code base from a template

Copilot Workspace allows you to create code bases from templates in natural language.

Use "Use this template" on GitHub.com

To create a code base using Copilot Workspace, navigate to the template code base on GitHub.com and select "Use this template":

  • Click "Use this template" to start creating your code base.

Getting Started with GitHub Copilot Workspace

  • This task is based on the software description you provide and the README of the template code base.
After starting, the task of creating a code base is as follows:

    The task is marked as "Code Library" and the "Template" panel indicates the template code library.

Getting Started with GitHub Copilot Workspace

Copilot Workspace will generate codebase specifications, create plans, and final implementations based on your description.

Use "New Session" on the dashboard

You can also create a code base from the template by clicking the New Session button on the Copilot Workspace dashboard and searching for the template. This will open a new task in the workspace where you can describe the software you want to create.

Use URL

You can enable the Create Codebase mode for any codebase URL by adding ?template=true as a query parameter. For example:

<code>https://copilot-workspace.githubnext.com/githubnext/hello-world?template=true</code>
Copy after login
Copy after login
Some codebases are considered templates by default:

    Any GitHub template codebase.
  • Any code base in your organization whose name contains "templates".
  • Any code base with the name "-template", "-scaffold", "-starter", or "-boilerplate".
GitHub Copilot Workspace's code base maintainer feature

As a code base maintainer, Copilot Workspace can help you in a variety of ways:

  • You can explore potential issue solutions.
  • You can generate sketches of issue solutions for potential contributors, lowering the barrier to participation.
  • It can help foster a culture where issue creators leave more useful instructions on how to resolve issue for contributors and AI assistants.

For example, when a new issue is submitted in your code base, you can use Copilot Workspace to generate a solution sketch for that issue. You can then use the Share button to post this sketch back to the issue thread, with additional comments on whether you think it is useful and what aspects may need to be improved. This can help potential contributors better understand the problem and provide a starting point for their work.

Similarly, when submitting a new issue, you can ask contributors to create a Copilot Workspace session for that issue. This may help contributors better understand the problem and provide a starting point for their work. You can also include this guidance in the issue template of the code base, assuming your users have access to Copilot Workspace. You can also ask contributors to leave additional instructions in the Copilot Workspace session, which can help future contributors and AI assistants better understand the problem.

Limit the use of GitHub Copilot Workspace in the code base

Unruly contributors may overuse AI-assisted code generation. Therefore, we provide codebase maintainers with the option to disable the creation of pull request and/or issue comments in their codebase using Copilot Workspace directly.

To disable creating a pull request directly using Copilot Workspace, create a file named .github/copilot-workspace/policy.json in the default branch of the code base, which contains the following content:

<code>https://copilot-workspace.githubnext.com/githubnext/hello-world?template=true</code>
Copy after login
Copy after login

To disable the issue comments that directly use Copilot Workspace to generate a Copilot Workspace session link, add the following to the policy.json file:

<code>{
"allowPullRequests": false
}</code>
Copy after login

Copilot Workspace users can still:

  • Create shared links for Copilot Workspace sessions and paste them into issue comments.
  • Push to a new branch in the code base (if they have write permissions).
  • Push a new branch to the codebase branch.
  • Create pull request manually from the branch.
  • Use Copilot Workspace to generate snippets and files for their own pull request and issue comments for use in their own code base.

Known issues and future improvements

Remember that GitHub Copilot Workspace is a technology preview and an area of ​​active development. This document lists some known issues and some known areas where we hope to improve our products in the future.

The following are the core areas we are actively working to improve Copilot Workspace:

Rewrite large files

When it implements plans involving large file changes, it can take a long time to complete. Copilot Workspace currently uses "whole file rewrite" because we find this to be highly thorough on a variety of tasks that Copilot Workspace can be used for. We are working on some file rewriting techniques (automatically and under user guidance) to improve the performance of this operation.

Code generation

Copilot Workspace generates code quality not always perfect. It is highly correlated with the quality of the underlying AI model used. We are working on improving the quality of code generated by Copilot Workspace at multiple levels. For example, the quality of code generation is affected by the planning and specification quality of tasks and the overall user experience of evaluating and clarifying these tasks. We are also working to improve these aspects. The quality achieved is also related to the experience of the iteratively generated code. We are actively studying finer-grained iterative technologies.

Content selection

Content selection in Copilot Workspace may sometimes be not optimal, which can lead to the generation of task-independent code. We are working to improve content selection in Copilot Workspace.

Web search

Tasks can contain direct links to network resources such as documents. In addition, some network searches can be inferred from the task. Copilot Workspace does not currently perform network retrieval and we are working on adding this feature.

Build/test fix

After code is generated, AI and traditional tools can be used to "fix" the code based on diagnostic information generated from the build, test, and run the code. We already have some support for this in Copilot Workspace and we are working to improve this.

Small tasks and large tasks

Some tasks are very small: update a few lines of code in the file. Some tasks are very large: implement a brand new code base function one by one. Copilot Workspace is currently designed for medium-sized tasks on GitHub issue. We are interested in providing variations of the Copilot Workspace core concept in a scheduling that is more suitable for small and large tasks. For example, for small tasks, we might offer a "lite version" of Copilot Workspace with only one task. For large tasks, we may provide a way to break the task into subtasks.

Authorization

It uses the GitHub OAuth application for authentication. Some organizations may have policies that limit OAuth applications from interacting with their code base. Unless the organization administrator approves the Copilot Workspace OAuth application, you will not be able to perform tasks in a private code base or create pull requests in a public code base. We are working to add a second authorization option to Copilot Workspace based on GitHub application and update this document when it becomes available.

Summary

Get Started Copilot Workspace is simple and flexible, with multiple entry points suitable for your workflow. Whether starting with the GitHub issue, CW dashboard, or codebase page, you can easily define tasks and collaborate with AI to enhance your development process. So, what are you waiting for? Start exploring now!

FAQ

Q1. What is Copilot Workspace (CW)? A: CW is a task-centric development environment that allows users to define tasks for the code base in natural language and complete these tasks efficiently in collaboration with AI.

Q2. How to start a task in Copilot Workspace? A: You can start tasks through a variety of entry points: A. Launch from the GitHub issue by clicking "Open in Workspace". B. Start directly through the CW dashboard by selecting the code base and defining the new task. C. Start from the code base page by entering the task in the Copilot tab.

Q3. Can I create a code base from a template in Copilot Workspace? A: Yes, you can create a code base using templates in the following ways: A. Select Use this template on GitHub.com. B. Click "New Session" on the CW dashboard and select the template. C. Add ?template=true to any codebase URL.

Q4. How does Copilot Workspace help code base maintainers? A: It helps maintainers by: A. Explore potential issue solutions. B. Generate solution sketches for contributors. C. Detailed issue descriptions and instructions are encouraged.

Q5. What are the known issues with Copilot Workspace? A: Yes, some known issues include: A. Rewriting large files slowly. B. Content selection is sometimes not optimal. C. Fuzzy detection is too sensitive. D. There is no "Stop" button when generating pull request description

The above is the detailed content of Getting Started with GitHub Copilot Workspace. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template