refactor: 预留空位,先删除旧逻辑再重新实现
This commit is contained in:
parent
7fd4b76e94
commit
12a21808f9
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -678,6 +678,7 @@ export function useSubmitThread({
|
|||
await apiClient.threads.create({
|
||||
threadId,
|
||||
ifExists: "do_nothing",
|
||||
// ifExists: "raise",
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue