feat: update conversation archiving to store structured message data
CI / test (pull_request) Failing after 7s

This commit is contained in:
2026-02-13 10:17:06 -06:00
parent a70f0c52a9
commit b7720496cf
@@ -353,11 +353,18 @@ app.delete(`${prefix}/conversations/:id/archive`, async (c) => {
row.openai_conversation_id,
);
const conversacion = items.data.filter((it: any) =>
it.type === "message" && (it.role === "assistant" || it.role === "user")
).map((it: any) => ({
role: it.role,
content: it.content.map((c: any) => c.text).join(""),
}));
// Guardar y marcar como ARCHIVADA
const { error: upErr } = await supabase.from("conversaciones_plan")
.update({
estado: "ARCHIVADA",
conversacion_json: items,
conversacion_json: conversacion,
})
.eq("id", conversation_plan_id);