Revert "Merge pull request #3260 from code-yeongyu/fix/remove-zwsp-sort-prefixes"

This reverts commit c3be4c2793, reversing
changes made to d2bb5d57d1.
This commit is contained in:
YeonGyu-Kim
2026-04-09 12:21:02 +09:00
parent ef95a99420
commit 0d5b087440
4 changed files with 34 additions and 64 deletions
+3 -5
View File
@@ -9,6 +9,7 @@ import { createAutoSlashCommandHook } from "../hooks/auto-slash-command"
import { createStartWorkHook } from "../hooks/start-work"
import { readBoulderState } from "../features/boulder-state"
import { _resetForTesting, setMainSession, subagentSessions, registerAgentName, updateSessionAgent, getSessionAgent } from "../features/claude-code-session-state"
import { getAgentListDisplayName } from "../shared/agent-display-names"
import { clearSessionModel, getSessionModel, setSessionModel } from "../shared/session-model-state"
type ChatMessagePart = { type: string; text?: string; [key: string]: unknown }
@@ -402,10 +403,7 @@ describe("createChatMessageHandler - TUI variant passthrough", () => {
expect(getSessionModel("test-session")).toEqual({ providerID: "openai", modelID: "gpt-5.4" })
})
test("treats legacy ZWSP-prefixed agent names as explicit model overrides (GH-3259)", async () => {
// Users upgrading from v3.14.0-v3.16.0 may still have ZWSP-prefixed agent
// keys persisted in their session state. The handler must strip the
// prefix and resolve to the canonical display name.
test("treats prefixed list-display agent names as explicit model overrides", async () => {
//#given
setMainSession("test-session")
setSessionModel("test-session", { providerID: "openai", modelID: "gpt-5.4" })
@@ -418,7 +416,7 @@ describe("createChatMessageHandler - TUI variant passthrough", () => {
},
})
const handler = createChatMessageHandler(args)
const input = createMockInput("\u200B\u200B\u200BPrometheus - Plan Builder")
const input = createMockInput(getAgentListDisplayName("prometheus"))
const output = createMockOutput()
//#when