Skip to content

Commit

Permalink
fix: run all func
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Dec 6, 2023
1 parent 68b7fa9 commit f195f7e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions agenta-web/src/components/Playground/Views/TestView.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, {useState} from "react"
import React, {useEffect, useState} from "react"
import {Button, Input, Card, Row, Col, Space} from "antd"
import {CaretRightOutlined, PlusOutlined} from "@ant-design/icons"
import {callVariant} from "@/lib/services/api"
import {ChatMessage, ChatRole, GenericObject, Parameter, Variant} from "@/lib/Types"
import {randString, removeKeys, renameVariables, safeParse} from "@/lib/helpers/utils"
import {randString, removeKeys, renameVariables} from "@/lib/helpers/utils"
import LoadTestsModal from "../LoadTestsModal"
import AddToTestSetDrawer from "../AddToTestSetDrawer/AddToTestSetDrawer"
import {DeleteOutlined} from "@ant-design/icons"
Expand Down Expand Up @@ -210,6 +210,15 @@ const App: React.FC<TestViewProps> = ({inputParams, optParams, variant, isChatVa
const [params, setParams] = useState<Record<string, string> | null>(null)
const classes = useStylesApp()

useEffect(() => {
setResultsList((prevResultsList) => {
const newResultsList = testList.map((_, index) => {
return index < prevResultsList.length ? prevResultsList[index] : ""
})
return newResultsList
})
}, [testList])

const setResultForIndex = (value: string, index: number) => {
if (isChatVariant) {
setTestList((prevState) =>
Expand Down

0 comments on commit f195f7e

Please sign in to comment.