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 <lawrencecchen@users.noreply.github.com>
This commit is contained in:
parent
32124d9256
commit
ee3460b8d7
20 changed files with 106 additions and 0 deletions
|
|
@ -202,6 +202,55 @@ esac`}</CodeBlock>
|
|||
}`}</CodeBlock>
|
||||
<p>{t("restartNote")}</p>
|
||||
|
||||
<h2>{t("copilotCliHooks")}</h2>
|
||||
<p>
|
||||
{t.rich("copilotCliHooksDesc", {
|
||||
link: (chunks) => (
|
||||
<a href="https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks">{chunks}</a>
|
||||
),
|
||||
})}
|
||||
</p>
|
||||
<CodeBlock title="~/.copilot/config.json" lang="json">{`{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
}`}</CodeBlock>
|
||||
<p>{t("copilotCliRepoHooks")}</p>
|
||||
<CodeBlock title=".github/hooks/notify.json" lang="json">{`{
|
||||
"version": 1,
|
||||
"hooks": {
|
||||
"userPromptSubmitted": [ ... ],
|
||||
"agentStop": [ ... ]
|
||||
}
|
||||
}`}</CodeBlock>
|
||||
|
||||
<h2>{t("integrationExamples")}</h2>
|
||||
|
||||
<h3>{t("notifyAfterLong")}</h3>
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. إنشاء نص الخطاف",
|
||||
"configureClaude": "2. إعداد Claude Code",
|
||||
"restartNote": "أعد تشغيل Claude Code لتطبيق الخطافات.",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "يدعم Copilot CLI <link>الخطافات</link> التي تنفذ أوامر shell عند أحداث دورة الحياة مثل إرسال الأوامر وتوقف الوكيل والأخطاء.",
|
||||
"copilotCliRepoHooks": "لخطافات على مستوى المستودع، أنشئ ملف .github/hooks/notify.json بنفس الهيكل:",
|
||||
"integrationExamples": "أمثلة التكامل",
|
||||
"notifyAfterLong": "إشعار بعد أمر طويل",
|
||||
"python": "Python",
|
||||
|
|
|
|||
|
|
@ -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 <link>hookove</link> 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>hooks</link>, 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>Hooks</link>, 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>hooks</link> 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>hooks</link> 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>hooks</link> 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>hook</link> 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",
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. フックスクリプトの作成",
|
||||
"configureClaude": "2. Claude Codeの設定",
|
||||
"restartNote": "フックを適用するにはClaude Codeを再起動してください。",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "Copilot CLIは、プロンプト送信、エージェント停止、エラーなどのライフサイクルイベントでシェルコマンドを実行する<link>フック</link>をサポートしています。",
|
||||
"copilotCliRepoHooks": "リポジトリレベルのフックには、同じ構造で.github/hooks/notify.jsonファイルを作成してください:",
|
||||
"integrationExamples": "連携の例",
|
||||
"notifyAfterLong": "長時間コマンド後の通知",
|
||||
"python": "Python",
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. បង្កើត hook script",
|
||||
"configureClaude": "2. កំណត់រចនាសម្ព័ន្ធ Claude Code",
|
||||
"restartNote": "ចាប់ផ្ដើម Claude Code ឡើងវិញដើម្បីអនុវត្ត hooks។",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "Copilot CLI គាំទ្រ<link>hooks</link> ដែលដំណើរការពាក្យបញ្ជា shell នៅព្រឹត្តិការណ៍វដ្តជីវិតដូចជាការបញ្ជូន prompt ការបញ្ឈប់ agent និងកំហុស។",
|
||||
"copilotCliRepoHooks": "សម្រាប់ hooks កម្រិត repo សូមបង្កើតឯកសារ .github/hooks/notify.json ដោយមានរចនាសម្ព័ន្ធដូចគ្នា:",
|
||||
"integrationExamples": "ឧទាហរណ៍ការរួមបញ្ចូល",
|
||||
"notifyAfterLong": "ជូនដំណឹងបន្ទាប់ពីពាក្យបញ្ជាយូរ",
|
||||
"python": "Python",
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. 훅 스크립트 생성",
|
||||
"configureClaude": "2. Claude Code 설정",
|
||||
"restartNote": "hooks를 적용하려면 Claude Code를 재시작하세요.",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "Copilot CLI는 프롬프트 제출, 에이전트 중지, 오류 등 라이프사이클 이벤트에서 셸 명령을 실행하는 <link>hooks</link>를 지원합니다.",
|
||||
"copilotCliRepoHooks": "저장소 수준 hooks의 경우, 같은 구조로 .github/hooks/notify.json 파일을 생성하세요:",
|
||||
"integrationExamples": "통합 예시",
|
||||
"notifyAfterLong": "긴 명령 후 알림",
|
||||
"python": "Python",
|
||||
|
|
|
|||
|
|
@ -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 <link>hooks</link> 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>hooki</link>, 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",
|
||||
|
|
|
|||
|
|
@ -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 <link>hooks</link> 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",
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. Создай скрипт хука",
|
||||
"configureClaude": "2. Настрой Claude Code",
|
||||
"restartNote": "Перезапусти Claude Code чтобы применить хуки.",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "Copilot CLI поддерживает <link>хуки</link>, которые выполняют shell-команды при событиях жизненного цикла, таких как отправка промпта, остановка агента и ошибки.",
|
||||
"copilotCliRepoHooks": "Для хуков на уровне репозитория создайте файл .github/hooks/notify.json с аналогичной структурой:",
|
||||
"integrationExamples": "Примеры интеграций",
|
||||
"notifyAfterLong": "Уведомление после долгой команды",
|
||||
"python": "Python",
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. สร้าง hook script",
|
||||
"configureClaude": "2. ตั้งค่า Claude Code",
|
||||
"restartNote": "รีสตาร์ท Claude Code เพื่อใช้ hooks",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "Copilot CLI รองรับ<link>hooks</link> ที่รันคำสั่ง shell ในเหตุการณ์วงจรชีวิต เช่น การส่ง prompt, การหยุด agent และข้อผิดพลาด",
|
||||
"copilotCliRepoHooks": "สำหรับ hooks ระดับ repo ให้สร้างไฟล์ .github/hooks/notify.json ด้วยโครงสร้างเดียวกัน:",
|
||||
"integrationExamples": "ตัวอย่าง integration",
|
||||
"notifyAfterLong": "แจ้งเตือนหลังคำสั่งที่ใช้เวลานาน",
|
||||
"python": "Python",
|
||||
|
|
|
|||
|
|
@ -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 <link>hook'ları</link> 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",
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. 创建 hook 脚本",
|
||||
"configureClaude": "2. 配置 Claude Code",
|
||||
"restartNote": "重启 Claude Code 以应用 hooks。",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "Copilot CLI 支持<link>hooks</link>,可在提示提交、代理停止和错误等生命周期事件中运行 shell 命令。",
|
||||
"copilotCliRepoHooks": "对于仓库级别的 hooks,使用相同结构创建 .github/hooks/notify.json 文件:",
|
||||
"integrationExamples": "集成示例",
|
||||
"notifyAfterLong": "长时间命令后发送通知",
|
||||
"python": "Python",
|
||||
|
|
|
|||
|
|
@ -556,6 +556,9 @@
|
|||
"createHookScript": "1. 建立 hook 腳本",
|
||||
"configureClaude": "2. 設定 Claude Code",
|
||||
"restartNote": "重新啟動 Claude Code 以套用 hooks。",
|
||||
"copilotCliHooks": "GitHub Copilot CLI",
|
||||
"copilotCliHooksDesc": "Copilot CLI 支援<link>hooks</link>,可在提示提交、代理停止和錯誤等生命週期事件中執行 shell 命令。",
|
||||
"copilotCliRepoHooks": "對於儲存庫層級的 hooks,使用相同結構建立 .github/hooks/notify.json 檔案:",
|
||||
"integrationExamples": "整合範例",
|
||||
"notifyAfterLong": "長時間指令後通知",
|
||||
"python": "Python",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue