mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 01:36:40 +00:00
feat: lightweight bootstrap context mode for heartbeat/cron runs (openclaw#26064) thanks @jose-velez
Verified: - pnpm build - pnpm check (fails on pre-existing unrelated repo issues in extensions/diffs and src/agents/tools/nodes-tool.test.ts) - pnpm vitest run src/agents/bootstrap-files.test.ts src/infra/heartbeat-runner.model-override.test.ts src/cli/cron-cli.test.ts - pnpm test:macmini (fails on pre-existing extensions/diffs import errors; touched suites pass) Co-authored-by: jose-velez <10926182+jose-velez@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -743,9 +743,16 @@ export async function runHeartbeatOnce(opts: {
|
||||
|
||||
const heartbeatModelOverride = heartbeat?.model?.trim() || undefined;
|
||||
const suppressToolErrorWarnings = heartbeat?.suppressToolErrorWarnings === true;
|
||||
const bootstrapContextMode: "lightweight" | undefined =
|
||||
heartbeat?.lightContext === true ? "lightweight" : undefined;
|
||||
const replyOpts = heartbeatModelOverride
|
||||
? { isHeartbeat: true, heartbeatModelOverride, suppressToolErrorWarnings }
|
||||
: { isHeartbeat: true, suppressToolErrorWarnings };
|
||||
? {
|
||||
isHeartbeat: true,
|
||||
heartbeatModelOverride,
|
||||
suppressToolErrorWarnings,
|
||||
bootstrapContextMode,
|
||||
}
|
||||
: { isHeartbeat: true, suppressToolErrorWarnings, bootstrapContextMode };
|
||||
const replyResult = await getReplyFromConfig(ctx, replyOpts, cfg);
|
||||
const replyPayload = resolveHeartbeatReplyPayload(replyResult);
|
||||
const includeReasoning = heartbeat?.includeReasoning === true;
|
||||
|
||||
Reference in New Issue
Block a user