Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:agenta-ai/agenta into add-pre-commit…
Browse files Browse the repository at this point in the history
…-hook
  • Loading branch information
ashrafchowdury committed Dec 16, 2024
2 parents 1ddcf2e + 387012f commit d3dc0b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion agenta-web/src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({
justifyContent: "space-between",
flexDirection: "column",
flex: 1,
overflowY: "auto",
},
"& .ant-menu-submenu-title": {
display: "flex",
Expand All @@ -66,7 +67,6 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({
},
menuContainer: {
borderRight: "0 !important",
maxHeight: "calc(100vh - 390px)",
overflowY: "auto",
position: "relative",
"& .ant-menu-item-selected": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ type EvaluatorsProps = {
onSuccess: () => void
setEvaluatorsDisplay: any
evaluatorsDisplay: string
setSelectedEvaluatorCategory: React.Dispatch<React.SetStateAction<string>>
selectedEvaluatorCategory: string
}

const useStyles = createUseStyles((theme: JSSTheme) => ({
Expand Down Expand Up @@ -74,13 +72,12 @@ const Evaluators = ({
setCloneConfig,
setEvaluatorsDisplay,
evaluatorsDisplay,
selectedEvaluatorCategory,
setSelectedEvaluatorCategory,
}: EvaluatorsProps) => {
const classes = useStyles()
const [searchTerm, setSearchTerm] = useState("")
const evaluatorTags = getEvaluatorTags()
const evaluators = useAtom(evaluatorsAtom)[0]
const [selectedEvaluatorCategory, setSelectedEvaluatorCategory] = useState("view_all")

const updatedEvaluatorConfigs = useMemo(() => {
return evaluatorConfigs.map((config) => {
Expand Down Expand Up @@ -128,7 +125,7 @@ const Evaluators = ({
<div>
<div className="flex items-center justify-between">
<Radio.Group
defaultValue={"view_all"}
defaultValue={selectedEvaluatorCategory}
className={classes.radioBtnContainer}
onChange={(e) => setSelectedEvaluatorCategory(e.target.value)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const EvaluatorsModal = ({
"evaluator_view",
"list",
)
const [selectedEvaluatorCategory, setSelectedEvaluatorCategory] = useState("view_all")
const [selectedTestset, setSelectedTestset] = useState("")

const evalConfigFetcher = () => {
Expand Down Expand Up @@ -114,8 +113,6 @@ const EvaluatorsModal = ({
setCloneConfig={setCloneConfig}
setEvaluatorsDisplay={setEvaluatorsDisplay}
evaluatorsDisplay={evaluatorsDisplay}
selectedEvaluatorCategory={selectedEvaluatorCategory}
setSelectedEvaluatorCategory={setSelectedEvaluatorCategory}
/>
),
},
Expand All @@ -128,8 +125,6 @@ const EvaluatorsModal = ({
setSelectedEvaluator={setSelectedEvaluator}
setEvaluatorsDisplay={setEvaluatorsDisplay}
evaluatorsDisplay={evaluatorsDisplay}
selectedEvaluatorCategory={selectedEvaluatorCategory}
setSelectedEvaluatorCategory={setSelectedEvaluatorCategory}
/>
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ type NewEvaluatorProps = {
setSelectedEvaluator: React.Dispatch<React.SetStateAction<Evaluator | null>>
setEvaluatorsDisplay: any
evaluatorsDisplay: string
setSelectedEvaluatorCategory: React.Dispatch<React.SetStateAction<string>>
selectedEvaluatorCategory: string
}

const useStyles = createUseStyles((theme: JSSTheme) => ({
Expand Down Expand Up @@ -62,12 +60,11 @@ const NewEvaluator = ({
setSelectedEvaluator,
setEvaluatorsDisplay,
evaluatorsDisplay,
selectedEvaluatorCategory,
setSelectedEvaluatorCategory,
}: NewEvaluatorProps) => {
const classes = useStyles()
const [searchTerm, setSearchTerm] = useState("")
const evaluatorTags = getEvaluatorTags()
const [selectedEvaluatorCategory, setSelectedEvaluatorCategory] = useState("view_all")

const filteredEvaluators = useMemo(() => {
let filtered = evaluators
Expand Down Expand Up @@ -103,7 +100,7 @@ const NewEvaluator = ({
<div>
<div className="flex items-center justify-between">
<Radio.Group
defaultValue={"view_all"}
defaultValue={selectedEvaluatorCategory}
className={classes.radioBtnContainer}
onChange={(e) => setSelectedEvaluatorCategory(e.target.value)}
>
Expand Down

0 comments on commit d3dc0b1

Please sign in to comment.