From bce67e4e18ceb91316f6d3d1a93ee88b255226fe Mon Sep 17 00:00:00 2001 From: paituo <330435863@qq.com> Date: Thu, 29 Aug 2024 10:07:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=92=8C=E9=87=8D=E5=91=BD=E5=90=8D=E4=BC=9A=E8=AF=9D=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/service/index.ts b/service/index.ts index 0597c55..c54fd32 100644 --- a/service/index.ts +++ b/service/index.ts @@ -1,5 +1,5 @@ import type { IOnCompleted, IOnData, IOnError, IOnFile, IOnMessageEnd, IOnMessageReplace, IOnNodeFinished, IOnNodeStarted, IOnThought, IOnWorkflowFinished, IOnWorkflowStarted } from './base' -import { get, post, ssePost } from './base' +import { get, post, del, ssePost } from './base' import type { Feedbacktype } from '@/types/app' export const sendChatMessage = async ( @@ -60,3 +60,12 @@ export const updateFeedback = async ({ url, body }: { url: string; body: Feedbac export const generationConversationName = async (id: string) => { return post(`conversations/${id}/name`, { body: { auto_generate: true } }) } + +export const renameConversation = async (id: string, name: string) => { + return post(`conversations/${id}/name`, { body: { name: name, auto_generate: false } }) +} + +export const deleteConversation = async (id: string) => { + return del(`conversations/${id}`) +} + From 82988d5204a76c2495367a124ced543bfb05b4c7 Mon Sep 17 00:00:00 2001 From: paituo <330435863@qq.com> Date: Thu, 29 Aug 2024 10:08:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E9=94=99=E8=AF=AFBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/index.tsx b/app/components/index.tsx index 4591462..b7efaba 100644 --- a/app/components/index.tsx +++ b/app/components/index.tsx @@ -207,7 +207,7 @@ const Main: FC = () => { isOpeningStatement: isShowPrompt, } if (calculatedIntroduction) - return [openStatement] + return [openstatement] return [] } From 3d796bda543faff2d9efac8811a2f1ffe836b39b Mon Sep 17 00:00:00 2001 From: paituo <330435863@qq.com> Date: Thu, 29 Aug 2024 10:09:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BE=BF=E6=8D=B7?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=92=8C=E5=88=87=E6=8D=A2=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=89=B9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run-1.bat | 2 ++ run-2.bat | 2 ++ run.bat | 1 + 3 files changed, 5 insertions(+) create mode 100644 run-1.bat create mode 100644 run-2.bat create mode 100644 run.bat diff --git a/run-1.bat b/run-1.bat new file mode 100644 index 0000000..051c211 --- /dev/null +++ b/run-1.bat @@ -0,0 +1,2 @@ +del .env.local +copy .env1.local .env.local diff --git a/run-2.bat b/run-2.bat new file mode 100644 index 0000000..475f1d1 --- /dev/null +++ b/run-2.bat @@ -0,0 +1,2 @@ +del .env.local +copy .env2.local .env.local \ No newline at end of file diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..b896a08 --- /dev/null +++ b/run.bat @@ -0,0 +1 @@ +npm run dev \ No newline at end of file