RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
feat: Add agent interface document link to agent page #3189 (#3190)
balibabu57f23e0808a4
diff --git a/web/src/locales/en.ts b/web/src/locales/en.tsindex 56309b1ecb..265c9b1fa6 100644--- a/web/src/locales/en.ts+++ b/web/src/locales/en.ts@@ -447,6 +447,7 @@ The above is the content you need to summarize.`,multiTurn: 'Multi-turn optimization',multiTurnTip:'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.',+ howUseId: 'How to use chat ID?',},setting: {profile: 'Profile',@@ -1031,6 +1032,7 @@ The above is the content you need to summarize.`,reference: 'Reference',input: 'Input',parameter: 'Parameter',+ howUseId: 'How to use agent ID?',},footer: {profile: 'All rights reserved @ React',diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.tsindex 6c3f9f252b..a3f45a0989 100644--- a/web/src/locales/zh-traditional.ts+++ b/web/src/locales/zh-traditional.ts@@ -416,6 +416,7 @@ export default {multiTurn: '多輪對話優化',multiTurnTip:'在多輪對話的中,對去知識庫查詢的問題進行最佳化。會呼叫大模型額外消耗token。',+ howUseId: '如何使用聊天ID?',},setting: {profile: '概述',@@ -979,6 +980,7 @@ export default {reference: '引用',input: '輸入',parameter: '參數',+ howUseId: '如何使用Agent ID?',},footer: {profile: '“保留所有權利 @ react”',diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.tsindex 51db5ed4d2..f5ab425bfe 100644--- a/web/src/locales/zh.ts+++ b/web/src/locales/zh.ts@@ -433,6 +433,7 @@ export default {multiTurn: '多轮对话优化',multiTurnTip:'在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。',+ howUseId: '如何使用聊天ID?',},setting: {profile: '概要',@@ -999,6 +1000,7 @@ export default {reference: '引用',input: '输入',parameter: '参数',+ howUseId: '如何使用Agent ID?',},footer: {profile: 'All rights reserved @ React',diff --git a/web/src/pages/chat/chat-id-modal/index.tsx b/web/src/pages/chat/chat-id-modal/index.tsxindex 9ea92a1804..2439633ecf 100644--- a/web/src/pages/chat/chat-id-modal/index.tsx+++ b/web/src/pages/chat/chat-id-modal/index.tsx@@ -4,7 +4,7 @@ import { Modal, Typography } from 'antd';import styles from './index.less';-const { Paragraph } = Typography;+const { Paragraph, Link } = Typography;const ChatIdModal = ({visible,@@ -14,20 +14,24 @@ const ChatIdModal = ({const { t } = useTranslate('chat');return (- <>- <Modal- title={t('overview')}- open={visible}- onCancel={hideModal}- cancelButtonProps={{ style: { display: 'none' } }}- onOk={hideModal}- okText={t('close', { keyPrefix: 'common' })}+ <Modal+ title={t('overview')}+ open={visible}+ onCancel={hideModal}+ cancelButtonProps={{ style: { display: 'none' } }}+ onOk={hideModal}+ okText={t('close', { keyPrefix: 'common' })}+ >+ <Paragraph copyable={{ text: id }} className={styles.id}>+ {id}+ </Paragraph>+ <Link+ href="https://ragflow.io/docs/dev/http_api_reference#create-session"+ target="_blank">- <Paragraph copyable={{ text: id }} className={styles.id}>- {id}- </Paragraph>- </Modal>- </>+ {t('howUseId')}+ </Link>+ </Modal>);};diff --git a/web/src/pages/flow/flow-id-modal/index.less b/web/src/pages/flow/flow-id-modal/index.lessnew file mode 100644index 0000000000..c95b34c95a--- /dev/null+++ b/web/src/pages/flow/flow-id-modal/index.less@@ -0,0 +1,3 @@+.id {+ .linkText();+}diff --git a/web/src/pages/flow/flow-id-modal/index.tsx b/web/src/pages/flow/flow-id-modal/index.tsxnew file mode 100644index 0000000000..fd9dbea473--- /dev/null+++ b/web/src/pages/flow/flow-id-modal/index.tsx@@ -0,0 +1,36 @@+import { useTranslate } from '@/hooks/common-hooks';+import { IModalProps } from '@/interfaces/common';+import { Modal, Typography } from 'antd';++import { useParams } from 'umi';+import styles from './index.less';++const { Paragraph, Link } = Typography;++const FlowIdModal = ({ hideModal }: IModalProps<any>) => {+ const { t } = useTranslate('flow');+ const { id } = useParams();++ return (+ <Modal+ title={'Agent ID'}+ open+ onCancel={hideModal}+ cancelButtonProps={{ style: { display: 'none' } }}+ onOk={hideModal}+ okText={t('close', { keyPrefix: 'common' })}+ >+ <Paragraph copyable={{ text: id }} className={styles.id}>+ {id}+ </Paragraph>+ <Link+ href="https://ragflow.io/docs/dev/http_api_reference#create-agent-session"+ target="_blank"+ >+ {t('howUseId')}+ </Link>+ </Modal>+ );+};++export default FlowIdModal;diff --git a/web/src/pages/flow/header/index.tsx b/web/src/pages/flow/header/index.tsxindex 38f16b7858..e03b03a772 100644--- a/web/src/pages/flow/header/index.tsx+++ b/web/src/pages/flow/header/index.tsx@@ -4,6 +4,7 @@ import { useFetchFlow } from '@/hooks/flow-hooks';import { ArrowLeftOutlined } from '@ant-design/icons';import { Button, Flex, Space } from 'antd';import { Link, useParams } from 'umi';+import FlowIdModal from '../flow-id-modal';import { useSaveGraph, useSaveGraphBeforeOpeningDebugDrawer } from '../hooks';import styles from './index.less';@@ -21,6 +22,7 @@ const FlowHeader = ({ showChatDrawer }: IProps) => {hideModal: hideOverviewModal,showModal: showOverviewModal,} = useSetModalState();+ const { visible, hideModal, showModal } = useSetModalState();const { id } = useParams();return (@@ -44,8 +46,11 @@ const FlowHeader = ({ showChatDrawer }: IProps) => {<Button type="primary" onClick={saveGraph}><b>{t('save')}</b></Button>- <Button type="primary" onClick={showOverviewModal} disabled>+ {/* <Button type="primary" onClick={showOverviewModal} disabled><b>{t('publish')}</b>+ </Button> */}+ <Button type="primary" onClick={showModal}>+ <b>Agent ID</b></Button></Space></Flex>@@ -57,6 +62,7 @@ const FlowHeader = ({ showChatDrawer }: IProps) => {idKey="canvasId"></ChatOverviewModal>)}+ {visible && <FlowIdModal hideModal={hideModal}></FlowIdModal>}</>);};