From a73bda919fe0d987e122afaae17ce64c5780f1ab Mon Sep 17 00:00:00 2001 From: dezoito Date: Sun, 20 Oct 2024 17:00:18 -0300 Subject: [PATCH 1/5] When deleting all experiment log files, limit deletion to JSON files only --- src-tauri/src/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index 32c1580..c3b3a01 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -242,11 +242,11 @@ pub fn delete_experiment_files( .ok_or_else(|| "Failed to get application data directory".to_string())?; if file_name == "*" { - // Delete all files in the directory + // Delete all JSON files in the directory for entry in fs::read_dir(&app_data_dir).map_err(|e| e.to_string())? { let entry = entry.map_err(|e| e.to_string())?; let path = entry.path(); - if path.is_file() { + if path.is_file() && path.extension().map(|e| e == "json").unwrap_or(false) { fs::remove_file(path).map_err(|e| e.to_string())?; } } From fad0f7b70c966aadf1c68ab4a12bf21b64617fe0 Mon Sep 17 00:00:00 2001 From: dezoito Date: Mon, 21 Oct 2024 20:34:31 -0300 Subject: [PATCH 2/5] Minor UI tweaks --- src/components/results/iteration-result.tsx | 17 ++++++++++++++--- src/components/ui/collapsible-text.tsx | 7 +++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/components/results/iteration-result.tsx b/src/components/results/iteration-result.tsx index e291789..d9c975d 100644 --- a/src/components/results/iteration-result.tsx +++ b/src/components/results/iteration-result.tsx @@ -102,11 +102,20 @@ export default function IterationResult(props: IProps) {
mirostat eta: {mirostat_eta}
- prompt: + prompt:{" "} +
system prompt:{" "} - +
@@ -131,9 +140,10 @@ export default function IterationResult(props: IProps) { {/* results metadata */} {query.data && ( -
+
{/* copy text to clipboard */}