feat: add heartbeat toggle with live RPC control
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
monitorWebProvider,
|
||||
resolveHeartbeatRecipients,
|
||||
runWebHeartbeatOnce,
|
||||
setHeartbeatsEnabled,
|
||||
type WebMonitorTuning,
|
||||
} from "../provider-web.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
@@ -240,6 +241,11 @@ Examples:
|
||||
respond({ type: "result", ok: true });
|
||||
return;
|
||||
}
|
||||
if (cmd.type === "set-heartbeats") {
|
||||
setHeartbeatsEnabled(Boolean(cmd.enabled));
|
||||
respond({ type: "result", ok: true });
|
||||
return;
|
||||
}
|
||||
if (cmd.type !== "send" || !cmd.text) {
|
||||
respond({ type: "error", error: "unsupported command" });
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user