refactor: 预留空位,先删除旧逻辑再重新实现

This commit is contained in:
肖应宇 2026-04-16 10:03:37 +08:00
parent 7fd4b76e94
commit 12a21808f9
2 changed files with 10 additions and 0 deletions

View File

@ -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",

View File

@ -678,6 +678,7 @@ export function useSubmitThread({
await apiClient.threads.create({
threadId,
ifExists: "do_nothing",
// ifExists: "raise",
});
}