mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Load the dialog page, prohibit calling the dialog/get interface #6798 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -84,7 +84,7 @@ export const useGetChatSearchParams = () => {
|
||||
|
||||
//#region dialog
|
||||
|
||||
export const useFetchNextDialogList = () => {
|
||||
export const useFetchNextDialogList = (pureFetch = false) => {
|
||||
const { handleClickDialog } = useClickDialogCard();
|
||||
const { dialogId } = useGetChatSearchParams();
|
||||
|
||||
@ -103,12 +103,14 @@ export const useFetchNextDialogList = () => {
|
||||
|
||||
if (data.code === 0) {
|
||||
const list: IDialog[] = data.data;
|
||||
if (list.length > 0) {
|
||||
if (list.every((x) => x.id !== dialogId)) {
|
||||
handleClickDialog(data.data[0].id);
|
||||
if (!pureFetch) {
|
||||
if (list.length > 0) {
|
||||
if (list.every((x) => x.id !== dialogId)) {
|
||||
handleClickDialog(data.data[0].id);
|
||||
}
|
||||
} else {
|
||||
history.push('/chat');
|
||||
}
|
||||
} else {
|
||||
history.push('/chat');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user