Change:
chat the whole view 1 accessibility view. Nothing happens Only if I move focus to be on one exact element the command will work. We should make the command more flexibly, so it is not so strict with regards to focus. It should also work if I am on the Chat input, or on the whole Chat view. In those cases it should probably act as if the focus was on the last item.
also mentioned this, makes sense
AFAIK, one cannot focus the chat view without focusing either the list (item) or the input. So, to verify: focus the chat input that the accessible view shows the most recent response repeat the steps but with focus on an item - it should show that item
Thanks for fixing it, it is better than before. However now the help view always has the content of the last chat. Ideally it would respect the focused chat element, if none of the chat elements are focused then we should show the content of the last one in the accessibility help editor. Reopening this to hear what you think about this proposal. Thanks
that is working for me - could you pls attach a gif of what you're seeing?
Here's what I am seeing. It looks like the accessibility help always gets the content from the editor. Here's a gif: I might be doing something wrong !
Thanks - that's a bug, but different from this issue - to test this issue, you'll want to use . I'll make a new one to cover that
Thanks! Here's the alt+f2 behaviour. It always show the last content. So it also seems to be off !
Hm, that's very strange - I cannot reproduce but will try again
I see you are focusing a request - in that case, it will just show the last response by design
ok I can repro now, thanks!
I tried with latest insiders and now I see the following: When the focus is on the last element or on the input box works as expected If the focus is anywhere else, is a no-op looks like we still have one case that we did not cover. Should we reopen? Can you repro? Thanks
Thanks for testing Where is your focus when you are seeing a ? I cannot repro unless my focus is on a request, which is expected.
You are correct, the focus is on the request. Why is that an expected no-op? Why do we treat request and response differently?
I consulted with JooYoung about this and he agreed that since the user entered the request, they don't need to inspect it closely.
It would be great if you could verify this particular issue - happy to make a new one if you disagree about the request no-op
I have the verified label. As for request and response behaving differently, I will open a new issue.

Discussion:
import { registerChatQuickQuestionActions } from 'vs/workbench/contrib/chat/browser/actions/chatQuickInputActions'; import { registerChatTitleActions } from 'vs/workbench/contrib/chat/browser/actions/chatTitleActions'; import { registerChatExportActions } from 'vs/workbench/contrib/chat/browser/actions/chatImportExport'; <del> import { ChatTreeItem, IChatAccessibilityService, IChatWidget, IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat'; </del> <ins> import { IChatAccessibilityService, IChatWidget, IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat'; </ins> import { ChatContributionService } from 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl'; import { ChatEditor, IChatEditorOptions } from 'vs/workbench/contrib/chat/browser/chatEditor'; import { ChatEditorInput, ChatEditorInputSerializer } from 'vs/workbench/contrib/chat/browser/chatEditorInput';

import { isResponseVM } from 'vs/workbench/contrib/chat/common/chatViewModel'; import { CONTEXT_IN_CHAT_SESSION } from 'vs/workbench/contrib/chat/common/chatContextKeys'; import { ChatAccessibilityService } from 'vs/workbench/contrib/chat/browser/chatAccessibilityService'; <ins> import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; </ins> // Register configuration const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration);

this._register(AccessibleViewAction.addImplementation(100, 'panelChat', accessor => { const accessibleViewService = accessor.get(IAccessibleViewService); const widgetService = accessor.get(IChatWidgetService); <del> const widget: IChatWidget | undefined = widgetService.lastFocusedWidget; const focusedItem: ChatTreeItem | undefined = widget?.getFocus(); if (!widget || !focusedItem || !isResponseVM(focusedItem)) { </del> <ins> const codeEditorService = accessor.get(ICodeEditorService); let widget = widgetService.lastFocusedWidget; if (!widget) { return false; } const chatInputFocused = !!(codeEditorService.getActiveCodeEditor() || codeEditorService.getFocusedCodeEditor()); if (chatInputFocused) { widget.focusLastMessage(); widget = widgetService.lastFocusedWidget; } if (!widget) { return false; } const verifiedWidget: IChatWidget = widget; const focusedItem = verifiedWidget.getFocus(); if (!focusedItem) { </ins> return false; } <del> const responseContent = focusedItem?.response.value; </del> <ins> const responseContent = isResponseVM(focusedItem) ? focusedItem.response.value : undefined; </ins> if (!responseContent) { return false; } accessibleViewService.show({ verbositySettingKey: 'panelChat', provideContent(): string { return responseContent; }, onClose() { <del> widget.focus(focusedItem); </del> <ins> if (chatInputFocused) { verifiedWidget.focusInput(); } else { verifiedWidget.focus(focusedItem); } </ins> }, options: { ariaLabel: nls.localize('chatAccessibleView', "Chat Accessible View"), language: 'typescript', type: AccessibleViewType.View } });