diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index 6d1865064..58bc376ce 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -1050,7 +1050,7 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s }, operator: 'Operator', value: 'Value', - useTemplate: 'Use this template', + useTemplate: 'Use', wenCai: 'WenCai', queryType: 'Query type', wenCaiDescription: diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.ts index 0bfc42b61..836478527 100644 --- a/web/src/locales/zh-traditional.ts +++ b/web/src/locales/zh-traditional.ts @@ -1017,7 +1017,7 @@ export default { }, operator: '操作符', value: '值', - useTemplate: '使用該模板', + useTemplate: '使用', wenCai: '問財', queryType: '查詢類型', wenCaiDescription: diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index 0431edc8d..72d6ad9b4 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -1047,7 +1047,7 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于 }, operator: '操作符', value: '值', - useTemplate: '使用该模板', + useTemplate: '使用', wenCai: '问财', queryType: '查询类型', wenCaiDescription: diff --git a/web/src/pages/agent/form/begin-form/query-table.tsx b/web/src/pages/agent/form/begin-form/query-table.tsx index 463a2fa64..b92c43fe2 100644 --- a/web/src/pages/agent/form/begin-form/query-table.tsx +++ b/web/src/pages/agent/form/begin-form/query-table.tsx @@ -54,7 +54,7 @@ export function QueryTable({ data = [], deleteRecord, showModal }: IProps) { { accessorKey: 'key', header: 'key', - meta: { cellClassName: 'max-w-16' }, + meta: { cellClassName: 'max-w-30' }, cell: ({ row }) => { const key: string = row.getValue('key'); return ( @@ -72,7 +72,7 @@ export function QueryTable({ data = [], deleteRecord, showModal }: IProps) { { accessorKey: 'name', header: t('flow.name'), - meta: { cellClassName: 'max-w-20' }, + meta: { cellClassName: 'max-w-30' }, cell: ({ row }) => { const name: string = row.getValue('name'); return ( @@ -107,10 +107,16 @@ export function QueryTable({ data = [], deleteRecord, showModal }: IProps) { return (
- -
@@ -139,7 +145,7 @@ export function QueryTable({ data = [], deleteRecord, showModal }: IProps) { return (
- +
{table.getHeaderGroups().map((headerGroup) => ( diff --git a/web/src/pages/agent/log-sheet/index.tsx b/web/src/pages/agent/log-sheet/index.tsx index 3722310d4..21ba73b40 100644 --- a/web/src/pages/agent/log-sheet/index.tsx +++ b/web/src/pages/agent/log-sheet/index.tsx @@ -27,12 +27,15 @@ import { import { IModalProps } from '@/interfaces/common'; import { ITraceData } from '@/interfaces/database/agent'; import { cn } from '@/lib/utils'; +import { t } from 'i18next'; import { get } from 'lodash'; -import { BellElectric, NotebookText } from 'lucide-react'; +import { NotebookText } from 'lucide-react'; import { useCallback, useEffect, useMemo } from 'react'; import JsonView from 'react18-json-view'; import 'react18-json-view/src/style.css'; +import { Operator } from '../constant'; import { useCacheChatLog } from '../hooks/use-cache-chat-log'; +import OperatorIcon from '../operator-icon'; import useGraphStore from '../store'; type LogSheetProps = IModalProps & @@ -89,6 +92,7 @@ export function LogSheet({ const getNodeName = useCallback( (nodeId: string) => { + if ('begin' === nodeId) return t('flow.begin'); return getNode(nodeId)?.data.name; }, [getNode], @@ -160,8 +164,12 @@ export function LogSheet({ {startedNodeList.map((x, idx) => { const nodeDataList = filterFinishedNodeList(x.data.component_id); + const finishNodeIds = nodeDataList.map( + (x: INodeData) => x.component_id, + ); const inputs = getInputsOrOutputs(nodeDataList, 'inputs'); const outputs = getInputsOrOutputs(nodeDataList, 'outputs'); + const nodeLabel = getNode(x.data.component_id)?.data.label; return ( - +
+
+
+
+
+ +
+
diff --git a/web/src/pages/agents/agent-templates.tsx b/web/src/pages/agents/agent-templates.tsx index 3067dbfb0..0c924ea1e 100644 --- a/web/src/pages/agents/agent-templates.tsx +++ b/web/src/pages/agents/agent-templates.tsx @@ -15,6 +15,7 @@ import { useCallback, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { CreateAgentDialog } from './create-agent-dialog'; import { TemplateCard } from './template-card'; +import { SideBar } from './template-sidebar'; export default function AgentTemplates() { const { navigateToAgentList } = useNavigatePage(); @@ -91,25 +92,32 @@ export default function AgentTemplates() { -
- {list?.map((x) => { - return ( - - ); - })} +
+ + +
+
+ {templateList?.map((x, index) => { + return ( + + ); + })} +
+ {creatingVisible && ( + + )} +
- {creatingVisible && ( - - )} ); }