From d291821bf39f939c7170be7506a1da8633e42a2c Mon Sep 17 00:00:00 2001 From: Anuraag Jain Date: Sat, 23 Mar 2024 20:56:18 +0200 Subject: [PATCH] refac: delete button UI --- .gitignore | 2 +- .../components/chat/Settings/Models.svelte | 24 ++++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 528e1f8..2ccac4d 100644 --- a/.gitignore +++ b/.gitignore @@ -166,7 +166,7 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +.idea/ # Logs logs diff --git a/src/lib/components/chat/Settings/Models.svelte b/src/lib/components/chat/Settings/Models.svelte index 973e3dd..35386e1 100644 --- a/src/lib/components/chat/Settings/Models.svelte +++ b/src/lib/components/chat/Settings/Models.svelte @@ -473,8 +473,10 @@ const {reader} = modelDownloadStatus[model]; if(reader){ await reader.cancel(); - toast.success(`${model} download has been canceled`); delete modelDownloadStatus[model]; + await deleteModel(localStorage.token, model); + toast.success(`${model} download has been canceled`); + } } @@ -611,6 +613,7 @@
{model}
+
+
{modelDownloadStatus[model].digest}