Skip to content

Commit fe0cbe4

Browse files
committed
add info to help menus
1 parent 8b9f999 commit fe0cbe4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ import { AccessibleDiffViewerNext } from 'vs/editor/browser/widget/diffEditor.co
1818
export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'panelChat' | 'inlineChat'): string {
1919
const keybindingService = accessor.get(IKeybindingService);
2020
const content = [];
21+
const openAccessibleViewKeybinding = keybindingService.lookupKeybinding('editor.action.accessibleView')?.getAriaLabel();
2122
if (type === 'panelChat') {
2223
content.push(localize('chat.overview', 'The chat view is comprised of an input box and a request/response list. The input box is used to make requests and the list is used to display responses.'));
2324
content.push(localize('chat.requestHistory', 'In the input box, use up and down arrows to navigate your request history. Edit input and use enter or the submit button to run a new request.'));
25+
content.push(openAccessibleViewKeybinding ? localize('chat.inspectResponse', 'In the input box, inspect the last response in the accessible view via {0}', openAccessibleViewKeybinding) : localize('chat.inspectResponseNoKb', 'With the input box focused, inspect the last response in the accessible view via the Open Accessible View command, which is currently not triggerable by a keybinding.'));
2426
content.push(localize('chat.announcement', 'Chat responses will be announced as they come in. A response will indicate the number of code blocks, if any, and then the rest of the response.'));
2527
content.push(descriptionForCommand('chat.action.focus', localize('workbench.action.chat.focus', 'To focus the chat request/response list, which can be navigated with up and down arrows, invoke The Focus Chat command ({0}).',), localize('workbench.action.chat.focusNoKb', 'To focus the chat request/response list, which can be navigated with up and down arrows, invoke The Focus Chat List command, which is currently not triggerable by a keybinding.'), keybindingService));
2628
content.push(descriptionForCommand('workbench.action.chat.focusInput', localize('workbench.action.chat.focusInput', 'To focus the input box for chat requests, invoke the Focus Chat Input command ({0})'), localize('workbench.action.interactiveSession.focusInputNoKb', 'To focus the input box for chat requests, invoke the Focus Chat Input command, which is currently not triggerable by a keybinding.'), keybindingService));
@@ -35,6 +37,7 @@ export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'pane
3537
if (upHistoryKeybinding && downHistoryKeybinding) {
3638
content.push(localize('inlineChat.requestHistory', 'In the input box, use {0} and {1} to navigate your request history. Edit input and use enter or the submit button to run a new request.', upHistoryKeybinding, downHistoryKeybinding));
3739
}
40+
content.push(openAccessibleViewKeybinding ? localize('inlineChat.inspectResponse', 'In the input box, inspect the response in the accessible view via {0}', openAccessibleViewKeybinding) : localize('inlineChat.inspectResponseNoKb', 'With the input box focused, inspect the response in the accessible view via the Open Accessible View command, which is currently not triggerable by a keybinding.'));
3841
content.push(localize('inlineChat.contextActions', "Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."));
3942
content.push(localize('inlineChat.fix', "If a fix action is invoked, a response will indicate the problem with the current code. A diff editor will be rendered and can be reached by tabbing."));
4043
const diffReviewKeybinding = keybindingService.lookupKeybinding(AccessibleDiffViewerNext.id)?.getAriaLabel();

src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ToggleScreenReaderMode extends Action2 {
2828
when: accessibilityHelpIsShown
2929
},
3030
{
31-
primary: KeyMod.Alt | KeyCode.F3,
31+
primary: KeyMod.Alt | KeyCode.F1 | KeyMod.Shift,
3232
weight: KeybindingWeight.WorkbenchContrib + 10,
3333
}]
3434
});

src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class InlineChatAccessibleViewContribution extends Disposable {
7575
if (!controller) {
7676
return false;
7777
}
78-
const inputFocused = editor.hasTextFocus();
7978
const responseContent = controller?.getMessage();
8079
if (!responseContent) {
8180
return false;
@@ -84,9 +83,7 @@ class InlineChatAccessibleViewContribution extends Disposable {
8483
verbositySettingKey: AccessibilityVerbositySettingId.InlineChat,
8584
provideContent(): string { return responseContent; },
8685
onClose() {
87-
if (inputFocused) {
88-
controller.focus();
89-
}
86+
controller.focus();
9087
},
9188

9289
options: { ariaLabel: localize('inlineChatAccessibleView', "Inline Chat Accessible View"), type: AccessibleViewType.View }

0 commit comments

Comments
 (0)