Skip to content

Commit

Permalink
chat - welcome updates (#234329)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored Nov 21, 2024
1 parent eeec4c3 commit 7bb46ec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.96.0",
"distro": "f656a837bb4aa14329dbe98d58c178615e959ae1",
"distro": "7d14bf7e9a283e1c9ca8b18ccb0c13274a3757cf",
"author": {
"name": "Microsoft Corporation"
},
Expand Down
1 change: 1 addition & 0 deletions src/vs/base/common/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ export interface IDefaultChatAgent {
readonly chatWelcomeTitle: string;
readonly documentationUrl: string;
readonly privacyStatementUrl: string;
readonly collectionDocumentationUrl: string;
readonly providerId: string;
readonly providerName: string;
readonly providerScopes: string[];
Expand Down
11 changes: 7 additions & 4 deletions src/vs/workbench/contrib/chat/browser/chatSetup.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { IWorkbenchContribution, registerWorkbenchContribution2, WorkbenchPhase } from '../../../common/contributions.js';
import { Disposable, toDisposable } from '../../../../base/common/lifecycle.js';
import { ContextKeyExpr, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
import { ITelemetryService, TelemetryLevel } from '../../../../platform/telemetry/common/telemetry.js';
import { AuthenticationSession, IAuthenticationService } from '../../../services/authentication/common/authentication.js';
import { IProductService } from '../../../../platform/product/common/productService.js';
import { IExtensionManagementService } from '../../../../platform/extensionManagement/common/extensionManagement.js';
Expand Down Expand Up @@ -47,6 +47,7 @@ const defaultChat = {
chatWelcomeTitle: product.defaultChatAgent?.chatWelcomeTitle ?? '',
documentationUrl: product.defaultChatAgent?.documentationUrl ?? '',
privacyStatementUrl: product.defaultChatAgent?.privacyStatementUrl ?? '',
collectionDocumentationUrl: product.defaultChatAgent?.collectionDocumentationUrl ?? '',
providerId: product.defaultChatAgent?.providerId ?? '',
providerName: product.defaultChatAgent?.providerName ?? '',
providerScopes: product.defaultChatAgent?.providerScopes ?? [],
Expand Down Expand Up @@ -102,7 +103,7 @@ class ChatSetupContribution extends Disposable implements IWorkbenchContribution
@IProductService private readonly productService: IProductService,
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
@IExtensionService private readonly extensionService: IExtensionService,
@IInstantiationService private readonly instantiationService: IInstantiationService
@IInstantiationService private readonly instantiationService: IInstantiationService,
) {
super();

Expand All @@ -119,8 +120,10 @@ class ChatSetupContribution extends Disposable implements IWorkbenchContribution
}

private registerChatWelcome(): void {
const header = localize('setupPreamble1', "{0} is your AI pair programmer that helps you write code faster and smarter.", defaultChat.name);
const footer = localize('setupPreamble2', "By proceeding you agree to the [Privacy Statement]({0}).", defaultChat.privacyStatementUrl);
const header = localize('setupPreamble1', "{0} is your AI pair programmer.", defaultChat.name);
const footer = this.telemetryService.telemetryLevel !== TelemetryLevel.NONE ?
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) :
localize({ key: 'setupPreambleWithoutOptOut', comment: ['{Locked="]({0})"}'] }, "By proceeding you agree to our [privacy statement]({0}).", defaultChat.privacyStatementUrl);

// Setup: Triggered (signed-out)
Registry.as<IChatViewsWelcomeContributionRegistry>(ChatViewsWelcomeExtensions.ChatViewsWelcomeRegistry).register({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@ div.chat-welcome-view {
& > .chat-welcome-view-progress {
display: flex;
gap: 6px;
color: var(--vscode-descriptionForeground);
text-align: center;
max-width: 350px;
padding: 0 20px;
margin-top: 20px;
}

& > .chat-welcome-view-message {
color: var(--vscode-descriptionForeground);
text-align: center;
max-width: 350px;
padding: 0 20px;
Expand All @@ -88,7 +86,6 @@ div.chat-welcome-view {
}

& > .chat-welcome-view-tips {
color: var(--vscode-descriptionForeground);
max-width: 250px;
margin-top: 10px;

Expand Down

0 comments on commit 7bb46ec

Please sign in to comment.