<commit_before># this class will register itself just before application starts loading, right after framework is ready

KD.extend

  apiUri       : KD.config.apiUri
  appsUri      : KD.config.appsUri
  singleton    : KD.getSingleton.bind KD
  useNewKites  : do ->
    useNewKites = switch
      when KD.config.kites.stack.force
        Boolean KD.config.kites.stack.newKites
      when localStorage.useNewKites?
        Boolean Number localStorage.useNewKites

    localStorage.useNewKites = if useNewKites then '1' else ''
  appClasses   : {}
  appScripts   : {}
  appLabels    : {}
  navItems     : []
  navItemIndex : {}

  toggleKiteStack: ->
    localStorage.useNewKites =
      if @useNewKites
      then ''
      else '1'
    location.reload()

  socketConnected:->
    @backendIsConnected = yes

  registerAppClass:(fn, options = {})->

    return error "AppClass is missing a name!"  unless options.name

    if KD.appClasses[options.name]
<commit_msg>toggle kites bugfix: use new kites should be a bool<commit_after># this class will register itself just before application starts loading, right after framework is ready

KD.extend

  apiUri       : KD.config.apiUri
  appsUri      : KD.config.appsUri
  singleton    : KD.getSingleton.bind KD
  useNewKites  : do ->
    useNewKites = switch
      when KD.config.kites.stack.force
        Boolean KD.config.kites.stack.newKites
      when localStorage.useNewKites?
        Boolean Number localStorage.useNewKites
    localStorage.useNewKites = if useNewKites then '1' else ''
    return useNewKites
  appClasses   : {}
  appScripts   : {}
  appLabels    : {}
  navItems     : []
  navItemIndex : {}

  toggleKiteStack: ->
    localStorage.useNewKites =
      if @useNewKites
      then ''
      else '1'
    location.reload()

  socketConnected:->
    @backendIsConnected = yes

  registerAppClass:(fn, options = {})->

    return error "AppClass is missing a name!"  unless options.name

    if KD.appClasses[options.name]

{'fraction_non_alphanumeric': 0.0871975806451613, 'fraction_numerical': 0.0020161290322580645, 'mean_word_length': 2.7666034155597723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3801314', 'n_tokens_mistral': 638, 'n_tokens_neox': 608, 'n_words': 155}