-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Copy link
Description
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
- vscode-coder extension changes to detect and report the IDE type (Track Cursor and other VS Code forks separately in usage statistics vscode-coder#696)
- Requires
workspace-usageexperiment to be enabled for app-specific tracking