Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: When adding a chat in the main interface, a warning will automatically pop up (#15685)

balibabu9c14e3f37797
diff --git a/web/src/components/tree-select.tsx b/web/src/components/tree-select.tsx
index 5b42095362..1e537bfc79 100644
--- a/web/src/components/tree-select.tsx
+++ b/web/src/components/tree-select.tsx
@@ -235,7 +235,7 @@ export function TreeSelect({
</button>
</PopoverTrigger>
<PopoverContent
- className="p-0 w-[var(--radix-popover-trigger-width)]"
+ className="p-0 w-auto min-w-[var(--radix-popover-trigger-width)]"
align="start"
sideOffset={4}
>
diff --git a/web/src/hooks/use-llm-request.tsx b/web/src/hooks/use-llm-request.tsx
index af17fbfc84..761c92b14c 100644
--- a/web/src/hooks/use-llm-request.tsx
+++ b/web/src/hooks/use-llm-request.tsx
@@ -366,7 +366,7 @@ export const useFetchDefaultModels = () => {
};
export const useFetchDefaultModelDictionary = (showEmptyModelWarn = false) => {
- const { data: defaultModels } = useFetchDefaultModels();
+ const { data: defaultModels, loading } = useFetchDefaultModels();
const result = useMemo(() => {
const dict: Record<string, string> = {};
@@ -377,7 +377,7 @@ export const useFetchDefaultModelDictionary = (showEmptyModelWarn = false) => {
return dict;
}, [defaultModels]);
- useWarnEmptyModel(showEmptyModelWarn, result.embd_id, result.llm_id);
+ useWarnEmptyModel(showEmptyModelWarn, result.embd_id, result.llm_id, loading);
return result;
};
diff --git a/web/src/hooks/use-memory-request.ts b/web/src/hooks/use-memory-request.ts
index 4c9e80e299..51aef32baf 100644
--- a/web/src/hooks/use-memory-request.ts
+++ b/web/src/hooks/use-memory-request.ts
@@ -12,7 +12,7 @@ export const useFetchAllMemoryList = () => {
queryFn: async () => {
const { data: response } = await memoryService.getMemoryList(
{
- params: { page_size: 100000000, page: 1 },
+ params: { page_size: 100, page: 1 },
data: {},
},
true,
diff --git a/web/src/hooks/use-user-setting-request.tsx b/web/src/hooks/use-user-setting-request.tsx
index 6bb272ebd4..3b498e2cff 100644
--- a/web/src/hooks/use-user-setting-request.tsx
+++ b/web/src/hooks/use-user-setting-request.tsx
@@ -90,7 +90,7 @@ export const useFetchTenantInfo = (
},
});
- useWarnEmptyModel(showEmptyModelWarn, data?.embd_id, data?.llm_id);
+ useWarnEmptyModel(showEmptyModelWarn, data?.embd_id, data?.llm_id, loading);
return { data, loading };
};
diff --git a/web/src/hooks/use-warn-empty-model.tsx b/web/src/hooks/use-warn-empty-model.tsx
index 51cf606d39..3d54a04200 100644
--- a/web/src/hooks/use-warn-empty-model.tsx
+++ b/web/src/hooks/use-warn-empty-model.tsx
@@ -9,6 +9,7 @@ export const useWarnEmptyModel = (
showEmptyModelWarn: boolean,
embdId?: string,
llmId?: string,
+ loading?: boolean,
) => {
const { t } = useTranslation();
const warnedRef = useRef(false);
@@ -18,6 +19,7 @@ export const useWarnEmptyModel = (
if (
showEmptyModelWarn &&
!warnedRef.current &&
+ !loading &&
(isEmpty(embdId) || isEmpty(llmId)) &&
typeof embdId === 'string' &&
typeof llmId === 'string'
@@ -39,5 +41,5 @@ export const useWarnEmptyModel = (
},
});
}
- }, [showEmptyModelWarn, embdId, llmId, navigateToModelSetting, t]);
+ }, [showEmptyModelWarn, embdId, llmId, loading, navigateToModelSetting, t]);
};
diff --git a/web/src/pages/agent/form/components/select-with-secondary-menu.tsx b/web/src/pages/agent/form/components/select-with-secondary-menu.tsx
index 5f28efc4b7..34c86847d8 100644
--- a/web/src/pages/agent/form/components/select-with-secondary-menu.tsx
+++ b/web/src/pages/agent/form/components/select-with-secondary-menu.tsx
@@ -170,6 +170,8 @@ export function GroupedSelectWithSecondaryMenu({
>
<HoverCardTrigger asChild>
<CommandItem
+ value={option.value}
+ keywords={[option.label]}
onSelect={() => {}}
className="flex items-center justify-between cursor-default"
>
@@ -205,6 +207,8 @@ export function GroupedSelectWithSecondaryMenu({
) : (
<CommandItem
key={option.value}
+ value={option.value}
+ keywords={[option.label]}
onSelect={() => {
onChange?.(option.value);
setOpen(false);
diff --git a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx
index 2a2293750a..18ae5aa4b9 100644
--- a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx
+++ b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx
@@ -215,7 +215,7 @@ const Chunk = () => {
</header>
<Spin spinning={loading} className="flex-1 h-0" size="large">
- <div className="relative @container h-full px-5 pb-5 overflow-x-hidden overflow-y-auto">
+ <div className="relative @container h-full px-5 pb-5 overflow-hidden flex flex-col">
<div
className="
sticky top-0 z-[1] bg-bg-base space-y-4 py-5
@@ -245,7 +245,7 @@ const Chunk = () => {
/>
</div>
- <div className="space-y-4">
+ <div className="space-y-4 flex-1 overflow-y-auto min-h-0">
{chunkList.map((item) => (
<ChunkCard
item={item}
diff --git a/web/src/pages/dataset/testing/testing-result.tsx b/web/src/pages/dataset/testing/testing-result.tsx
index 73a5f117f1..5534831c32 100644
--- a/web/src/pages/dataset/testing/testing-result.tsx
+++ b/web/src/pages/dataset/testing/testing-result.tsx
@@ -83,10 +83,10 @@ export function TestingResult({
</FilterPopover>
</header>
- <div className="flex-1 h-0">
+ <>
{data.chunks?.length > 0 && !loading && (
<>
- <section className="px-5 pb-5 flex flex-col gap-5 overflow-auto h-full scrollbar-thin">
+ <section className="px-5 pb-5 flex flex-col gap-5 overflow-auto scrollbar-thin min-h-0">
{data.chunks?.map((x) => (
<article key={x.chunk_id}>
<Card className="px-5 py-2.5 bg-transparent shadow-none">
@@ -96,12 +96,14 @@ export function TestingResult({
</article>
))}
</section>
- <RAGFlowPagination
- total={data.total}
- onChange={onPaginationChange}
- current={page}
- pageSize={pageSize}
- ></RAGFlowPagination>
+ <div className="p-2">
+ <RAGFlowPagination
+ total={data.total}
+ onChange={onPaginationChange}
+ current={page}
+ pageSize={pageSize}
+ ></RAGFlowPagination>
+ </div>
</>
)}
{!data.chunks?.length && !loading && (
@@ -119,7 +121,7 @@ export function TestingResult({
</div>
</div>
)}
- </div>
+ </>
</article>
);
}