diff --git a/agenta-web/src/components/Playground/Playground.tsx b/agenta-web/src/components/Playground/Playground.tsx index b472a6e16b..539f6cd0c2 100644 --- a/agenta-web/src/components/Playground/Playground.tsx +++ b/agenta-web/src/components/Playground/Playground.tsx @@ -244,7 +244,6 @@ const Playground: React.FC = () => { variant={variant} handlePersistVariant={handlePersistVariant} environments={environments} - onAdd={fetchData} deleteVariant={deleteVariant} onStateChange={(isDirty) => setUnsavedVariants((prev) => ({...prev, [variant.variantName]: isDirty})) diff --git a/agenta-web/src/components/Playground/ViewNavigation.tsx b/agenta-web/src/components/Playground/ViewNavigation.tsx index 30ab69fed2..a3438b84e0 100644 --- a/agenta-web/src/components/Playground/ViewNavigation.tsx +++ b/agenta-web/src/components/Playground/ViewNavigation.tsx @@ -21,7 +21,6 @@ interface Props { variant: Variant handlePersistVariant: (variantName: string) => void environments: Environment[] - onAdd: () => void deleteVariant: (deleteAction?: Function) => void getHelpers: (helpers: {save: Function; delete: Function}) => void onStateChange: (isDirty: boolean) => void @@ -42,7 +41,6 @@ const ViewNavigation: React.FC = ({ variant, handlePersistVariant, environments, - onAdd, deleteVariant, getHelpers, onStateChange, @@ -235,7 +233,6 @@ const ViewNavigation: React.FC = ({ isParamsCollapsed={isParamsCollapsed} setIsParamsCollapsed={setIsParamsCollapsed} environments={environments} - onAdd={onAdd} getHelpers={getHelpers} onStateChange={onStateChange} tabID={tabID} diff --git a/agenta-web/src/components/Playground/Views/ParametersView.tsx b/agenta-web/src/components/Playground/Views/ParametersView.tsx index 43740f3257..a24d51ed77 100644 --- a/agenta-web/src/components/Playground/Views/ParametersView.tsx +++ b/agenta-web/src/components/Playground/Views/ParametersView.tsx @@ -23,7 +23,6 @@ interface Props { isParamsCollapsed: string setIsParamsCollapsed: (value: string) => void environments: Environment[] - onAdd: () => void deleteVariant: (deleteAction?: Function) => void getHelpers: (helpers: {save: Function; delete: Function}) => void onStateChange: (isDirty: boolean) => void @@ -62,7 +61,6 @@ const ParametersView: React.FC = ({ isParamsCollapsed, setIsParamsCollapsed, environments, - onAdd, deleteVariant, getHelpers, onStateChange, @@ -96,8 +94,7 @@ const ParametersView: React.FC = ({ const onSave = () => { return new Promise((res) => { - onOptParamsChange(optParams!, true, isPersistent, (isNew: boolean) => { - if (isNew && onAdd) onAdd() + onOptParamsChange(optParams!, true, isPersistent, () => { messageApi.open({ type: "success", content: "Changes saved successfully!",