mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 11:20:43 +00:00
test: simplify raw body prompt prefixing
This commit is contained in:
@@ -23,9 +23,10 @@ describe("RawBody directive parsing", () => {
|
||||
const directives = parseInlineDirectives(sessionCtx.BodyForCommands ?? "", {
|
||||
allowStatusDirective: true,
|
||||
});
|
||||
const prefixedBody = [buildInboundUserContextPrefix(sessionCtx), directives.cleaned]
|
||||
.filter(Boolean)
|
||||
.join("\n\n");
|
||||
const contextPrefix = buildInboundUserContextPrefix(sessionCtx);
|
||||
const prefixedBody = contextPrefix
|
||||
? `${contextPrefix}\n\n${directives.cleaned}`
|
||||
: directives.cleaned;
|
||||
const prompt = buildReplyPromptBodies({
|
||||
ctx: sessionCtx,
|
||||
sessionCtx: { ...sessionCtx, BodyStripped: directives.cleaned },
|
||||
|
||||
Reference in New Issue
Block a user