Copilot

魯捷 Lv1

Copilot

從之前試用期間過了之後就沒有再訂閱,最近又回來付費訂閱啦,所以就稍微記錄一下快捷指令用法等等的~

簡單介紹一下 Copilot (應該沒人沒用過就是了),目前 Copilot 應該是已經使用了 GPT-4 了,那他就是拿 Github public repos 來做訓練(目前 Github 上最多的語言是 js),並且有非常複雜的快取機制來避免 DDOS 攻擊。

也因為 Copilot 的出現發展出一個有趣的 CDD (Comment Driven Development),真的是蠻有意思的。但過多的註解也很干擾程式閱讀,如果註解有誤就更可怕啦(可以產生完程式碼後把註解移除)

指令 (Visual Studio Code)

  • /fix: 修正程式碼
  • /explain: 解釋程式碼
  • /doc: 產生文件
  • /tests: 產生單元測試
  • /clear: clear session
  • /terminal: 用 cli 做事
  • /new: 建立系統架構

我自己比較常使用的是 /fix /explain

快捷鍵

  • inline-chat: command + i
  • new chat: command + shift + i
  • more code: control + enter

我自己覺得 new chat 的方式產出的程式碼更精準

先記錄到這邊,如果還有用到更多再繼續更新~

  • Title: Copilot
  • Author: 魯捷
  • Created at : 2024-02-05 23:39:22
  • Updated at : 2024-02-05 23:41:22
  • Link: https://redefine.ohevan.com/2024/02/05/Copilot/
  • License: This work is licensed under CC BY-NC-SA 4.0.