<commit_before>class WebTermController extends AppController

  KD.registerAppClass @,
    name         : "WebTerm"
    route        : "/Develop"
    multiple     : yes
    hiddenHandle : no
    behavior     : "application"
    preCondition :
      condition  : (cb)->
        KD.singletons.vmController.info (err, vm, info)=>
          cb  if info?.state is 'RUNNING' then yes else no
      failure    : (cb)->
        KD.singletons.vmController.askToTurnOn 'WebTerm', cb

  constructor:(options = {}, data)->

    vmName          = options.params?.vmName or KD.nick()
    options.view    = new WebTermAppView {vmName}
    options.appInfo =
      title         : "Terminal on #{vmName}"
      cssClass      : "webterm"

    super options, data

  # TODO: the below was pasted in here during a merge.  fixme C.T.
  # bringToFront: ->
  #   appStorage = new AppStorage 'WebTerm', '1.0'
  #   appStorage.fetchStorage =>
  #     data = new WebTermView appStorage
  #     data.on "WebTerm.terminated", =>
  #       @propagateEvent<commit_msg>Use group vm if vm is not provided<commit_after>class WebTermController extends AppController

  KD.registerAppClass @,
    name         : "WebTerm"
    route        : "/Develop"
    multiple     : yes
    hiddenHandle : no
    behavior     : "application"
    preCondition :
      condition  : (cb)->
        KD.singletons.vmController.info (err, vm, info)=>
          cb  if info?.state is 'RUNNING' then yes else no
      failure    : (cb)->
        KD.singletons.vmController.askToTurnOn 'WebTerm', cb

  constructor:(options = {}, data)->
    vmName          = options.params?.vmName or \
                      KD.singletons.vmController.getDefaultVmName()
    options.view    = new WebTermAppView {vmName}
    options.appInfo =
      title         : "Terminal on #{vmName}"
      cssClass      : "webterm"

    super options, data

  # TODO: the below was pasted in here during a merge.  fixme C.T.
  # bringToFront: ->
  #   appStorage = new AppStorage 'WebTerm', '1.0'
  #   appStorage.fetchStorage =>
  #     data = new WebTermView appStorage
  #     data.on "WebTerm.terminated", =>
  #       @propagateEvent
{'fraction_non_alphanumeric': 0.1062152133580705, 'fraction_numerical': 0.0018552875695732839, 'mean_word_length': 2.2146050670640833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '18847', 'n_tokens_mistral': 671, 'n_tokens_neox': 642, 'n_words': 170}