diff --git a/src/interface/web/app/agents/page.tsx b/src/interface/web/app/agents/page.tsx index fef3e932..6b38ccbd 100644 --- a/src/interface/web/app/agents/page.tsx +++ b/src/interface/web/app/agents/page.tsx @@ -246,7 +246,6 @@ function AgentCard(props: AgentCardProps) { body: JSON.stringify(values), }) .then((response) => { - console.log(response); if (response.status === 200) { form.reset(); setShowModal(false); @@ -660,6 +659,8 @@ function AgentModificationForm(props: AgentModificationFormProps) { const [uploading, setUploading] = useState(false); const [progressValue, setProgressValue] = useState(0); const [uploadedFiles, setUploadedFiles] = useState([]); + const [allFileOptions, setAllFileOptions] = useState(props.filesOptions); + const fileInputRef = useRef(null); useEffect(() => { @@ -682,6 +683,7 @@ function AgentModificationForm(props: AgentModificationFormProps) { useEffect(() => { if (uploadedFiles.length > 0) { handleAgentFileChange(uploadedFiles); + setAllFileOptions((prev) => [...prev, ...uploadedFiles]); } }, [uploadedFiles]); @@ -1028,7 +1030,7 @@ function AgentModificationForm(props: AgentModificationFormProps) { No files found. - {props.filesOptions.map((file) => ( + {allFileOptions.map((file) => ( ) => { - console.log(JSON.stringify(values)); - let agentsApiUrl = `/api/agents`; fetch(agentsApiUrl, {