Skip to content

Commit a5656c9

Browse files
authored
Add expand action for question part (#311453)
Add expand action for question part (#310886)
1 parent 5bb89a0 commit a5656c9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,13 +687,14 @@ export class ChatQuestionCarouselPart extends Disposable implements IChatContent
687687
const title = dom.$('.chat-question-title');
688688
const messageContent = this.getQuestionText(questionText);
689689
title.setAttribute('aria-label', messageContent);
690-
questionRenderStore.add(this._hoverService.setupDelayedHover(title, { content: messageContent }));
691690

692-
const titleText = question.required
693-
? new MarkdownString(`${isMarkdownString(questionText) ? questionText.value : questionText} *`)
694-
: (isMarkdownString(questionText) ? MarkdownString.lift(questionText) : new MarkdownString(questionText));
695-
const renderedTitle = questionRenderStore.add(this._markdownRendererService.render(titleText));
696-
title.appendChild(renderedTitle.element);
691+
const rawValue = isMarkdownString(questionText) ? questionText.value : questionText;
692+
const suffixed = question.required ? `${rawValue} *` : rawValue;
693+
const md = isMarkdownString(questionText)
694+
? MarkdownString.lift({ ...questionText, value: suffixed })
695+
: new MarkdownString(suffixed);
696+
const rendered = questionRenderStore.add(this._markdownRendererService.render(md));
697+
title.appendChild(rendered.element);
697698
titleRow.appendChild(title);
698699
}
699700

0 commit comments

Comments
 (0)