GitHub Copilot 应用入门教程:用 diff、终端和浏览器面板审查 AI 代码

GitHub Blog·2026-09-11 05:31·42分钟前·Kayla Cinnamon
AI 导读

GitHub Copilot 应用新增 diff、终端、浏览器三个内置面板,让初学者在不离开应用的情况下完成 AI 智能体改动的审查、运行和预览。diff 面板以红绿高亮显示增删改行,用户可接受、评论或要求修改;终端面板可运行项目命令并支持多窗口,浏览器面板配合 Pick & Polish 工具选中界面元素让智能体调整,最后可直接在应用内接受变更并创建 pull request。

GitHub Blog
53AI 编辑部评分,满分 100

GitHub Copilot 应用入门教程:用 diff、终端和浏览器面板审查 AI 代码

2026-09-11 05:31· 42分钟前· Kayla Cinnamon
AI 导读

GitHub Copilot 应用新增 diff、终端、浏览器三个内置面板,让初学者在不离开应用的情况下完成 AI 智能体改动的审查、运行和预览。diff 面板以红绿高亮显示增删改行,用户可接受、评论或要求修改;终端面板可运行项目命令并支持多窗口,浏览器面板配合 Pick & Polish 工具选中界面元素让智能体调整,最后可直接在应用内接受变更并创建 pull request。

When an agent makes a change to your code, you want to review it, run it, and see what changed. Great news: now you can do all three without having to leave the GitHub Copilot app.

Before, doing those three jobs would mean having to bounce between your editor, terminal window, and web browser. But when these steps live side by side as built-in panels in the Copilot app, checking your agent’s work is simple.

Let’s walk through each of the panels in the app and how we’ll use them to complete the AI coding loop.

Using the diff panel to review changes

The diff panel (a diff is a before and after comparison) shows exactly what lines were added, removed, or changed, with additions highlighted in green and deletions in red.

This gives you complete clarity, so you can choose what happens. You can accept changes, leave comments, or ask Copilot to make changes. You’re in complete control and make the final decisions.

Running commands in the terminal panel

Reading code is good, but running it is even better. You can run commands right inside the session from the Copilot app’s terminal panel. And if it looks intimidating, don’t worry. You’re mostly just running the project’s own commands and reading the results.

You can run the code by hand or configure it as a script (available through the Run button). Pretend you’re working on a website, here’s an example of how that works:

  • Add the dev server script that opens the client folder and then runs npm run dev.
  • Click Run to start the server for the website.

You can have multiple terminal windows open at once, so you can switch between them and keep running commands.

Using the pick & polish tool in the browser panel

For anything that has a user interface, the browser panel closes the loop. And for our website example: this panel means you can open it and test your new feature as if you were using the site.

If you want to keep iterating, you can use the Pick & Polish tool to select an element and adjust it with the agent.

And to see what got fixed, you can run the dev server script again after you’ve made changes.

Closing the loop of reviewing AI code

Now you’ve reviewed the diff, started the project in the terminal, reviewed it in the browser, and iterated to get it to a working feature. Once you’ve gotten it where you want, you can accept the change directly from the Copilot app and create a pull request. Completing this loop from one place means there’s no tab hopping, switching apps, or losing your place.

Having review, run, and preview side by side is what makes agent-made changes feel safe instead of scary, because you can prove that what you’re merging works.

Take this with you

These built-in panels answer three important questions you should always ask before you accept an agent’s work.

  • What’s changed? 
  • Does it run?  
  • And does it actuallywork?  

Running through this list before accepting agent-generated code will help you understand what changed and whether it functions the way you want, keeping you in control. ✨

Try using the GitHub Copilot app >

来源:GitHub Blog· github.blog