Skip to content

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

BugFix: AgentCreateBUGFix:required argument are missing: dsl; (#8794)

yungongzi504e453ae5de
diff --git a/web/src/pages/flow/list/agent-template-modal.tsx b/web/src/pages/flow/list/agent-template-modal.tsx
index 5a90d16c77..ac19ff0dec 100644
--- a/web/src/pages/flow/list/agent-template-modal.tsx
+++ b/web/src/pages/flow/list/agent-template-modal.tsx
@@ -1,6 +1,7 @@
import { IModalManagerChildrenProps } from '@/components/modal-manager';
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
-import { useFetchFlowTemplates } from '@/hooks/flow-hooks';
+import { IFlowTemplate } from '@/interfaces/database/flow';
+// import { useFetchFlowTemplates } from '@/hooks/flow-hooks';
import { useSelectItem } from '@/hooks/logic-hooks';
import { Button, Card, Flex, List, Modal, Typography } from 'antd';
import { useCallback, useState } from 'react';
@@ -15,11 +16,18 @@ interface IProps extends Omit<IModalManagerChildrenProps, 'showModal'> {
loading: boolean;
onOk: (name: string, templateId: string) => void;
showModal?(): void;
+ templateList: IFlowTemplate[];
}
-const AgentTemplateModal = ({ visible, hideModal, loading, onOk }: IProps) => {
+const AgentTemplateModal = ({
+ visible,
+ hideModal,
+ loading,
+ onOk,
+ templateList,
+}: IProps) => {
const { t } = useTranslate('common');
- const { data: list } = useFetchFlowTemplates();
+ // const { data: list } = useFetchFlowTemplates();
const { selectedId, handleItemClick } = useSelectItem('');
const [checkedId, setCheckedId] = useState<string>('');
@@ -62,7 +70,7 @@ const AgentTemplateModal = ({ visible, hideModal, loading, onOk }: IProps) => {
</Title>
<List
grid={{ gutter: 16, column: 4 }}
- dataSource={list}
+ dataSource={templateList}
renderItem={(x) => (
<List.Item>
<Card
diff --git a/web/src/pages/flow/list/hooks.ts b/web/src/pages/flow/list/hooks.ts
index 31e71beff9..35c994d566 100644
--- a/web/src/pages/flow/list/hooks.ts
+++ b/web/src/pages/flow/list/hooks.ts
@@ -88,6 +88,7 @@ export const useSaveFlow = () => {
onFlowOk,
flowSettingVisible,
hideFlowSettingModal,
+ templateList: list,
showFlowSettingModal: showFileRenameModal,
};
};
diff --git a/web/src/pages/flow/list/index.tsx b/web/src/pages/flow/list/index.tsx
index 0c624e65fc..9bc0a845de 100644
--- a/web/src/pages/flow/list/index.tsx
+++ b/web/src/pages/flow/list/index.tsx
@@ -24,6 +24,7 @@ const FlowList = () => {
hideFlowSettingModal,
flowSettingVisible,
flowSettingLoading,
+ templateList,
onFlowOk,
} = useSaveFlow();
const { t } = useTranslate('flow');
@@ -110,6 +111,7 @@ const FlowList = () => {
onOk={onFlowOk}
loading={flowSettingLoading}
hideModal={hideFlowSettingModal}
+ templateList={templateList}
></AgentTemplateModal>
)}
</Flex>