diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts b/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts index 0c9a71f81c3..67c3d7f56ad 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts @@ -25,7 +25,7 @@ export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'chat content.push(descriptionForCommand('workbench.action.chat.focusInput', localize('workbench.action.chat.focusInput', 'The Focus Chat Input command ({0}) focuses the input box for chat requests.'), localize('workbench.action.interactiveSession.focusInputNoKb', 'Focus Chat Input command focuses the input box for chat requests and is currently not triggerable by a keybinding.'), keybindingService)); content.push('Chat responses may contain code blocks which can be tabbed to. Use typical editor keybindings to select and copy text. To further interact with these code blocks, run the following commands:'); content.push(descriptionForCommand('workbench.action.chat.insertCodeBlock', localize('workbench.action.chat.insertCodeBlock', 'Insert Code Block ({0}) inserts the code at the current cursor location in last active editor'), localize('workbench.action.chat.insertCodeBlockNoKb', 'Insert Code Block inserts the code at the current cursor location and is currently not triggerable by a keybinding.'), keybindingService)); - content.push(descriptionForCommand('workbench.action.chat.insertIntoNewFile', localize('workbench.action.chat.insertIntoNewFile', 'Insert into New File ({0}) creates a new file with the code block as its contents'), localize('workbench.action.chat.insertIntoNewFileNoKb', 'Insert into New File creates a new file with the code block as its contents and is currently not triggerable by a keybinding.'), keybindingService)); + content.push(descriptionForCommand('workbench.action.chat.insertIntoNewFile', localize('workbench.action.chat.insertIntoNewFile', 'Insert into New File ({0}) creates a new file with the code block as its content'), localize('workbench.action.chat.insertIntoNewFileNoKb', 'Insert into New File creates a new file with the code block as its content and is currently not triggerable by a keybinding.'), keybindingService)); content.push(descriptionForCommand('workbench.action.chat.runInTerminal', localize('workbench.action.chat.runInTerminal', 'Run in Terminal ({0}) runs the code block in the terminal'), localize('workbench.action.chat.runInTerminalNoKb', 'Run in Terminal runs the code block in the terminal and is currently not triggerable by a keybinding.'), keybindingService)); } else { content.push(localize('interactiveSession.makeRequest', "Tab once to reach the make request button, which will re-run the request.")); diff --git a/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts b/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts index 493d21cfac6..a980a7442f3 100644 --- a/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts +++ b/src/vs/workbench/contrib/chat/browser/chatListRenderer.ts @@ -58,6 +58,7 @@ import { CONTEXT_RESPONSE_HAS_PROVIDER_ID, CONTEXT_RESPONSE_VOTE } from 'vs/work import { IChatReplyFollowup, IChatService, ISlashCommand, InteractiveSessionVoteDirection } from 'vs/workbench/contrib/chat/common/chatService'; import { IChatRequestViewModel, IChatResponseViewModel, IChatWelcomeMessageViewModel, isRequestVM, isResponseVM, isWelcomeVM } from 'vs/workbench/contrib/chat/common/chatViewModel'; import { IWordCountResult, getNWords } from 'vs/workbench/contrib/chat/common/chatWordCounter'; +import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution'; const $ = dom.$; @@ -582,6 +583,7 @@ class CodeBlockPart extends Disposable implements IChatResultCodeBlockPart { @IContextKeyService contextKeyService: IContextKeyService, @ILanguageService private readonly languageService: ILanguageService, @IModelService private readonly modelService: IModelService, + @IConfigurationService private readonly _configurationService: IConfigurationService ) { super(); this.element = $('.interactive-result-editor-wrapper'); @@ -608,7 +610,7 @@ class CodeBlockPart extends Disposable implements IChatResultCodeBlockPart { scrollbar: { alwaysConsumeMouseWheel: false }, - ariaLabel: localize('chat.codeBlock', 'Code block'), + ariaLabel: this._configurationService.getValue(AccessibilityVerbositySettingId.Chat) ? localize('chat.codeBlockHelp', 'Code block, to discover ways this can be interacted with, search the command palette for Chat: Insert and Chat: Run.') : localize('chat.codeBlock', 'Code block'), ...this.getEditorOptionsFromConfig() }, { isSimpleWidget: true,