Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

2.0 KB
Raw Blame
import { plugins, PluginTarget, PluginType } from '@src/react/shared/plugins/Plugins';
import { SMYTHOS_DOCS_URL } from '@src/shared/constants/general';
// TODO: Delete this commented block once removal is confirmed. Discord & Academy links were removed from the app; code kept for traceability.
import { BookIcon, /* DiscordIcon, */ HomeIcon, KeyIcon } from '../components/svgs';

export const PRICING_PLAN_REDIRECT = 'https://smythos.com/pricing/';

export const NEW_ENTERPRISE_PLAN_REDIRECT = 'https://smythos.com/pricing-enquiry/';

export type SidebarMenuItem = {
  url: string;
  name: string;
  icon: React.FC;
  visible: boolean | ((ctx: any) => boolean);
  order?: number;
};

export const getSidebarMenuItems = (): SidebarMenuItem[] => {
  const pluginItems = (
    plugins.getPluginsByTarget(PluginTarget.SidebarMenuItems, PluginType.Config) as {
      config: SidebarMenuItem;
    }[]
  ).flatMap((item) => item.config);

  return [
    { url: '/agents', name: 'Home', icon: HomeIcon, visible: true, order: 1 },
    { url: '/vault', name: 'Vault', icon: KeyIcon, visible: true, order: 5 },
    ...pluginItems,
  ].sort((a, b) => (a.order || 0) - (b.order || 0));
};

export const bottomLinks = [
  { title: 'Docs', path: SMYTHOS_DOCS_URL, icon: BookIcon, isExternal: true },
  // TODO: Delete this commented block once removal is confirmed. Discord & Academy links were removed from the app; code kept for traceability.
  // {
  //   title: 'Discord Support',
  //   path: 'https://discord.gg/smythos',
  //   icon: DiscordIcon,
  //   isExternal: true,
  // },
];

export const profileDropdownItems = () => {
  const pluginItems = (
    plugins.getPluginsByTarget(PluginTarget.TopMenuProfileDropdownItems, PluginType.Config) as {
      config: any;
    }[]
  ).flatMap((item) => item.config);

  return [
    // { url: '/account', name: 'Account' },
    // { url: '/teams/members', name: 'User Management' },
    ...pluginItems,
    { url: '/teams/settings', name: 'User Management' },
  ];
};