mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:10:45 +00:00
fix: keep bare reset transcript prompt non-empty
This commit is contained in:
committed by
Peter Steinberger
parent
03bfdbb052
commit
1dbc250b1a
@@ -1018,7 +1018,7 @@ describe("runPreparedReply media-only handling", () => {
|
||||
expect(call?.followupRun.transcriptPrompt).toBe("[OpenClaw heartbeat poll]");
|
||||
});
|
||||
|
||||
it("keeps bare reset startup instructions out of visible transcript prompt", async () => {
|
||||
it("uses a non-empty transcript marker while keeping bare reset startup instructions out of visible transcript prompt", async () => {
|
||||
await runPreparedReply(
|
||||
baseParams({
|
||||
ctx: {
|
||||
@@ -1052,8 +1052,8 @@ describe("runPreparedReply media-only handling", () => {
|
||||
const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];
|
||||
expect(call?.commandBody).toContain("A new session was started via /new or /reset.");
|
||||
expect(call?.followupRun.prompt).toContain("A new session was started via /new or /reset.");
|
||||
expect(call?.transcriptCommandBody).toBe("");
|
||||
expect(call?.followupRun.transcriptPrompt).toBe("");
|
||||
expect(call?.transcriptCommandBody).toBe("[OpenClaw session new]");
|
||||
expect(call?.followupRun.transcriptPrompt).toBe("[OpenClaw session new]");
|
||||
});
|
||||
|
||||
it("keeps reset user notes visible while hiding startup instructions", async () => {
|
||||
|
||||
@@ -502,7 +502,7 @@ export async function runPreparedReply(
|
||||
const transcriptBodyBase = isHeartbeat
|
||||
? HEARTBEAT_TRANSCRIPT_PROMPT
|
||||
: isBareSessionReset
|
||||
? softResetTail
|
||||
? softResetTail || `[OpenClaw session ${startupAction}]`
|
||||
: hasUserBody
|
||||
? baseBodyFinal
|
||||
: "[User sent media without caption]";
|
||||
|
||||
Reference in New Issue
Block a user