Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions detection/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions detection/toolmention/toolmention_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
9 changes: 9 additions & 0 deletions detection/trailer/trailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
8 changes: 8 additions & 0 deletions detection/trailer/trailer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cursoragent@cursor.com>",
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) <copilot@github.com>",
Expand Down