惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
S
Securelist
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
量子位
博客园 - Franky
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Latest news
Latest news
T
Troy Hunt's Blog
N
News | PayPal Newsroom
Google Online Security Blog
Google Online Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
小众软件
小众软件
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
L
LINUX DO - 最新话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
P
Privacy International News Feed
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
T
Tailwind CSS Blog
博客园_首页
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
D
DataBreaches.Net
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
Engineering at Meta
Engineering at Meta
Forbes - Security
Forbes - Security
T
Tenable Blog

陈少文的网站

巨变与机遇的未来十年 Kubernetes 平台管理软件压力测试方案 使用镜像部署 Hexo 静态页面 终于等到你 - GitHub 镜像仓库服务(ghcr.io) 一起来学 Go --(6)Interface 一起来学 Go --(5)Goroutine 和 Channel 什么是函数式编程 如何在 Kubernetes 集群集成 Kata 柯里化与偏函数 使用 PyGithub 自动创建 Label 软件产品是团队能力的输出 Helm 2 、Helm 3 比较 IoT 变现 Kubernetes 中的 DNS 服务 国内的 Helm 镜像源 Harbor 使用自签证书支持 Https 访问 DevOps 工具链之 Prow 如何使用 kfctl 安装 Kubeflow VS Code 无法下载 Go 插件的工具包 工程师更应具有服务精神 你不知道的 Docker 使用技巧 使用 Docker 运行 Tensorflow 论中国 什么是左移 如何清空 Git 仓库全部历史记录 一禅小和尚 有风吹过厨房 时间的玫瑰 如何在 CentOS 安装 GPU 驱动 开发 Tips(19) 使用 Velero 备份 Kubernetes 集群 Kubernetes Cheat Sheet 开发 Tips(18) 如何构建一个 Java 工程 开发 Tips(17) KubeSpray 安装 Kubernetes 报错 ip in ansible_all_ipv4_addresses 基于 Kubernetes 和 Jenkins 搭建自动化测试系统 在 Kubernetes 上动态创建 Jenkins Slave 使用 Jenkins 进行服务拨测 开发 Tips(16) Kubernetes 签发 Ingress 证书及日常故障运维 Kubernetes 中 Deployment 的基本操作 Kubernetes 中的证书 如何使用 KubeBuilder 开发一个 Operator Kubernetes 1.6.0 安装问题汇总 镜像管理工具 -- Harbor 开发 Tips(15) Docker 如何拉取镜像 开发 Tips(14) 使用 Helm 安装 harbor 开发 Tips(13) 使用 S2I 构建云原生应用 在 Kubernetes 中使用 emptyDir、hostPath、localVolume 开发 Tips(12) 开发 Tips(11) 代码质量分析工具 SonarQube 使用 Kubeadm 安装 Kubernetes 集群 一起来学 Go --(4)常用函数 Kubernetes 中的 Ceph Kubernetes 之 Volumes Kubernetes 之 Labels、Selectors 开发 Tips(10) 开源正在重构商业模式 Kubernetes 之网络 Kubernetes 之 API 使用 Helm 和 Operator 快速部署 Prometheus Kubernetes 复杂有状态应用管理框架 -- Operator Kubernetes 的包管理器 -- Helm 一起来学 Go --(3)Go Modules 如何一步一步地优化博客方案 kubectl 实用指南 Kubernetes 中的基本概念 搭建远程 Kubernetes 开发环境 大公司和小公司的 ToB 思路 开发 Tips(9) Go 入门指南 一起来学 Go --(2)数据与逻辑结构 如何预防 Web 富文本中的 XSS 攻击 django-xss-cleaner 云工作时代 一起来学 Go --(1)背景与特点 SaaS 开发团队的不同阶段 你不知道的 Git 使用技巧 输出既服务 微服务设计 继续奔跑 开发 Tips(8) 从账户安全到二次验证 Django 性能之数据库查询优化 Django 性能之分库分表 敏捷开发之研发流程 打造一致性的团队 开发 Tips(7) Pytest 进阶学习之 Mock PaaS 部署之 buildpack Go 开发配置 领域输出才是 PaaS 的核心竞争力 Pytest 入门学习 开发 Tips(6) 如何使用 Jenkins、Docker、GitLab 搭建 Django 自动化部署流程
GitHub Copilot Chat 使用
微信公众号 · 2023-07-04 · via 陈少文的网站

Please enable Javascript to view the contents

1. 申请使用 GitHub Copilot Chat

申请链接 https://github.com/github-copilot/chat_waitlist_signup/join

申请通过之后,会收到一封邮件:

2. 什么是 VS Code insiders

  • 什么是 VS Code insiders

VS Code insiders 是 VS Code 的预览版本,提供一些最新的功能和改进,更新非常频繁。如果有更新强迫症,慎重使用,因为几乎每天都有更新。

  • VS Code 和 VS Code insiders 的区别

VS Code 的命令行是 code ,logo 是这样

VS Code insiders 的命令行是 code-insiders ,logo 是这样

  • VS Code 与 VS Code insiders 是否可以共存

可以共存,他们的命令行不同,Settings Sync 同步的配置也可以不同。

3. 安装 VS Code insiders

前往 https://code.visualstudio.com/insiders/ 下载最新的 code-insiders

  • 查看 code-insiders 命令路径
1
2
3
which code-insiders

/usr/local/bin/code-insiders
  • 【可选】创建软连接,替代 VS Code 命令
1
ln -s /usr/local/bin/code-insiders /usr/local/bin/code
  • 安装 GitHub Copilot Chat 查看

GitHub Copilot Nightly 已经 deprecated 不维护了。在 Extensions 中搜索 Copilot Chat,安装插件,如下图:

4. 使用 Copilot Chat

4.1 直接在 Chat 面板中聊天

类似 ChatGPT,但是 Copilot Chat 内置在 VS Code 中,不用切换到浏览器。

4.2 提供上下文,调用 Copilot 指令

在编辑器中选中一段代码,作为上下文,在对话框中输入 / 会有指令提示。

1
2
3
4
/explain 解释代码
/fix 代码修复
/tests 生成单元测试
/clear 清空对话

下图是生成单元测试的一个示例:

点击对话框的图示按钮,可以直接将 Copilot 生成的代码应用于项目。

4.3 提供上下文,右键菜单调用 Copilot 指令

在编辑器中,选中一段代码,右键菜单中会有 Copilot 指令。

此时与输入 Copilot 指令的效果一样。

在 Copilot 产生了变更之后,会出现代码 Merge 的对话框,可以选择是否应用变更。

5. 总结

本篇主要是介绍了如何在 VS Code 中使用 Copilot Chat。

Copilot 的这种形式,正在颠覆以往的产品形态。以往的产品和工具,往往只能提供信息或者执行动作,使用 Copilot 这种整合信息和执行的方式,可以真切地感受到效率的提升。

Copilot Chat 应该只能算是 Copilot 的一个前端应用,后端其实需要很多的数据、功能支撑。


微信公众号