






















@@ -11,7 +11,7 @@ import {
1111makeCfg,
1212mockRunEmbeddedPiAgentOk,
1313requireSessionStorePath,
14-runGreetingPromptForBareNewOrReset,
14+expectBareNewOrResetAcknowledged,
1515withTempHome,
1616} from "../../test/helpers/auto-reply/trigger-handling-test-harness.js";
1717import { loadSessionStore, resolveSessionKey } from "../config/sessions.js";
@@ -375,7 +375,7 @@ describe("trigger handling", () => {
375375});
376376});
377377378-it("prepends runtime-loaded daily memory context on bare /new", async () => {
378+it("acknowledges bare /new without invoking the model or loading startup memory", async () => {
379379await withTempHome(async (home) => {
380380const workspaceDir = join(home, "openclaw");
381381const nowMs = Date.now();
@@ -392,18 +392,12 @@ describe("trigger handling", () => {
392392393393const res = await runAuthorizedSmsCommand("/new", cfg);
394394395-expect(maybeReplyText(res)).toBe("hello");
396-const prompt = runEmbeddedPiAgentMock.mock.calls.at(-1)?.[0]?.prompt ?? "";
397-expect(prompt).toContain("[Startup context loaded by runtime]");
398-expect(prompt).toContain(`[Untrusted daily memory: memory/${todayStamp}.md]`);
399-expect(prompt).toContain("BEGIN_QUOTED_NOTES");
400-expect(prompt).toContain("today startup note");
401-expect(prompt).toContain(`[Untrusted daily memory: memory/${yesterdayStamp}.md]`);
402-expect(prompt).toContain("yesterday startup note");
395+expect(maybeReplyText(res)).toBe("✅ New session started.");
396+expect(runEmbeddedPiAgentMock).not.toHaveBeenCalled();
403397});
404398});
405399406-it("treats normalized /RESET as reset for startupContext.applyOn", async () => {
400+it("acknowledges normalized bare /RESET without invoking the model", async () => {
407401await withTempHome(async (home) => {
408402const workspaceDir = join(home, "openclaw");
409403const nowMs = Date.now();
@@ -418,10 +412,8 @@ describe("trigger handling", () => {
418412419413const res = await runAuthorizedSmsCommand("/RESET", cfg);
420414421-expect(maybeReplyText(res)).toBe("hello");
422-const prompt = runEmbeddedPiAgentMock.mock.calls.at(-1)?.[0]?.prompt ?? "";
423-expect(prompt).toContain(`[Untrusted daily memory: memory/${todayStamp}.md]`);
424-expect(prompt).toContain("reset startup note");
415+expect(maybeReplyText(res)).toBe("✅ Session reset.");
416+expect(runEmbeddedPiAgentMock).not.toHaveBeenCalled();
425417});
426418});
427419@@ -824,7 +816,7 @@ describe("trigger handling", () => {
824816825817it("handles bare session reset, inline commands, and unauthorized inline status", async () => {
826818await withTempHome(async (home) => {
827-await runGreetingPromptForBareNewOrReset({ home, body: "/new", getReplyFromConfig });
819+await expectBareNewOrResetAcknowledged({ home, body: "/new", getReplyFromConfig });
828820await expectResetBlockedForNonOwner({ home });
829821await expectInlineCommandHandledAndStripped({
830822 home,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。