Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

598 B
Raw Blame
import type { CindyVersionsState } from '../../../shared/cindyVersions';
import { isXdOrgUser, type XdOrgIdentity } from '../../../shared/xdOrg';
import { CINDY_MAKE_ENABLED } from '@cindy/maker-shared/cindy-make-feature';

export function canAccessCindyMakeSettings(
  isDevelopmentBuild: boolean,
  versions?: CindyVersionsState,
  isBetaBuild = false,
  user?: XdOrgIdentity | null,
): boolean {
  if (!CINDY_MAKE_ENABLED) return false;
  if (isDevelopmentBuild || (!!versions?.currentId && versions.currentId !== 'original')) {
    return true;
  }
  return isBetaBuild && isXdOrgUser(user);
}