Skip to content

Commit e642e3d

Browse files
committed
Merge branch 'dmdimitrov/chat-ai-component' of https://github.com/IgniteUI/igniteui-webcomponents into dmdimitrov/chat-ai-component
2 parents 7766630 + 0421b58 commit e642e3d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stories/chat.stories.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { html, nothing } from 'lit';
33
import { GoogleGenAI, Modality } from '@google/genai';
44
import {
55
IgcChatComponent,
6-
// MarkdownMessageRenderer,
76
defineComponents,
87
registerIcon,
98
} from 'igniteui-webcomponents';
9+
import { MarkdownMessageRenderer } from 'igniteui-webcomponents/extras';
1010
import 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

163164
const 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

Comments
 (0)