Skip to content

Commit f338f3d

Browse files
authored
update wording based on feedback (microsoft#232189)
* update wording * remove test code * remove bad comma * address PR feedback
1 parent fa0bf8d commit f338f3d

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

src/vs/workbench/contrib/chat/browser/chatMovedView.contribution.ts

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { IExtensionManagementService } from '../../../../platform/extensionManag
1414
import { ExtensionIdentifier } from '../../../../platform/extensions/common/extensions.js';
1515
import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js';
1616
import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
17+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
1718
import { KeybindingsRegistry, KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
1819
import { IOpenerService } from '../../../../platform/opener/common/opener.js';
1920
import { IProductService } from '../../../../platform/product/common/productService.js';
@@ -53,7 +54,8 @@ export class MoveChatViewContribution implements IWorkbenchContribution {
5354
@IViewsService private readonly viewsService: IViewsService,
5455
@IPaneCompositePartService private readonly paneCompositePartService: IPaneCompositePartService,
5556
@IStorageService private readonly storageService: IStorageService,
56-
@IConfigurationService private readonly configurationService: IConfigurationService
57+
@IConfigurationService private readonly configurationService: IConfigurationService,
58+
@IKeybindingService private readonly keybindingService: IKeybindingService,
5759
) {
5860
this.initialize();
5961
}
@@ -196,19 +198,33 @@ export class MoveChatViewContribution implements IWorkbenchContribution {
196198
};
197199

198200
Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).registerViews([viewDescriptor], viewContainer);
201+
202+
199203
const secondarySideBarLeft = this.configurationService.getValue('workbench.sideBar.location') !== 'left';
200-
const welcomeViewMainMessage = this.hasCommandCenterChat() ?
201-
(secondarySideBarLeft ?
202-
localize('chatMovedMainMessage1Left', "Chat has been moved to the Secondary Side Bar on the left. You can quickly access Chat from the new Copilot icon in the title bar.") :
203-
localize('chatMovedMainMessage1Right', "Chat has been moved to the Secondary Side Bar on the right. You can quickly access Chat from the new Copilot icon in the title bar.")) :
204-
(secondarySideBarLeft ?
205-
localize('chatMovedMainMessage2Left', "Chat has been moved to the Secondary Side Bar on the left.") :
206-
localize('chatMovedMainMessage2Right', "Chat has been moved to the Secondary Side Bar on the right."));
207-
208-
const okButton = `[${localize('ok', "OK")}](command:_chatMovedViewWelcomeView.ok)`;
204+
205+
206+
let welcomeViewMainMessage = secondarySideBarLeft ?
207+
localize('chatMovedMainMessage1Left', "Chat has been moved to the Secondary Side Bar on the left for a more integrated AI experience in your editor.") :
208+
localize('chatMovedMainMessage1Right', "Chat has been moved to the Secondary Side Bar on the right for a more integrated AI experience in your editor.");
209+
210+
const chatViewKeybinding = this.keybindingService.lookupKeybinding(CHAT_SIDEBAR_PANEL_ID)?.getLabel();
211+
let quicklyAccessMessage = undefined;
212+
if (this.hasCommandCenterChat() && chatViewKeybinding) {
213+
quicklyAccessMessage = localize('chatMovedCommandCenterAndKeybind', "You can quickly access Chat via the new Copilot icon in the editor title bar or with the keyboard shortcut {0}.", chatViewKeybinding);
214+
} else if (this.hasCommandCenterChat()) {
215+
quicklyAccessMessage = localize('chatMovedCommandCenter', "You can quickly access Chat via the new Copilot icon in the editor title bar.");
216+
} else if (chatViewKeybinding) {
217+
quicklyAccessMessage = localize('chatMovedKeybind', "You can quickly access Chat with the keyboard shortcut {0}.", chatViewKeybinding);
218+
}
219+
220+
if (quicklyAccessMessage) {
221+
welcomeViewMainMessage = `${welcomeViewMainMessage}\n\n${quicklyAccessMessage}`;
222+
}
223+
224+
const okButton = `[${localize('ok', "Got it")}](command:_chatMovedViewWelcomeView.ok)`;
209225
const restoreButton = `[${localize('restore', "Restore Old Location")}](command:_chatMovedViewWelcomeView.restore)`;
210226

211-
const welcomeViewFooterMessage = localize('chatMovedFooterMessage', "[Learn more](command:_chatMovedViewWelcomeView.learnMore) about the Secondary Sidebar.");
227+
const welcomeViewFooterMessage = localize('chatMovedFooterMessage', "[Learn more](command:_chatMovedViewWelcomeView.learnMore) about the Secondary Side Bar.");
212228

213229
const viewsRegistry = Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry);
214230
return viewsRegistry.registerViewWelcomeContent(viewId, {

0 commit comments

Comments
 (0)