diff --git a/src/frontend/public/locales/en/bs.json b/src/frontend/public/locales/en/bs.json
index d6befe165..8f2a8f3ff 100644
--- a/src/frontend/public/locales/en/bs.json
+++ b/src/frontend/public/locales/en/bs.json
@@ -234,7 +234,10 @@
"selected": "Selected",
"pleaseSelectAnApp": "Please select an app",
"allLabels": "All labels",
- "searchLabels": "Search labels"
+ "searchLabels": "Search labels",
+ "confirmed": "Confirmed",
+ "confirm": "Confirm",
+ "runNewWorkflow": "Run New Workflow"
},
"model": {
"modelManagement": "Model Management",
@@ -329,7 +332,9 @@
"libraryCollection": "Knowledge Base Collection",
"createUser": "Create User",
"details": "Details",
- "confirmDeleteLibrary": "Confirm deletion of this Knowledge Base?"
+ "confirmDeleteLibrary": "Confirm deletion of this Knowledge Base?",
+ "copy": "Copy",
+ "copying": "Copying"
},
"evaluation": {
"id": "Task ID",
diff --git a/src/frontend/public/locales/zh/bs.json b/src/frontend/public/locales/zh/bs.json
index 7da31206a..2213ea146 100644
--- a/src/frontend/public/locales/zh/bs.json
+++ b/src/frontend/public/locales/zh/bs.json
@@ -230,7 +230,10 @@
"selected": "已选",
"pleaseSelectAnApp": "请选择一个应用",
"allLabels": "全部标签",
- "searchLabels": "搜索标签"
+ "searchLabels": "搜索标签",
+ "confirmed": "已确认",
+ "confirm": "确认",
+ "runNewWorkflow": "运行新工作流"
},
"model": {
"modelManagement": "模型管理",
@@ -326,7 +329,9 @@
"libraryCollection": "知识库集合",
"createUser": "创建用户",
"details": "详情",
- "confirmDeleteLibrary": "确认删除该知识库?"
+ "confirmDeleteLibrary": "确认删除该知识库?",
+ "copy": "复制",
+ "copying": "复制中"
},
"evaluation": {
"id": "任务ID",
diff --git a/src/frontend/src/components/bs-comp/sheets/AppTempSheet.tsx b/src/frontend/src/components/bs-comp/sheets/AppTempSheet.tsx
index e208705e3..466c58af1 100644
--- a/src/frontend/src/components/bs-comp/sheets/AppTempSheet.tsx
+++ b/src/frontend/src/components/bs-comp/sheets/AppTempSheet.tsx
@@ -1,6 +1,6 @@
+import { AbilitiesIcon, FlowIcon, HelperIcon } from "@/components/bs-icons/app";
import { readTempsDatabase } from "@/controllers/API";
import { AppType } from "@/types/app";
-import { Bot } from "lucide-react";
import { useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { SearchInput } from "../../bs-ui/input";
@@ -64,21 +64,21 @@ export default function AppTempSheet({ children, onCustomCreate, onSelect }) {
className={`flex items-center gap-2 px-4 py-2 rounded-md cursor-pointer hover:bg-muted-foreground/10 transition-all duration-200 mb-2 ${type === AppType.FLOW && 'bg-muted-foreground/10'}`}
onClick={() => setType(AppType.FLOW)}
>
- {/* */}
+
{t('workflow')}
setType(AppType.ASSISTANT)}
>
- {/* */}
+
{t('assistant')}
setType(AppType.SKILL)}
>
- {/*
*/}
+
{t('skill')}
diff --git a/src/frontend/src/components/bs-icons/app/abilities.svg b/src/frontend/src/components/bs-icons/app/abilities.svg
new file mode 100644
index 000000000..42d4023b2
--- /dev/null
+++ b/src/frontend/src/components/bs-icons/app/abilities.svg
@@ -0,0 +1,13 @@
+
diff --git a/src/frontend/src/components/bs-icons/app/flow.svg b/src/frontend/src/components/bs-icons/app/flow.svg
new file mode 100644
index 000000000..22f09a7d7
--- /dev/null
+++ b/src/frontend/src/components/bs-icons/app/flow.svg
@@ -0,0 +1,9 @@
+
diff --git a/src/frontend/src/components/bs-icons/app/helper.svg b/src/frontend/src/components/bs-icons/app/helper.svg
new file mode 100644
index 000000000..0ab57226a
--- /dev/null
+++ b/src/frontend/src/components/bs-icons/app/helper.svg
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/src/frontend/src/components/bs-icons/app/index.tsx b/src/frontend/src/components/bs-icons/app/index.tsx
new file mode 100644
index 000000000..e2e567932
--- /dev/null
+++ b/src/frontend/src/components/bs-icons/app/index.tsx
@@ -0,0 +1,25 @@
+import React, { forwardRef } from "react";
+import Helper from "./helper.svg?react";
+import Flow from "./flow.svg?react";
+import Abilities from "./Abilities.svg?react";
+
+export const HelperIcon = forwardRef<
+ SVGSVGElement & { className: any },
+ React.PropsWithChildren<{ className?: string }>
+>((props, ref) => {
+ return ;
+});
+
+export const FlowIcon = forwardRef<
+ SVGSVGElement & { className: any },
+ React.PropsWithChildren<{ className?: string }>
+>((props, ref) => {
+ return ;
+});
+
+export const AbilitiesIcon = forwardRef<
+ SVGSVGElement & { className: any },
+ React.PropsWithChildren<{ className?: string }>
+>((props, ref) => {
+ return ;
+});
diff --git a/src/frontend/src/pages/BuildPage/flow/FlowChat/ChatInput.tsx b/src/frontend/src/pages/BuildPage/flow/FlowChat/ChatInput.tsx
index 863472fad..5996d2fa0 100644
--- a/src/frontend/src/pages/BuildPage/flow/FlowChat/ChatInput.tsx
+++ b/src/frontend/src/pages/BuildPage/flow/FlowChat/ChatInput.tsx
@@ -433,7 +433,7 @@ export default function ChatInput({ autoRun, clear, form, wsUrl, onBeforSend, on
variant="outline"
onClick={handleRestartClick}>
- 运行新工作流
+ {t('chat.runNewWorkflow')}
}
diff --git a/src/frontend/src/pages/BuildPage/flow/FlowChat/MessageBsChoose.tsx b/src/frontend/src/pages/BuildPage/flow/FlowChat/MessageBsChoose.tsx
index 833edad63..a2a293a64 100644
--- a/src/frontend/src/pages/BuildPage/flow/FlowChat/MessageBsChoose.tsx
+++ b/src/frontend/src/pages/BuildPage/flow/FlowChat/MessageBsChoose.tsx
@@ -159,7 +159,7 @@ export default function MessageBsChoose({ type = 'choose', logo, data }: { type?
className="h-8"
disabled={inputSended}
onClick={handleSend}
- >{inputSended ? '已确认' : '确认'}
+ >{inputSended ? t('chat.confirmed') : t('chat.confirm')}
:
diff --git a/src/frontend/src/pages/BuildPage/flow/FlowNode/index.tsx b/src/frontend/src/pages/BuildPage/flow/FlowNode/index.tsx
index 51c1661fe..d2a1dc08c 100644
--- a/src/frontend/src/pages/BuildPage/flow/FlowNode/index.tsx
+++ b/src/frontend/src/pages/BuildPage/flow/FlowNode/index.tsx
@@ -196,7 +196,7 @@ function CustomNode({ data: node, selected, isConnectable }: { data: WorkflowNod
{!['output', 'condition', 'end'].includes(node.type) && {
setExpend(!expend)
diff --git a/src/frontend/src/pages/BuildPage/flow/Header.tsx b/src/frontend/src/pages/BuildPage/flow/Header.tsx
index 161c4a356..7d5e49b32 100644
--- a/src/frontend/src/pages/BuildPage/flow/Header.tsx
+++ b/src/frontend/src/pages/BuildPage/flow/Header.tsx
@@ -18,7 +18,7 @@ import { captureAndAlertRequestErrorHoc } from "@/controllers/request";
import { AppType } from "@/types/app";
import { FlowVersionItem } from "@/types/flow";
import { findParallelNodes } from "@/util/flowUtils";
-import { isEqual } from "lodash-es";
+import { cloneDeep, isEqual } from "lodash-es";
import { ChevronLeft, EllipsisVertical, PencilLineIcon, Play, ShieldCheck } from "lucide-react";
import { useContext, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -138,8 +138,15 @@ const Header = ({ flow, onTabChange, preFlow, onChange }) => {
const handleExportClick = () => {
setOpen(false)
+ const nFlow = cloneDeep(flow)
+ // 删除report节点文档key
+ nFlow.nodes.forEach(node => {
+ if (node.data.type === 'report') {
+ node.data.group_params[0].params[0].value.version_key = ''
+ }
+ })
const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent(
- JSON.stringify({ ...flow })
+ JSON.stringify(nFlow)
)}`;
const link = document.createElement("a");
link.href = jsonString;
diff --git a/src/frontend/src/pages/KnowledgePage/KnowledgeFile.tsx b/src/frontend/src/pages/KnowledgePage/KnowledgeFile.tsx
index 174ec355e..c55459254 100644
--- a/src/frontend/src/pages/KnowledgePage/KnowledgeFile.tsx
+++ b/src/frontend/src/pages/KnowledgePage/KnowledgeFile.tsx
@@ -256,7 +256,7 @@ export default function KnowledgeFile() {
window.libname = [el.name, el.description];
}}>
{t('lib.details')}
- {(user.role === 'admin' || user.user_id === el.user_id) && (el.state === 1 ? : )}
+ {(user.role === 'admin' || user.user_id === el.user_id) && (el.state === 1 ? : )}
{user.role === 'admin' || user.user_id === el.user_id ?
: