<commit_before>import _ from 'underscore';

export function RESET_STATE(state) {
  Object.assign(state, {
    nodes: [],
    selectedIndices: [],
  });
}

export function SET_NODES(state, nodes) {
  _.each(nodes, node => {
    node.changed = true;
  });
  state.nodes = nodes;
  state.selectedIndices = [0]; // TODO: remove
}

export function RESET_SELECTED(state) {
  state.selectedIndices = [];
}

export function SELECT_NODE(state, index) {
  state.selectedIndices.push(index);
}

export function DESELECT_NODE(state, index) {
  state.selectedIndices = _.reject(state.selectedIndices, i => {
    return i === index;<commit_msg>Don't automatically select a node<commit_after>import _ from 'underscore';

export function RESET_STATE(state) {
  Object.assign(state, {
    nodes: [],
    selectedIndices: [],
  });
}

export function SET_NODES(state, nodes) {
  _.each(nodes, node => {
    node.changed = true;
  });
  state.nodes = nodes;
}

export function RESET_SELECTED(state) {
  state.selectedIndices = [];
}

export function SELECT_NODE(state, index) {
  state.selectedIndices.push(index);
}

export function DESELECT_NODE(state, index) {
  state.selectedIndices = _.reject(state.selectedIndices, i => {
    return i === index;
{'fraction_non_alphanumeric': 0.1386861313868613, 'fraction_numerical': 0.0008110300081103001, 'mean_word_length': 4.273504273504273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2280402', 'n_tokens_mistral': 395, 'n_tokens_neox': 403, 'n_words': 83}