From 3724093618bd8b4eaed8fc9fd68331c2b76bb74a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 8 Apr 2026 13:01:43 +0900 Subject: [PATCH] fix(zwsp): strip zero-width chars from agent headers in command-config-handler Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/plugin-handlers/command-config-handler.test.ts | 4 ++-- src/plugin-handlers/command-config-handler.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugin-handlers/command-config-handler.test.ts b/src/plugin-handlers/command-config-handler.test.ts index b5837c76b..19f31f1e3 100644 --- a/src/plugin-handlers/command-config-handler.test.ts +++ b/src/plugin-handlers/command-config-handler.test.ts @@ -5,7 +5,7 @@ import * as skillLoader from "../features/opencode-skill-loader"; import type { OhMyOpenCodeConfig } from "../config"; import type { PluginComponents } from "./plugin-components-loader"; import { applyCommandConfig } from "./command-config-handler"; -import { getAgentListDisplayName } from "../shared/agent-display-names"; +import { getAgentDisplayName } from "../shared/agent-display-names"; function createPluginComponents(): PluginComponents { return { @@ -119,6 +119,6 @@ describe("applyCommandConfig", () => { // then const commandConfig = config.command as Record; - expect(commandConfig["start-work"]?.agent).toBe(getAgentListDisplayName("atlas")); + expect(commandConfig["start-work"]?.agent).toBe(getAgentDisplayName("atlas")); }); }); diff --git a/src/plugin-handlers/command-config-handler.ts b/src/plugin-handlers/command-config-handler.ts index 08b40d4d1..f45ff6531 100644 --- a/src/plugin-handlers/command-config-handler.ts +++ b/src/plugin-handlers/command-config-handler.ts @@ -1,5 +1,5 @@ import type { OhMyOpenCodeConfig } from "../config"; -import { getAgentListDisplayName } from "../shared/agent-display-names"; +import { getAgentDisplayName } from "../shared/agent-display-names"; import { loadUserCommands, loadProjectCommands, @@ -96,7 +96,7 @@ export async function applyCommandConfig(params: { function remapCommandAgentFields(commands: Record>): void { for (const cmd of Object.values(commands)) { if (cmd?.agent && typeof cmd.agent === "string") { - cmd.agent = getAgentListDisplayName(cmd.agent); + cmd.agent = getAgentDisplayName(cmd.agent); } } }