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
Summary
Currently, the allowed session types for IDE tracking are limited to
vscode,jetbrains,ssh, andreconnecting-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.
MagicSessionTypeinagent/agentssh/agentssh.goAdd new session type constants:
Update
extractMagicSessionType()to recognize these values.2.
UsageAppNameincodersdk/workspaces.goAdd new usage app names:
Update
AllowedAppNamesslice.3.
cli/ssh.goUpdate
getUsageAppName()to include the new app names inallowedUsageApps.4.
coderd/workspaces.goAdd cases in the switch statement for the new app names to track session counts.
Related
workspace-usageexperiment to be enabled for app-specific tracking