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 Accessor, createSignal } from 'solid-js';
export type FocusRequest = {
pending: Accessor<number | undefined>;
request: () => void;
consume: () => boolean;
};
export function createFocusRequest(): FocusRequest {
const [pending, setPending] = createSignal<number | undefined>();
let nextId = 0;
return {
pending,
request: () => {
nextId += 1;
setPending(nextId);
},
consume: () => {
if (pending() === undefined) return false;
setPending(undefined);
return true;
},
};
}