<commit_before>angular.module('panelApp').directive('batScopeTree', function ($compile) {

  // make toggle settings persist across $compile
  var modelState = {};
  var scopeState = {};

  var selected = null;

  var template =
    '<div class="scope-branch">' +
      '<a href ng-click="inspect()">&lt;</a> ' +
      '<a href ng-click="select()" ng-class="{selected: selectedScope == val.id}">{{inspect()._controllerName || "Scope"}} ({{val.id}})</a>' +
      '<div ng-repeat="child in val.children">' +
        '<bat-scope-tree ' +
          'val="child" ' +
          'inspect="inspect" ' +
          'select="select" ' +
          'selected-scope="selectedScope">' +
        '</bat-scope-tree>' +
      '</div>' +
    '</div>';

  return {
    restrict: 'E',
    terminal: true,
    scope: {
      val: '=',
      select: '=',
      selectedScope: '=',
      inspect: '='
    },<commit_msg>Add getScope<commit_after>angular.module('panelApp').directive('batScopeTree', function ($compile) {

  // make toggle settings persist across $compile
  var modelState = {};
  var scopeState = {};

  var selected = null;

  var template =
    '<div class="scope-branch">' +
      '<a href ng-click="inspect()">&lt;</a> ' +
      '<a href ng-click="select()" ng-class="{selected: selectedScope == val.id}">{{getScope(val.id)._controllerName || "Scope"}} ({{val.id}})</a>' +
      '<div ng-repeat="child in val.children">' +
        '<bat-scope-tree ' +
          'val="child" ' +
          'inspect="inspect" ' +
          'select="select" ' +
          'selected-scope="selectedScope">' +
        '</bat-scope-tree>' +
      '</div>' +
    '</div>';

  return {
    restrict: 'E',
    terminal: true,
    scope: {
      val: '=',
      select: '=',
      selectedScope: '=',
      inspect: '='
    },
{'fraction_non_alphanumeric': 0.2121380846325167, 'fraction_numerical': 0.0, 'mean_word_length': 2.544378698224852, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '2197386', 'n_tokens_mistral': 585, 'n_tokens_neox': 590, 'n_words': 107}