适合初学者的 GitHub Copilot 应用程序:使用 diff、终端和浏览器
检查代理生成的代码通常意味着在选项卡之间跳转。了解如何在 GitHub Copilot 应用程序中查看差异、运行终端命令以及并排预览 Web 应用程序。面向初学者的 GitHub Copilot 应用程序:使用 diff、终端和浏览器一文首先出现在 GitHub 博客 上。

来自 GitHub AI 的官方动态,版本与适用范围以发布方说明为准。
GitHub AI · 查看官方发布中文机器翻译 · 原文附后
正文 · 来源原文
尝试使用 GitHub Copilot 应用 >
高级人工智能开发工具倡导者
当代理对您的代码进行更改时,您想要查看它、运行它并查看更改的内容。好消息:现在您无需离开 GitHub Copilot 应用程序即可完成这三项操作。
以前,完成这三项工作意味着必须在编辑器、终端窗口和 Web 浏览器之间来回切换。但是,当这些步骤作为 Copilot 应用程序中的内置面板并排存在时,检查座席的工作就变得很简单。
让我们逐步了解应用程序中的每个面板,以及如何使用它们来完成 AI 编码循环。
差异面板(差异是之前和之后的比较)准确显示了添加、删除或更改的行,添加内容以绿色突出显示,删除内容以红色突出显示。
这让您完全清楚,因此您可以选择发生什么。您可以接受更改、发表评论或要求 Copilot 进行更改。您拥有完全的控制权并做出最终决定。
阅读代码很好,但运行代码更好。您可以从 Copilot 应用程序的终端面板直接在会话内运行命令。如果它看起来很吓人,请不要担心。您主要只是运行项目自己的命令并读取结果。
您可以手动运行代码或将其配置为脚本(可通过“运行”按钮使用)。假设您正在开发一个网站,以下是其工作原理的示例:
您可以同时打开多个终端窗口,以便您可以在它们之间切换并继续运行命令。
对于任何具有用户界面的东西,浏览器面板都会关闭循环。对于我们的网站示例:此面板意味着您可以打开它并测试您的新功能,就像您正在使用该网站一样。
如果您想继续迭代,可以使用 Pick & Polish 工具选择一个元素并使用代理进行调整。
要查看修复的内容,您可以在进行更改后再次运行开发服务器脚本。
现在您已经查看了差异,在终端中启动了项目,在浏览器中查看了它,并进行了迭代以使其成为可用功能。一旦您获得所需的位置,您可以直接从 Copilot 应用程序接受更改并创建拉取请求。从一个地方完成这一循环意味着不会跳标签、切换应用程序或丢失位置。
并行审查、运行和预览使代理所做的更改感到安全而不是可怕,因为您可以证明您正在合并的内容有效。
这些内置面板回答了您在接受代理工作之前应始终询问的三个重要问题。
在接受代理生成的代码之前浏览此列表将帮助您了解更改的内容以及它是否按照您想要的方式运行,从而让您保持控制。 ✨
在代理商之前,这种规模的重写是无法承受的。以下是将 Copilot 代理运行时移植到 Rust 的 800,000 条生产线实际需要的工作。
如果你能写下你的工作方式,你就可以将其自动化。以下是我为支持 GitHub 亚太地区营销团队所做的工作。
在受控离线评估中,HydraFusion 的选择性编码工作流程匹配或超过了评估的 Opus 5 基线,同时降低了估计的工作流程成本。现在可在 GitHub Copilot 中作为研究预览。
查看英文原文
GitHub Copilot app for Beginners: Using the diff, terminal, and browser
Checking agent-generated code usually means hopping between tabs. Learn how to view diffs, run terminal commands, and preview web apps side by side in the GitHub Copilot app. The post GitHub Copilot app for Beginners: Using the diff, terminal, and browser appeared first on The GitHub Blog .
正文 · 来源原文
Try using the GitHub Copilot app >
Senior AI Developer Tools Advocate
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.
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.
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.
