6
6
import { IWorkbenchContribution , registerWorkbenchContribution2 , WorkbenchPhase } from '../../../common/contributions.js' ;
7
7
import { Disposable , toDisposable } from '../../../../base/common/lifecycle.js' ;
8
8
import { ContextKeyExpr , IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js' ;
9
- import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
9
+ import { ITelemetryService , TelemetryLevel } from '../../../../platform/telemetry/common/telemetry.js' ;
10
10
import { AuthenticationSession , IAuthenticationService } from '../../../services/authentication/common/authentication.js' ;
11
11
import { IProductService } from '../../../../platform/product/common/productService.js' ;
12
12
import { IExtensionManagementService } from '../../../../platform/extensionManagement/common/extensionManagement.js' ;
@@ -47,6 +47,7 @@ const defaultChat = {
47
47
chatWelcomeTitle : product . defaultChatAgent ?. chatWelcomeTitle ?? '' ,
48
48
documentationUrl : product . defaultChatAgent ?. documentationUrl ?? '' ,
49
49
privacyStatementUrl : product . defaultChatAgent ?. privacyStatementUrl ?? '' ,
50
+ collectionDocumentationUrl : product . defaultChatAgent ?. collectionDocumentationUrl ?? '' ,
50
51
providerId : product . defaultChatAgent ?. providerId ?? '' ,
51
52
providerName : product . defaultChatAgent ?. providerName ?? '' ,
52
53
providerScopes : product . defaultChatAgent ?. providerScopes ?? [ ] ,
@@ -102,7 +103,7 @@ class ChatSetupContribution extends Disposable implements IWorkbenchContribution
102
103
@IProductService private readonly productService : IProductService ,
103
104
@IExtensionManagementService private readonly extensionManagementService : IExtensionManagementService ,
104
105
@IExtensionService private readonly extensionService : IExtensionService ,
105
- @IInstantiationService private readonly instantiationService : IInstantiationService
106
+ @IInstantiationService private readonly instantiationService : IInstantiationService ,
106
107
) {
107
108
super ( ) ;
108
109
@@ -119,8 +120,10 @@ class ChatSetupContribution extends Disposable implements IWorkbenchContribution
119
120
}
120
121
121
122
private registerChatWelcome ( ) : void {
122
- const header = localize ( 'setupPreamble1' , "{0} is your AI pair programmer that helps you write code faster and smarter." , defaultChat . name ) ;
123
- const footer = localize ( 'setupPreamble2' , "By proceeding you agree to the [Privacy Statement]({0})." , defaultChat . privacyStatementUrl ) ;
123
+ const header = localize ( 'setupPreamble1' , "{0} is your AI pair programmer." , defaultChat . name ) ;
124
+ const footer = this . telemetryService . telemetryLevel !== TelemetryLevel . NONE ?
125
+ localize ( { key : 'setupPreambleWithOptOut' , comment : [ '{Locked="]({0})"}' ] } , "{0} may use your code snippets for product improvements. Read our [privacy statement]({1}) and learn how to [opt out]({2})." , defaultChat . name , defaultChat . privacyStatementUrl , defaultChat . collectionDocumentationUrl ) :
126
+ localize ( { key : 'setupPreambleWithoutOptOut' , comment : [ '{Locked="]({0})"}' ] } , "By proceeding you agree to our [privacy statement]({0})." , defaultChat . privacyStatementUrl ) ;
124
127
125
128
// Setup: Triggered (signed-out)
126
129
Registry . as < IChatViewsWelcomeContributionRegistry > ( ChatViewsWelcomeExtensions . ChatViewsWelcomeRegistry ) . register ( {
0 commit comments