diff --git a/frontend/src/app/workspace/chats/[thread_id]/page.tsx b/frontend/src/app/workspace/chats/[thread_id]/page.tsx index 254e6191..04c16730 100644 --- a/frontend/src/app/workspace/chats/[thread_id]/page.tsx +++ b/frontend/src/app/workspace/chats/[thread_id]/page.tsx @@ -141,6 +141,15 @@ export default function ChatPage() { if (initializedThreadRef.current === safeThreadId) return; initializedThreadRef.current = safeThreadId; void apiClient.threads + // TODO: 先注释先删除再创建的逻辑 + // .delete(safeThreadId) + // .catch(() => undefined) + // .then(() => + // apiClient.threads.create({ + // threadId: safeThreadId, + // ifExists: "raise", + // }), + // ) .create({ threadId: safeThreadId, ifExists: "do_nothing", diff --git a/frontend/src/core/threads/hooks.ts b/frontend/src/core/threads/hooks.ts index 72558a4d..a007599c 100644 --- a/frontend/src/core/threads/hooks.ts +++ b/frontend/src/core/threads/hooks.ts @@ -678,6 +678,7 @@ export function useSubmitThread({ await apiClient.threads.create({ threadId, ifExists: "do_nothing", + // ifExists: "raise", }); }