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
import type { Attachment, Attachments } from '@core/component/AI/types';
type HomeComposerInput = {
attachments: Pick<Attachments, 'setAttached'>;
setPendingDraft: (text: string | null) => void;
};
type HomeComposerEditor = {
setMarkdown: (markdown: string) => void;
};
export function replaceHomeComposerSelection(
input: HomeComposerInput,
draft: string,
attachments: Attachment[] = []
) {
input.attachments.setAttached(attachments);
input.setPendingDraft(draft);
}
export function replaceHomeComposerDraft(
editor: HomeComposerEditor,
draft: string
) {
editor.setMarkdown(draft);
}