Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/shared/agent-display-names.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ describe("getAgentConfigKey", () => {
})

describe("getAgentListDisplayName", () => {
it("applies invisible stable-sort prefixes to the core agent list", () => {
expect(getAgentListDisplayName("sisyphus")).toBe("\u200BSisyphus - Ultraworker")
expect(getAgentListDisplayName("hephaestus")).toBe("\u200B\u200BHephaestus - Deep Agent")
expect(getAgentListDisplayName("prometheus")).toBe("\u200B\u200B\u200BPrometheus - Plan Builder")
expect(getAgentListDisplayName("atlas")).toBe("\u200B\u200B\u200B\u200BAtlas - Plan Executor")
it("returns clean display names without ZWSP prefixes", () => {
expect(getAgentListDisplayName("sisyphus")).toBe("Sisyphus - Ultraworker")
expect(getAgentListDisplayName("hephaestus")).toBe("Hephaestus - Deep Agent")
expect(getAgentListDisplayName("prometheus")).toBe("Prometheus - Plan Builder")
expect(getAgentListDisplayName("atlas")).toBe("Atlas - Plan Executor")
})

it("keeps non-core agents unprefixed for list display", () => {
Expand Down
13 changes: 9 additions & 4 deletions src/shared/agent-display-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ export const AGENT_DISPLAY_NAMES: Record<string, string> = {
"council-member": "council-member",
}

// ZWSP sort prefixes removed — they caused agent name truncation in VS Code,
// WezTerm, and other terminals that mishandle zero-width characters.
// Sorting now relies exclusively on the `order` field injected by
// CANONICAL_CORE_AGENT_ORDER in agent-priority-order.ts.
// The map is kept (with empty values) so callers don't break.
const AGENT_LIST_SORT_PREFIXES: Record<string, string> = {
sisyphus: "\u200B",
hephaestus: "\u200B\u200B",
prometheus: "\u200B\u200B\u200B",
atlas: "\u200B\u200B\u200B\u200B",
sisyphus: "",
hephaestus: "",
prometheus: "",
atlas: "",
}

const INVISIBLE_AGENT_CHARACTERS_REGEX = /[\u200B\u200C\u200D\uFEFF]/g
Expand Down
Loading