From ee3460b8d74951ea472c735964658bb02f19488b Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Thu, 26 Mar 2026 16:03:07 -0700 Subject: [PATCH] docs: add Copilot CLI hooks section to i18n notifications page (#2217) Follow-up to #1875 which added Copilot CLI hook instructions to docs/notifications.md but not the live docs site. Adds the section to page.tsx with translation keys for all 19 locales. Co-authored-by: Lawrence Chen --- web/app/[locale]/docs/notifications/page.tsx | 49 ++++++++++++++++++++ web/messages/ar.json | 3 ++ web/messages/bs.json | 3 ++ web/messages/da.json | 3 ++ web/messages/de.json | 3 ++ web/messages/en.json | 3 ++ web/messages/es.json | 3 ++ web/messages/fr.json | 3 ++ web/messages/it.json | 3 ++ web/messages/ja.json | 3 ++ web/messages/km.json | 3 ++ web/messages/ko.json | 3 ++ web/messages/no.json | 3 ++ web/messages/pl.json | 3 ++ web/messages/pt-BR.json | 3 ++ web/messages/ru.json | 3 ++ web/messages/th.json | 3 ++ web/messages/tr.json | 3 ++ web/messages/zh-CN.json | 3 ++ web/messages/zh-TW.json | 3 ++ 20 files changed, 106 insertions(+) diff --git a/web/app/[locale]/docs/notifications/page.tsx b/web/app/[locale]/docs/notifications/page.tsx index 0a337de2..e3f6c17f 100644 --- a/web/app/[locale]/docs/notifications/page.tsx +++ b/web/app/[locale]/docs/notifications/page.tsx @@ -202,6 +202,55 @@ esac`} }`}

{t("restartNote")}

+

{t("copilotCliHooks")}

+

+ {t.rich("copilotCliHooksDesc", { + link: (chunks) => ( + {chunks} + ), + })} +

+ {`{ + "hooks": { + "userPromptSubmitted": [ + { + "type": "command", + "bash": "if command -v cmux &>/dev/null; then cmux set-status copilot_cli Running; fi", + "timeoutSec": 3 + } + ], + "agentStop": [ + { + "type": "command", + "bash": "if command -v cmux &>/dev/null; then cmux notify --title 'Copilot CLI' --body 'Done'; cmux set-status copilot_cli Idle; fi", + "timeoutSec": 5 + } + ], + "errorOccurred": [ + { + "type": "command", + "bash": "if command -v cmux &>/dev/null; then cmux notify --title 'Copilot CLI' --subtitle 'Error' --body 'An error occurred'; cmux set-status copilot_cli Error; fi", + "timeoutSec": 5 + } + ], + "sessionEnd": [ + { + "type": "command", + "bash": "if command -v cmux &>/dev/null; then cmux clear-status copilot_cli; fi", + "timeoutSec": 3 + } + ] + } +}`} +

{t("copilotCliRepoHooks")}

+ {`{ + "version": 1, + "hooks": { + "userPromptSubmitted": [ ... ], + "agentStop": [ ... ] + } +}`} +

{t("integrationExamples")}

{t("notifyAfterLong")}

diff --git a/web/messages/ar.json b/web/messages/ar.json index ae023a2f..c711ed99 100644 --- a/web/messages/ar.json +++ b/web/messages/ar.json @@ -556,6 +556,9 @@ "createHookScript": "1. إنشاء نص الخطاف", "configureClaude": "2. إعداد Claude Code", "restartNote": "أعد تشغيل Claude Code لتطبيق الخطافات.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "يدعم Copilot CLI الخطافات التي تنفذ أوامر shell عند أحداث دورة الحياة مثل إرسال الأوامر وتوقف الوكيل والأخطاء.", + "copilotCliRepoHooks": "لخطافات على مستوى المستودع، أنشئ ملف .github/hooks/notify.json بنفس الهيكل:", "integrationExamples": "أمثلة التكامل", "notifyAfterLong": "إشعار بعد أمر طويل", "python": "Python", diff --git a/web/messages/bs.json b/web/messages/bs.json index 6b1cc021..6e4f62fd 100644 --- a/web/messages/bs.json +++ b/web/messages/bs.json @@ -556,6 +556,9 @@ "createHookScript": "1. Kreirajte hook skriptu", "configureClaude": "2. Konfigurirajte Claude Code", "restartNote": "Ponovo pokrenite Claude Code da primijenite hookove.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI podržava hookove koji pokreću shell komande na događajima životnog ciklusa poput slanja upita, zaustavljanja agenta i grešaka.", + "copilotCliRepoHooks": "Za hookove na nivou repozitorija, kreirajte .github/hooks/notify.json datoteku sa istom strukturom:", "integrationExamples": "Primjeri integracije", "notifyAfterLong": "Notifikacija nakon duge komande", "python": "Python", diff --git a/web/messages/da.json b/web/messages/da.json index cc55a3b8..ada8dea6 100644 --- a/web/messages/da.json +++ b/web/messages/da.json @@ -556,6 +556,9 @@ "createHookScript": "1. Opret hook-scriptet", "configureClaude": "2. Konfigurér Claude Code", "restartNote": "Genstart Claude Code for at anvende hooks.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI understøtter hooks, der kører shell-kommandoer ved livscyklushændelser som prompt-indsendelse, agent-stop og fejl.", + "copilotCliRepoHooks": "For hooks på repo-niveau, opret en .github/hooks/notify.json-fil med samme struktur:", "integrationExamples": "Integrationseksempler", "notifyAfterLong": "Notificér efter lang kommando", "python": "Python", diff --git a/web/messages/de.json b/web/messages/de.json index 076982df..3902b32b 100644 --- a/web/messages/de.json +++ b/web/messages/de.json @@ -556,6 +556,9 @@ "createHookScript": "1. Hook-Skript erstellen", "configureClaude": "2. Claude Code konfigurieren", "restartNote": "Starten Sie Claude Code neu, um die Hooks zu aktivieren.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI unterstützt Hooks, die Shell-Befehle bei Lebenszyklus-Ereignissen wie Prompt-Übermittlung, Agent-Stopp und Fehlern ausführen.", + "copilotCliRepoHooks": "Für Hooks auf Repository-Ebene erstellen Sie eine .github/hooks/notify.json-Datei mit der gleichen Struktur:", "integrationExamples": "Integrationsbeispiele", "notifyAfterLong": "Benachrichtigung nach langem Befehl", "python": "Python", diff --git a/web/messages/en.json b/web/messages/en.json index 0a267070..139dd3c2 100644 --- a/web/messages/en.json +++ b/web/messages/en.json @@ -557,6 +557,9 @@ "createHookScript": "1. Create the hook script", "configureClaude": "2. Configure Claude Code", "restartNote": "Restart Claude Code to apply the hooks.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI supports hooks that run shell commands at lifecycle events like prompt submission, agent stop, and errors.", + "copilotCliRepoHooks": "For repo-level hooks, create a .github/hooks/notify.json file with the same structure:", "integrationExamples": "Integration examples", "notifyAfterLong": "Notify after long command", "python": "Python", diff --git a/web/messages/es.json b/web/messages/es.json index e2cb9fb3..7a75b1a4 100644 --- a/web/messages/es.json +++ b/web/messages/es.json @@ -556,6 +556,9 @@ "createHookScript": "1. Crear el script de hook", "configureClaude": "2. Configurar Claude Code", "restartNote": "Reinicie Claude Code para aplicar los hooks.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI soporta hooks que ejecutan comandos shell en eventos del ciclo de vida como el envío de prompts, la detención del agente y errores.", + "copilotCliRepoHooks": "Para hooks a nivel de repositorio, cree un archivo .github/hooks/notify.json con la misma estructura:", "integrationExamples": "Ejemplos de integración", "notifyAfterLong": "Notificar después de un comando largo", "python": "Python", diff --git a/web/messages/fr.json b/web/messages/fr.json index 76db3b0d..751fe8ae 100644 --- a/web/messages/fr.json +++ b/web/messages/fr.json @@ -556,6 +556,9 @@ "createHookScript": "1. Créer le script de hook", "configureClaude": "2. Configurer Claude Code", "restartNote": "Redémarrez Claude Code pour appliquer les hooks.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI prend en charge les hooks qui exécutent des commandes shell lors d'événements du cycle de vie comme la soumission de prompts, l'arrêt de l'agent et les erreurs.", + "copilotCliRepoHooks": "Pour les hooks au niveau du dépôt, créez un fichier .github/hooks/notify.json avec la même structure :", "integrationExamples": "Exemples d'intégration", "notifyAfterLong": "Notifier après une longue commande", "python": "Python", diff --git a/web/messages/it.json b/web/messages/it.json index 6ac8649e..a06869c5 100644 --- a/web/messages/it.json +++ b/web/messages/it.json @@ -556,6 +556,9 @@ "createHookScript": "1. Crea lo script hook", "configureClaude": "2. Configura Claude Code", "restartNote": "Riavvia Claude Code per applicare gli hook.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI supporta gli hook che eseguono comandi shell in eventi del ciclo di vita come l'invio di prompt, l'arresto dell'agente e gli errori.", + "copilotCliRepoHooks": "Per gli hook a livello di repository, crea un file .github/hooks/notify.json con la stessa struttura:", "integrationExamples": "Esempi di integrazione", "notifyAfterLong": "Notifica dopo un comando lungo", "python": "Python", diff --git a/web/messages/ja.json b/web/messages/ja.json index 1541f349..e2a4f950 100644 --- a/web/messages/ja.json +++ b/web/messages/ja.json @@ -556,6 +556,9 @@ "createHookScript": "1. フックスクリプトの作成", "configureClaude": "2. Claude Codeの設定", "restartNote": "フックを適用するにはClaude Codeを再起動してください。", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLIは、プロンプト送信、エージェント停止、エラーなどのライフサイクルイベントでシェルコマンドを実行するフックをサポートしています。", + "copilotCliRepoHooks": "リポジトリレベルのフックには、同じ構造で.github/hooks/notify.jsonファイルを作成してください:", "integrationExamples": "連携の例", "notifyAfterLong": "長時間コマンド後の通知", "python": "Python", diff --git a/web/messages/km.json b/web/messages/km.json index a0ae6106..7b42600c 100644 --- a/web/messages/km.json +++ b/web/messages/km.json @@ -556,6 +556,9 @@ "createHookScript": "1. បង្កើត hook script", "configureClaude": "2. កំណត់រចនាសម្ព័ន្ធ Claude Code", "restartNote": "ចាប់ផ្ដើម Claude Code ឡើងវិញដើម្បីអនុវត្ត hooks។", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI គាំទ្រhooks ដែលដំណើរការពាក្យបញ្ជា shell នៅព្រឹត្តិការណ៍វដ្តជីវិតដូចជាការបញ្ជូន prompt ការបញ្ឈប់ agent និងកំហុស។", + "copilotCliRepoHooks": "សម្រាប់ hooks កម្រិត repo សូមបង្កើតឯកសារ .github/hooks/notify.json ដោយមានរចនាសម្ព័ន្ធដូចគ្នា:", "integrationExamples": "ឧទាហរណ៍ការរួមបញ្ចូល", "notifyAfterLong": "ជូនដំណឹងបន្ទាប់ពីពាក្យបញ្ជាយូរ", "python": "Python", diff --git a/web/messages/ko.json b/web/messages/ko.json index d3033093..5779f8f7 100644 --- a/web/messages/ko.json +++ b/web/messages/ko.json @@ -556,6 +556,9 @@ "createHookScript": "1. 훅 스크립트 생성", "configureClaude": "2. Claude Code 설정", "restartNote": "hooks를 적용하려면 Claude Code를 재시작하세요.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI는 프롬프트 제출, 에이전트 중지, 오류 등 라이프사이클 이벤트에서 셸 명령을 실행하는 hooks를 지원합니다.", + "copilotCliRepoHooks": "저장소 수준 hooks의 경우, 같은 구조로 .github/hooks/notify.json 파일을 생성하세요:", "integrationExamples": "통합 예시", "notifyAfterLong": "긴 명령 후 알림", "python": "Python", diff --git a/web/messages/no.json b/web/messages/no.json index 3299ed26..009916c4 100644 --- a/web/messages/no.json +++ b/web/messages/no.json @@ -556,6 +556,9 @@ "createHookScript": "1. Opprett hook-skriptet", "configureClaude": "2. Konfigurer Claude Code", "restartNote": "Start Claude Code på nytt for å bruke hooksene.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI støtter hooks som kjører shell-kommandoer ved livssyklushendelser som prompt-innsending, agent-stopp og feil.", + "copilotCliRepoHooks": "For hooks på repo-nivå, opprett en .github/hooks/notify.json-fil med samme struktur:", "integrationExamples": "Integrasjonseksempler", "notifyAfterLong": "Varsel etter lang kommando", "python": "Python", diff --git a/web/messages/pl.json b/web/messages/pl.json index db15d8d4..d9c3bf74 100644 --- a/web/messages/pl.json +++ b/web/messages/pl.json @@ -556,6 +556,9 @@ "createHookScript": "1. Utwórz skrypt hooka", "configureClaude": "2. Skonfiguruj Claude Code", "restartNote": "Zrestartuj Claude Code aby zastosować hooki.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI obsługuje hooki, które uruchamiają polecenia shell przy zdarzeniach cyklu życia, takich jak wysłanie promptu, zatrzymanie agenta i błędy.", + "copilotCliRepoHooks": "Dla hooków na poziomie repozytorium utwórz plik .github/hooks/notify.json o tej samej strukturze:", "integrationExamples": "Przykłady integracji", "notifyAfterLong": "Powiadom po długim poleceniu", "python": "Python", diff --git a/web/messages/pt-BR.json b/web/messages/pt-BR.json index 93bc7e23..6bac968b 100644 --- a/web/messages/pt-BR.json +++ b/web/messages/pt-BR.json @@ -556,6 +556,9 @@ "createHookScript": "1. Crie o script de hook", "configureClaude": "2. Configure o Claude Code", "restartNote": "Reinicie o Claude Code para aplicar os hooks.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "O Copilot CLI suporta hooks que executam comandos shell em eventos do ciclo de vida como envio de prompts, parada do agente e erros.", + "copilotCliRepoHooks": "Para hooks no nível do repositório, crie um arquivo .github/hooks/notify.json com a mesma estrutura:", "integrationExamples": "Exemplos de integração", "notifyAfterLong": "Notificar após comando longo", "python": "Python", diff --git a/web/messages/ru.json b/web/messages/ru.json index eea6a3b6..10cada36 100644 --- a/web/messages/ru.json +++ b/web/messages/ru.json @@ -556,6 +556,9 @@ "createHookScript": "1. Создай скрипт хука", "configureClaude": "2. Настрой Claude Code", "restartNote": "Перезапусти Claude Code чтобы применить хуки.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI поддерживает хуки, которые выполняют shell-команды при событиях жизненного цикла, таких как отправка промпта, остановка агента и ошибки.", + "copilotCliRepoHooks": "Для хуков на уровне репозитория создайте файл .github/hooks/notify.json с аналогичной структурой:", "integrationExamples": "Примеры интеграций", "notifyAfterLong": "Уведомление после долгой команды", "python": "Python", diff --git a/web/messages/th.json b/web/messages/th.json index 4df38826..b4fc8e3e 100644 --- a/web/messages/th.json +++ b/web/messages/th.json @@ -556,6 +556,9 @@ "createHookScript": "1. สร้าง hook script", "configureClaude": "2. ตั้งค่า Claude Code", "restartNote": "รีสตาร์ท Claude Code เพื่อใช้ hooks", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI รองรับhooks ที่รันคำสั่ง shell ในเหตุการณ์วงจรชีวิต เช่น การส่ง prompt, การหยุด agent และข้อผิดพลาด", + "copilotCliRepoHooks": "สำหรับ hooks ระดับ repo ให้สร้างไฟล์ .github/hooks/notify.json ด้วยโครงสร้างเดียวกัน:", "integrationExamples": "ตัวอย่าง integration", "notifyAfterLong": "แจ้งเตือนหลังคำสั่งที่ใช้เวลานาน", "python": "Python", diff --git a/web/messages/tr.json b/web/messages/tr.json index 3327ea70..5df36cae 100644 --- a/web/messages/tr.json +++ b/web/messages/tr.json @@ -556,6 +556,9 @@ "createHookScript": "1. Hook betiğini oluşturun", "configureClaude": "2. Claude Code'u yapılandırın", "restartNote": "Hook'ları uygulamak için Claude Code'u yeniden başlatın.", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI, prompt gönderimi, agent durdurma ve hatalar gibi yaşam döngüsü olaylarında shell komutları çalıştıran hook'ları destekler.", + "copilotCliRepoHooks": "Repo düzeyinde hook'lar için aynı yapıda bir .github/hooks/notify.json dosyası oluşturun:", "integrationExamples": "Entegrasyon örnekleri", "notifyAfterLong": "Uzun komuttan sonra bildir", "python": "Python", diff --git a/web/messages/zh-CN.json b/web/messages/zh-CN.json index c74f9181..771c7598 100644 --- a/web/messages/zh-CN.json +++ b/web/messages/zh-CN.json @@ -556,6 +556,9 @@ "createHookScript": "1. 创建 hook 脚本", "configureClaude": "2. 配置 Claude Code", "restartNote": "重启 Claude Code 以应用 hooks。", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI 支持hooks,可在提示提交、代理停止和错误等生命周期事件中运行 shell 命令。", + "copilotCliRepoHooks": "对于仓库级别的 hooks,使用相同结构创建 .github/hooks/notify.json 文件:", "integrationExamples": "集成示例", "notifyAfterLong": "长时间命令后发送通知", "python": "Python", diff --git a/web/messages/zh-TW.json b/web/messages/zh-TW.json index bdbbc56f..89f89de3 100644 --- a/web/messages/zh-TW.json +++ b/web/messages/zh-TW.json @@ -556,6 +556,9 @@ "createHookScript": "1. 建立 hook 腳本", "configureClaude": "2. 設定 Claude Code", "restartNote": "重新啟動 Claude Code 以套用 hooks。", + "copilotCliHooks": "GitHub Copilot CLI", + "copilotCliHooksDesc": "Copilot CLI 支援hooks,可在提示提交、代理停止和錯誤等生命週期事件中執行 shell 命令。", + "copilotCliRepoHooks": "對於儲存庫層級的 hooks,使用相同結構建立 .github/hooks/notify.json 檔案:", "integrationExamples": "整合範例", "notifyAfterLong": "長時間指令後通知", "python": "Python",