@@ -88,12 +88,13 @@ export class Tracer {
88
88
89
89
private askForTracingConsent ( ) : void {
90
90
vscode . window . showInformationMessage (
91
- 'Do you want to help EPFL develop Dotty LSP plugin by uploading your LSP communication? ' +
92
- 'PLEASE BE AWARE that the data sent contains your entire codebase and ALL the IDE actions, ' +
93
- 'including every single keystroke.' ,
94
- 'yes' , 'no'
91
+ 'To help us improve the Scala IDE support, we would like to collect ' +
92
+ 'the content of every Scala file in your project and ' +
93
+ 'every interaction with Scala files in the IDE, including keystrokes. ' +
94
+ 'This data will be stored anonymously (we won\'t know your name) on servers at EPFL in Switzerland.' ,
95
+ 'Allow' , 'Deny' ,
95
96
) . then ( ( value : string | undefined ) => {
96
- if ( value === 'yes ' || value === 'no ' ) this . tracingConsent . set ( value )
97
+ if ( value === 'Allow ' || value === 'Deny ' ) this . tracingConsent . set ( value )
97
98
} )
98
99
}
99
100
@@ -109,7 +110,7 @@ export class Tracer {
109
110
}
110
111
}
111
112
112
- if ( this . tracingConsent . get ( ) === 'yes ' ) {
113
+ if ( this . tracingConsent . get ( ) === 'Allow ' ) {
113
114
doInitialize ( )
114
115
} else {
115
116
let didInitialize = false
@@ -127,14 +128,15 @@ export class Tracer {
127
128
item . command = consentCommandName
128
129
const renderStatusBarItem = ( ) => {
129
130
item . text = ( ( ) => {
130
- const desc = this . tracingConsent . get ( ) === 'yes ' ? 'ON ' : 'OFF '
131
- return `$(radio-tower) Dotty trace : ${ desc } `
131
+ const desc = this . tracingConsent . get ( ) === 'Allow ' ? 'On ' : 'Off '
132
+ return `$(radio-tower) Scala telemetry : ${ desc } `
132
133
} ) ( )
133
134
134
135
item . tooltip = ( ( ) => {
135
- const desc = this . tracingConsent . get ( ) === 'yes' ? 'consented' : 'not consented'
136
- return `This workspace is configured for remote tracing of Dotty LSP and you have ${ desc } to it. ` +
137
- 'Click to adjust your consent.'
136
+ const desc = this . tracingConsent . get ( ) === 'Allow' ? 'enabled' : 'disabled'
137
+ const toggle = this . tracingConsent . get ( ) === 'Allow' ? 'disable' : 'enable'
138
+ return `Data collection for Scala is ${ desc } . ` +
139
+ `Click to ${ toggle } it.`
138
140
} ) ( )
139
141
}
140
142
renderStatusBarItem ( )
@@ -284,20 +286,20 @@ export class Tracer {
284
286
285
287
append : ( value : string ) => {
286
288
localOutputChannel . append ( value )
287
- if ( this . tracingConsent . get ( ) === 'no ' ) return
289
+ if ( this . tracingConsent . get ( ) === 'Deny ' ) return
288
290
log += value
289
291
} ,
290
292
291
293
appendLine : ( value : string ) => {
292
294
localOutputChannel . appendLine ( value )
293
- if ( this . tracingConsent . get ( ) === 'no ' ) {
295
+ if ( this . tracingConsent . get ( ) === 'Deny ' ) {
294
296
log = ''
295
297
return
296
298
}
297
299
298
300
log += value
299
301
log += '\n'
300
- if ( this . tracingConsent . get ( ) === 'yes ' ) withSocket ( ( socket ) => {
302
+ if ( this . tracingConsent . get ( ) === 'Allow ' ) withSocket ( ( socket ) => {
301
303
if ( socket . readyState === WebSocket . OPEN ) {
302
304
const send = ( msg : string ) => socket . send ( msg , ( err ) => {
303
305
if ( err ) {
0 commit comments