dsh-codearts 1.4.7 → 1.4.9
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 +39 -0
- package/README.en.md +9 -0
- package/README.md +7 -0
- package/lib/{auth-BRlNY6dB.mjs → auth-BaxN0iKC.mjs} +1 -1
- package/lib/bin.mjs +3 -3
- package/lib/client/index.d.cts +8 -0
- package/lib/client/index.js +466 -116
- package/lib/index.d.mts +92 -3
- package/lib/index.mjs +373 -29
- package/lib/keeper-main.mjs +1 -1
- package/lib/{upstream-CgQXomCI.mjs → upstream-BX6-klXI.mjs} +137 -9
- package/lib/{version-DNEBIi8C.mjs → version-1elDzsw0.mjs} +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,45 @@
|
|
|
3
3
|
本文件记录本插件的重要改动。格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),
|
|
4
4
|
版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
5
5
|
|
|
6
|
+
## [1.4.9] - 2026-11-23
|
|
7
|
+
|
|
8
|
+
### 新增
|
|
9
|
+
|
|
10
|
+
- `llm-codearts.config.maxTokensOverrides`:按模型覆盖单次输出上限(#15)。企业
|
|
11
|
+
自定义模型实测能到 128K,而插件全局上限是 65536(对福利模型实测的保守值);
|
|
12
|
+
覆盖值现在**直接作为该模型的天花板**,可越过那道墙。卡片弹层里加了「输出上限」
|
|
13
|
+
滑块 + 数字框,清空或填回上游声明值 = 跟随上游;设过头的值仍由「400 → 折半
|
|
14
|
+
重发」的降档机制自愈,无需额外防护。
|
|
15
|
+
- `llm-codearts.config.maxConcurrentPerAccount`:没单独设置过的账号用的并发上限
|
|
16
|
+
(#16),默认 2(上游个人档 3 个会话、留 1 个给 CodeArts 网页端)。
|
|
17
|
+
- `llm-codearts.config.maxConcurrentOverrides`:按账号覆盖并发上限(账号 id → 槽位数,
|
|
18
|
+
#16)。上游配额按账号算 —— 一个号个人档、另一个企业档是常态,覆盖后互不影响;
|
|
19
|
+
卡片上每张账号卡各有一个「并发 −/+」,点一下只改那个号,立即生效,不用改文件。
|
|
20
|
+
|
|
21
|
+
### 修复
|
|
22
|
+
|
|
23
|
+
- **窗口覆盖现在真的能清掉了**(#17):设覆盖时把上游标称值一起记下,清除时恢复它;
|
|
24
|
+
清除改用 `settings.mutate` + `unset` 删配置键 —— 之前用深合并写「过滤后的整表」,
|
|
25
|
+
键留在 `cordis.patch.yml` 里,重启后覆盖照常生效,用户以为清了其实没清。修复前
|
|
26
|
+
已经丢了原值的条目,清除时摘掉信任标记,让下一轮发现把上游值带回来。
|
|
27
|
+
- 弹层提示语与实现对齐:拖动立即生效,输入后按回车或收起弹层生效(之前写的是
|
|
28
|
+
「输入后立即生效」,与「收起才提交」的实现不符)。
|
|
29
|
+
|
|
30
|
+
## [1.4.8] - 2026-11-20
|
|
31
|
+
|
|
32
|
+
### 新增
|
|
33
|
+
|
|
34
|
+
- `llm-codearts.config.retryPolicy`:可按需覆盖 `maxRetries` / `initialDelayMs` /
|
|
35
|
+
`maxDelayMs`。策略在注册 provider 时被宿主快照,改完需要重载插件才生效。
|
|
36
|
+
|
|
37
|
+
### 修复
|
|
38
|
+
|
|
39
|
+
- **重试预算跨得过账号冷却窗了**(#14):软限流 / 5xx 后账号会被冷却 30 秒,期间
|
|
40
|
+
请求回 429 交给宿主重试;而宿主默认预算(5 次指数退避,累计约 15.5 秒)在冷却
|
|
41
|
+
前段**确定性地**烧尽,变成可见的轮次失败。现在 provider 注册的重试策略默认对齐
|
|
42
|
+
到 8 次(0.5+1+2+4+8+10+10+10 ≈45.5 秒,含抖动下限也稳过 30 秒)。
|
|
43
|
+
代价:持续性故障的暴露时间从约 15.5 秒变约 45.5 秒。
|
|
44
|
+
|
|
6
45
|
## [1.4.7] - 2026-11-20
|
|
7
46
|
|
|
8
47
|
### 修复
|
package/README.en.md
CHANGED
|
@@ -142,6 +142,15 @@ other local processes cannot impersonate it.
|
|
|
142
142
|
`max_tokens` is already at the 8192 floor and upstream still rejects the request, the plugin
|
|
143
143
|
records this request’s prompt estimate as that model’s upper bound (in-process, tighten-only),
|
|
144
144
|
so the next round is blocked locally with a `/compact` or new-session hint.
|
|
145
|
+
- **Output limit** is overridable per model too (issue #15): enterprise custom models were
|
|
146
|
+
measured at 131072, while the conservative global cap is 65536. Set that model’s ceiling with
|
|
147
|
+
`maxTokensOverrides`, e.g. `{ "my-enterprise-model": 131072 }` (the card popover has an
|
|
148
|
+
“Output limit” slider as well). Values that are too high self-heal via the 400 → halve retry.
|
|
149
|
+
- **Concurrency**: each account has its own in-flight cap, default 2 (the free tier allows
|
|
150
|
+
3 sessions, leaving one for the CodeArts web console). Enterprise plans were measured at 5 —
|
|
151
|
+
raise just that account with the −/+ stepper inside its card; changes apply immediately and
|
|
152
|
+
only affect that account. Config keys: `maxConcurrentOverrides` (per account) and
|
|
153
|
+
`maxConcurrentPerAccount` (the default).
|
|
145
154
|
- The usage ledger counts only requests **this machine sent through the plugin**, so its
|
|
146
155
|
numbers are not an account total; the card links to the official page. The ledger keeps
|
|
147
156
|
60 days and is lost when you move machines or clear `$DSH_HOME`.
|
package/README.md
CHANGED
|
@@ -105,6 +105,13 @@ shim 只监听回环地址,并校验 Host、Origin 与本进程随机密钥,
|
|
|
105
105
|
`{ "deepseek-v4.1-flash-1017": 491520, "glm-5.3-flash": 774000 }`。此外,当
|
|
106
106
|
`max_tokens` 已降到 8192 地板仍被判参数非法时,插件会把本次 prompt 估算记为该模型的
|
|
107
107
|
上界(进程内、只收紧不放宽),下一轮直接在本地拦下并提示 `/compact` 或新建会话。
|
|
108
|
+
- **输出上限**也能按模型纠正(issue #15):企业自定义模型实测可到 131072,而全局保守上限
|
|
109
|
+
是 65536。用 `maxTokensOverrides` 设该模型的天花板,例:`{ "my-enterprise-model": 131072 }`
|
|
110
|
+
(卡片弹层里也有「输出上限」滑块)。设过头的值由「400 → 折半重发」自动降档兜住。
|
|
111
|
+
- **并发**:每个账号有自己的在飞请求上限,默认 2(上游个人免费档 3 个会话、留 1 个给
|
|
112
|
+
CodeArts 网页端)。企业档实测上限 5,可以把那个号调到 5 —— 卡片上每张账号卡里都有
|
|
113
|
+
「并发 −/+」,点一下立即生效、只影响该号;配置里对应 `maxConcurrentOverrides`
|
|
114
|
+
(按账号覆盖)与 `maxConcurrentPerAccount`(默认值)。
|
|
108
115
|
- 用量账本只统计**本机经插件发出**的请求,不等于账号总额度;额度/积分以卡片上的账号余额为准,
|
|
109
116
|
官方明细走卡片里的链接。账本按天保留 60 天,换机器/清 `$DSH_HOME` 即丢失。
|
|
110
117
|
- 文档:README 与 INSTALL 有英文版([README.en.md](./README.en.md) / [INSTALL.en.md](./INSTALL.en.md)),
|
|
@@ -584,7 +584,7 @@ async function clearCredential(path) {
|
|
|
584
584
|
async function claimIfPossible(cred) {
|
|
585
585
|
if (!cred.accessKeyId || !cred.secretAccessKey) return;
|
|
586
586
|
try {
|
|
587
|
-
const { claimBenefit } = await import("./upstream-
|
|
587
|
+
const { claimBenefit } = await import("./upstream-BX6-klXI.mjs").then((n) => n.L);
|
|
588
588
|
await claimBenefit({
|
|
589
589
|
token: cred.token,
|
|
590
590
|
accessKeyId: cred.accessKeyId,
|
package/lib/bin.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as codeartsAccountsPath, t as CodeArtsAccountStore } from "./auth-
|
|
3
|
-
import {
|
|
4
|
-
import { i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-
|
|
2
|
+
import { i as codeartsAccountsPath, t as CodeArtsAccountStore } from "./auth-BaxN0iKC.mjs";
|
|
3
|
+
import { K as isBenefitModel, l as fetchCallerIdentity } from "./upstream-BX6-klXI.mjs";
|
|
4
|
+
import { i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-1elDzsw0.mjs";
|
|
5
5
|
import { existsSync, statSync } from "node:fs";
|
|
6
6
|
//#region src/bin.ts
|
|
7
7
|
/**
|
package/lib/client/index.d.cts
CHANGED
|
@@ -109,6 +109,14 @@ interface CodeArtsSettingsKey {
|
|
|
109
109
|
modelWindowHeading: string;
|
|
110
110
|
modelWindowFollow: string;
|
|
111
111
|
modelWindowHint: string;
|
|
112
|
+
modelOutputLabel: string;
|
|
113
|
+
modelOutputHeading: string;
|
|
114
|
+
modelOutputHint: string;
|
|
115
|
+
concurrencyLabel: string;
|
|
116
|
+
concurrencyLess: string;
|
|
117
|
+
concurrencyMore: string;
|
|
118
|
+
concurrencyHint: string;
|
|
119
|
+
concurrencyShortHint: string;
|
|
112
120
|
/** 账号暂停/置顶。 */
|
|
113
121
|
accountPaused: string;
|
|
114
122
|
accountPinned: string;
|