<commit_before>import React, { Fragment } from 'react'
import { Badge, UncontrolledButtonDropdown, DropdownToggle, DropdownItem, DropdownMenu } from 'reactstrap'
import { AccessControl } from '../../../App/AccessControl'
import { Link } from 'react-router-dom'

export default ({ bot, requestStageChange, deleteBot, exportBot, permissions, allowPromotion }) => (
  <div className="bp_table-row" key={bot.id}>
    <div className="actions">
      <UncontrolledButtonDropdown>
        <DropdownToggle caret size="sm" outline color="primary">
          Actions
        </DropdownToggle>
        <DropdownMenu>
          <DropdownItem tag="a" target="_blank" href={`${window.location.origin}/s/${bot.id}`}>
            Open chat
          </DropdownItem>
          <DropdownItem tag="a" href={`/studio/${bot.id}`}>
            Edit
          </DropdownItem>
          <AccessControl permissions={permissions} resource="admin.bots.*" operation="write">
            <DropdownItem onClick={exportBot}>Export</DropdownItem>
            {allowPromotion && <DropdownItem onClick={requestStageChange}>Promote to next stage</DropdownItem>}
            <DropdownItem onClick={deleteBot}>Delete</DropdownItem>
          </AccessControl>
        </DropdownMenu>
      </UncontrolledButtonDropdown>
    </div>
    <div className="title">
      {bot.disabled ? (
        <Fragment>
          <span>{bot.name}</span>
          <Badge color="danger" style={{ marginLeft: 10, fontSize: '60%' }}>
            disabled
          </Badge>
        </Fragment>
      ) : (
        <Fragment>
          <Link to={`/studio/${bot.id}`}>{bot.name}</Link>
          {bot.private && (<commit_msg>added some icons to improve readability<commit_after>import React, { Fragment } from 'react'
import { Badge, UncontrolledButtonDropdown, DropdownToggle, DropdownItem, DropdownMenu } from 'reactstrap'
import { AccessControl } from '../../../App/AccessControl'
import { Link } from 'react-router-dom'
import { IoIosChatbubble } from 'react-icons/lib/io'
import { MdModeEdit, MdArchive, MdDelete, MdSkipNext } from 'react-icons/lib/md'
import { FaCog } from 'react-icons/lib/fa'

export default ({ bot, requestStageChange, deleteBot, exportBot, permissions, allowStageChange }) => (
  <div className="pipeline_bot" key={bot.id}>
    <div className="actions">
      <UncontrolledButtonDropdown>
        <DropdownToggle caret size="sm" outline color="primary">
          Actions
        </DropdownToggle>
        <DropdownMenu>
          <DropdownItem tag="a" target="_blank" href={`${window.location.origin}/s/${bot.id}`}>
            <IoIosChatbubble /> &nbsp;Open chat
          </DropdownItem>
          <DropdownItem tag={Link} to={`/studio/${bot.id}`}>
            <MdModeEdit />
            &nbsp;Edit in studio
          </DropdownItem>
          <DropdownItem tag="a" href={`/admin/bot/${bot.id}/details`}>
            <FaCog />
            &nbsp;Configs
          </DropdownItem>
          <AccessControl permissions={permissions} resource="admin.bots.*" operation="write">
            <DropdownItem onClick={exportBot}>
              <MdArchive />
              &nbsp;Export
            </DropdownItem>
            {allowStageChange && (
              <DropdownItem onClick={requestStageChange}>
                <MdSkipNext />
                &nbsp;Promote to next stage
              </DropdownItem>
            )}
            <DropdownItem onClick={deleteBot}>
              <MdDelete />
              &nbsp;Delete
            </DropdownItem>
          </AccessControl>
        </DropdownMenu>
      </UncontrolledButtonDropdown>
    </div>
    <div className="title">
      {bot.disabled ? (
        <Fragment>
          <span>{bot.name}</span>
          <Badge color="danger" style={{ marginLeft: 10, fontSize: '60%' }}>
            disabled
          </Badge>
        </Fragment>
      ) : (
        <Fragment>
          <Link to={`/studio/${bot.id}`}>{bot.name}</Link>
          {bot.private && (
{'fraction_non_alphanumeric': 0.14400805639476336, 'fraction_numerical': 0.002014098690835851, 'mean_word_length': 2.3957264957264957, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 75, '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': '7052207', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1131, 'n_words': 223}