Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(channels): don't serialize or deserialize pending attachments (#2761)
teoeab420165418
diff --git a/js/app/packages/channel/Input/attachment-tracker.ts b/js/app/packages/channel/Input/attachment-tracker.tsindex 148cbc42d0..b384bd44b4 100644--- a/js/app/packages/channel/Input/attachment-tracker.ts+++ b/js/app/packages/channel/Input/attachment-tracker.ts@@ -26,7 +26,13 @@ export function createInputAttachmentTracker();const [attachments, setAttachments] = options.persistenceKey- ? makePersisted(raw, { name: options.persistenceKey })+ ? makePersisted(raw, {+ name: options.persistenceKey,+ serialize: (data: InputAttachmentData[]) =>+ JSON.stringify(data.filter((a) => !a.pending)),+ deserialize: (data: string) =>+ (JSON.parse(data) as InputAttachmentData[]).filter((a) => !a.pending),+ }): raw;const maxAttachments = options.maxAttachments ?? 10;