fix(chat): hide voice message transcript

This commit is contained in:
2026-06-25 11:26:32 +08:00
parent cd836cda43
commit f83e04ed6f
3 changed files with 0 additions and 12 deletions
@@ -81,7 +81,6 @@ export function MessageContent({
{hasAudio && audioUrl ? (
<VoiceBubble
audioUrl={audioUrl}
content={content}
isFromAI={isFromAI}
/>
) : null}
@@ -96,14 +96,6 @@
height: 26px;
}
.text {
margin: 0;
font-size: var(--font-size-md, 14px);
line-height: 1.45;
white-space: pre-wrap;
word-break: break-word;
}
.error {
margin: 0;
color: var(--color-error, #ff4d4f);
-3
View File
@@ -7,13 +7,11 @@ import styles from "./voice-bubble.module.css";
export interface VoiceBubbleProps {
audioUrl: string;
content?: string;
isFromAI: boolean;
}
export function VoiceBubble({
audioUrl,
content = "",
isFromAI,
}: VoiceBubbleProps) {
const audioRef = useRef<HTMLAudioElement>(null);
@@ -82,7 +80,6 @@ export function VoiceBubble({
<span />
<span />
</div>
{content.length > 0 ? <p className={styles.text}>{content}</p> : null}
{hasError ? (
<p className={styles.error}>Voice message failed to load.</p>
) : null}