fix(agents): restore canonical core agent ordering
Remap the core agent keys, default agent, and command routing back to\nlist display names so OpenCode's name-based sorting keeps the\ncanonical Sisyphus -> Hephaestus -> Prometheus -> Atlas order.\n\nAlso teach tool config lookups to resolve the prefixed list keys and\nadd regression tests that exercise the real ordering and routing path.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { OhMyOpenCodeConfig } from "../config";
|
||||
import { getAgentDisplayName } from "../shared/agent-display-names";
|
||||
import { getAgentDisplayName, getAgentListDisplayName } from "../shared/agent-display-names";
|
||||
import { isTaskSystemEnabled } from "../shared";
|
||||
|
||||
type AgentWithPermission = { permission?: Record<string, unknown> };
|
||||
@@ -16,7 +16,7 @@ function getConfigQuestionPermission(): string | null {
|
||||
}
|
||||
|
||||
function agentByKey(agentResult: Record<string, unknown>, key: string): AgentWithPermission | undefined {
|
||||
return (agentResult[getAgentDisplayName(key)] ?? agentResult[key]) as
|
||||
return (agentResult[getAgentListDisplayName(key)] ?? agentResult[getAgentDisplayName(key)] ?? agentResult[key]) as
|
||||
| AgentWithPermission
|
||||
| undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user