diff --git a/detection/constants.go b/detection/constants.go index e4bde75..225b6a7 100644 --- a/detection/constants.go +++ b/detection/constants.go @@ -38,6 +38,12 @@ var SupportedToolsInMentions = []string{ "Claude", "GitHub Copilot", "Copilot", + "Cursor Grok 4.6", + "Cursor Grok 4.5", + "Cursor Grok", + "Composer 2.5", + "Cursor Fast", + "Cursor Small", "Cursor", "Aider", "OpenAI Codex", diff --git a/detection/toolmention/toolmention_test.go b/detection/toolmention/toolmention_test.go index 8934f1b..6eb8195 100644 --- a/detection/toolmention/toolmention_test.go +++ b/detection/toolmention/toolmention_test.go @@ -51,6 +51,13 @@ func TestDetect(t *testing.T) { wantScore: 20, wantConfidence: detection.ConfidenceLow, }, + { + name: "cursor grok model mentioned", + input: detection.Input{Text: "Assisted by Cursor Grok 4.6"}, + wantTools: []string{"Cursor Grok 4.6"}, + wantScore: 20, + wantConfidence: detection.ConfidenceLow, + }, { name: "case insensitive", input: detection.Input{Text: "I used CLAUDE to write this"}, diff --git a/detection/trailer/trailer.go b/detection/trailer/trailer.go index 05adba4..945ac38 100644 --- a/detection/trailer/trailer.go +++ b/detection/trailer/trailer.go @@ -147,6 +147,15 @@ func extractCoauthorModel(tool, namePart string) string { return strings.TrimSpace(namePart[len("Claude "):]) } return namePart + case "Cursor": + if strings.EqualFold(namePart, "Cursor") { + return "" + } + namePartLower := strings.ToLower(namePart) + if strings.HasPrefix(namePartLower, "cursor ") { + return strings.TrimSpace(namePart[len("Cursor "):]) + } + return namePart } return "" diff --git a/detection/trailer/trailer_test.go b/detection/trailer/trailer_test.go index c8bbcda..37d9188 100644 --- a/detection/trailer/trailer_test.go +++ b/detection/trailer/trailer_test.go @@ -65,6 +65,14 @@ func TestDetect(t *testing.T) { wantScore: []float64{85}, wantConfidence: []detection.Confidence{detection.ConfidenceHigh}, }, + { + name: "coauthor: Cursor trailer with Grok model prefix", + message: "refactor: extract method\n\nCo-Authored-By: Cursor Grok 4.6 ", + wantTools: []string{"Cursor"}, + wantModels: []string{"Grok 4.6"}, + wantScore: []float64{85}, + wantConfidence: []detection.Confidence{detection.ConfidenceHigh}, + }, { name: "coauthor: Copilot trailer with parenthesized model", message: "feat: add endpoint\n\nCo-Authored-By: Copilot (gpt-4.1) ",