fix: remove ZWSP sort prefix from Atlas agent name
The \u200B (zero-width space) in AGENT_LIST_SORT_PREFIXES leaked into the x-opencode-agent-name HTTP header, causing invalid header errors. Agent ordering is handled by agent-priority-order.ts via numeric order fields and insertion order — the ZWSP prefix was redundant.
This commit is contained in:
@@ -185,8 +185,8 @@ describe("getAgentListDisplayName", () => {
|
|||||||
expect(getAgentListDisplayName("sisyphus")).toBe("Sisyphus (Ultraworker)")
|
expect(getAgentListDisplayName("sisyphus")).toBe("Sisyphus (Ultraworker)")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("applies invisible atlas sort prefix for list display", () => {
|
it("returns atlas display name without sort prefix", () => {
|
||||||
expect(getAgentListDisplayName("atlas")).toBe("\u200BAtlas (Plan Executor)")
|
expect(getAgentListDisplayName("atlas")).toBe("Atlas (Plan Executor)")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ export const AGENT_DISPLAY_NAMES: Record<string, string> = {
|
|||||||
"council-member": "council-member",
|
"council-member": "council-member",
|
||||||
}
|
}
|
||||||
|
|
||||||
const AGENT_LIST_SORT_PREFIXES: Record<string, string> = {
|
const AGENT_LIST_SORT_PREFIXES: Record<string, string> = {}
|
||||||
atlas: "\u200B",
|
|
||||||
}
|
|
||||||
|
|
||||||
function stripAgentListSortPrefix(agentName: string): string {
|
function stripAgentListSortPrefix(agentName: string): string {
|
||||||
return agentName.replace(/^\u200B+/, "")
|
return agentName.replace(/^\u200B+/, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user