diff --git a/projects/app/src/components/ChatBox/index.tsx b/projects/app/src/components/ChatBox/index.tsx index 6683f1de148..e4becdc662f 100644 --- a/projects/app/src/components/ChatBox/index.tsx +++ b/projects/app/src/components/ChatBox/index.tsx @@ -586,42 +586,6 @@ const ChatBox = ( }, [onUpdateVariable] ); - const HumanChatCard = useCallback( - ({ item, index }: { item: ChatSiteItemType; index: number }) => { - return ( - <> - {/* control icon */} - - { - delOneMessage({ dataId: item.dataId, index }); - } - : undefined - } - onRetry={useCallback(() => retryInput(index), [index])} - /> - - - {/* content */} - - - - - - - ); - }, - [] - ); return ( @@ -645,7 +609,37 @@ const ChatBox = ( {chatHistory.map((item, index) => ( - {item.obj === 'Human' && } + {item.obj === 'Human' && ( + <> + {/* control icon */} + + { + delOneMessage({ dataId: item.dataId, index }); + } + : undefined + } + onRetry={() => retryInput(index)} + /> + + + {/* content */} + + + + + + + )} {item.obj === 'AI' && ( <> diff --git a/projects/app/src/web/common/hooks/useSpeech.ts b/projects/app/src/web/common/hooks/useSpeech.ts index 3a90f0ce47e..fd54a576dae 100644 --- a/projects/app/src/web/common/hooks/useSpeech.ts +++ b/projects/app/src/web/common/hooks/useSpeech.ts @@ -78,7 +78,7 @@ export const useSpeech = (props?: { shareId?: string }) => { const duration = Math.round((Date.now() - startTimestamp.current) / 1000); - formData.append('files', blob, 'recording.webm'); + formData.append('file', blob, 'recording.webm'); formData.append('metadata', JSON.stringify({ duration, shareId })); setIsTransCription(true);