From ce53b4cbdb009d0d648d488716e2e753acafe0de Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 11 Apr 2026 22:01:34 +0900 Subject: [PATCH] refactor(agent-priority): use getAgentListDisplayName for ordering Update agent priority order handler and tests to use getAgentListDisplayName for consistent runtime-facing names. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/plugin-handlers/agent-priority-order.test.ts | 10 +++++----- src/plugin-handlers/agent-priority-order.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugin-handlers/agent-priority-order.test.ts b/src/plugin-handlers/agent-priority-order.test.ts index f9e64fa8f..10890c3b0 100644 --- a/src/plugin-handlers/agent-priority-order.test.ts +++ b/src/plugin-handlers/agent-priority-order.test.ts @@ -6,7 +6,7 @@ import { reorderAgentsByPriority, CANONICAL_CORE_AGENT_ORDER, } from "./agent-priority-order" -import { getAgentDisplayName } from "../shared/agent-display-names" +import { getAgentDisplayName, getAgentListDisplayName } from "../shared/agent-display-names" describe("agent-priority-order", () => { describe("CANONICAL_CORE_AGENT_ORDER", () => { @@ -36,10 +36,10 @@ describe("agent-priority-order", () => { describe("reorderAgentsByPriority", () => { // given: display names for all core agents - const sisyphus = getAgentDisplayName("sisyphus") - const hephaestus = getAgentDisplayName("hephaestus") - const prometheus = getAgentDisplayName("prometheus") - const atlas = getAgentDisplayName("atlas") + const sisyphus = getAgentListDisplayName("sisyphus") + const hephaestus = getAgentListDisplayName("hephaestus") + const prometheus = getAgentListDisplayName("prometheus") + const atlas = getAgentListDisplayName("atlas") const oracle = getAgentDisplayName("oracle") const librarian = getAgentDisplayName("librarian") const explore = getAgentDisplayName("explore") diff --git a/src/plugin-handlers/agent-priority-order.ts b/src/plugin-handlers/agent-priority-order.ts index 003679e25..711f6a58c 100644 --- a/src/plugin-handlers/agent-priority-order.ts +++ b/src/plugin-handlers/agent-priority-order.ts @@ -1,4 +1,4 @@ -import { getAgentDisplayName } from "../shared/agent-display-names" +import { getAgentListDisplayName } from "../shared/agent-display-names" /** * CRITICAL: This is the ONLY source of truth for core agent ordering. @@ -25,7 +25,7 @@ const CORE_AGENT_ORDER: ReadonlyArray<{ order: number }> = CANONICAL_CORE_AGENT_ORDER.map((configKey, index) => ({ configKey, - displayName: getAgentDisplayName(configKey), + displayName: getAgentListDisplayName(configKey), order: index + 1, }))