diff --git a/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css b/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css index 8d1e2b5cc84a6..a70f773c3b8ef 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +++ b/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css @@ -63,15 +63,6 @@ -webkit-user-select: text; .rendered-markdown { - a { - color: var(--vscode-textLink-foreground); - } - - a:hover, - a:active { - color: var(--vscode-textLink-activeForeground); - } - p { margin: 0; } @@ -95,6 +86,15 @@ } } +.interactive-session .chat-question-carousel-container .rendered-markdown a { + color: var(--vscode-textLink-foreground); +} + +.interactive-session .chat-question-carousel-container .rendered-markdown a:hover, +.interactive-session .chat-question-carousel-container .rendered-markdown a:active { + color: var(--vscode-textLink-activeForeground); +} + .interactive-session .chat-question-carousel-container.chat-question-carousel-collapsed { .chat-question-carousel-content { .chat-question-description, diff --git a/src/vs/workbench/test/browser/componentFixtures/chat/chatQuestionCarousel.fixture.ts b/src/vs/workbench/test/browser/componentFixtures/chat/chatQuestionCarousel.fixture.ts index 82c998e822d2d..7b989d831fad6 100644 --- a/src/vs/workbench/test/browser/componentFixtures/chat/chatQuestionCarousel.fixture.ts +++ b/src/vs/workbench/test/browser/componentFixtures/chat/chatQuestionCarousel.fixture.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as dom from '../../../../../base/browser/dom.js'; +import { MarkdownString } from '../../../../../base/common/htmlContent.js'; import { IMarkdownRendererService, MarkdownRendererService } from '../../../../../platform/markdown/browser/markdownRenderer.js'; import { IChatQuestion, IChatQuestionCarousel } from '../../../../contrib/chat/common/chatService/chatService.js'; import { ChatQuestionCarouselPart, IChatQuestionCarouselOptions } from '../../../../contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js'; @@ -123,6 +124,19 @@ const multiSelectQuestion: IChatQuestion = { defaultValue: ['lint', 'fmt'], }; +const markdownLinksQuestion: IChatQuestion = { + id: 'review-results', + type: 'text', + title: 'Review results', + message: new MarkdownString('Review the [VS Code documentation](https://code.visualstudio.com/docs) before continuing.'), + detailedMessage: new MarkdownString([ + 'Related resources:', + '', + '- [VS Code repository](https://github.com/microsoft/vscode)', + '- [Extension API](https://code.visualstudio.com/api)', + ].join('\n')), +}; + // ============================================================================ // Fixtures // ============================================================================ @@ -157,6 +171,15 @@ export default defineThemedFixtureGroup({ path: 'chat/' }, { render: (context) => renderCarousel(context, createCarousel([singleSelectQuestion], false)), }), + MarkdownLinks: defineComponentFixture({ + labels: { kind: 'screenshot' }, + render: (context) => { + const carousel = createCarousel([markdownLinksQuestion]); + carousel.message = new MarkdownString('See the [question guidance](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode) for more information.'); + renderCarousel(context, carousel); + }, + }), + SubmittedSummary: defineComponentFixture({ labels: { kind: 'screenshot' }, render: (context) => {