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.
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.
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:
This operation opens the issue in Copilot Workspace and starts the process of analyzing and resolving the issue.
You can also start tasks directly from the CW dashboard:
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.
Another way to start a task is to start it directly from the code base page:
This will take you into the CW and begin the process of analyzing and solving tasks.
Copilot Workspace allows you to create code bases from templates in natural language.
To create a code base using Copilot Workspace, navigate to the template code base on GitHub.com and select "Use this template":
Use "New Session" on the dashboard
Use URL
<code>https://copilot-workspace.githubnext.com/githubnext/hello-world?template=true</code>
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.
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>
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>
Copilot Workspace users can still:
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:
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.
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 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.
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.
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.
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.
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.
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!
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!