MCPcopy
hub / github.com/ValueCell-ai/ClawX / pollHistoryFallback

Function pollHistoryFallback

src/stores/chat.ts:3710–3718  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3708 // progress detection honest in that case. The RPC is skipped while
3709 // streamed events are fresh, so healthy runs issue no extra requests.
3710 const pollHistoryFallback = () => {
3711 _historyPollTimer = null;
3712 const state = get();
3713 if (!state.sending || state.currentSessionKey !== currentSessionKey) return;
3714 if (Date.now() - _lastChatEventAt >= HISTORY_POLL_EVENT_SILENCE_MS) {
3715 void state.loadHistory(true);
3716 }
3717 _historyPollTimer = setTimeout(pollHistoryFallback, HISTORY_POLL_INTERVAL_MS);
3718 };
3719 _historyPollTimer = setTimeout(pollHistoryFallback, HISTORY_POLL_START_DELAY_MS);
3720
3721 const checkStuck = () => {

Callers

nothing calls this directly

Calls 1

getFunction · 0.50

Tested by

no test coverage detected