From 39fb54f996baa9a701283b7db805897813c6ee56 Mon Sep 17 00:00:00 2001 From: abhimazu <mail.abhijeetmazumdar@gmail.com> Date: Wed, 5 Mar 2025 12:25:16 -0500 Subject: [PATCH] Added few comments --- src/renderer/components/Data/LocalDatasets.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/components/Data/LocalDatasets.tsx b/src/renderer/components/Data/LocalDatasets.tsx index 790fb9b7..5ccf9afe 100644 --- a/src/renderer/components/Data/LocalDatasets.tsx +++ b/src/renderer/components/Data/LocalDatasets.tsx @@ -150,19 +150,24 @@ export default function LocalDatasets() { <Input placeholder="Open-Orca/OpenOrca" name="download-dataset-name" + // Setting model_id text field to 70% of the width, as they are longer sx={{ flex: 7 }} /> <Input placeholder="Config name" name="download-config-name" + // Setting config name text field to 30% of the width, as they are folder names sx={{ flex: 3 }} /> <Button onClick={async (e) => { const dataset = document.getElementsByName('download-dataset-name')[0].value; const configName = document.getElementsByName('download-config-name')[0]?.value; + // only download if valid model is entered if (dataset) { + // this triggers UI changes while download is in progress setDownloadingDataset(dataset); + // Datasets can be very large so do this asynchronously fetch(chatAPI.Endpoints.Dataset.Download(dataset, configName)) .then((response) => { if (!response.ok) { -- GitLab