Skip to content

Track Cursor and other VS Code forks separately in usage statistics #696

@blinkagent

Description

@blinkagent

Summary

Currently, the extension sets CODER_SSH_SESSION_TYPE=vscode and --usage-app=vscode regardless of which IDE is actually being used. This means Cursor, Windsurf, and other VS Code forks are all reported as "vscode" in usage statistics.

This makes it difficult for deployment admins to understand which IDEs their users are connecting with.

Proposed Solution

Detect the IDE using vscode.env.appName and set the appropriate session type:

function getIDEName(): string {
  const appName = vscode.env.appName.toLowerCase();
  if (appName.includes('cursor')) return 'cursor';
  if (appName.includes('windsurf')) return 'windsurf';
  return 'vscode';
}

Then use this value when setting:

  1. CODER_SSH_SESSION_TYPE via SSH SetEnv (in src/remote/remote.ts)
  2. --usage-app flag when launching coder ssh

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions