Skip to content

Commit e129b2e

Browse files
committed
Avoid chat having to import markdown-stream assets
1 parent c899dfb commit e129b2e

File tree

3 files changed

+25
-80
lines changed

3 files changed

+25
-80
lines changed

js/chat/chat.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { LitElement, html } from "lit";
22
import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
33
import { property } from "lit/decorators.js";
44

5-
import { contentToHTML } from "../markdown-stream/markdown-stream";
6-
75
import { LightElement, createElement } from "../utils/_utils";
86

97
type ContentType = "markdown" | "html" | "text";
@@ -76,7 +74,12 @@ class ChatUserMessage extends LightElement {
7674
@property() content = "...";
7775

7876
render(): ReturnType<LitElement["render"]> {
79-
return contentToHTML(this.content, "semi-markdown");
77+
return html`
78+
<shiny-markdown-stream
79+
content=${this.content}
80+
content_type="semi-markdown"
81+
></shiny-markdown-stream>
82+
`;
8083
}
8184
}
8285

0 commit comments

Comments
 (0)