Add image count telemetry to ChatProviderInvokedEvent

- Add numImages field to ChatProviderInvokedEvent type
- Add GDPR-compliant classification for numImages
- Populate numImages in complete() method by filtering image variable entries
This commit is contained in:
bhavyaus
2026-03-31 22:13:38 -07:00
parent 975641fb6f
commit b91c8c350e
4 changed files with 3681 additions and 1 deletions

11
.github/agents/stop-hook-test.md vendored Normal file
View File

@@ -0,0 +1,11 @@
---
name: "StopHookTestAgent"
description: "Test agent that has a Stop hook to verify subagent hook behavior"
hooks:
Stop:
- type: command
command: "bash .github/hooks/test-stop-hook.sh"
---
You are a test agent. When invoked, respond with exactly: "Hello from StopHookTestAgent. I am done."
Do not do anything else.

14
.github/hooks/test-stop-hook.sh vendored Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Test Stop hook that blocks the agent from stopping (once).
# Reads JSON from stdin, checks stop_hook_active to avoid infinite loops.
INPUT=$(cat)
STOP_HOOK_ACTIVE=$(echo "$INPUT" | python3 -c "import sys, json; d=json.load(sys.stdin); print(d.get('stop_hook_active', False))" 2>/dev/null)
if [ "$STOP_HOOK_ACTIVE" = "True" ] || [ "$STOP_HOOK_ACTIVE" = "true" ]; then
# Already continued once — let it stop now
echo '{"continue": true}'
else
# Block the stop the first time
echo '{"hookSpecificOutput": {"hookEventName": "Stop", "decision": "block", "reason": "Test hook: please say HOOK_VERIFIED before stopping."}}'
fi

View File

@@ -213,5 +213,6 @@
".github/skills/.local": true,
".agents/skills/.local": true,
".claude/skills/.local": true,
}
},
"github.copilot.chat.summarizeAgentConversationHistoryThreshold": 65000
}

File diff suppressed because one or more lines are too long