mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 15:36:50 +08:00
### What problem does this PR solve? fix: Fixed the issue of error reporting when uploading files in the chat box #2897 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
This commit is contained in:
@ -582,14 +582,18 @@ export const useSendButtonDisabled = (value: string) => {
|
||||
export const useCreateConversationBeforeUploadDocument = () => {
|
||||
const { setConversation } = useSetConversation();
|
||||
const { dialogId } = useGetChatSearchParams();
|
||||
const { getConversationIsNew } = useSetChatRouteParams();
|
||||
|
||||
const createConversationBeforeUploadDocument = useCallback(
|
||||
async (message: string) => {
|
||||
const data = await setConversation(message, true);
|
||||
const isNew = getConversationIsNew();
|
||||
if (isNew === 'true') {
|
||||
const data = await setConversation(message, true);
|
||||
|
||||
return data;
|
||||
return data;
|
||||
}
|
||||
},
|
||||
[setConversation],
|
||||
[setConversation, getConversationIsNew],
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@ -43,3 +43,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fileThumbnail {
|
||||
display: inline-block;
|
||||
max-width: 40px;
|
||||
}
|
||||
|
||||
@ -118,7 +118,11 @@ const MarkdownContent = ({
|
||||
{documentId && (
|
||||
<Flex gap={'small'}>
|
||||
{fileThumbnail ? (
|
||||
<img src={fileThumbnail} alt="" />
|
||||
<img
|
||||
src={fileThumbnail}
|
||||
alt=""
|
||||
className={styles.fileThumbnail}
|
||||
/>
|
||||
) : (
|
||||
<SvgIcon
|
||||
name={`file-icon/${fileExtension}`}
|
||||
|
||||
Reference in New Issue
Block a user