Remap config.agent keys to display names at output boundary

Use display names as config.agent keys so opencode shows proper names in UI
(Tab/@ menu). Key remapping happens after all agents are assembled but before
reordering, via remapAgentKeysToDisplayNames().

- agent-config-handler: set default_agent to display name, add key remapping
- agent-key-remapper: new module to transform lowercase keys to display names
- agent-priority-order: CORE_AGENT_ORDER uses display names
- tool-config-handler: look up agents by config key via agentByKey() helper
This commit is contained in:
YeonGyu-Kim
2026-02-16 20:42:58 +09:00
parent c71a80a86c
commit d94a739203
4 changed files with 63 additions and 28 deletions
+8 -1
View File
@@ -1,4 +1,11 @@
const CORE_AGENT_ORDER = ["sisyphus", "hephaestus", "prometheus", "atlas"] as const;
import { getAgentDisplayName } from "../shared/agent-display-names";
const CORE_AGENT_ORDER = [
getAgentDisplayName("sisyphus"),
getAgentDisplayName("hephaestus"),
getAgentDisplayName("prometheus"),
getAgentDisplayName("atlas"),
] as const;
export function reorderAgentsByPriority(
agents: Record<string, unknown>,