diff --git a/cmd/server/server.go b/cmd/server/server.go index 621bc09..454030c 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -23,26 +23,28 @@ import ( type AgentType = msgfmt.AgentType const ( - AgentTypeClaude AgentType = msgfmt.AgentTypeClaude - AgentTypeGoose AgentType = msgfmt.AgentTypeGoose - AgentTypeAider AgentType = msgfmt.AgentTypeAider - AgentTypeCodex AgentType = msgfmt.AgentTypeCodex - AgentTypeGemini AgentType = msgfmt.AgentTypeGemini - AgentTypeAmp AgentType = msgfmt.AgentTypeAmp - AgentTypeCursor AgentType = msgfmt.AgentTypeCursor - AgentTypeCustom AgentType = msgfmt.AgentTypeCustom + AgentTypeClaude AgentType = msgfmt.AgentTypeClaude + AgentTypeGoose AgentType = msgfmt.AgentTypeGoose + AgentTypeAider AgentType = msgfmt.AgentTypeAider + AgentTypeCodex AgentType = msgfmt.AgentTypeCodex + AgentTypeGemini AgentType = msgfmt.AgentTypeGemini + AgentTypeAmp AgentType = msgfmt.AgentTypeAmp + AgentTypeCursorAgent AgentType = msgfmt.AgentTypeCursorAgent + AgentTypeCursor AgentType = msgfmt.AgentTypeCursor + AgentTypeCustom AgentType = msgfmt.AgentTypeCustom ) // exhaustiveness of this map is checked by the exhaustive linter var agentTypeMap = map[AgentType]bool{ - AgentTypeClaude: true, - AgentTypeGoose: true, - AgentTypeAider: true, - AgentTypeCodex: true, - AgentTypeGemini: true, - AgentTypeAmp: true, - AgentTypeCursor: true, - AgentTypeCustom: true, + AgentTypeClaude: true, + AgentTypeGoose: true, + AgentTypeAider: true, + AgentTypeCodex: true, + AgentTypeGemini: true, + AgentTypeAmp: true, + AgentTypeCursorAgent: true, + AgentTypeCursor: true, + AgentTypeCustom: true, } func parseAgentType(firstArg string, agentTypeVar string) (AgentType, error) { diff --git a/cmd/server/server_test.go b/cmd/server/server_test.go index 121eade..92d75f2 100644 --- a/cmd/server/server_test.go +++ b/cmd/server/server_test.go @@ -47,6 +47,11 @@ func TestParseAgentType(t *testing.T) { agentTypeVar: "", want: AgentTypeGemini, }, + { + firstArg: "cursor-agent", + agentTypeVar: "", + want: AgentTypeCursorAgent, + }, { firstArg: "cursor", agentTypeVar: "", @@ -87,6 +92,11 @@ func TestParseAgentType(t *testing.T) { agentTypeVar: "gemini", want: AgentTypeGemini, }, + { + firstArg: "claude", + agentTypeVar: "cursor-agent", + want: AgentTypeCursorAgent, + }, { firstArg: "claude", agentTypeVar: "cursor", diff --git a/lib/msgfmt/msgfmt.go b/lib/msgfmt/msgfmt.go index 8f8e34d..a4b830a 100644 --- a/lib/msgfmt/msgfmt.go +++ b/lib/msgfmt/msgfmt.go @@ -192,7 +192,7 @@ func RemoveUserInput(msgRaw string, userInputRaw string, agentType AgentType) st if idx, found := skipTrailingInputBoxLine(msgLines, lastUserInputLineIdx, "╯", "╰"); found { lastUserInputLineIdx = idx } - } else if agentType == AgentTypeCursor { + } else if agentType == AgentTypeCursorAgent || agentType == AgentTypeCursor { if idx, found := skipTrailingInputBoxLine(msgLines, lastUserInputLineIdx, "┘", "└"); found { lastUserInputLineIdx = idx } @@ -225,14 +225,15 @@ func trimEmptyLines(message string) string { type AgentType string const ( - AgentTypeClaude AgentType = "claude" - AgentTypeGoose AgentType = "goose" - AgentTypeAider AgentType = "aider" - AgentTypeCodex AgentType = "codex" - AgentTypeGemini AgentType = "gemini" - AgentTypeAmp AgentType = "amp" - AgentTypeCursor AgentType = "cursor" - AgentTypeCustom AgentType = "custom" + AgentTypeClaude AgentType = "claude" + AgentTypeGoose AgentType = "goose" + AgentTypeAider AgentType = "aider" + AgentTypeCodex AgentType = "codex" + AgentTypeGemini AgentType = "gemini" + AgentTypeAmp AgentType = "amp" + AgentTypeCursorAgent AgentType = "cursor-agent" + AgentTypeCursor AgentType = "cursor" + AgentTypeCustom AgentType = "custom" ) func formatGenericMessage(message string, userInput string, agentType AgentType) string { @@ -263,6 +264,8 @@ func FormatAgentMessage(agentType AgentType, message string, userInput string) s return formatGenericMessage(message, userInput, agentType) case AgentTypeAmp: return formatGenericMessage(message, userInput, agentType) + case AgentTypeCursorAgent: + return formatGenericMessage(message, userInput, agentType) case AgentTypeCursor: return formatGenericMessage(message, userInput, agentType) case AgentTypeCustom: