diff --git a/src/shared/agent-display-names.ts b/src/shared/agent-display-names.ts index 55dc1918d..ac8f546f0 100644 --- a/src/shared/agent-display-names.ts +++ b/src/shared/agent-display-names.ts @@ -27,13 +27,14 @@ export const AGENT_DISPLAY_NAMES: Record = { } const INVISIBLE_AGENT_CHARACTERS_REGEX = /[\u200B\u200C\u200D\uFEFF]/g +const VISIBLE_AGENT_LIST_SORT_PREFIX_REGEX = /^\d+\|/ export function stripInvisibleAgentCharacters(agentName: string): string { return agentName.replace(INVISIBLE_AGENT_CHARACTERS_REGEX, "") } export function stripAgentListSortPrefix(agentName: string): string { - return stripInvisibleAgentCharacters(agentName) + return stripInvisibleAgentCharacters(agentName).replace(VISIBLE_AGENT_LIST_SORT_PREFIX_REGEX, "") } /**