Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -489,35 +489,10 @@ export class ChatQuestionCarouselPart extends Disposable implements IChatContent
// Render question header row with title and close button
const headerRow = dom.$('.chat-question-header-row');

// Render question message with title styling (no progress prefix)
// Fall back to question.title if message is not provided
const questionText = question.message ?? question.title;
if (questionText) {
// Render question title (short header) in the header bar as plain text
if (question.title) {
const title = dom.$('.chat-question-title');
const messageContent = this.getQuestionText(questionText);

title.setAttribute('aria-label', messageContent);

if (isMarkdownString(questionText)) {
const renderedTitle = questionRenderStore.add(this._markdownRendererService.render(MarkdownString.lift(questionText)));
title.appendChild(renderedTitle.element);
} else {
// Check for subtitle in parentheses at the end
const parenMatch = messageContent.match(/^(.+?)\s*(\([^)]+\))\s*$/);
if (parenMatch) {
// Main title (bold)
const mainTitle = dom.$('span.chat-question-title-main');
mainTitle.textContent = parenMatch[1];
title.appendChild(mainTitle);

// Subtitle in parentheses (normal weight)
const subtitle = dom.$('span.chat-question-title-subtitle');
subtitle.textContent = ' ' + parenMatch[2];
title.appendChild(subtitle);
} else {
title.textContent = messageContent;
}
}
title.textContent = question.title;
headerRow.appendChild(title);
}

Expand All @@ -528,6 +503,18 @@ export class ChatQuestionCarouselPart extends Disposable implements IChatContent

this._questionContainer.appendChild(headerRow);

// Render full question text below the header row (supports multi-line and markdown)
if (question.message) {
const messageEl = dom.$('.chat-question-message');
if (isMarkdownString(question.message)) {
const renderedMessage = questionRenderStore.add(this._markdownRendererService.render(MarkdownString.lift(question.message)));
messageEl.appendChild(renderedMessage.element);
} else {
messageEl.textContent = this.getQuestionText(question.message);
}
this._questionContainer.appendChild(messageEl);
}
Comment thread
meganrogge marked this conversation as resolved.

const isSingleQuestion = this.carousel.questions.length === 1;
// Update step indicator in footer
if (this._stepIndicator) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
display: flex;
flex-direction: column;
background: var(--vscode-chat-requestBackground);
padding: 8px 16px 10px 16px;
padding: 0 16px 10px 16px;
overflow: hidden;

.chat-question-header-row {
Expand All @@ -45,7 +45,8 @@
align-items: center;
gap: 8px;
min-width: 0;
padding-bottom: 5px;
padding-top: 4px;
padding-bottom: 4px;
margin-left: -16px;
margin-right: -16px;
padding-left: 16px;
Expand All @@ -60,30 +61,6 @@
font-weight: 500;
font-size: var(--vscode-chat-font-size-body-s);
margin: 0;

.rendered-markdown {
a {
color: var(--vscode-textLink-foreground);
}

a:hover,
a:active {
color: var(--vscode-textLink-activeForeground);
}

p {
margin: 0;
}
}

.chat-question-title-main {
font-weight: 500;
}

.chat-question-title-subtitle {
font-weight: normal;
color: var(--vscode-descriptionForeground);
}
}

.chat-question-close-container {
Expand All @@ -104,6 +81,29 @@
}
}
}

.chat-question-message {
padding-top: 8px;
font-size: var(--vscode-chat-font-size-body-s);
word-wrap: break-word;
overflow-wrap: break-word;
line-height: 1.4;

.rendered-markdown {
a {
color: var(--vscode-textLink-foreground);
}

a:hover,
a:active {
color: var(--vscode-textLink-activeForeground);
}

p {
margin: 0;
}
}
}
}
}

Expand Down Expand Up @@ -141,7 +141,7 @@

.chat-question-list-item {
display: flex;
align-items: center;
align-items: flex-start;
gap: 8px;
padding: 3px 8px;
cursor: pointer;
Expand All @@ -166,9 +166,9 @@
.chat-question-list-label {
font-size: var(--vscode-chat-font-size-body-s);
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-wrap: break-word;
overflow-wrap: break-word;
padding-top: 2px;
}

.chat-question-list-label-title {
Expand Down
Loading