Add underscore to valid orchestration ID characters

Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 21:27:04 +00:00
parent baada7bb39
commit f80dad6b51
3 changed files with 11 additions and 11 deletions

View File

@@ -34,8 +34,8 @@ function getUserAgentWithOrchestrationId(userAgent: string): string {
return userAgent
}
// Sanitize orchestration ID - only keep alphanumeric, dots, and hyphens
const sanitized = orchestrationId.replace(/[^a-zA-Z0-9.-]/g, '')
// Sanitize orchestration ID - only keep alphanumeric, dots, hyphens, and underscores
const sanitized = orchestrationId.replace(/[^a-zA-Z0-9._-]/g, '')
if (!sanitized) {
return userAgent
}