@@ -3,10 +3,10 @@ import { html, nothing } from 'lit';
33import { GoogleGenAI , Modality } from '@google/genai' ;
44import {
55 IgcChatComponent ,
6- // MarkdownMessageRenderer,
76 defineComponents ,
87 registerIcon ,
98} from 'igniteui-webcomponents' ;
9+ import { MarkdownMessageRenderer } from 'igniteui-webcomponents/extras' ;
1010import type {
1111 IgcMessage ,
1212 IgcMessageAttachment ,
@@ -159,6 +159,7 @@ const _customRenderer = {
159159 return html `< span > ${ m . text . toUpperCase ( ) } </ span > ` ;
160160 } ,
161161} ;
162+ const _markdownRenderer = new MarkdownMessageRenderer ( ) ;
162163
163164const ai_chat_options = {
164165 headerText : 'Chat' ,
@@ -510,7 +511,8 @@ export const Chat_Templates: Story = {
510511 suggestions : [ 'Hello' , 'Hi' , 'Generate an image!' ] ,
511512 renderers : {
512513 messageHeader : ( ctx ) => _messageAuthorTemplate ( ctx . param , ctx ) ,
513- messageContent : ( ctx ) => html `${ ctx . param . text . toUpperCase ( ) } ` ,
514+ messageContent : ( ctx ) => _markdownRenderer . render ( ctx . param ) ,
515+ // messageContent: (ctx) => html`${ctx.param.text.toUpperCase()}`,
514516 messageActions : ( ctx ) => _messageActionsTemplate ( ctx . param ) ,
515517 attachmentHeader : ( ) => nothing ,
516518 inputActions : ( ctx ) => _actionsTemplate ( ctx ) ,
0 commit comments