JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(memory): 修复 /memory 列表显示"1 lines"的单复数问题
openJiuwen-botd1be6aa49d67
diff --git a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/memory.ts b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/memory.tsindex fe384c4579..7a1aa4bd3a 100644--- a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/memory.ts+++ b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/memory.ts@@ -195,7 +195,7 @@ async function listMemory(ctx: import("../types.js").CommandContext): Promise<voconst items = files.map((f) => ({label: f.path,value: f.kind,- description: `${f.relative_path !== f.path ? f.relative_path + " · " : ""}${formatSize(f.size)} · ${f.lines} lines · ${formatTime(f.mtime)}`,+ description: `${f.relative_path !== f.path ? f.relative_path + " · " : ""}${formatSize(f.size)} · ${f.lines} line${f.lines <= 1 ? "" : "s"} · ${formatTime(f.mtime)}`,}));ctx.addItem(@@ -288,7 +288,7 @@ async function editMemoryInteractive(const options = allFiles.map((f) => ({label: f.relative_path,- description: `${f.kind} · ${f.lines} lines${f.exists ? "" : " (new)"}`,+ description: `${f.kind} · ${f.lines} line${f.lines <= 1 ? "" : "s"}${f.exists ? "" : " (new)"}`,details: f.relative_path !== f.path ? [f.path] : undefined,}));