a2a-source-edit: write agent.py

This commit is contained in:
a2a-cloud
2026-07-13 11:06:32 +00:00
parent 95d9c37306
commit e6f51386e1

View File

@@ -763,7 +763,7 @@ def redact_secrets(text: str) -> str:
r"ghp_[A-Za-z0-9]{12,}",
]
for pattern in patterns:
redacted = re.sub(pattern, lambda m: (m.group(1) if m.lastindex else "") + "[REDACTED]", redacted)
redacted = re.sub(pattern, _redact_match, redacted)
return redacted