From 049dc581eedb2f379c4fd1b8851d015cd42f5ff1 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Thu, 13 Nov 2025 05:50:10 +0000 Subject: [PATCH] completionId: cgen-8a54b9a367034577b4ed8146cb80ea63 cgen-8a54b9a367034577b4ed8146cb80ea63 --- client/lib/aethex-toast.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/client/lib/aethex-toast.ts b/client/lib/aethex-toast.ts index 1af644a8..c519048b 100644 --- a/client/lib/aethex-toast.ts +++ b/client/lib/aethex-toast.ts @@ -113,4 +113,27 @@ export const aethexToast = { variant: "aethex" as any, }); }, + + arm: (options: AethexToastOptions & { accentColor: string }) => { + const normalize = (d?: any) => { + if (d == null) return undefined; + if (typeof d === "string") return d; + if (typeof d === "object") { + if ((d as any).message) return String((d as any).message); + try { + return JSON.stringify(d); + } catch (e) { + return String(d); + } + } + return String(d); + }; + return toast({ + title: options.title, + description: normalize(options.description), + duration: options.duration || 5000, + variant: "arm" as any, + accentColor: options.accentColor, + }); + }, };