Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Cursor and Windsurf as recognized IDE session types for usage tracking #21361

@blinkagent

Description

@blinkagent

Summary

Currently, the allowed session types for IDE tracking are limited to vscode, jetbrains, ssh, and reconnecting-pty. To properly track usage of VS Code forks like Cursor and Windsurf, we need to add them as recognized session types.

This will help deployment admins better understand which IDEs their users are connecting with.

Changes Required

1. MagicSessionType in agent/agentssh/agentssh.go

Add new session type constants:

MagicSessionTypeCursor   MagicSessionType = "cursor"
MagicSessionTypeWindsurf MagicSessionType = "windsurf"

Update extractMagicSessionType() to recognize these values.

2. UsageAppName in codersdk/workspaces.go

Add new usage app names:

UsageAppNameCursor   UsageAppName = "cursor"
UsageAppNameWindsurf UsageAppName = "windsurf"

Update AllowedAppNames slice.

3. cli/ssh.go

Update getUsageAppName() to include the new app names in allowedUsageApps.

4. coderd/workspaces.go

Add cases in the switch statement for the new app names to track session counts.

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions