fix(start-work): reuse registered opencode agent names

This commit is contained in:
YeonGyu-Kim
2026-04-08 16:18:26 +09:00
parent 24629643f0
commit 06b825dd74
13 changed files with 82 additions and 34 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));
}
}
}