我发现 Github Copilot 也挺好用的,可惜一直没注意。今天试了下感觉还不错,能够突破上下文的限制,生成代码文件,自动提交 PR。整个流程体验还是不错的。
研究了两天终于搞明白了 GitHub Copilot 产品分类了,着实有些繁杂但背后线路也渐渐清晰了。
Ask mode:就是最基本的提问回答模式,编辑器不会做任何代码修改。
Edit mode:是指定部分文件交给 AI 去修改,限定了编辑范围。比如修复 BUG 时,如果很清楚问题产生的原因和文件位置,适合用这个模式。
Agent mode:是让 AI 自行去当前项目文件里寻找信息构建上下文,属于比较模糊查找的自动编辑。当不知道问题在哪里时候,或者写新功能需要适当的全局观时,可以用这个模式。
Coding Agent:这个是一个跟上边几个模式不同的产品。上边三个可以归类为编辑器内不同的 AI 模式。但 Coding Agent 则是运行在云端的独立智能体,会在 GitHub 上发 PR 然后自行编码。像是个独立的工程师。适合做一些代码量比较大的新功能开发。
整体来看,Github Copilot 摊子铺的很大,这些功能基本上就是 Cursor + Claude Code。微软的战略重点确实在向 GitHub 靠拢。毕竟在开发工具领域微软向来都是非常重视的。
Codespaces compute is counted in core hours, which is the sum of the time a codespace is active, multiplied by the multiplier for the codespace's machine type: for example, a multiplier of 2 for a 2-core machine, or a multiplier of 8 for an 8-core machine. A codespace becomes active when you create it or start it. A codespace stops being active when you stop it or delete it, or when it is stopped or deleted automatically.
The default idle timeout, which stops a codespace after a period of inactivity, is 30 minutes. You can reduce this if required.
Copilot coding agent uses GitHub Actions minutes and Copilot premium requests.
了解各模型特点才能更好的分配任务,过期的旧模型某些场景表现更好。现阶段手动 route 不同需求到不同模型还是很有必要的。
https://docs.github.com/en/copilot/reference/ai-models/model-comparison
今天才搞清楚了 Github Copilot Coding agent 用的是 Sonnet 4 的模型。怪不得用起来感觉棒棒的。
https://www.reddit.com/r/github/comments/1m2cmit/comment/n3pcg55
Github 的 Vibe Coding 有几条不同方向的产品线:VSCode 中的自动补全、对话、网页版的 Chat、Github Agent 还有自带虚拟机环境的 CodeSpace。每种体验不尽相同,最省事的就是 Agent,提出需求只要等着就行,不需要在 Console 里操作,也不用去管用了什么模型, AI 各种输出也隐藏了起来不用去看。完事后自动发一个 PR,审核通过就行。虽然速度慢点,感觉这个方向是以后的趋势。