fix: remove ZWSP from agent display names (#3146)
This commit is contained in:
@@ -28,7 +28,7 @@ describe("claude-code-session-state", () => {
|
||||
test("should store agent for session", () => {
|
||||
// given
|
||||
const sessionID = "test-session-1"
|
||||
const agent = "Prometheus (Planner)"
|
||||
const agent = "Prometheus - Plan Builder"
|
||||
|
||||
// when
|
||||
setSessionAgent(sessionID, agent)
|
||||
@@ -52,13 +52,13 @@ describe("claude-code-session-state", () => {
|
||||
test("should NOT overwrite existing agent (first-write wins)", () => {
|
||||
// given
|
||||
const sessionID = "test-session-1"
|
||||
setSessionAgent(sessionID, "Prometheus (Planner)")
|
||||
setSessionAgent(sessionID, "Prometheus - Plan Builder")
|
||||
|
||||
// when - try to overwrite
|
||||
setSessionAgent(sessionID, "sisyphus")
|
||||
|
||||
// then - first agent preserved
|
||||
expect(getSessionAgent(sessionID)).toBe("Prometheus (Planner)")
|
||||
expect(getSessionAgent(sessionID)).toBe("Prometheus - Plan Builder")
|
||||
})
|
||||
|
||||
test("should return undefined for unknown session", () => {
|
||||
@@ -73,7 +73,7 @@ describe("claude-code-session-state", () => {
|
||||
test("should overwrite existing agent", () => {
|
||||
// given
|
||||
const sessionID = "test-session-1"
|
||||
setSessionAgent(sessionID, "Prometheus (Planner)")
|
||||
setSessionAgent(sessionID, "Prometheus - Plan Builder")
|
||||
|
||||
// when - force update
|
||||
updateSessionAgent(sessionID, "sisyphus")
|
||||
@@ -99,8 +99,8 @@ describe("claude-code-session-state", () => {
|
||||
test("should remove agent from session", () => {
|
||||
// given
|
||||
const sessionID = "test-session-1"
|
||||
setSessionAgent(sessionID, "Prometheus (Planner)")
|
||||
expect(getSessionAgent(sessionID)).toBe("Prometheus (Planner)")
|
||||
setSessionAgent(sessionID, "Prometheus - Plan Builder")
|
||||
expect(getSessionAgent(sessionID)).toBe("Prometheus - Plan Builder")
|
||||
|
||||
// when
|
||||
clearSessionAgent(sessionID)
|
||||
@@ -160,15 +160,15 @@ describe("claude-code-session-state", () => {
|
||||
test("should correctly identify Prometheus agent for permission checks", () => {
|
||||
// given - Prometheus session
|
||||
const sessionID = "test-prometheus-session"
|
||||
const prometheusAgent = "Prometheus (Planner)"
|
||||
const prometheusAgent = "Prometheus - Plan Builder"
|
||||
|
||||
// when - agent is set (simulating chat.message hook)
|
||||
setSessionAgent(sessionID, prometheusAgent)
|
||||
|
||||
// then - getSessionAgent returns correct agent for prometheus-md-only hook
|
||||
const agent = getSessionAgent(sessionID)
|
||||
expect(agent).toBe("Prometheus (Planner)")
|
||||
expect(["Prometheus (Planner)"].includes(agent!)).toBe(true)
|
||||
expect(agent).toBe("Prometheus - Plan Builder")
|
||||
expect(["Prometheus - Plan Builder"].includes(agent!)).toBe(true)
|
||||
})
|
||||
|
||||
test("should return undefined when agent not set (bug scenario)", () => {
|
||||
|
||||
Reference in New Issue
Block a user