<commit_before>import Ember from 'ember';

export default Ember.Service.extend({
  overlays: Ember.inject.service('ember-overlays'),
  marks: Ember.computed.alias('overlays.marks'),

  fields: Ember.computed('marks', function() {
    return this.get('marks').filter(m => m.group === 'cardstack-fields');
  }),

  contentItems: Ember.computed('marks', function() {
    return this.get('marks').filter(m => m.group === 'cardstack-content');
  }),

  activeContentItem: Ember.computed('contentItems', function() {
    return this.get('contentItems')[0];
  }),

  activeFields: Ember.computed('activeContentItem', 'fields', function() {
    let item = this.get('activeContentItem');
    if (item) {
      return this.get('fields').filter(f => f.model.content === item.model);
    } else {
      return [];
    }
  }),

  // Can tools be enabled at all? This affects whether we will offer a
  // launcher button
  available: true,

  // Tools are active when the user has hit the launcher button and
  // revealed the toolbars.
  active: false,

  // Which tab are we showing in the toolbox?
  activePanel: 'cs-composition-panel',
  activePanelChoices: [
    {
      id: 'cs-composition-panel',
      icon: {
        name: 'write',
        width: 13,
        height: 18
      },
    },
    {
      id: 'cardstack-library',
      icon: {
        name: 'archive',
        width: 22,
        height: 24
      }
    }
  ],

  // Are we viewing the current URL as a normal page in its own right,
  // or in one of its other forms (like a preview card)?
  previewFormat: 'page',
  previewFormatChoices: [
    {
      id: 'page',
      description: 'Page',
      icon: {
        name: 'page',
        width: 18,
        height: 24
      }
    },
    {
      id: 'cards',
      description: 'Tile',
      icon: {
        name: 'tiles',
        width: 20,
        height: 24
      }
    }
  ],

  editing: false,

  init() {
    this._super();
    let priorState;
    try {
      let item = localStorage.getItem('cardstack-tools');
      if (item) {<commit_msg>better terminology<commit_after>import Ember from 'ember';

export default Ember.Service.extend({
  overlays: Ember.inject.service('ember-overlays'),
  marks: Ember.computed.alias('overlays.marks'),

  fields: Ember.computed('marks', function() {
    return this.get('marks').filter(m => m.group === 'cardstack-fields');
  }),

  contentItems: Ember.computed('marks', function() {
    return this.get('marks').filter(m => m.group === 'cardstack-content');
  }),

  activeContentItem: Ember.computed('contentItems', function() {
    return this.get('contentItems')[0];
  }),

  activeFields: Ember.computed('activeContentItem', 'fields', function() {
    let item = this.get('activeContentItem');
    if (item) {
      return this.get('fields').filter(f => f.model.content === item.model);
    } else {
      return [];
    }
  }),

  // Can tools be enabled at all? This affects whether we will offer a
  // launcher button
  available: true,

  // Tools are active when the user has hit the launcher button and
  // revealed the toolbars.
  active: false,

  // Which tab are we showing in the toolbox?
  activePanel: 'cs-composition-panel',
  activePanelChoices: [
    {
      id: 'cs-composition-panel',
      icon: {
        name: 'write',
        width: 13,
        height: 18
      },
    },
    {
      id: 'cardstack-library',
      icon: {
        name: 'archive',
        width: 22,
        height: 24
      }
    }
  ],

  // Are we viewing the current URL as a normal page in its own right,
  // or in one of its other forms (like a preview card)?
  previewFormat: 'page',
  previewFormatChoices: [
    {
      id: 'page',
      description: 'Page',
      icon: {
        name: 'page',
        width: 18,
        height: 24
      }
    },
    {
      id: 'cards',
      description: 'Card',
      icon: {
        name: 'tiles',
        width: 20,
        height: 24
      }
    }
  ],

  editing: false,

  init() {
    this._super();
    let priorState;
    try {
      let item = localStorage.getItem('cardstack-tools');
      if (item) {
{'fraction_non_alphanumeric': 0.1458892412783606, 'fraction_numerical': 0.008294706025859966, 'mean_word_length': 2.349673202614379, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4507177', 'n_tokens_mistral': 1330, 'n_tokens_neox': 1273, 'n_words': 341}