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 <hikari@nhcarrigan.com>
This commit is contained in:
2026-02-07 12:11:14 -08:00
committed by Naomi Carrigan
parent 89e99b1524
commit e397435dbe
3 changed files with 9 additions and 11 deletions
+2 -6
View File
@@ -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",
+3 -3
View File
@@ -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)
+4 -2
View File
@@ -144,12 +144,14 @@
{:else if memoryFiles.length === 0}
<div class="empty">
<p>No memory files found.</p>
<p class="hint">Memory files are created automatically as I learn from our conversations!</p>
<p class="hint">
Memory files are created automatically as I learn from our conversations!
</p>
</div>
{:else}
<div class="panel-layout">
<div class="file-list">
{#each memoryFiles as file}
{#each memoryFiles as file (file)}
<button
class="file-item"
class:active={selectedFile === file}