feat: improve read aloud (#105, #341)

This commit is contained in:
josc146
2023-05-18 10:17:33 +08:00
parent 6bb5a81304
commit 277b9f69a9
2 changed files with 24 additions and 20 deletions
+2 -3
View File
@@ -21,6 +21,7 @@ export function ConversationItem({ type, content, session, done, port, onRetry }
<p>{t('You')}:</p>
<div className="gpt-util-group">
<CopyButton contentFn={() => content.replace(/\n<hr\/>$/, '')} size={14} />
<ReadButton contentFn={() => content} size={14} />
{!collapsed ? (
<span
title={t('Collapse')}
@@ -74,9 +75,7 @@ export function ConversationItem({ type, content, session, done, port, onRetry }
{session && (
<CopyButton contentFn={() => content.replace(/\n<hr\/>$/, '')} size={14} />
)}
{session && (
<ReadButton contentFn={() => content.replace(/\n<hr\/>$/, '')} size={14} />
)}
{session && <ReadButton contentFn={() => content} size={14} />}
{!collapsed ? (
<span
title={t('Collapse')}