fix(chat): prevent duplicate renderer requests and thinking messages (#870)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Haze <hazeone@users.noreply.github.com>
This commit is contained in:
@@ -97,6 +97,9 @@ function maybeLoadSessions(
|
||||
state: { loadSessions: () => Promise<void> },
|
||||
force = false,
|
||||
): void {
|
||||
const { status } = useGatewayStore.getState();
|
||||
if (status.gatewayReady === false) return;
|
||||
|
||||
const now = Date.now();
|
||||
if (!force && now - lastLoadSessionsAt < LOAD_SESSIONS_MIN_INTERVAL_MS) return;
|
||||
lastLoadSessionsAt = now;
|
||||
|
||||
Reference in New Issue
Block a user