fix(frontend):keep DeerFlow chat thread ids in sync (#1931)

* fix: replay thread sync changes on top of main

* fix: avoid stale thread ids during stream startup
This commit is contained in:
Admire
2026-04-07 17:15:46 +08:00
committed by GitHub
parent 3b3e8e1b0b
commit ab41de2961
4 changed files with 34 additions and 10 deletions
@@ -22,8 +22,11 @@ export function useThreadChat() {
if (pathname.endsWith("/new")) {
setIsNewThread(true);
setThreadId(uuid());
return;
}
}, [pathname]);
setIsNewThread(false);
setThreadId(threadIdFromPath);
}, [pathname, threadIdFromPath]);
const isMock = searchParams.get("mock") === "true";
return { threadId, isNewThread, setIsNewThread, isMock };
return { threadId, setThreadId, isNewThread, setIsNewThread, isMock };
}