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 [] } 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 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}`) +} +