Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

579 B
Raw Blame
import { createToolGroupDisclosure } from '../primitives/tool-group-disclosure';
import { ToolGroup, type ToolGroupProps } from '../ui/ToolGroup';

/** Apply live-run timing without making the presentation own tool lifecycle. */
export function LiveToolGroup(
  props: Omit<ToolGroupProps, 'open' | 'onOpenChange'>
) {
  const disclosure = createToolGroupDisclosure({
    active: () => props.active,
    defaultOpen: props.defaultOpen,
  });

  return (
    <ToolGroup
      {...props}
      open={disclosure.expanded()}
      onOpenChange={disclosure.setExpanded}
    />
  );
}