refactor(command-config): use getAgentListDisplayName for consistent naming

Update command config handler and tests to use getAgentListDisplayName

for proper agent name resolution in command configurations.

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:42 +09:00
parent ce53b4cbdb
commit 15c8d469bc
2 changed files with 7 additions and 6 deletions
@@ -1,7 +1,7 @@
import type { OhMyOpenCodeConfig } from "../config";
import {
getAgentConfigKey,
getAgentDisplayName,
getAgentListDisplayName,
} from "../shared/agent-display-names";
import {
loadUserCommands,
@@ -99,7 +99,7 @@ export async function applyCommandConfig(params: {
function remapCommandAgentFields(commands: Record<string, Record<string, unknown>>): void {
for (const cmd of Object.values(commands)) {
if (cmd?.agent && typeof cmd.agent === "string") {
cmd.agent = getAgentDisplayName(getAgentConfigKey(cmd.agent));
cmd.agent = getAgentListDisplayName(getAgentConfigKey(cmd.agent));
}
}
}