feat(shared): update agent display names for team-mode
This commit is contained in:
@@ -27,13 +27,14 @@ export const AGENT_DISPLAY_NAMES: Record<string, string> = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const INVISIBLE_AGENT_CHARACTERS_REGEX = /[\u200B\u200C\u200D\uFEFF]/g
|
const INVISIBLE_AGENT_CHARACTERS_REGEX = /[\u200B\u200C\u200D\uFEFF]/g
|
||||||
|
const VISIBLE_AGENT_LIST_SORT_PREFIX_REGEX = /^\d+\|/
|
||||||
|
|
||||||
export function stripInvisibleAgentCharacters(agentName: string): string {
|
export function stripInvisibleAgentCharacters(agentName: string): string {
|
||||||
return agentName.replace(INVISIBLE_AGENT_CHARACTERS_REGEX, "")
|
return agentName.replace(INVISIBLE_AGENT_CHARACTERS_REGEX, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
export function stripAgentListSortPrefix(agentName: string): string {
|
export function stripAgentListSortPrefix(agentName: string): string {
|
||||||
return stripInvisibleAgentCharacters(agentName)
|
return stripInvisibleAgentCharacters(agentName).replace(VISIBLE_AGENT_LIST_SORT_PREFIX_REGEX, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user