449 文字
2 分

GitHub Copilot Agent Modeを試す

GitHub Copilot Agend Mode が「GitHub Copilot: The agent awakens」にて紹介されていた。

現状は、プレビュー(VSCode Insiders)でのみ利用可能であり、合わせて GA が発表された Copilot Edits のモードとして提供されている。

Copilot Edits#

Copilot Edits を利用すると、編集対象やコンテキストを指定した上で、変更をリクエストできる。 Copilot Chat と同じ画面の左上のボタンで Chat と Edits を切り替えられる。

alt text

GitHub Copilot Agent Mode (Preview)#

GitHub Copilot Agent Mode では、Cursor や Cline のように与えられたリクエストに対して、コードの生成に加えて、エラーの検知や修正、ターミナルコマンドの提案を行うことが出来る。

Copilot Edits の右下にある「Edits」を「Agent」に切り替えることで利用できる。

alt text

コードの生成や、コマンドは自動的に実行されることはなく、ユーザーの確認が要求される。 コードの生成の場合は「Accept」を押すと保存され、コマンドの場合は次の「Continue」を押すことで実行される。

alt text

利用できるモデル#

GPT-4o、o1、o3-mini、Claude 3.5 Sonnet、Gemini 2.0 Flash が利用できる。 各モデルの利用には、次の URL 先にある Copilot policies での設定が必要。

https://github.com/settings/copilot

機能によっては利用できないモデルがあるため注意。例えば Agent Mode では o1、o3-mini は利用できない。

Custom Instructions#

Copilot Chat では、.github/copilot-instructions.mdを配置することで、Custom Instructions を追加できた。Copilot Edits 及び Agent mode でも同様に有効であることが確認できた。

https://docs.github.com/en/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot?tool=vscode

Vision (Preview)#

画像を Copilot Chat などに添付して解釈させることが出来る Vision もプレビュー(VSCode Insiders)で利用可能になった。

https://github.blog/changelog/2025-02-06-next-edit-suggestions-agent-mode-and-prompts-files-for-github-copilot-in-vs-code-january-release-v0-24/#vision-public-preview

ただし、これは GPT-4o モデルを使用していない場合は利用できない。

GitHub Copilot Agent Modeを試す
https://blog.ohirunewani.com/posts/github-copilot-agent-mode-try/
作者
hrdtbs
公開日
2025-02-09
ライセンス
CC BY-NC-SA 4.0