ux improved

This commit is contained in:
Lucas Tettamanti
2026-01-17 04:13:35 -03:00
parent 98e3d78e3d
commit 63b9ecef61
35 changed files with 4266 additions and 75 deletions

View File

@@ -6,6 +6,26 @@ import { debug as dbg } from "../../shared/debug.js";
export async function handleEvolutionWebhook(body) {
const t0 = Date.now();
const parsed = parseEvolutionWebhook(body);
// #region agent log
fetch("http://127.0.0.1:7242/ingest/86c7b1cd-c414-4eae-852c-08e57e562b3b", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
sessionId: "debug-session",
runId: "pre-fix",
hypothesisId: "H1",
location: "evolution.js:9",
message: "parsed_webhook",
data: {
ok: parsed?.ok,
reason: parsed?.reason || null,
has_text: Boolean(parsed?.text),
source: parsed?.source || null,
},
timestamp: Date.now(),
}),
}).catch(() => {});
// #endregion
if (!parsed.ok) {
return { status: 200, payload: { ok: true, ignored: parsed.reason } };
}