diff --git a/src/renderer/components/Experiment/Eval/EvalJobsTable.tsx b/src/renderer/components/Experiment/Eval/EvalJobsTable.tsx index ecd65e24e7afd69d8766e174569f4632b6088bc2..1e9413c64e330feae42b50f3d4b21ba173a1a545 100644 --- a/src/renderer/components/Experiment/Eval/EvalJobsTable.tsx +++ b/src/renderer/components/Experiment/Eval/EvalJobsTable.tsx @@ -1,12 +1,14 @@ import { Box, Button, + IconButton, ButtonGroup, Chip, Sheet, Table, Typography, } from '@mui/joy'; +import { Trash2Icon } from 'lucide-react'; import { useState, useEffect } from 'react'; import useSWR from 'swr'; import * as chatAPI from '../../../lib/transformerlab-api-sdk'; @@ -31,6 +33,7 @@ function RenderScore({ score }) { return <Chip color="danger">Failed</Chip>; } + let scoreArray = []; try { scoreArray = JSON.parse(score); @@ -127,6 +130,16 @@ const EvalJobsTable = () => { > View Output </Button> + <IconButton variant="plain"> + <Trash2Icon + onClick={async () => { + await fetch( + chatAPI.Endpoints.Jobs.Delete(job?.id) + ); + jobsMutate(); + }} + /> + </IconButton> </ButtonGroup> </td> </tr>