Skip to content

Commit 2d608f6

Browse files
CopilotTyriar
andcommitted
Fix disclaimer word wrap by using appendMarkdown instead of appendText
Co-authored-by: Tyriar <[email protected]>
1 parent 90d057f commit 2d608f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export class ToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
267267
messageSeeMoreObserver.startObserving();
268268

269269
if (disclaimer) {
270-
this._makeMarkdownPart(elements.disclaimer, disclaimer, codeBlockRenderOptions);
270+
this._makeMarkdownPart(elements.disclaimer, disclaimer, codeBlockRenderOptions, true);
271271
} else {
272272
elements.disclaimer.remove();
273273
}
@@ -315,8 +315,8 @@ export class ToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
315315
this.domNode = confirmWidget.domNode;
316316
}
317317

318-
private _makeMarkdownPart(container: HTMLElement, message: string | IMarkdownString, codeBlockRenderOptions: ICodeBlockRenderOptions) {
319-
const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, { kind: 'markdownContent', content: typeof message === 'string' ? new MarkdownString().appendText(message) : message }, this.context, this.editorPool, false, this.codeBlockStartIndex, this.renderer, undefined, this.currentWidthDelegate(), this.codeBlockModelCollection, { codeBlockRenderOptions }));
318+
private _makeMarkdownPart(container: HTMLElement, message: string | IMarkdownString, codeBlockRenderOptions: ICodeBlockRenderOptions, isDisclaimer = false) {
319+
const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, { kind: 'markdownContent', content: typeof message === 'string' ? (isDisclaimer ? new MarkdownString().appendMarkdown(message) : new MarkdownString().appendText(message)) : message }, this.context, this.editorPool, false, this.codeBlockStartIndex, this.renderer, undefined, this.currentWidthDelegate(), this.codeBlockModelCollection, { codeBlockRenderOptions }));
320320
renderFileWidgets(part.domNode, this.instantiationService, this.chatMarkdownAnchorService, this._store);
321321
container.append(part.domNode);
322322

0 commit comments

Comments
 (0)