Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts
13401 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { ServicesAccessor } from '../../../../editor/browser/editorExtensions.js';
7
import { AccessibleViewProviderId, AccessibleViewType, AccessibleContentProvider } from '../../../../platform/accessibility/browser/accessibleView.js';
8
import { IAccessibleViewImplementation } from '../../../../platform/accessibility/browser/accessibleViewRegistry.js';
9
import { AccessibilityVerbositySettingId } from '../../../../workbench/contrib/accessibility/browser/accessibilityConfiguration.js';
10
import { IsSessionsWindowContext } from '../../../../workbench/common/contextkeys.js';
11
import { localize } from '../../../../nls.js';
12
import { FOCUS_AI_CUSTOMIZATION_VIEW_ID } from '../../aiCustomizationTreeView/browser/aiCustomizationTreeView.js';
13
import { IViewsService } from '../../../../workbench/services/views/common/viewsService.js';
14
import { NewChatViewPane, SessionsViewId } from './newChatViewPane.js';
15
16
export class SessionsChatAccessibilityHelp implements IAccessibleViewImplementation {
17
readonly priority = 120;
18
readonly name = 'sessionsChat';
19
readonly type = AccessibleViewType.Help;
20
readonly when = IsSessionsWindowContext;
21
22
getProvider(accessor: ServicesAccessor) {
23
const viewsService = accessor.get(IViewsService);
24
25
const content: string[] = [];
26
content.push(localize('sessionsChat.overview', "You are in the Agents app. The Agents app is a dedicated workspace for working with AI agents. It provides a chat interface, a changes view for reviewing agent-generated changes, a file explorer, and customization options."));
27
content.push(localize('sessionsChat.input', "You are in the chat input. Type a message and press Enter to send it."));
28
content.push(localize('sessionsChat.workspace', "Shift+Tab to navigate to the workspace picker and choose a workspace for your session."));
29
content.push(localize('sessionsChat.history', "Use up and down arrows to navigate your request history in the input box."));
30
content.push(localize('sessionsChat.changes', "Focus the Changes view{0}.", '<keybinding:workbench.action.agentSessions.focusChangesView>'));
31
content.push(localize('sessionsChat.filesView', "Focus the Files Explorer view{0}.", '<keybinding:workbench.action.agentSessions.focusChangesFileView>'));
32
content.push(localize('sessionsChat.sessionsView', "Focus the Chat Sessions view{0}.", '<keybinding:workbench.action.chat.focusAgentSessionsViewer>'));
33
content.push(localize('sessionsChat.customizations', "Focus the Chat Customizations view{0}.", `<keybinding:${FOCUS_AI_CUSTOMIZATION_VIEW_ID}>`));
34
35
return new AccessibleContentProvider(
36
AccessibleViewProviderId.SessionsChat,
37
{ type: AccessibleViewType.Help },
38
() => content.join('\n'),
39
() => {
40
const view = viewsService.getActiveViewWithId<NewChatViewPane>(SessionsViewId);
41
view?.focus();
42
},
43
AccessibilityVerbositySettingId.SessionsChat,
44
);
45
}
46
}
47
48