From 976b377185574fa89dd964cc0cc4e15ade1cef8f Mon Sep 17 00:00:00 2001 From: ma-zhongxu Date: Thu, 6 Mar 2025 10:16:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=86=E6=9E=90=E5=8C=BA?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9,?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=8F=96=E6=B6=88=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Documents/Directory/index.jsx | 28 +++++++++---------- .../ThreadContainer/ThreadItem/index.jsx | 6 ++-- .../ThreadContainer/index.jsx | 8 +++--- frontend/src/pages/PolicyLibrary/index.jsx | 28 +++++++++---------- server/models/workspaceThread.js | 2 +- 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/index.jsx b/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/index.jsx index 9ca6be7..75fb035 100644 --- a/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/index.jsx +++ b/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/index.jsx @@ -52,7 +52,7 @@ function Directory({ event.stopPropagation(); if ( !window.confirm( - "Are you sure you want to delete these files and folders?\nThis will remove the files from the system and remove them from any existing workspaces automatically.\nThis action is not reversible." + "确定要删除这些文件和文件夹吗?此操作将永久删除它们及在任何现有工作空间中的副本,且无法撤销。" ) ) { return false; @@ -209,19 +209,19 @@ function Directory({ weight="bold" /> - + {/**/} + {/* */} + {/*
*/} + {/* 新文件夹*/} + {/*
*/} + {/**/}
diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/ThreadItem/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/ThreadItem/index.jsx index 61b802f..9ea0da8 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/ThreadItem/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/ThreadItem/index.jsx @@ -196,7 +196,7 @@ function OptionsMenu({ const renameThread = async () => { const name = window - .prompt("您想将此线程重命名为什么?") + .prompt("您想将此对话重命名为什么?") ?.trim(); if (!name || name.length === 0) { close(); @@ -223,7 +223,7 @@ function OptionsMenu({ const handleDelete = async () => { if ( !window.confirm( - "您确定要删除此线程吗?所有的聊天记录都将被删除。这是无法挽回的。" + "您确定要删除此对话吗?所有的聊天记录都将被删除。这是无法挽回的。" ) ) return; @@ -262,7 +262,7 @@ function OptionsMenu({ className="w-full rounded-md flex items-center p-2 gap-x-2 hover:bg-red-500/20 text-slate-300 light:text-theme-text-primary hover:text-red-100" > -

删除线程

+

删除对话

); diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx index e669525..ad73559 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx @@ -129,7 +129,7 @@ export default function ThreadContainer({ workspace }) { idx={0} activeIdx={activeThreadIdx} isActive={activeThreadIdx === 0} - thread={{ slug: null, name: "default" }} + thread={{ slug: null, name: "默认对话" }} hasNext={threads.length > 0} /> {threads.map((thread, i) => ( @@ -151,7 +151,7 @@ export default function ThreadContainer({ workspace }) { threads={threads} onDelete={handleDeleteAll} /> - + {/**/} ); } @@ -195,11 +195,11 @@ function NewThreadButton({ workspace }) { {loading ? (

- 启动线程... + 启动对话...

) : (

- 新线程 + 新对话

)} diff --git a/frontend/src/pages/PolicyLibrary/index.jsx b/frontend/src/pages/PolicyLibrary/index.jsx index 8d49e0a..891063a 100644 --- a/frontend/src/pages/PolicyLibrary/index.jsx +++ b/frontend/src/pages/PolicyLibrary/index.jsx @@ -62,7 +62,7 @@ function Directory({ event.stopPropagation(); if ( !window.confirm( - "Are you sure you want to delete these files and folders?\nThis will remove the files from the system and remove them from any existing workspaces automatically.\nThis action is not reversible." + "确定要删除这些文件和文件夹吗?此操作将永久删除它们及在任何现有工作空间中的副本,且无法撤销。" ) ) { return false; @@ -231,19 +231,19 @@ function Directory({ weight="bold" /> - + {/**/} + {/* */} + {/*
*/} + {/* 新文件夹*/} + {/*
*/} + {/**/}
diff --git a/server/models/workspaceThread.js b/server/models/workspaceThread.js index 1ac6040..823b367 100644 --- a/server/models/workspaceThread.js +++ b/server/models/workspaceThread.js @@ -3,7 +3,7 @@ const slugifyModule = require("slugify"); const { v4: uuidv4 } = require("uuid"); const WorkspaceThread = { - defaultName: "Thread", + defaultName: "对话", writable: ["name"], /**