@legna-lnc/legnacode 1.2.0 → 1.2.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 +26 -0
- package/README.md +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to LegnaCode CLI will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.2.1] - 2026-04-04
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
|
|
9
|
+
- **模型适配器层 (Model Adapter Layer)** — 统一的第三方模型兼容框架,自动检测模型/端点并应用对应变换
|
|
10
|
+
- **MiMo (Xiaomi) 适配器** — api.xiaomimimo.com/anthropic,支持 mimo-v2-pro/omni/flash (1M ctx)
|
|
11
|
+
- simplifyThinking + forceAutoToolChoice + normalizeTools + stripBetas + injectTopP(0.95) + stripCacheControl
|
|
12
|
+
- 处理 content_filter / repetition_truncation stop_reason
|
|
13
|
+
- **GLM (ZhipuAI) 适配器** — open.bigmodel.cn/api/anthropic,支持 glm-5.1/5/5-turbo/4.7/4.6/4.5 等
|
|
14
|
+
- 标准变换全套,服务端自动缓存(strip cache_control)
|
|
15
|
+
- **DeepSeek 适配器** — api.deepseek.com/anthropic,支持 deepseek-chat/coder/reasoner
|
|
16
|
+
- stripReasoningContent 避免 400 错误,reasoner 模型自动 strip temperature/top_p
|
|
17
|
+
- **Kimi (Moonshot) 适配器** — api.moonshot.ai/anthropic,支持 kimi-k2/k2.5/k2-turbo 等
|
|
18
|
+
- 保留 cache_control(Kimi 支持 prompt caching 折扣),stripReasoningContent
|
|
19
|
+
- **MiniMax 适配器** — api.minimaxi.com/anthropic (中国区) + api.minimax.io/anthropic (国际区)
|
|
20
|
+
- 支持 MiniMax-M2.7/M2.5/M2.1/M2 全系列 (204K ctx),大小写不敏感匹配
|
|
21
|
+
- 深度兼容:保留 metadata、tool_choice、cache_control、top_p(其他适配器均需 strip/force)
|
|
22
|
+
- 仅需 simplifyThinking + normalizeTools + stripBetas + stripUnsupportedFieldsKeepMetadata
|
|
23
|
+
|
|
24
|
+
### Architecture
|
|
25
|
+
|
|
26
|
+
- `src/utils/model/adapters/index.ts` — 适配器注册表 + match/transform 调度
|
|
27
|
+
- `src/utils/model/adapters/shared.ts` — 12 个共享变换函数(含新增 stripUnsupportedFieldsKeepMetadata)
|
|
28
|
+
- `src/utils/model/adapters/{mimo,glm,deepseek,kimi,minimax}.ts` — 5 个提供商适配器
|
|
29
|
+
- `src/services/api/claude.ts` — paramsFromContext() 末尾调用 applyModelAdapter()
|
|
30
|
+
|
|
5
31
|
## [1.2.0] - 2026-04-03
|
|
6
32
|
|
|
7
33
|
### New Features
|
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ LegnaCode 是一个基于 Anthropic Claude 的智能终端编程助手,让你
|
|
|
12
12
|
|
|
13
13
|
| 版本 | 日期 | 摘要 |
|
|
14
14
|
|------|------|------|
|
|
15
|
+
| [1.2.1](./CHANGELOG.md#121---2026-04-04) | 2026-04-04 | 模型适配器层:MiMo、GLM、DeepSeek、Kimi、MiniMax 五大提供商深度兼容 |
|
|
15
16
|
| [1.2.0](./CHANGELOG.md#120---2026-04-03) | 2026-04-03 | 会话按项目分组、resume 带 cd、迁移支持会话记录、Windows 原生编译 |
|
|
16
17
|
| [1.1.9](./CHANGELOG.md#119---2026-04-03) | 2026-04-03 | postinstall 自动安装平台包,修复 Windows/镜像源 optionalDependencies 失效 |
|
|
17
18
|
| [1.1.8](./CHANGELOG.md#118---2026-04-03) | 2026-04-03 | bin wrapper 自动安装缺失平台包,修复 Windows npm 全局安装问题 |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legna-lnc/legnacode",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.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.2.
|
|
146
|
-
"@legna-lnc/legnacode-darwin-x64": "1.2.
|
|
147
|
-
"@legna-lnc/legnacode-linux-x64": "1.2.
|
|
148
|
-
"@legna-lnc/legnacode-linux-arm64": "1.2.
|
|
149
|
-
"@legna-lnc/legnacode-win32-x64": "1.2.
|
|
145
|
+
"@legna-lnc/legnacode-darwin-arm64": "1.2.1",
|
|
146
|
+
"@legna-lnc/legnacode-darwin-x64": "1.2.1",
|
|
147
|
+
"@legna-lnc/legnacode-linux-x64": "1.2.1",
|
|
148
|
+
"@legna-lnc/legnacode-linux-arm64": "1.2.1",
|
|
149
|
+
"@legna-lnc/legnacode-win32-x64": "1.2.1"
|
|
150
150
|
}
|
|
151
151
|
}
|