fix(agents): use runtime names for default_agent to match ordered agent list

This commit is contained in:
YeonGyu-Kim
2026-04-11 14:15:00 +09:00
parent 630f5b79e7
commit c30b058b7e
5 changed files with 106 additions and 16 deletions
+8 -4
View File
@@ -37,6 +37,13 @@ export function stripAgentListSortPrefix(agentName: string): string {
return agentName.replace(/^\u200B+/, "")
}
export function getAgentRuntimeName(configKey: string): string {
const displayName = getAgentDisplayName(configKey)
const prefix = AGENT_LIST_SORT_PREFIXES[configKey.toLowerCase()]
return prefix ? `${prefix}${displayName}` : displayName
}
/**
* Get display name for an agent config key.
* Uses case-insensitive lookup for backward compatibility.
@@ -65,10 +72,7 @@ export function getAgentDisplayName(configKey: string): string {
* See: https://github.com/code-yeongyu/oh-my-openagent/issues/3238
*/
export function getAgentListDisplayName(configKey: string): string {
const displayName = getAgentDisplayName(configKey)
const prefix = AGENT_LIST_SORT_PREFIXES[configKey.toLowerCase()]
return prefix ? `${prefix}${displayName}` : displayName
return getAgentRuntimeName(configKey)
}
const REVERSE_DISPLAY_NAMES: Record<string, string> = Object.fromEntries(