refactor(agent-key): use getAgentListDisplayName for consistent key remapping

Update agent key remapper and tests to use getAgentListDisplayName

for proper runtime-facing list names in OpenCode display.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-11 22:01:29 +09:00
parent 3b092c249b
commit 79b4b0a386
2 changed files with 30 additions and 33 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { getAgentDisplayName, getAgentRuntimeName } from "../shared/agent-display-names"
import { getAgentListDisplayName, getAgentRuntimeName } from "../shared/agent-display-names"
function rewriteAgentNameForListDisplay(
key: string,
@@ -21,7 +21,7 @@ export function remapAgentKeysToDisplayNames(
const result: Record<string, unknown> = {}
for (const [key, value] of Object.entries(agents)) {
const displayName = getAgentDisplayName(key)
const displayName = getAgentListDisplayName(key)
if (displayName && displayName !== key) {
result[displayName] = rewriteAgentNameForListDisplay(key, value)
// Regression guard: do not also assign result[key].