@legna-lnc/legnacode 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@
4
4
 
5
5
  All notable changes to LegnaCode CLI will be documented in this file.
6
6
 
7
+ ## [1.5.2] - 2026-04-20
8
+
9
+ ### Performance
10
+
11
+ - **Async CodeGraph** — `build()` and `walkDir()` converted from sync to async, yielding the event loop every 50 files. Added `maxDepth=10` depth limit and `visitedInodes` symlink loop protection. `save()` now uses async `writeFile`.
12
+ - **undoTracker size guard** — Added 1MB file size limit; files exceeding it skip undo snapshot recording (prevents OOM). `readFileSync` → async `readFile`.
13
+ - **Async error file pre-injection** — `extractErrorFiles` converted from `existsSync`+`readFileSync` to async `access`+`readFile`.
14
+ - **stripCode dedup** — `magicKeywords.ts` reduced `stripCode()` from 3-4 calls to 1, passing the result to all downstream functions.
15
+ - **FileMemoryProvider TTL cache** — `searchSolutions` and fallback file search now use 60s TTL cache, avoiding repeated disk reads on every prefetch.
16
+ - **OML_SESSION_GUIDANCE cache** — `attachments.ts` dynamic import cached at module level after first load.
17
+ - **frustrationHint patterns hoisted** — Regex array moved from function body to module-level constant.
18
+
19
+ ### i18n
20
+
21
+ - **Compacting status messages localized** — "Compacting context…" → "凝练上下文…", "Compacting conversation" → "精炼对话中" for Chinese users.
22
+ - **Turn completion verbs localized** — New `getTurnCompletionVerbs()` function; Chinese users see "烹制了 5s" instead of "Baked for 5s".
23
+
24
+ ### Cleanup
25
+
26
+ - Deleted dead code `src/commands/undo.ts` (was never registered in command list).
27
+ - Fixed dead conditional in `extractImports`.
28
+
7
29
  ## [1.5.1] - 2026-04-19
8
30
 
9
31
  ### Features
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **An AI-powered terminal programming assistant, supercharged.**
6
6
 
7
- [![version](https://img.shields.io/badge/version-1.5.1-blue)](./CHANGELOG.md)
7
+ [![version](https://img.shields.io/badge/version-1.5.2-blue)](./CHANGELOG.md)
8
8
  [![platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-brightgreen)](#platform-support)
9
9
  [![license](https://img.shields.io/badge/license-MIT-yellow)](./LICENSE)
10
10
  [![Claude Code](https://img.shields.io/badge/based%20on-Claude%20Code-blueviolet)](https://github.com/anthropics/claude-code)
@@ -33,6 +33,7 @@ LegnaCode is built on top of [Claude Code CLI](https://github.com/anthropics/cla
33
33
 
34
34
  | Version | Summary |
35
35
  |---------|---------|
36
+ | **1.5.2** | Perf audit: async CodeGraph, undoTracker size guard, compacting i18n, TTL caches |
36
37
  | **1.5.1** | Proactive skill invocation (OML 1% rule); auto-inject frontend/design guidelines; enhanced designer agent |
37
38
  | **1.5.0** | Fix REPL startup deadlock; remove /undo static import; all AtomCode features fully wired |
38
39
  | **1.4.9** | Baseline (no-AVX) builds for older x64 CPUs (darwin-x64-baseline, linux-x64-baseline) |
package/README.zh-CN.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **AI 驱动的终端编程助手,全面增强。**
6
6
 
7
- [![version](https://img.shields.io/badge/version-1.5.1-blue)](./CHANGELOG.zh-CN.md)
7
+ [![version](https://img.shields.io/badge/version-1.5.2-blue)](./CHANGELOG.zh-CN.md)
8
8
  [![platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-brightgreen)](#平台支持)
9
9
  [![license](https://img.shields.io/badge/license-MIT-yellow)](./LICENSE)
10
10
  [![Claude Code](https://img.shields.io/badge/based%20on-Claude%20Code-blueviolet)](https://github.com/anthropics/claude-code)
@@ -33,6 +33,7 @@ LegnaCode 基于 [Claude Code CLI](https://github.com/anthropics/claude-code)
33
33
 
34
34
  | 版本 | 摘要 |
35
35
  |------|------|
36
+ | **1.5.2** | 性能审计:CodeGraph async 化 + undoTracker 大文件保护 + 状态文案 i18n |
36
37
  | **1.5.1** | Skill 主动调用(OML 1% 规则);前端/设计指令自动注入;增强 designer agent |
37
38
  | **1.5.0** | 修复 REPL 启动死锁;移除 /undo 静态导入;AtomCode 全部特性完整接线 |
38
39
  | **1.4.9** | Baseline(无 AVX)构建,支持老款 x64 CPU(darwin-x64-baseline、linux-x64-baseline) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legna-lnc/legnacode",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "LegnaCode — legna.lnc's official CLI for coding assistance",
5
5
  "type": "module",
6
6
  "bin": {
@@ -142,13 +142,13 @@
142
142
  "bun": ">=1.2.0"
143
143
  },
144
144
  "optionalDependencies": {
145
- "@legna-lnc/legnacode-darwin-arm64": "1.5.1",
146
- "@legna-lnc/legnacode-darwin-x64": "1.5.1",
147
- "@legna-lnc/legnacode-darwin-x64-baseline": "1.5.1",
148
- "@legna-lnc/legnacode-linux-x64": "1.5.1",
149
- "@legna-lnc/legnacode-linux-x64-baseline": "1.5.1",
150
- "@legna-lnc/legnacode-linux-arm64": "1.5.1",
151
- "@legna-lnc/legnacode-win32-x64": "1.5.1",
152
- "@legna-lnc/legnacode-win32-ia32": "1.5.1"
145
+ "@legna-lnc/legnacode-darwin-arm64": "1.5.2",
146
+ "@legna-lnc/legnacode-darwin-x64": "1.5.2",
147
+ "@legna-lnc/legnacode-darwin-x64-baseline": "1.5.2",
148
+ "@legna-lnc/legnacode-linux-x64": "1.5.2",
149
+ "@legna-lnc/legnacode-linux-x64-baseline": "1.5.2",
150
+ "@legna-lnc/legnacode-linux-arm64": "1.5.2",
151
+ "@legna-lnc/legnacode-win32-x64": "1.5.2",
152
+ "@legna-lnc/legnacode-win32-ia32": "1.5.2"
153
153
  }
154
154
  }