|
7 | 7 | 'use strict';
|
8 | 8 |
|
9 | 9 | import vscode = require('vscode');
|
10 |
| -import { getLocalGoplsVersion, isInPreviewMode, lastUserAction, latestConfig } from './goLanguageServer'; |
| 10 | +import { getLocalGoplsVersion, lastUserAction, latestConfig } from './goLanguageServer'; |
11 | 11 | import { outputChannel } from './goStatus';
|
12 | 12 | import { extensionId } from './const';
|
13 | 13 | import { getFromGlobalState, getFromWorkspaceState, updateGlobalState } from './stateUtils';
|
@@ -103,14 +103,12 @@ export function shouldPromptForSurvey(now: Date, cfg: SurveyConfig): SurveyConfi
|
103 | 103 | }
|
104 | 104 | // This is the first activation this month (or ever), so decide if we
|
105 | 105 | // should prompt the user. This is done by generating a random number in
|
106 |
| - // the range [0, 1) and checking if it is < probability, which varies |
107 |
| - // depending on whether the default or the nightly is in use. |
| 106 | + // the range [0, 1) and checking if it is < probability. |
108 | 107 | // We then randomly pick a day in the rest of the month on which to prompt
|
109 | 108 | // the user.
|
110 |
| - let probability = 0.01; // lower probability for the regular extension |
111 |
| - if (isInPreviewMode()) { |
112 |
| - probability = 0.0275; |
113 |
| - } |
| 109 | + // Probability is set based on the # of responses received, and will be |
| 110 | + // decreased if we begin receiving > 200 responses/month. |
| 111 | + const probability = 0.03; |
114 | 112 | cfg.promptThisMonth = Math.random() < probability;
|
115 | 113 | if (cfg.promptThisMonth) {
|
116 | 114 | // end is the last day of the month, day is the random day of the
|
|
0 commit comments