feat: add reply tags and replyToMode

This commit is contained in:
Peter Steinberger
2026-01-02 23:18:41 +01:00
parent a9ff03acaf
commit 2c92ccd66e
19 changed files with 353 additions and 27 deletions

View File

@@ -1417,7 +1417,7 @@ describe("web auto-reply", () => {
expect(callArg.ReplyToId).toBe("q1");
expect(callArg.ReplyToBody).toBe("original");
expect(callArg.ReplyToSender).toBe("+1999");
expect(callArg.Body).toContain("[Replying to +1999]");
expect(callArg.Body).toContain("[Replying to +1999 id:q1]");
expect(callArg.Body).toContain("original");
});

View File

@@ -921,7 +921,8 @@ export async function monitorWebProvider(
const formatReplyContext = (msg: WebInboundMsg) => {
if (!msg.replyToBody) return null;
const sender = msg.replyToSender ?? "unknown sender";
return `[Replying to ${sender}]\n${msg.replyToBody}\n[/Replying]`;
const idPart = msg.replyToId ? ` id:${msg.replyToId}` : "";
return `[Replying to ${sender}${idPart}]\n${msg.replyToBody}\n[/Replying]`;
};
const buildLine = (msg: WebInboundMsg) => {