@legna-lnc/legnacode 1.3.0 → 1.3.1

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
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to LegnaCode CLI will be documented in this file.
4
4
 
5
+ ## [1.3.1] - 2026-04-06
6
+
7
+ ### Bug Fixes
8
+
9
+ - **Snip 感知 context window** — 1M 模型不再被过早 snip,`KEEP_RECENT` 从硬编码 10 改为动态计算(1M: 200, 500K: 100, 200K: 10)
10
+ - **Snip nudge 频率** — 1M 模型 nudge 阈值从 20 条提升到 100 条
11
+ - **branch 命令品牌名** — `/branch` 后的 resume 提示从 `claude -r` 改为 `legna -r`
12
+ - **admin 版本号 fallback** — 从源码运行时显示正确版本号
13
+
14
+ ### Architecture
15
+
16
+ - `src/services/compact/snipCompact.ts` — 新增 `getSnipThresholds(model)` 动态阈值函数,`snipCompactIfNeeded` 和 `shouldNudgeForSnips` 增加 model 参数
17
+ - `src/query.ts` / `src/QueryEngine.ts` / `src/commands/force-snip-impl.ts` — 传入 model 参数
18
+
5
19
  ## [1.3.0] - 2026-04-04
6
20
 
7
21
  ### New Features
package/README.md CHANGED
@@ -12,6 +12,7 @@ LegnaCode 是一个基于 Anthropic Claude 的智能终端编程助手,让你
12
12
 
13
13
  | 版本 | 日期 | 摘要 |
14
14
  |------|------|------|
15
+ | [1.3.1](./CHANGELOG.md#131---2026-04-06) | 2026-04-06 | 修复 1M 模型被过早 snip 的问题,snip 阈值感知 context window 大小 |
15
16
  | [1.3.0](./CHANGELOG.md#130---2026-04-04) | 2026-04-04 | 项目本地化存储:会话/skills/memory/rules 下沉到 `<project>/.legna/`,全局迁移 `~/.claude/` → `~/.legna/`,`legna migrate` 命令 |
16
17
  | [1.2.1](./CHANGELOG.md#121---2026-04-04) | 2026-04-04 | 模型适配器层:MiMo、GLM、DeepSeek、Kimi、MiniMax 五大提供商深度兼容 |
17
18
  | [1.2.0](./CHANGELOG.md#120---2026-04-03) | 2026-04-03 | 会话按项目分组、resume 带 cd、迁移支持会话记录、Windows 原生编译 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legna-lnc/legnacode",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "LegnaCode — legna.lnc's official CLI for coding assistance",
5
5
  "type": "module",
6
6
  "bin": {
@@ -142,10 +142,10 @@
142
142
  "bun": ">=1.2.0"
143
143
  },
144
144
  "optionalDependencies": {
145
- "@legna-lnc/legnacode-darwin-arm64": "1.3.0",
146
- "@legna-lnc/legnacode-darwin-x64": "1.3.0",
147
- "@legna-lnc/legnacode-linux-x64": "1.3.0",
148
- "@legna-lnc/legnacode-linux-arm64": "1.3.0",
149
- "@legna-lnc/legnacode-win32-x64": "1.3.0"
145
+ "@legna-lnc/legnacode-darwin-arm64": "1.3.1",
146
+ "@legna-lnc/legnacode-darwin-x64": "1.3.1",
147
+ "@legna-lnc/legnacode-linux-x64": "1.3.1",
148
+ "@legna-lnc/legnacode-linux-arm64": "1.3.1",
149
+ "@legna-lnc/legnacode-win32-x64": "1.3.1"
150
150
  }
151
151
  }