fix(channel): support channel names that include numbers; legacy test names containing numbers may still appear (#796)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Haze <hazeone@users.noreply.github.com>
This commit is contained in:
Haze
2026-04-08 18:38:59 +08:00
committed by GitHub
Unverified
parent 19b3ea974b
commit c1e165d48d
6 changed files with 219 additions and 29 deletions

View File

@@ -139,7 +139,7 @@ function slugifyAgentId(name: string): string {
.replace(/-+/g, '-')
.replace(/^-|-$/g, '');
if (!normalized) return 'agent';
if (!normalized || /^\d+$/.test(normalized)) return 'agent';
if (normalized === MAIN_AGENT_ID) return 'agent';
return normalized;
}