Story: Detect IDE Environment
As a specsmd maintainer I want to detect which IDE the extension is running in So that I can understand IDE distribution and compatibility
As a specsmd maintainer I want to detect which IDE the extension is running in So that I can understand IDE distribution and compatibility
--- story: 003-detect-ide-environment unit: 001-analytics-core intent: 012-vscode-extension-analytics priority: must status: complete implemented: true created: 2025-01-08T12:30:00Z ---
**As a** specsmd maintainer **I want** to detect which IDE the extension is running in **So that** I can understand IDE distribution and compatibility
// IDE detection mapping
const IDE_MAPPINGS: Record<string, string> = {
'Visual Studio Code': 'vscode',
'Visual Studio Code - Insiders': 'vscode-insiders',
'VSCodium': 'vscodium',
'Cursor': 'cursor',
'Windsurf': 'windsurf',
'Positron': 'positron',
};
function detectIDE(): IDEInfo {
const appName = vscode.env.appName;
return {
name: IDE_MAPPINGS[appName] || appName.toLowerCase().replace(/\s+/g, '-'),
version: vscode.version,
host: vscode.env.appHost
};
}**Size**: S