MCPcopy Index your code
hub / github.com/ByBrawe/opencode-loop / presetDefaults

Function presetDefaults

src/index.js:498–512  ·  view source on GitHub ↗
(name, args)

Source from the content-addressed store, hash-verified

496 continue
497 }
498 Promise.resolve()
499 .then(async () => {
500 await finalizeActiveRun(info.directory, info.client, sessionID, { forceStale: true })
501 await maybeRunDueJobs(info.directory, info.client, sessionID, { heartbeat: true })
502 })
503 .catch((error) => appendLoopLog(info.directory, "heartbeat-error", { sessionID, error: sdkErrorMessage(error) }).catch(() => {}))
504 }
505 if (!knownSessions.size && heartbeatTimer) {
506 clearInterval(heartbeatTimer)
507 heartbeatTimer = undefined
508 }
509 }, HEARTBEAT_MS)
510}
511function presetDefaults(name, args) {
512 const [maybeDuration, rest] = splitFirst(args)
513 const parsed = parseDuration(maybeDuration)
514 const intervalMs = parsed === null ? 0 : parsed
515 const extra = parsed === null ? String(args || "").trim() : rest

Callers 1

handleCommandFunction · 0.85

Calls 2

splitFirstFunction · 0.85
parseDurationFunction · 0.85

Tested by

no test coverage detected