From e397435dbe7efcee3005c7e849b08884c99b355d Mon Sep 17 00:00:00 2001 From: Hikari Date: Sat, 7 Feb 2026 12:11:14 -0800 Subject: [PATCH] fix: resolve linting issues in memory system - Add key to #each block in MemoryBrowserPanel (ESLint) - Replace .last() with .next_back() for better performance (Clippy) - Format files with Prettier Co-Authored-By: Hikari --- src-tauri/capabilities/default.json | 8 ++------ src-tauri/src/wsl_bridge.rs | 6 +++--- src/lib/components/MemoryBrowserPanel.svelte | 6 ++++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 70e8b60..e34363d 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -30,15 +30,11 @@ }, { "identifier": "fs:scope", - "allow": [ - { "path": "$HOME/.claude/**" } - ] + "allow": [{ "path": "$HOME/.claude/**" }] }, { "identifier": "fs:allow-read-text-file", - "allow": [ - { "path": "$HOME/.claude/**" } - ] + "allow": [{ "path": "$HOME/.claude/**" }] }, "core:window:allow-set-size", "core:window:allow-set-always-on-top", diff --git a/src-tauri/src/wsl_bridge.rs b/src-tauri/src/wsl_bridge.rs index bf0f3de..dac8689 100644 --- a/src-tauri/src/wsl_bridge.rs +++ b/src-tauri/src/wsl_bridge.rs @@ -1515,7 +1515,7 @@ fn format_tool_description(name: &str, input: &serde_json::Value) -> String { if let Some(path) = input.get("file_path").and_then(|v| v.as_str()) { if is_memory_path(path) { // Extract just the filename for cleaner display - let filename = path.split('/').last().unwrap_or(path); + let filename = path.split('/').next_back().unwrap_or(path); format!("📝 Reading memory: {}", filename) } else { format!("Reading file: {}", path) @@ -1541,7 +1541,7 @@ fn format_tool_description(name: &str, input: &serde_json::Value) -> String { "Edit" => { if let Some(path) = input.get("file_path").and_then(|v| v.as_str()) { if is_memory_path(path) { - let filename = path.split('/').last().unwrap_or(path); + let filename = path.split('/').next_back().unwrap_or(path); format!("💾 Updating memory: {}", filename) } else { format!("Editing: {}", path) @@ -1553,7 +1553,7 @@ fn format_tool_description(name: &str, input: &serde_json::Value) -> String { "Write" => { if let Some(path) = input.get("file_path").and_then(|v| v.as_str()) { if is_memory_path(path) { - let filename = path.split('/').last().unwrap_or(path); + let filename = path.split('/').next_back().unwrap_or(path); format!("💾 Writing memory: {}", filename) } else { format!("Editing: {}", path) diff --git a/src/lib/components/MemoryBrowserPanel.svelte b/src/lib/components/MemoryBrowserPanel.svelte index 1e19400..d500325 100644 --- a/src/lib/components/MemoryBrowserPanel.svelte +++ b/src/lib/components/MemoryBrowserPanel.svelte @@ -144,12 +144,14 @@ {:else if memoryFiles.length === 0}

No memory files found.

-

Memory files are created automatically as I learn from our conversations!

+

+ Memory files are created automatically as I learn from our conversations! +

{:else}
- {#each memoryFiles as file} + {#each memoryFiles as file (file)}