mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-13 06:03:39 -06:00
0dd9dcda2f
* refactor(auto-reply): canonicalize inbound text once * chore(plugin-sdk): refresh API baseline * refactor(auto-reply): narrow finalized template context * test(auto-reply): keep runner fixtures structurally compatible * fix(auto-reply): guard optional post-command agent text * fix(auto-reply): finalize intercepted gateway context * fix(ci): register iOS release planner entries
19 lines
578 B
TypeScript
19 lines
578 B
TypeScript
// Builds minimal message contexts for reply unit tests.
|
|
import type { FinalizedRuntimeMsgContext, MsgContext } from "../templating.js";
|
|
import { finalizeInboundContext } from "./inbound-context.js";
|
|
|
|
export function buildTestCtx(overrides: Partial<MsgContext> = {}): FinalizedRuntimeMsgContext {
|
|
return finalizeInboundContext({
|
|
Body: "",
|
|
CommandBody: "",
|
|
CommandSource: "text",
|
|
From: "whatsapp:+1000",
|
|
To: "whatsapp:+2000",
|
|
ChatType: "direct",
|
|
Provider: "whatsapp",
|
|
Surface: "whatsapp",
|
|
CommandAuthorized: false,
|
|
...overrides,
|
|
});
|
|
}
|