generated from nhcarrigan/template
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:
@@ -30,15 +30,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"identifier": "fs:scope",
|
"identifier": "fs:scope",
|
||||||
"allow": [
|
"allow": [{ "path": "$HOME/.claude/**" }]
|
||||||
{ "path": "$HOME/.claude/**" }
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"identifier": "fs:allow-read-text-file",
|
"identifier": "fs:allow-read-text-file",
|
||||||
"allow": [
|
"allow": [{ "path": "$HOME/.claude/**" }]
|
||||||
{ "path": "$HOME/.claude/**" }
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"core:window:allow-set-size",
|
"core:window:allow-set-size",
|
||||||
"core:window:allow-set-always-on-top",
|
"core:window:allow-set-always-on-top",
|
||||||
|
|||||||
@@ -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 let Some(path) = input.get("file_path").and_then(|v| v.as_str()) {
|
||||||
if is_memory_path(path) {
|
if is_memory_path(path) {
|
||||||
// Extract just the filename for cleaner display
|
// 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)
|
format!("📝 Reading memory: {}", filename)
|
||||||
} else {
|
} else {
|
||||||
format!("Reading file: {}", path)
|
format!("Reading file: {}", path)
|
||||||
@@ -1541,7 +1541,7 @@ fn format_tool_description(name: &str, input: &serde_json::Value) -> String {
|
|||||||
"Edit" => {
|
"Edit" => {
|
||||||
if let Some(path) = input.get("file_path").and_then(|v| v.as_str()) {
|
if let Some(path) = input.get("file_path").and_then(|v| v.as_str()) {
|
||||||
if is_memory_path(path) {
|
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)
|
format!("💾 Updating memory: {}", filename)
|
||||||
} else {
|
} else {
|
||||||
format!("Editing: {}", path)
|
format!("Editing: {}", path)
|
||||||
@@ -1553,7 +1553,7 @@ fn format_tool_description(name: &str, input: &serde_json::Value) -> String {
|
|||||||
"Write" => {
|
"Write" => {
|
||||||
if let Some(path) = input.get("file_path").and_then(|v| v.as_str()) {
|
if let Some(path) = input.get("file_path").and_then(|v| v.as_str()) {
|
||||||
if is_memory_path(path) {
|
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)
|
format!("💾 Writing memory: {}", filename)
|
||||||
} else {
|
} else {
|
||||||
format!("Editing: {}", path)
|
format!("Editing: {}", path)
|
||||||
|
|||||||
@@ -144,12 +144,14 @@
|
|||||||
{:else if memoryFiles.length === 0}
|
{:else if memoryFiles.length === 0}
|
||||||
<div class="empty">
|
<div class="empty">
|
||||||
<p>No memory files found.</p>
|
<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>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="panel-layout">
|
<div class="panel-layout">
|
||||||
<div class="file-list">
|
<div class="file-list">
|
||||||
{#each memoryFiles as file}
|
{#each memoryFiles as file (file)}
|
||||||
<button
|
<button
|
||||||
class="file-item"
|
class="file-item"
|
||||||
class:active={selectedFile === file}
|
class:active={selectedFile === file}
|
||||||
|
|||||||
Reference in New Issue
Block a user