(feature)(supersonic-fe) add memory manage (#1279)

This commit is contained in:
williamhliu
2024-06-29 14:56:40 +08:00
committed by GitHub
parent a45fe183d2
commit ee86924205
7 changed files with 16717 additions and 14292 deletions

View File

@@ -20,6 +20,7 @@ import { uuid, jsonParse, encryptPassword, decryptPassword } from '@/utils/utils
import ToolsSection from './ToolsSection';
import globalStyles from '@/global.less';
import { testLLMConn } from './service';
import MemorySection from './MemorySection';
const FormItem = Form.Item;
const { TextArea } = Input;
@@ -273,6 +274,11 @@ const AgentForm: React.FC<Props> = ({ editAgent, onSaveAgent, onCreateToolBtnCli
key: 'tools',
children: <ToolsSection currentAgent={editAgent} onSaveAgent={onSaveAgent} />,
},
{
label: '记忆管理',
key: 'memory',
children: <MemorySection />,
},
];
return (
@@ -288,15 +294,17 @@ const AgentForm: React.FC<Props> = ({ editAgent, onSaveAgent, onCreateToolBtnCli
<Tabs
tabBarExtraContent={
<Space>
<Button
type="primary"
loading={saveLoading}
onClick={() => {
onOk();
}}
>
</Button>
{activeKey !== 'memory' && (
<Button
type="primary"
loading={saveLoading}
onClick={() => {
onOk();
}}
>
</Button>
)}
{activeKey === 'tools' && (
<Button
type="primary"