@@ -88,12 +88,13 @@ export class Tracer {
8888
8989 private askForTracingConsent ( ) : void {
9090 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' ,
9596 ) . then ( ( value : string | undefined ) => {
96- if ( value === 'yes ' || value === 'no ' ) this . tracingConsent . set ( value )
97+ if ( value === 'Allow ' || value === 'Deny ' ) this . tracingConsent . set ( value )
9798 } )
9899 }
99100
@@ -109,7 +110,7 @@ export class Tracer {
109110 }
110111 }
111112
112- if ( this . tracingConsent . get ( ) === 'yes ' ) {
113+ if ( this . tracingConsent . get ( ) === 'Allow ' ) {
113114 doInitialize ( )
114115 } else {
115116 let didInitialize = false
@@ -127,14 +128,15 @@ export class Tracer {
127128 item . command = consentCommandName
128129 const renderStatusBarItem = ( ) => {
129130 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 } `
132133 } ) ( )
133134
134135 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.`
138140 } ) ( )
139141 }
140142 renderStatusBarItem ( )
@@ -284,20 +286,20 @@ export class Tracer {
284286
285287 append : ( value : string ) => {
286288 localOutputChannel . append ( value )
287- if ( this . tracingConsent . get ( ) === 'no ' ) return
289+ if ( this . tracingConsent . get ( ) === 'Deny ' ) return
288290 log += value
289291 } ,
290292
291293 appendLine : ( value : string ) => {
292294 localOutputChannel . appendLine ( value )
293- if ( this . tracingConsent . get ( ) === 'no ' ) {
295+ if ( this . tracingConsent . get ( ) === 'Deny ' ) {
294296 log = ''
295297 return
296298 }
297299
298300 log += value
299301 log += '\n'
300- if ( this . tracingConsent . get ( ) === 'yes ' ) withSocket ( ( socket ) => {
302+ if ( this . tracingConsent . get ( ) === 'Allow ' ) withSocket ( ( socket ) => {
301303 if ( socket . readyState === WebSocket . OPEN ) {
302304 const send = ( msg : string ) => socket . send ( msg , ( err ) => {
303305 if ( err ) {
0 commit comments