Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
import { useContext, useEffect, useRef } from "react";
import { CanvasActivity } from "./useCanvasAwake";
/** Wall-clock updates sleep with a retained canvas and resume at their normal cadence. */
export function useCanvasInterval(callback: () => void, milliseconds: number, enabled = true): void {
const active = useContext(CanvasActivity);
const latest = useRef(callback);
latest.current = callback;
useEffect(() => {
if (!active || !enabled) return;
const timer = window.setInterval(() => latest.current(), milliseconds);
return () => window.clearInterval(timer);
}, [active, enabled, milliseconds]);
}