<commit_before>import React from 'react';
import * as fdc3 from 'openfin-fdc3';
import { FaChartLine, FaRegListAlt  } from 'react-icons/fa'
import * as PropTypes from 'prop-types';
import { Utils, Intents } from 'stockflux-core';

const handleWatchlistAddClick = (code, name) => {
  fdc3.raiseIntent('WatchlistAdd', {
    type: 'security',
    name,
    id: {
      default: code
    }
  });
};

const SearchResult = ({ code, name }) => (
  <div className="searchResult">
    <div className="name">{Utils.truncate(name)}</div>
    <div className="subtitle">{code}</div>
    <div className="containerActions">
      <button
        type="button"
        className="buttonAction"
        onClick={() => handleWatchlistAddClick(code, name)}
      >
        <FaRegListAlt className="buttonIcon"/>
      </button>
      <button
        type="button"
        className="buttonAction"
        onClick={() => Intents.viewChart(code, name)}
      >
        <FaChartLine className="buttonIcon"/>
      </button>
    </div>
  </div>
);

SearchResult.propTypes = {
  code: PropTypes.string.isRequired,
  name: PropTypes.string.isRequired<commit_msg>Add news link to launcher search results<commit_after>import React from 'react';
import * as fdc3 from 'openfin-fdc3';
import { FaChartLine, FaRegListAlt, FaNewspaper  } from 'react-icons/fa'
import * as PropTypes from 'prop-types';
import { Utils, Intents } from 'stockflux-core';

const handleWatchlistAddClick = (code, name) => {
  fdc3.raiseIntent('WatchlistAdd', {
    type: 'security',
    name,
    id: {
      default: code
    }
  });
};

const handleViewNewsClick = async (code) => {
  Intents.viewNews(code);
}

const SearchResult = ({ code, name }) => (
  <div className="searchResult">
    <div className="name">{Utils.truncate(name)}</div>
    <div className="subtitle">{code}</div>
    <div className="containerActions">
      <button
        type="button"
        className="buttonAction"
        onClick={() => handleViewNewsClick(code)}
      >
        <FaNewspaper className="buttonIcon"/>
      </button>
      <button
        type="button"
        className="buttonAction"
        onClick={() => handleWatchlistAddClick(code, name)}
      >
        <FaRegListAlt className="buttonIcon"/>
      </button>
      <button
        type="button"
        className="buttonAction"
        onClick={() => Intents.viewChart(code, name)}
      >
        <FaChartLine className="buttonIcon"/>
      </button>
    </div>
  </div>
);

SearchResult.propTypes = {
  code: PropTypes.string.isRequired,
  name: PropTypes.string.isRequired
{'fraction_non_alphanumeric': 0.14817688130333592, 'fraction_numerical': 0.0023273855702094647, 'mean_word_length': 3.113237639553429, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 44, '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': '3523898', 'n_tokens_mistral': 789, 'n_tokens_neox': 795, 'n_words': 163}