Edit: My current proposal:
Based on recent discussions, I think using env variables makes most sense here, and I think we should try to standardise on a set of env vars both for the application name discussed here, and as a replacement for the other mechanisms we use today (--client-id for server, FLUTTER_HOST for flutter, PUB_ENVIRONMENT for pub). Using env vars mean we could update the IDEs once with all of these, and then migrate tools over in time, rather than have to coordinate changes and handle different versions that CLI flags would require.
Based on the info VS Code has, I think there are probably 6 useful pieces of information:
- The name of the application/product
- The version of the application/product
- The "name" of the plugin/client
- The version of the plugin/client
- The ID that identifies the "tool" used for analytics grouping
- Information about the kind of environment (desktop, web, docker, wsl)... This can be useful to understand if Linux users are actually on Windows (WSL) which can cause some kinds of issues or if the extension host is remote from the UI (eg. could affect latency and payload sizes might matter more)
So perhaps something like:
| Environment Variable |
Example Values |
Description |
Replaces |
DASH__IDE_NAME |
VS Code, Cursor, Antigravity, IntelliJ, Android Studio |
The name of the IDE that the user launched (regardless of any plugin) |
N/A |
DASH__IDE_VERSION |
1.2.3, 1.2.3-alpha.4 |
The version of the software named in DASH__IDE_NAME |
N/A |
DASH__PLUGIN_NAME |
Dart-Code, dart-intellij(?) |
The name of the plugin that provides the integration with Dart/Flutter tools |
|
DASH__PLUGIN_VERSION |
1.2.3, 1.2.3-alpha.4 |
The version of the software named in DASH__PLUGIN_NAME |
--client-version |
DASH__TOOL |
vscode-plugins, intellijPlugins |
The ID of the tool used for analytics reporting (maps to fixed enum in unified analytics). This also controls whether the user is prompted about analytics collection (the first use of a given value triggers a new prompt). |
--client-id, FLUTTER_HOST(?) |
DASH__IDE_ENVIRONMENT |
desktop, wsl, ssh-remote, codespaces, dev-container |
Additional string to describe if the environment is special in some way (like a VS Code "remote" session) |
The -Remote suffix in the tool name? |
Questions:
Original message:
When we start the analysis server, was pass a "Client ID" which can be used in diagnostic reports and analytics. Currently this is one of two strings, depending on whether we're in a remote session (ssh, docker, Codespaces, etc.) or not:
|
const clientID = isRunningLocally ? "VS-Code" : "VS-Code-Remote"; |
It would be more helpful if we provided more specific client IDs for clients like Cursor and Firebase Studio since they often have customised code and may behave different (or have different bugs).
VS Code's API has env.appName which is usually customised by these other editors and we could perhaps pass instead. Since the analysis server currently switches on this string, we can only change what we pass when we know we're using a version of server that supports these new strings (or a fallback for strings it does not recognise).
Here are some examples of env.appNames that have been recorded:

We could also consider what we do with the current "-Remote" suffix if we change this (if we just use appName as-is, there will be no indication of being in a remote workspace.. usually we infer this from env.remoteName or env.appHost).
Edit: My current proposal:
Based on recent discussions, I think using env variables makes most sense here, and I think we should try to standardise on a set of env vars both for the application name discussed here, and as a replacement for the other mechanisms we use today (
--client-idfor server,FLUTTER_HOSTforflutter,PUB_ENVIRONMENTforpub). Using env vars mean we could update the IDEs once with all of these, and then migrate tools over in time, rather than have to coordinate changes and handle different versions that CLI flags would require.Based on the info VS Code has, I think there are probably 6 useful pieces of information:
So perhaps something like:
DASH__IDE_NAMEVS Code,Cursor,Antigravity,IntelliJ,Android StudioDASH__IDE_VERSION1.2.3,1.2.3-alpha.4DASH__IDE_NAMEDASH__PLUGIN_NAMEDart-Code,dart-intellij(?)DASH__PLUGIN_VERSION1.2.3,1.2.3-alpha.4DASH__PLUGIN_NAME--client-versionDASH__TOOLvscode-plugins,intellijPlugins--client-id,FLUTTER_HOST(?)DASH__IDE_ENVIRONMENTdesktop,wsl,ssh-remote,codespaces,dev-container-Remotesuffix in the tool name?Questions:
-Remotesuffix onDASH__PLUGIN_NAMEfor VS Code? It feels like a hacky way to describe the environment and maybeDASH__IDE_ENVIRONMENTis a better (and more detailed) way to capture these environments.--client-idfor compatibility)Dart-Codefor the env name to reduce confusion (even if this just maps to "VSCode" internally to avoid renaming the tool?)pub, orflutter), what should it set?puborflutterin an IDEs embedded terminal, should these env vars also be set?Original message:
When we start the analysis server, was pass a "Client ID" which can be used in diagnostic reports and analytics. Currently this is one of two strings, depending on whether we're in a remote session (ssh, docker, Codespaces, etc.) or not:
Dart-Code/src/extension/analysis/analyzer.ts
Line 701 in f4bc97a
It would be more helpful if we provided more specific client IDs for clients like Cursor and Firebase Studio since they often have customised code and may behave different (or have different bugs).
VS Code's API has
env.appNamewhich is usually customised by these other editors and we could perhaps pass instead. Since the analysis server currently switches on this string, we can only change what we pass when we know we're using a version of server that supports these new strings (or a fallback for strings it does not recognise).Here are some examples of
env.appNames that have been recorded:We could also consider what we do with the current "-Remote" suffix if we change this (if we just use
appNameas-is, there will be no indication of being in a remote workspace.. usually we infer this fromenv.remoteNameorenv.appHost).