Skip to content

Commit 50cea58

Browse files
committed
restore tts
1 parent 48512e7 commit 50cea58

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

client/agents/compliai/message.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import html from "solid-js/html";
22
import { parse as parseMarkdown } from "marked";
33
import yaml from "yaml";
4-
import { parseStreamingJson } from "./utils.js";
4+
import { parseStreamingJson, playAudio } from "./utils.js";
55

66
export default function Message({ message, active }) {
77
if (!message) return null;
@@ -56,12 +56,7 @@ export default function Message({ message, active }) {
5656
<span
5757
class=${["markdown card mb-2 p-2 small", isAssistant ? "bg-light w-100 border-secondary" : "bg-white"].join(" ")}
5858
innerHTML=${parseMarkdown(textContent)}></span>
59-
${isAssistant &&
60-
window.MODELS_LOADED &&
61-
!active &&
62-
html`<button onClick=${() => playAudio(textContent)} class="position-absolute border-0 p-0 me-1 bg-transparent top-0 end-0">
63-
64-
</button>`}
59+
${isAssistant && !active && window.tts && html`<button onClick=${() => playAudio(textContent)} class="position-absolute border-0 p-0 me-1 bg-transparent top-0 end-0"></button>`}
6560
`}
6661
${toolCalls.map(
6762
(tool) => html`

0 commit comments

Comments
 (0)