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.

717 B
Raw Blame
import { ChannelLoading } from '@channel/Channel/ChannelLoading';
import { defineBlock, type ExtractLoadType, LoadErrors } from '@core/block';
import { ok } from 'neverthrow';
import { lazy } from 'solid-js';

export const definition = defineBlock({
  name: 'channel',
  description: '',
  loading: ChannelLoading,
  component: lazy(async () => ({
    default: (await import('./component/NewChannelBlockAdapter'))
      .NewChannelBlockAdapter,
  })),
  liveTrackingEnabled: true,
  async load(source, _intent) {
    if (source.type === 'dss') {
      return ok({ id: source.id });
    }
    return LoadErrors.MISSING;
  },
  accepted: {},
});

export type ChannelData = ExtractLoadType<(typeof definition)['load']>;