mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-17 06:36:56 +00:00
[bot] Update Learning Hub for Copilot CLI v1.0.69–v1.0.71 features (#2287)
* docs: update Learning Hub for Copilot CLI v1.0.69–v1.0.71 features - automating-with-hooks: document preToolUse exit code 2 for silent deny (v1.0.69) - creating-effective-skills: mention Forge automatic draft skill creation (v1.0.70) - installing-and-using-plugins: add /plugins dashboard documentation (v1.0.69) - copilot-configuration-basics: add /delegate --base flag (v1.0.69), --repo/--local flags for /settings and /model (v1.0.70), /settings Repo scope tabs (v1.0.71) - understanding-mcp-servers: add paginated session.mcp.resources RPCs (v1.0.70) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update website/src/content/docs/learning-hub/installing-and-using-plugins.md --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Aaron Powell <me@aaron-powell.com>
This commit is contained in:
committed by
GitHub
parent
0b950f9824
commit
67ab0108a9
@@ -3,7 +3,7 @@ title: 'Automating with Hooks'
|
||||
description: 'Learn how to use hooks to automate lifecycle events like formatting, linting, and governance checks during Copilot agent sessions.'
|
||||
authors:
|
||||
- GitHub Copilot Learning Hub Team
|
||||
lastUpdated: 2026-06-25
|
||||
lastUpdated: 2026-07-13
|
||||
estimatedReadingTime: '8 minutes'
|
||||
tags:
|
||||
- hooks
|
||||
@@ -392,6 +392,8 @@ Block dangerous commands before they execute. Use the `matcher` field to target
|
||||
|
||||
The `preToolUse` hook receives JSON input with details about the tool being called. Your script can inspect this input and exit with a non-zero code to **deny** the tool execution, or exit with zero to **approve** it.
|
||||
|
||||
> **Exit code 2 — silent deny (v1.0.69+)**: A `preToolUse` hook that exits with code `2` **denies the tool call silently** — the agent receives a denial without any error message being surfaced to the user. This is useful when you want to block a tool call as a policy decision without triggering a noisy failure (for example, blocking network access in CI without alarming users). Exit with any other non-zero code (e.g., `1`) to deny and show an error message.
|
||||
|
||||
### Modifying Tool Arguments with preToolUse
|
||||
|
||||
Beyond approve/deny, `preToolUse` hooks can also **modify tool arguments** before they are passed to the tool, and inject **additional context** into the agent's reasoning. To do this, write JSON to stdout from your hook script:
|
||||
|
||||
Reference in New Issue
Block a user