mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
fix(active-memory): preserve setup grace for embedded recall
Apply setupGraceTimeoutMs to the embedded recall runner as well as the outer Active Memory watchdog. Co-authored-by: volcano303 <75143900+volcano303@users.noreply.github.com>
This commit is contained in:
@@ -2256,7 +2256,7 @@ describe("active-memory plugin", () => {
|
||||
);
|
||||
|
||||
expect(result?.prependContext).toContain("remember the ramen place");
|
||||
expect(runEmbeddedPiAgent.mock.calls.at(-1)?.[0]?.timeoutMs).toBe(CONFIGURED_TIMEOUT_MS);
|
||||
expect(runEmbeddedPiAgent.mock.calls.at(-1)?.[0]?.timeoutMs).toBe(CONFIGURED_TIMEOUT_MS + 100);
|
||||
const infoLines = vi
|
||||
.mocked(api.logger.info)
|
||||
.mock.calls.map((call: unknown[]) => String(call[0]));
|
||||
|
||||
@@ -2273,6 +2273,7 @@ async function runRecallSubagent(params: {
|
||||
|
||||
try {
|
||||
const embeddedConfig = applyActiveMemoryRuntimeConfigSnapshot(params.api.config, params.config);
|
||||
const embeddedTimeoutMs = params.config.timeoutMs + params.config.setupGraceTimeoutMs;
|
||||
const result = await params.api.runtime.agent.runEmbeddedPiAgent({
|
||||
sessionId: subagentSessionId,
|
||||
sessionKey: subagentSessionKey,
|
||||
@@ -2286,7 +2287,7 @@ async function runRecallSubagent(params: {
|
||||
prompt,
|
||||
provider: modelRef.provider,
|
||||
model: modelRef.model,
|
||||
timeoutMs: params.config.timeoutMs,
|
||||
timeoutMs: embeddedTimeoutMs,
|
||||
runId: subagentSessionId,
|
||||
trigger: "manual",
|
||||
toolsAllow: ["memory_recall", "memory_search", "memory_get"],
|
||||
|
||||
Reference in New Issue
Block a user