@@ -5,7 +5,6 @@ import {
|
5 | 5 | buildCurrentInboundPrompt, |
6 | 6 | buildCurrentInboundPromptContextPrefix, |
7 | 7 | buildRuntimeContextCustomMessage, |
8 | | -buildRuntimeContextSystemContext, |
9 | 8 | resolveRuntimeContextPromptParts, |
10 | 9 | } from "./runtime-context-prompt.js"; |
11 | 10 | |
@@ -352,20 +351,14 @@ describe("runtime context prompt submission", () => {
|
352 | 351 | }); |
353 | 352 | }); |
354 | 353 | |
355 | | -it("labels next-turn runtime context only when used as prompt-local system context", () => { |
356 | | -const systemContext = buildRuntimeContextSystemContext("secret runtime context"); |
357 | | - |
358 | | -expect(systemContext).toContain( |
359 | | -"OpenClaw runtime context for the immediately preceding user message.", |
360 | | -); |
361 | | -expect(systemContext).toContain("not user-authored"); |
362 | | -expect(systemContext).toContain("secret runtime context"); |
363 | | -}); |
364 | | - |
365 | | -it("labels runtime-only events as system context", async () => { |
366 | | -const { buildRuntimeEventSystemContext } = await import("./runtime-context-prompt.js"); |
| 354 | +it("labels runtime-only events as system context", () => { |
| 355 | +const parts = resolveRuntimeContextPromptParts({ |
| 356 | +effectivePrompt: "internal event", |
| 357 | +transcriptPrompt: "", |
| 358 | +}); |
367 | 359 | |
368 | | -expect(buildRuntimeEventSystemContext("internal event")).toContain("OpenClaw runtime event."); |
369 | | -expect(buildRuntimeEventSystemContext("internal event")).toContain("not user-authored"); |
| 360 | +expect(parts.runtimeSystemContext).toContain("OpenClaw runtime event."); |
| 361 | +expect(parts.runtimeSystemContext).toContain("not user-authored"); |
| 362 | +expect(parts.runtimeSystemContext).toContain("internal event"); |
370 | 363 | }); |
371 | 364 | }); |