chore: format + regenerate protocol
This commit is contained in:
@@ -216,7 +216,12 @@ describe("broadcast groups", () => {
|
||||
|
||||
expect(resolver).toHaveBeenCalledTimes(2);
|
||||
for (const call of resolver.mock.calls.slice(0, 2)) {
|
||||
const payload = call[0] as { Body: string; SenderName?: string; SenderE164?: string; SenderId?: string };
|
||||
const payload = call[0] as {
|
||||
Body: string;
|
||||
SenderName?: string;
|
||||
SenderE164?: string;
|
||||
SenderId?: string;
|
||||
};
|
||||
expect(payload.Body).toContain("Chat messages since your last reply");
|
||||
expect(payload.Body).toContain("Alice (+111): hello group");
|
||||
expect(payload.Body).toContain("[message_id: g1]");
|
||||
|
||||
@@ -9,7 +9,10 @@ import {
|
||||
} from "../../../auto-reply/reply/response-prefix-template.js";
|
||||
import { resolveTextChunkLimit } from "../../../auto-reply/chunk.js";
|
||||
import { formatAgentEnvelope } from "../../../auto-reply/envelope.js";
|
||||
import { buildHistoryContextFromEntries, type HistoryEntry } from "../../../auto-reply/reply/history.js";
|
||||
import {
|
||||
buildHistoryContextFromEntries,
|
||||
type HistoryEntry,
|
||||
} from "../../../auto-reply/reply/history.js";
|
||||
import { dispatchReplyWithBufferedBlockDispatcher } from "../../../auto-reply/reply/provider-dispatcher.js";
|
||||
import type { getReplyFromConfig } from "../../../auto-reply/reply.js";
|
||||
import type { ReplyPayload } from "../../../auto-reply/types.js";
|
||||
@@ -88,7 +91,9 @@ export async function processMessage(params: {
|
||||
currentMessage: combinedBody,
|
||||
excludeLast: false,
|
||||
formatEntry: (entry) => {
|
||||
const bodyWithId = entry.messageId ? `${entry.body}\n[message_id: ${entry.messageId}]` : entry.body;
|
||||
const bodyWithId = entry.messageId
|
||||
? `${entry.body}\n[message_id: ${entry.messageId}]`
|
||||
: entry.body;
|
||||
return formatAgentEnvelope({
|
||||
channel: "WhatsApp",
|
||||
from: conversationId,
|
||||
|
||||
Reference in New Issue
Block a user