<commit_before>import React from 'react';
import {EOL} from 'os';
import ReplCommon from '../common/ReplCommon';
import ReplConstants from '../constants/ReplConstants';

export default class ReplEntryMessage extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    let shortEntry;
    if(this.props.commandCollapse) {
      let lines = this.props.message.plainCode.trim().split(EOL);
      if(lines.length && lines[0].length > ReplConstants.COMMAND_TRUNCATE_LENGTH){
        shortEntry = ReplCommon.highlight(lines[0].slice(0, ReplConstants.COMMAND_TRUNCATE_LENGTH));        
      }
    }
    return (
      <div className='repl-entry-message'>
        {
          this.props.commandCollapse && shortEntry
            ? <pre key="short" className='repl-entry-message-command ellipsis'<commit_msg>:bug: command collapse bug fix<commit_after>import React from 'react';
import {EOL} from 'os';
import ReplCommon from '../common/ReplCommon';
import ReplConstants from '../constants/ReplConstants';

export default class ReplEntryMessage extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    let shortEntry;
    if(this.props.commandCollapse) {
      let lines = this.props.message.plainCode.trim().split(EOL);
      if(lines.length > 1 || lines[0].length > ReplConstants.COMMAND_TRUNCATE_LENGTH){
        shortEntry = ReplCommon.highlight(lines[0].slice(0, ReplConstants.COMMAND_TRUNCATE_LENGTH));
      }
    }
    return (
      <div className='repl-entry-message'>
        {
          this.props.commandCollapse && shortEntry
            ? <pre key="short" className='repl-entry-message-command ellipsis'
{'fraction_non_alphanumeric': 0.12507480550568523, 'fraction_numerical': 0.004189108318372232, 'mean_word_length': 3.482573726541555, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '5903741', 'n_tokens_mistral': 504, 'n_tokens_neox': 500, 'n_words': 96}