mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-18 21:36:52 +01:00
* chat: bring the sticky prompt header to the regular window The prompt timeline's sticky header — the band that pins the prompt you have scrolled past to the top of the transcript, with previous/next navigation — only existed in the Agents window, because it lived in vs/sessions and only that layer loaded it. Move the feature to vs/workbench/contrib/chat and register it from chat.shared.contribution, which both windows import, so the chat view and chat editor get the same header from one implementation. The rail (ruler and dock) stays Agents-window only: its layout and content reservation are built for the centered session view, so it is now gated on IWorkbenchEnvironmentService.isSessionsWindow. Replace sessions.promptTimeline.stickyHeader with chat.promptTimeline.stickyHeader, defaulting to on outside stable, and migrate an existing opt-in over. Mount the header only on widgets that render their input below the transcript (new IChatWidget.rendersInputOnTop), which excludes quick chat and the new-session composer. The band now composites the request-bubble tint over the widget's own list background so it stays opaque over scrolling rows in either host, with the Agents window's box model kept as an override. Also document the header in the chat accessibility help, and stop scanning the whole transcript on every scroll now that the header is on by default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: only describe the sticky prompt header where it is mounted The accessibility help derived the sticky-header text from the setting alone, with a 'not quick chat' proxy for the host check. The new-session composer (agentSessionsWelcome) is a ChatAgentLocation.Chat widget with renderInputOnTop, and AgentChatAccessibilityHelp's when clause does not exclude it, so its help could announce a header and Previous/Next buttons that are not there. Export the contribution's own predicate as isStickyPromptHeaderShown and use it for the help text, so the two cannot drift. Cover the predicate and the help branch with tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>