Files
magpie/internal/agent/cursor_name_test.go
T
yetone 486ea82378 agents: cursor-agent's row is Cursor CLI (@G_Z_Y on X)
@G_Z_Y looked for Cursor CLI on the Agents page and took the "Cursor" row
for the editor. The row is cursor-agent, so it is named Cursor CLI. What
it keeps in ~/.cursor is the Cursor editor's too (MCP servers, skills,
chats), so the Library and Sessions name it Cursor there (SharedName).

Run at this head before the rebase onto 0f391a7a7: go test -tags nogui -count=1 -timeout 45m ./... under a sandbox HOME, every package ok; gofmt -l clean; go vet clean for darwin, linux (nogui) and windows; GUI files agent*, i18n*, gui-*, getting-started, library*, sess* and import-row in both engines: 1638/1638.
2026-10-16 05:10:43 +08:00

27 lines
864 B
Go

package agent
import "testing"
// @G_Z_Y on X installed cursor-agent and looked for it on the Agents page
// more than once: the row said "Cursor", which reads as the editor. The row
// is the CLI's; the files and chats it shares with the editor (SharedName)
// are Cursor's.
func TestCursorIsCursorCLI(t *testing.T) {
a := cursor(t.TempDir())
if a.Name != "Cursor CLI" {
t.Errorf("Name = %q, want Cursor CLI", a.Name)
}
if a.ID != "cursor" || len(a.Aliases) != 1 || a.Aliases[0] != "cursor-agent" {
t.Errorf("id or aliases changed: %q %v", a.ID, a.Aliases)
}
if got := a.SharedName(); got != "Cursor" {
t.Errorf("SharedName = %q, want Cursor", got)
}
// every other agent keeps one name
for _, b := range All() {
if b.ID != "cursor" && b.SharedName() != b.Name {
t.Errorf("%s: SharedName %q, Name %q", b.ID, b.SharedName(), b.Name)
}
}
}