MCPcopy
hub / github.com/modstart-lib/aigcpanel / flush

Function flush

electron/mapi/log/beacon-render.ts:35–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33let timer: ReturnType<typeof setTimeout> | null = null;
34
35const flush = () => {
36 if (!pending.length) return;
37 const events = pending.splice(0);
38 try {
39 const encoded = encodeURIComponent(btoa(JSON.stringify(events)));
40 const url = `${BEACON_URL}?app=${BEACON_APP}&data=${encoded}`;
41 fetch(url).catch(() => {});
42 } catch {}
43};
44
45const schedule = () => {
46 if (timer) return;

Callers 1

scheduleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected