@chrysb/alphaclaw 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/public/js/app.js +4 -4
- package/package.json +1 -1
package/lib/public/js/app.js
CHANGED
|
@@ -257,17 +257,17 @@ function App() {
|
|
|
257
257
|
useEffect(() => {
|
|
258
258
|
if (!onboarded) return;
|
|
259
259
|
let active = true;
|
|
260
|
-
const check = async () => {
|
|
260
|
+
const check = async (refresh = false) => {
|
|
261
261
|
try {
|
|
262
|
-
const data = await fetchAlphaclawVersion(
|
|
262
|
+
const data = await fetchAlphaclawVersion(refresh);
|
|
263
263
|
if (!active) return;
|
|
264
264
|
setAcVersion(data.currentVersion || null);
|
|
265
265
|
setAcLatest(data.latestVersion || null);
|
|
266
266
|
setAcHasUpdate(!!data.hasUpdate);
|
|
267
267
|
} catch {}
|
|
268
268
|
};
|
|
269
|
-
check();
|
|
270
|
-
const id = setInterval(check, 5 * 60 * 1000);
|
|
269
|
+
check(true);
|
|
270
|
+
const id = setInterval(() => check(false), 5 * 60 * 1000);
|
|
271
271
|
return () => { active = false; clearInterval(id); };
|
|
272
272
|
}, [onboarded]);
|
|
273
273
|
|