diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index ee03d1d8f..fc2d0b527 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -1291,6 +1291,7 @@ This delimiter is used to split the input text into several text pieces echo of
agent: 'Agent',
agentDescription:
'Builds agent components equipped with reasoning, tool usage, and multi-agent collaboration. ',
+ maxRecords: 'Max records',
},
llmTools: {
bad_calculator: {
diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts
index 63c5d4fe7..574fe85e6 100644
--- a/web/src/locales/zh.ts
+++ b/web/src/locales/zh.ts
@@ -1244,6 +1244,7 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于
query: '查询变量',
agent: 'Agent',
agentDescription: '构建具备推理、工具调用和多智能体协同的智能体组件。',
+ maxRecords: '最大记录数',
},
footer: {
profile: 'All rights reserved @ React',
diff --git a/web/src/pages/agent/agent-sidebar.tsx b/web/src/pages/agent/agent-sidebar.tsx
deleted file mode 100644
index dd642981e..000000000
--- a/web/src/pages/agent/agent-sidebar.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import { SideDown } from '@/assets/icon/Icon';
-import { Card, CardContent } from '@/components/ui/card';
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from '@/components/ui/collapsible';
-import {
- Sidebar,
- SidebarContent,
- SidebarGroup,
- SidebarGroupContent,
- SidebarGroupLabel,
- SidebarHeader,
- SidebarMenu,
-} from '@/components/ui/sidebar';
-import { memo, useMemo } from 'react';
-import {
- AgentOperatorList,
- Operator,
- componentMenuList,
- operatorMap,
-} from './constant';
-import { useHandleDrag } from './hooks';
-import OperatorIcon from './operator-icon';
-
-type OperatorItem = {
- name: Operator;
-};
-
-function OperatorCard({ name }: OperatorItem) {
- const { handleDragStart } = useHandleDrag();
-
- return (
-
-
-
- {name}
-
-
- );
-}
-
-type OperatorCollapsibleProps = { operatorList: OperatorItem[]; title: string };
-
-function OperatorCollapsible({
- operatorList,
- title,
-}: OperatorCollapsibleProps) {
- return (
-
-
-
-
- {title}
-
-
-
-
-
-
- {operatorList.map((item) => (
-
- ))}
-
-
-
-
-
- );
-}
-
-function InnerAgentSidebar() {
- const agentOperatorList = useMemo(() => {
- return componentMenuList.filter((x) =>
- AgentOperatorList.some((y) => y === x.name),
- );
- }, []);
-
- const thirdOperatorList = useMemo(() => {
- return componentMenuList.filter(
- (x) => !AgentOperatorList.some((y) => y === x.name),
- );
- }, []);
-
- return (
-
-
- All nodes
-
-
-
-
-
-
- );
-}
-
-export const AgentSidebar = memo(InnerAgentSidebar);
diff --git a/web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx b/web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx
index a277c2ace..0b3575181 100644
--- a/web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx
+++ b/web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx
@@ -100,7 +100,7 @@ function AccordionOperators() {
= {
- [Operator.Retrieval]: {
- backgroundColor: '#cad6e0',
- color: '#385974',
- },
- [Operator.Generate]: {
- backgroundColor: '#ebd6d6',
- width: 150,
- height: 150,
- fontSize: 20,
- iconFontSize: 30,
- color: '#996464',
- },
- [Operator.Answer]: {
- backgroundColor: '#f4816d',
- color: '#f4816d',
- },
- [Operator.Begin]: {
- backgroundColor: '#4f51d6',
- },
- [Operator.Categorize]: {
- backgroundColor: '#ffebcd',
- color: '#cc8a26',
- },
- [Operator.Message]: {
- backgroundColor: '#c5ddc7',
- color: 'green',
- },
- [Operator.Relevant]: {
- backgroundColor: '#9fd94d',
- color: '#8ef005',
- width: 70,
- height: 70,
- fontSize: 12,
- iconFontSize: 16,
- },
- [Operator.RewriteQuestion]: {
- backgroundColor: '#f8c7f8',
- color: '#f32bf3',
- width: 70,
- height: 70,
- fontSize: 12,
- iconFontSize: 16,
- },
- [Operator.KeywordExtract]: {
- width: 70,
- height: 70,
- backgroundColor: '#6E5494',
- color: '#6E5494',
- fontSize: 12,
- iconWidth: 16,
- },
- [Operator.DuckDuckGo]: {
- backgroundColor: '#e7e389',
- color: '#aea00c',
- },
- [Operator.Baidu]: {
- backgroundColor: '#d9e0f8',
- },
- [Operator.Wikipedia]: {
- backgroundColor: '#dee0e2',
- },
- [Operator.PubMed]: {
- backgroundColor: '#a2ccf0',
- },
- [Operator.ArXiv]: {
- width: 70,
- height: 70,
- fontSize: 12,
- iconWidth: 16,
- iconFontSize: 16,
- moreIconColor: 'white',
- backgroundColor: '#b31b1b',
- color: 'white',
- },
- [Operator.Google]: {
- backgroundColor: 'pink',
- },
- [Operator.Bing]: {
- backgroundColor: '#c0dcc4',
- },
- [Operator.GoogleScholar]: {
- backgroundColor: '#b4e4f6',
- },
- [Operator.DeepL]: {
- backgroundColor: '#f5e8e6',
- },
- [Operator.GitHub]: {
- backgroundColor: 'purple',
- color: 'purple',
- },
- [Operator.BaiduFanyi]: { backgroundColor: '#e5f2d3' },
- [Operator.QWeather]: {
- backgroundColor: '#a4bbf3',
- color: '#a4bbf3',
- },
- [Operator.ExeSQL]: { backgroundColor: '#b9efe8' },
- [Operator.Switch]: { backgroundColor: '#dbaff6', color: '#dbaff6' },
- [Operator.WenCai]: { backgroundColor: '#faac5b' },
- [Operator.AkShare]: { backgroundColor: '#8085f5' },
- [Operator.YahooFinance]: { backgroundColor: '#b474ff' },
- [Operator.Jin10]: { backgroundColor: '#a0b9f8' },
- [Operator.Concentrator]: {
- backgroundColor: '#32d2a3',
- color: '#32d2a3',
- width: 70,
- height: 70,
- fontSize: 10,
- iconFontSize: 16,
- },
- [Operator.TuShare]: { backgroundColor: '#f8cfa0' },
- [Operator.Note]: { backgroundColor: '#f8cfa0' },
- [Operator.Crawler]: {
- backgroundColor: '#dee0e2',
- },
- [Operator.Invoke]: {
- backgroundColor: '#dee0e2',
- },
- [Operator.Template]: {
- backgroundColor: '#dee0e2',
- },
- [Operator.Email]: { backgroundColor: '#e6f7ff' },
- [Operator.Iteration]: { backgroundColor: '#e6f7ff' },
- [Operator.IterationStart]: { backgroundColor: '#e6f7ff' },
- [Operator.Code]: { backgroundColor: '#4c5458' },
- [Operator.WaitingDialogue]: { backgroundColor: '#a5d65c' },
- [Operator.Agent]: { backgroundColor: '#a5d65c' },
- [Operator.TavilySearch]: { backgroundColor: '#a5d65c' },
-};
-
export const componentMenuList = [
{
name: Operator.Retrieval,
@@ -552,16 +411,14 @@ export const initialQWeatherValues = {
};
export const initialExeSqlValues = {
- ...initialLlmBaseValues,
+ sql: '',
db_type: 'mysql',
database: '',
username: '',
host: '',
port: 3306,
password: '',
- loop: 3,
- top_n: 30,
- query: '',
+ max_records: 1024,
};
export const initialSwitchValues = {
@@ -775,8 +632,34 @@ export const initialTavilyValues = {
type: 'string',
},
json: {
- value: {},
- type: 'Object',
+ value: [],
+ type: 'Array