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 { fireAndForget } from '@core/util/fireAndForget';
import type { Accessor } from 'solid-js';
import { RoutinesList } from '../components/routines-list';
import type { RoutineListSource } from '../context/routine-sources';
import type { RoutineTemplate } from '../core/routine-templates';
import { createRoutineRows } from '../primitives/routines-list';
export function RoutinesListView(props: {
source: RoutineListSource;
userId: Accessor<string | undefined>;
showTitle?: boolean;
registerSearchFocus?: (focus: () => void) => void;
onCreate(): void;
onOpen(id: string): void;
/** Templates to start from, above the list. */
templates?: RoutineTemplate[];
onTemplate?: (template: RoutineTemplate) => void;
}) {
const rows = createRoutineRows(props.source, props.userId);
return (
<RoutinesList
showTitle={props.showTitle}
registerSearchFocus={props.registerSearchFocus}
rows={rows()}
loading={props.source.loading()}
error={props.source.error()}
onRetry={() => fireAndForget(props.source.refresh(), 'routines')}
onCreate={props.onCreate}
onOpen={props.onOpen}
pendingId={props.source.pendingId()}
onToggle={(row) => props.source.setEnabled(row.id, !row.enabled)}
templates={props.templates}
onTemplate={props.onTemplate}
/>
);
}