dsh-codearts 1.4.12 → 1.4.14

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
@@ -3,6 +3,37 @@
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.14] - 2026-11-26
7
+
8
+ ### 修复
9
+
10
+ - **带图请求必失败**(#21):`REQUEST_IMAGE_BUDGETS` 是手搓的 resolved profile,漏了
11
+ 宿主 0.2.3 起用来算字节预算的 `requestImageBudgetCount`;除法得到 NaN,`NaN < 1`
12
+ 绕过宿主自检,请求在附件层抛 `INVALID_ATTACHMENT_REF`。补上该字段(取 4:6 MiB
13
+ 总预算下,均分仍盖过 1 MiB 单图上限),并补齐 0.2.3 改了名字的 `maxImageBytes`
14
+ 以及 0.2.2-rc.1 起的必填项 `maxRequestImages` / `imageOffloadCountQuantum`。
15
+ - **单账号积分耗尽不再判死整轮**(#20):上游回 HTTP 400 + `TM.00001050`(同一错误
16
+ 也会以流内首帧出现)时识别为 `hard_credit`,轮转循环换下一个号并冷却 30 分钟;
17
+ 全部账号耗尽时回 402 并说明「积分按账号独立计算、不能跨号挪用」。流内报错日志里
18
+ 的错误码不再被脱敏器打成 `****`。
19
+ - **provider 注册不再被首轮发现拖住**(#19):启动引导改为先注册 provider、再做
20
+ 首轮发现(一次性宿主仍然等首轮发现拿清单);体检新增 `provider` 一项(是否注册、
21
+ 卡在哪个阶段、注册报错原文),启动等待超时时也会留一条可见的 warn。
22
+
23
+ ### 新增
24
+
25
+ - **积分弹层标出耗尽的号**(#20):余额为 0 的账号在卡片里降为警戒色圆点并挂
26
+ 「已耗尽」标签;账号多于一个时,表头下方补一句「积分按账号独立计算、不能跨号
27
+ 挪用;底部合计是所有号的总和」。合计数字本身不变。
28
+
29
+ ## [1.4.13] - 2026-11-24
30
+
31
+ ### 修复
32
+
33
+ - 清空「输出上限」后点弹层外面或按 Esc 收起,改动不提交、徽标停在旧值(#15):
34
+ 点外面/Esc 的监听器闭包只把窗口草稿列为依赖,清空输出只更新输出草稿、不重注册
35
+ 监听器,收起时拿的是不含输出改动的旧快照。两处草稿现在都是依赖。
36
+
6
37
  ## [1.4.12] - 2026-11-24
7
38
 
8
39
  ### 修复
@@ -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-DeRNnZdN.mjs").then((n) => n.R);
587
+ const { claimBenefit } = await import("./upstream-DA3AC1mv.mjs").then((n) => n.z);
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-D-RmpxN3.mjs";
3
- import { l as fetchCallerIdentity, q as isBenefitModel } from "./upstream-DeRNnZdN.mjs";
4
- import { i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-BGniJF-q.mjs";
2
+ import { i as codeartsAccountsPath, t as CodeArtsAccountStore } from "./auth-fN1w-DqH.mjs";
3
+ import { J as isBenefitModel, l as fetchCallerIdentity } from "./upstream-DA3AC1mv.mjs";
4
+ import { i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-DcfKEx5Z.mjs";
5
5
  import { existsSync, statSync } from "node:fs";
6
6
  //#region src/bin.ts
7
7
  /**
@@ -201,6 +201,8 @@ interface CodeArtsSettingsKey {
201
201
  creditsDockEmpty: string;
202
202
  creditsDockExpiring: string;
203
203
  creditsDockUpdated: string;
204
+ creditsDockExhausted: string;
205
+ creditsDockPerAccountNote: string;
204
206
  dockProvider: string;
205
207
  dockModel: string;
206
208
  dockNoModel: string;
@@ -194,129 +194,129 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
194
194
  document.head.appendChild(tag);
195
195
  }
196
196
  var CodeArtsPluginCard_module_css_default = {
197
- "skeletonRow": "xoziZG_skeletonRow",
198
- "usageTipRow": "xoziZG_usageTipRow",
199
- "accountToggle": "xoziZG_accountToggle",
200
- "windowHint": "xoziZG_windowHint",
201
- "accountInfo": "xoziZG_accountInfo",
202
- "tabs": "xoziZG_tabs",
197
+ "windowInputSet": "xoziZG_windowInputSet",
198
+ "count": "xoziZG_count",
199
+ "windowUnit": "xoziZG_windowUnit",
200
+ "area": "xoziZG_area",
203
201
  "creditBlock": "xoziZG_creditBlock",
204
- "balanceUnit": "xoziZG_balanceUnit",
205
- "check": "xoziZG_check",
206
- "fieldLabel": "xoziZG_fieldLabel",
207
- "heatAxis": "xoziZG_heatAxis",
208
- "choices": "xoziZG_choices",
209
- "modelTokens": "xoziZG_modelTokens",
202
+ "modelSpec": "xoziZG_modelSpec",
203
+ "usageTipName": "xoziZG_usageTipName",
204
+ "body": "xoziZG_body",
205
+ "manualSummary": "xoziZG_manualSummary",
206
+ "heatLegendChip": "xoziZG_heatLegendChip",
207
+ "windowRange": "xoziZG_windowRange",
208
+ "sectionHead": "xoziZG_sectionHead",
209
+ "heatAxisSlot": "xoziZG_heatAxisSlot",
210
210
  "heatCell": "xoziZG_heatCell",
211
- "balanceMeta": "xoziZG_balanceMeta",
212
- "skeleton": "xoziZG_skeleton",
213
- "heatHours": "xoziZG_heatHours",
214
- "windowAnchor": "xoziZG_windowAnchor",
215
- "windowInput": "xoziZG_windowInput",
216
- "accountMenuAnchor": "xoziZG_accountMenuAnchor",
217
- "manual": "xoziZG_manual",
218
- "windowPopover": "xoziZG_windowPopover",
219
- "doctorList": "xoziZG_doctorList",
220
- "doctorRow": "xoziZG_doctorRow",
211
+ "creditRow": "xoziZG_creditRow",
221
212
  "windowButton": "xoziZG_windowButton",
222
- "concurrencyButton": "xoziZG_concurrencyButton",
223
- "danger": "xoziZG_danger",
213
+ "windowPopoverRow": "xoziZG_windowPopoverRow",
214
+ "field": "xoziZG_field",
215
+ "accountNameRow": "xoziZG_accountNameRow",
216
+ "updated": "xoziZG_updated",
217
+ "claimAllRow": "xoziZG_claimAllRow",
218
+ "windowHint": "xoziZG_windowHint",
219
+ "link": "xoziZG_link",
220
+ "modelTokens": "xoziZG_modelTokens",
221
+ "fieldLabel": "xoziZG_fieldLabel",
224
222
  "error": "xoziZG_error",
225
- "usageTip": "xoziZG_usageTip",
226
- "choiceTail": "xoziZG_choiceTail",
227
- "heatLegendChip": "xoziZG_heatLegendChip",
228
- "trendTip": "xoziZG_trendTip",
229
- "statValue": "xoziZG_statValue",
230
- "modelShare": "xoziZG_modelShare",
223
+ "name": "xoziZG_name",
224
+ "usageFill": "xoziZG_usageFill",
225
+ "heatLegend": "xoziZG_heatLegend",
226
+ "check": "xoziZG_check",
227
+ "concurrencyStepper": "xoziZG_concurrencyStepper",
228
+ "tabPanel": "xoziZG_tabPanel",
229
+ "windowButtonOpen": "xoziZG_windowButtonOpen",
230
+ "modelCheck": "xoziZG_modelCheck",
231
+ "accountClearHint": "xoziZG_accountClearHint",
232
+ "balanceUnit": "xoziZG_balanceUnit",
233
+ "accountToolbar": "xoziZG_accountToolbar",
234
+ "manual": "xoziZG_manual",
231
235
  "windowSection": "xoziZG_windowSection",
232
- "modelRow": "xoziZG_modelRow",
233
- "bar": "xoziZG_bar",
234
- "creditLink": "xoziZG_creditLink",
235
- "usageTipName": "xoziZG_usageTipName",
236
- "creditRow": "xoziZG_creditRow",
237
236
  "accountCard": "xoziZG_accountCard",
238
- "field": "xoziZG_field",
239
- "accountConcurrencyLabel": "xoziZG_accountConcurrencyLabel",
240
- "manualForm": "xoziZG_manualForm",
241
- "body": "xoziZG_body",
242
- "creditRows": "xoziZG_creditRows",
243
- "groupLabel": "xoziZG_groupLabel",
244
- "groupHeadFirst": "xoziZG_groupHeadFirst",
245
- "usageTipSep": "xoziZG_usageTipSep",
246
- "choiceRow": "xoziZG_choiceRow",
247
- "area": "xoziZG_area",
248
- "modelFill": "xoziZG_modelFill",
237
+ "modelName": "xoziZG_modelName",
238
+ "heatGrid": "xoziZG_heatGrid",
239
+ "accountConcurrencyInline": "xoziZG_accountConcurrencyInline",
240
+ "windowInput": "xoziZG_windowInput",
241
+ "section": "xoziZG_section",
242
+ "skeleton": "xoziZG_skeleton",
249
243
  "headText": "xoziZG_headText",
250
- "accountClear": "xoziZG_accountClear",
251
- "heatAxisSlot": "xoziZG_heatAxisSlot",
252
- "windowInputSet": "xoziZG_windowInputSet",
253
- "modelSpec": "xoziZG_modelSpec",
254
- "name": "xoziZG_name",
255
- "expiryLabel": "xoziZG_expiryLabel",
256
- "balance": "xoziZG_balance",
257
- "doctorName": "xoziZG_doctorName",
258
- "desc": "xoziZG_desc",
259
- "creditHint": "xoziZG_creditHint",
244
+ "hint": "xoziZG_hint",
260
245
  "modelMeta": "xoziZG_modelMeta",
261
- "accountNameRow": "xoziZG_accountNameRow",
262
- "windowButtonOpen": "xoziZG_windowButtonOpen",
263
- "count": "xoziZG_count",
264
- "accountMenu": "xoziZG_accountMenu",
265
- "modelRequests": "xoziZG_modelRequests",
266
- "accountConcurrencyInline": "xoziZG_accountConcurrencyInline",
246
+ "expiryRow": "xoziZG_expiryRow",
247
+ "creditFooter": "xoziZG_creditFooter",
267
248
  "modelTrack": "xoziZG_modelTrack",
268
- "statSub": "xoziZG_statSub",
269
- "accountName": "xoziZG_accountName",
270
- "heatLegend": "xoziZG_heatLegend",
271
- "windowUnit": "xoziZG_windowUnit",
249
+ "accountEntry": "xoziZG_accountEntry",
250
+ "accountMenu": "xoziZG_accountMenu",
251
+ "concurrencyValue": "xoziZG_concurrencyValue",
252
+ "usageTipSep": "xoziZG_usageTipSep",
253
+ "modelRow": "xoziZG_modelRow",
254
+ "modelShare": "xoziZG_modelShare",
255
+ "manualForm": "xoziZG_manualForm",
272
256
  "heatHourCell": "xoziZG_heatHourCell",
273
- "heatGrid": "xoziZG_heatGrid",
257
+ "usageTip": "xoziZG_usageTip",
258
+ "statValue": "xoziZG_statValue",
259
+ "creditHint": "xoziZG_creditHint",
260
+ "doctorList": "xoziZG_doctorList",
261
+ "choiceRow": "xoziZG_choiceRow",
262
+ "desc": "xoziZG_desc",
263
+ "choiceTail": "xoziZG_choiceTail",
264
+ "heatAxis": "xoziZG_heatAxis",
265
+ "modelRequests": "xoziZG_modelRequests",
266
+ "heatHours": "xoziZG_heatHours",
274
267
  "accountMenuItem": "xoziZG_accountMenuItem",
275
- "usageBar": "xoziZG_usageBar",
276
- "manualSummary": "xoziZG_manualSummary",
277
- "accountGrid": "xoziZG_accountGrid",
278
- "windowPopoverHead": "xoziZG_windowPopoverHead",
279
- "modelName": "xoziZG_modelName",
280
- "section": "xoziZG_section",
281
- "statusLine": "xoziZG_statusLine",
282
- "sectionLabel": "xoziZG_sectionLabel",
268
+ "accountToggle": "xoziZG_accountToggle",
269
+ "meta": "xoziZG_meta",
270
+ "accountRow": "xoziZG_accountRow",
271
+ "statCard": "xoziZG_statCard",
272
+ "windowAnchor": "xoziZG_windowAnchor",
273
+ "concurrencyButton": "xoziZG_concurrencyButton",
274
+ "windowButtonSet": "xoziZG_windowButtonSet",
275
+ "accountClear": "xoziZG_accountClear",
276
+ "doctorRow": "xoziZG_doctorRow",
277
+ "windowCaret": "xoziZG_windowCaret",
278
+ "header": "xoziZG_header",
279
+ "card": "xoziZG_card",
280
+ "balance": "xoziZG_balance",
283
281
  "barFill": "xoziZG_barFill",
282
+ "windowPopover": "xoziZG_windowPopover",
284
283
  "avatar": "xoziZG_avatar",
285
- "claimAllRow": "xoziZG_claimAllRow",
286
- "statGrid": "xoziZG_statGrid",
287
- "windowCaret": "xoziZG_windowCaret",
288
284
  "windowPopoverValue": "xoziZG_windowPopoverValue",
289
- "windowButtonSet": "xoziZG_windowButtonSet",
290
- "concurrencyStepper": "xoziZG_concurrencyStepper",
291
- "accountHint": "xoziZG_accountHint",
285
+ "accountMenuAnchor": "xoziZG_accountMenuAnchor",
286
+ "balanceMeta": "xoziZG_balanceMeta",
287
+ "choices": "xoziZG_choices",
288
+ "accountInfo": "xoziZG_accountInfo",
289
+ "accountConcurrencyLabel": "xoziZG_accountConcurrencyLabel",
290
+ "bar": "xoziZG_bar",
292
291
  "groupHead": "xoziZG_groupHead",
293
- "balanceRow": "xoziZG_balanceRow",
294
- "accountClearHint": "xoziZG_accountClearHint",
295
- "modelCheck": "xoziZG_modelCheck",
296
- "meta": "xoziZG_meta",
297
- "link": "xoziZG_link",
298
- "header": "xoziZG_header",
299
292
  "statLabel": "xoziZG_statLabel",
293
+ "doctorName": "xoziZG_doctorName",
294
+ "usageBar": "xoziZG_usageBar",
295
+ "balanceRow": "xoziZG_balanceRow",
296
+ "accountRowActions": "xoziZG_accountRowActions",
297
+ "groupHeadFirst": "xoziZG_groupHeadFirst",
298
+ "expiryLabel": "xoziZG_expiryLabel",
299
+ "tabs": "xoziZG_tabs",
300
300
  "actions": "xoziZG_actions",
301
- "modelChart": "xoziZG_modelChart",
302
- "usageFill": "xoziZG_usageFill",
303
301
  "skeletonBreath": "xoziZG_skeletonBreath",
304
- "windowPopoverRow": "xoziZG_windowPopoverRow",
305
- "windowRange": "xoziZG_windowRange",
306
- "accountEntry": "xoziZG_accountEntry",
307
- "updated": "xoziZG_updated",
308
- "accountToolbar": "xoziZG_accountToolbar",
309
- "statCard": "xoziZG_statCard",
310
- "accountRow": "xoziZG_accountRow",
311
- "expiryRow": "xoziZG_expiryRow",
302
+ "danger": "xoziZG_danger",
303
+ "statSub": "xoziZG_statSub",
304
+ "modelChart": "xoziZG_modelChart",
305
+ "usageTipRow": "xoziZG_usageTipRow",
306
+ "sectionLabel": "xoziZG_sectionLabel",
307
+ "accountName": "xoziZG_accountName",
308
+ "accountGrid": "xoziZG_accountGrid",
309
+ "modelFill": "xoziZG_modelFill",
310
+ "skeletonRow": "xoziZG_skeletonRow",
311
+ "statGrid": "xoziZG_statGrid",
312
+ "statusLine": "xoziZG_statusLine",
313
+ "accountHint": "xoziZG_accountHint",
314
+ "creditRows": "xoziZG_creditRows",
315
+ "creditLink": "xoziZG_creditLink",
316
+ "trendTip": "xoziZG_trendTip",
317
+ "groupLabel": "xoziZG_groupLabel",
312
318
  "heatWeekday": "xoziZG_heatWeekday",
313
- "sectionHead": "xoziZG_sectionHead",
314
- "hint": "xoziZG_hint",
315
- "accountRowActions": "xoziZG_accountRowActions",
316
- "concurrencyValue": "xoziZG_concurrencyValue",
317
- "card": "xoziZG_card",
318
- "creditFooter": "xoziZG_creditFooter",
319
- "tabPanel": "xoziZG_tabPanel"
319
+ "windowPopoverHead": "xoziZG_windowPopoverHead"
320
320
  };
321
321
  //#endregion
322
322
  //#region src/client/CodeArtsPluginCard.tsx
@@ -1530,6 +1530,7 @@ function CodeArtsPluginCard({ t }) {
1530
1530
  }, [
1531
1531
  windowOpenFor,
1532
1532
  windowDrafts,
1533
+ outputDrafts,
1533
1534
  selection
1534
1535
  ]);
1535
1536
  (0, react.useEffect)(() => {
@@ -3552,52 +3553,69 @@ function CodeArtsCreditDock({ useProjection, t, zone = "dock", onOpenSettings })
3552
3553
  fontSize: 12,
3553
3554
  color: "var(--dsw-alias-label-tertiary)"
3554
3555
  },
3555
- children: [rows.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("creditsDockEmpty") }), rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3556
- style: {
3557
- display: "flex",
3558
- flexDirection: "column",
3559
- gap: 2,
3560
- minWidth: 0
3561
- },
3562
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3556
+ children: [
3557
+ rows.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("creditsDockEmpty") }),
3558
+ rows.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3559
+ style: {
3560
+ fontSize: 11,
3561
+ lineHeight: "15px"
3562
+ },
3563
+ children: t("creditsDockPerAccountNote")
3564
+ }),
3565
+ rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3563
3566
  style: {
3564
- display: "grid",
3565
- gridTemplateColumns: PANEL_ROW_COLUMNS,
3566
- gap: "0 8px",
3567
- alignItems: "center",
3567
+ display: "flex",
3568
+ flexDirection: "column",
3569
+ gap: 2,
3568
3570
  minWidth: 0
3569
3571
  },
3570
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3572
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3571
3573
  style: {
3572
- display: "flex",
3574
+ display: "grid",
3575
+ gridTemplateColumns: PANEL_ROW_COLUMNS,
3576
+ gap: "0 8px",
3573
3577
  alignItems: "center",
3574
- gap: 5,
3575
3578
  minWidth: 0
3576
3579
  },
3577
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: row.remain === null ? "warning" : "done" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3580
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3578
3581
  style: {
3579
- overflow: "hidden",
3580
- textOverflow: "ellipsis",
3581
- whiteSpace: "nowrap",
3582
- color: "var(--dsw-alias-label-primary)"
3582
+ display: "flex",
3583
+ alignItems: "center",
3584
+ gap: 5,
3585
+ minWidth: 0
3583
3586
  },
3584
- title: row.error === void 0 ? row.name : row.error,
3585
- children: row.name
3587
+ children: [
3588
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: row.remain === null || row.remain < 1 ? "warning" : "done" }),
3589
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3590
+ style: {
3591
+ overflow: "hidden",
3592
+ textOverflow: "ellipsis",
3593
+ whiteSpace: "nowrap",
3594
+ color: "var(--dsw-alias-label-primary)"
3595
+ },
3596
+ title: row.error === void 0 ? row.name : row.error,
3597
+ children: row.name
3598
+ }),
3599
+ row.remain !== null && row.remain < 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
3600
+ tone: "warning",
3601
+ children: t("creditsDockExhausted")
3602
+ })
3603
+ ]
3604
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3605
+ style: PANEL_NUM_CELL,
3606
+ children: row.remain === null ? "—" : formatNumber(row.remain)
3586
3607
  })]
3587
3608
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3588
- style: PANEL_NUM_CELL,
3589
- children: row.remain === null ? "—" : formatNumber(row.remain)
3609
+ style: {
3610
+ paddingLeft: 11,
3611
+ fontSize: 11,
3612
+ lineHeight: "15px",
3613
+ color: "var(--dsw-alias-label-tertiary)"
3614
+ },
3615
+ children: row.usage === void 0 ? t("creditsDockNoTokens") : `${t("usageToday")} ${usageLine(row.usage, t)}`
3590
3616
  })]
3591
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3592
- style: {
3593
- paddingLeft: 11,
3594
- fontSize: 11,
3595
- lineHeight: "15px",
3596
- color: "var(--dsw-alias-label-tertiary)"
3597
- },
3598
- children: row.usage === void 0 ? t("creditsDockNoTokens") : `${t("usageToday")} ${usageLine(row.usage, t)}`
3599
- })]
3600
- }, row.id))]
3617
+ }, row.id))
3618
+ ]
3601
3619
  }),
3602
3620
  rows.filter((row) => row.expiring > 0).map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3603
3621
  style: {
@@ -3630,14 +3648,14 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
3630
3648
  document.head.appendChild(tag);
3631
3649
  }
3632
3650
  var CodeArtsPanel_module_css_default = {
3633
- "head": "Z66cgG_head",
3634
3651
  "desc": "Z66cgG_desc",
3635
- "backCaret": "Z66cgG_backCaret",
3636
- "icon": "Z66cgG_icon",
3637
- "page": "Z66cgG_page",
3652
+ "body": "Z66cgG_body",
3638
3653
  "back": "Z66cgG_back",
3654
+ "icon": "Z66cgG_icon",
3655
+ "backCaret": "Z66cgG_backCaret",
3639
3656
  "title": "Z66cgG_title",
3640
- "body": "Z66cgG_body"
3657
+ "head": "Z66cgG_head",
3658
+ "page": "Z66cgG_page"
3641
3659
  };
3642
3660
  //#endregion
3643
3661
  //#region src/client/CodeArtsPanel.tsx
@@ -3963,6 +3981,8 @@ const zh = {
3963
3981
  creditsDockEmpty: "暂时没有积分数据",
3964
3982
  creditsDockExpiring: "{account}:{expiring} 积分将在本周期结束时作废",
3965
3983
  creditsDockUpdated: "最近刷新 {time}",
3984
+ creditsDockExhausted: "已耗尽",
3985
+ creditsDockPerAccountNote: "积分按账号独立计算、不能跨号挪用;底部合计是所有号的总和。",
3966
3986
  dockProvider: "Provider {provider}",
3967
3987
  dockModel: "Model {model}",
3968
3988
  dockNoModel: "未选择模型",
@@ -4190,6 +4210,8 @@ const en = {
4190
4210
  creditsDockEmpty: "No credit data yet",
4191
4211
  creditsDockExpiring: "{account}: {expiring} credits expire when this cycle ends",
4192
4212
  creditsDockUpdated: "Last updated {time}",
4213
+ creditsDockExhausted: "Exhausted",
4214
+ creditsDockPerAccountNote: "Credits are counted per account and cannot be pooled; the dock total is just the sum of every account.",
4193
4215
  dockProvider: "Provider {provider}",
4194
4216
  dockModel: "Model {model}",
4195
4217
  dockNoModel: "No model selected",
package/lib/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { a as codeartsAuthPath, c as credentialFromOAuth, g as startLogin, i as codeartsAccountsPath, n as CodeArtsCredentialStore, o as codeartsDebugLogPath, r as MANUAL_ACCOUNT_ID, s as codeartsRefreshLogPath, t as CodeArtsAccountStore } from "./auth-D-RmpxN3.mjs";
2
- import { $ as withContextWindowOverride, A as pickDailyWelfareCampaign, B as FALLBACK_CODEARTS_MODELS, C as isTpmLimit, D as maxTokensCeilingFor, E as learnedContextWindowFor, F as setMaxTokenOverrides, G as forgetModelUnavailable, H as clearBenefitBlocked, I as signedGet, J as markModelUnavailable, K as isBenefitBlocked, L as upstreamErrorMessage, M as queueFrame, N as rateLimitFrame, O as modelUnavailableReasonText, P as setMaxTokenOverride, S as isQueueableRate, T as learnContextWindow, U as creditRatioLabel, W as filterEnabledModels, Z as modelUnavailableReason, _ as isModelNotAccessible, a as claimDailyWelfare, b as isQueueReject, c as degradeTokenCeiling, d as fetchQueueStatus, et as withMaxTokensOverride, f as fetchWelfareCampaigns, g as isIamTokenError, h as isContextOverflowText, i as chatStream, j as prepareChatBody, k as overrideValueFor, l as fetchCallerIdentity, m as isConcurrencyCap, n as SNAP_HOST, o as clearQueueStatus, p as firstFrameError, q as isBenefitModel, r as canonicalModel, s as contextWindowOverrideFor, t as MAX_TOKENS_FLOOR, u as fetchModels, v as isNotMultimodal, w as isWelfareClaimedStatus, x as isQueueRejectText, y as isParamInvalidFrame, z as CodeArtsCatalog } from "./upstream-DeRNnZdN.mjs";
3
- import { a as refreshCatalog, i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-BGniJF-q.mjs";
1
+ import { a as codeartsAuthPath, c as credentialFromOAuth, g as startLogin, i as codeartsAccountsPath, n as CodeArtsCredentialStore, o as codeartsDebugLogPath, r as MANUAL_ACCOUNT_ID, s as codeartsRefreshLogPath, t as CodeArtsAccountStore } from "./auth-fN1w-DqH.mjs";
2
+ import { A as overrideValueFor, B as CodeArtsCatalog, C as isQueueableRate, D as learnedContextWindowFor, E as learnContextWindow, F as setMaxTokenOverride, G as filterEnabledModels, I as setMaxTokenOverrides, J as isBenefitModel, K as forgetModelUnavailable, L as signedGet, M as prepareChatBody, N as queueFrame, O as maxTokensCeilingFor, P as rateLimitFrame, Q as modelUnavailableReason, R as upstreamErrorMessage, S as isQueueRejectText, T as isWelfareClaimedStatus, U as clearBenefitBlocked, V as FALLBACK_CODEARTS_MODELS, W as creditRatioLabel, Y as markModelUnavailable, _ as isIamTokenError, a as claimDailyWelfare, b as isParamInvalidFrame, c as degradeTokenCeiling, d as fetchQueueStatus, et as withContextWindowOverride, f as fetchWelfareCampaigns, g as isCreditExhausted, h as isContextOverflowText, i as chatStream, j as pickDailyWelfareCampaign, k as modelUnavailableReasonText, l as fetchCallerIdentity, m as isConcurrencyCap, n as SNAP_HOST, o as clearQueueStatus, p as firstFrameError, q as isBenefitBlocked, r as canonicalModel, s as contextWindowOverrideFor, t as MAX_TOKENS_FLOOR, tt as withMaxTokensOverride, u as fetchModels, v as isModelNotAccessible, w as isTpmLimit, x as isQueueReject, y as isNotMultimodal } from "./upstream-DA3AC1mv.mjs";
3
+ import { a as refreshCatalog, i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-DcfKEx5Z.mjs";
4
4
  import { i as lazyApi, r as createProvider } from "./models-CgKCibpk.mjs";
5
5
  import { c as keeperLogPath, f as keeperStats, i as clearKeeperHandoff, l as keeperNextPassAt, m as stopKeeper, n as KEEPER_STALE_MS, p as spawnKeeper, s as keeperHandoffRecent, u as keeperScriptPath } from "./keeper-BWHQDFAh.mjs";
6
6
  import { appendFileSync, statSync, writeFileSync } from "node:fs";
@@ -820,7 +820,32 @@ const NO_COST = {
820
820
  const REQUEST_IMAGE_BUDGETS = {
821
821
  maxRequestImageBytes: 6291456,
822
822
  requestImagePixelBudget: 4194304,
823
- requestImageMaxBytes: 1048576
823
+ /**
824
+ * 单图上限。这个字段在宿主里有两个拼写:0.2.2 及以前读 `requestImageMaxBytes`,
825
+ * 0.2.3 起 resolved profile 改叫 `maxImageBytes`(配置里的旧名由 resolveProfiles
826
+ * 映射过去)。本插件是手搓 profile、不走 resolveProfiles,两处都得写,各自忽略
827
+ * 不认识的那一个。
828
+ */
829
+ requestImageMaxBytes: 1048576,
830
+ maxImageBytes: 1048576,
831
+ /**
832
+ * 0.2.3 起宿主要求的字节预算除数(issue #21):
833
+ * allocated = floor(maxRequestImageBytes / requestImageBudgetCount / 4) * 3
834
+ * cap = min(allocated, maxImageBytes)
835
+ * 漏掉它时分母是 undefined ⇒ NaN,`NaN < 1` 为 false 绕过宿主自检,带图请求
836
+ * 必然在附件层抛 INVALID_ATTACHMENT_REF。
837
+ *
838
+ * 取 4 而不是宿主默认的 20:allocated 只是 min() 的候选,除数必须让商仍盖过
839
+ * 1 MiB 单图上限,否则没人选的更小数字会悄悄顶替单图上限(6 MiB 时
840
+ * 20 → 235,929 字节,4 → 1,179,648)。5 已差一点(943,716),所以是 4。
841
+ */
842
+ requestImageBudgetCount: 4,
843
+ /**
844
+ * 0.2.2-rc.1 起 resolved profile 的必填项(宿主默认 50 / 10)。
845
+ * 不写等于「数量不设限」,在带图长会话里会先撞上游请求体上限才轮到宿主 offload。
846
+ */
847
+ maxRequestImages: 50,
848
+ imageOffloadCountQuantum: 10
824
849
  };
825
850
  /** Inert pi-ai auth plane: the codearts route authenticates only via the shim secret. */
826
851
  const INERT_AUTH = {
@@ -1218,6 +1243,13 @@ const QUEUE_HEARTBEAT_MS = 2e4;
1218
1243
  const SERVER_COOLDOWN_MS = 3e4;
1219
1244
  /** 零散错误累计到阈值后冷却该账号。 */
1220
1245
  const ERROR_COOLDOWN_MS = 6e4;
1246
+ /**
1247
+ * 积分耗尽后的冷却。积分是账号级的,不会在几十秒内回来(要等套餐周期刷新或
1248
+ * 领取活动积分),30 秒的短冷却只会让它被反复选中、反复失败一遍。30 分钟是
1249
+ * 「不反复白撞」与「用户中途领到积分后还能恢复」之间的折中;用户也可以在
1250
+ * 卡片上暂停这个号。
1251
+ */
1252
+ const CREDIT_COOLDOWN_MS = 18e5;
1221
1253
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
1222
1254
  const recentShapes = [];
1223
1255
  /** 最近的请求形状,最新在前。 */
@@ -1411,12 +1443,12 @@ function createCodeArtsShim(options) {
1411
1443
  const upstreamError = headText === void 0 ? void 0 : firstFrameError(headText);
1412
1444
  if (upstreamError !== void 0) {
1413
1445
  const detail = `${upstreamError.code}: ${upstreamError.message}`.replace(/^: /, "");
1414
- if (isIamTokenError(detail) || isModelNotAccessible(detail) || isNotMultimodal(detail)) {
1446
+ if (isIamTokenError(detail) || isModelNotAccessible(detail) || isNotMultimodal(detail) || isCreditExhausted(detail)) {
1415
1447
  reader.releaseLock();
1416
1448
  await result.stream.cancel().catch(() => {});
1417
1449
  logger?.warn(`dsh-codearts: ${prepared.model} 首帧报上游错误(${detail.slice(0, 160)})`);
1418
1450
  if (isModelNotAccessible(detail)) markModelUnavailable(prepared.model, modelUnavailableReasonText(detail));
1419
- const kind = isIamTokenError(detail) ? "iam_stale" : isModelNotAccessible(detail) ? "not_found" : "client";
1451
+ const kind = isIamTokenError(detail) ? "iam_stale" : isModelNotAccessible(detail) ? "not_found" : isCreditExhausted(detail) ? "hard_credit" : "client";
1420
1452
  return {
1421
1453
  prepared,
1422
1454
  result: {
@@ -1657,6 +1689,10 @@ function createCodeArtsShim(options) {
1657
1689
  pool.disable(id, result.message);
1658
1690
  continue;
1659
1691
  }
1692
+ if (result.kind === "hard_credit") {
1693
+ pool.cooldown(id, CREDIT_COOLDOWN_MS, "该账号积分已耗尽(TM.00001050),额度刷新或领取积分后恢复");
1694
+ continue;
1695
+ }
1660
1696
  if (result.kind === "server" || result.kind === "soft_rate") {
1661
1697
  pool.cooldown(id, SERVER_COOLDOWN_MS, result.message);
1662
1698
  break;
@@ -1842,7 +1878,7 @@ function createCodeArtsShim(options) {
1842
1878
  if (ev.error === void 0) return;
1843
1879
  const code = String(ev.error.code ?? "");
1844
1880
  const message = String(ev.error.message ?? "").slice(0, 200);
1845
- logger?.error(`dsh-codearts: 上游流内报错 model=${model} code=${code} msg=${message}`);
1881
+ logger?.error(`dsh-codearts: 上游流内报错 model=${model} 错误码 ${code} msg=${message}`);
1846
1882
  } catch {}
1847
1883
  }
1848
1884
  /** 把上游 SSE 按事件边界转发给 DSH,直到流结束或被中止。 */
@@ -2382,6 +2418,15 @@ async function doctorReport(deps) {
2382
2418
  detail: `${models.length}`
2383
2419
  });
2384
2420
  if (models.length === 0) hints.add("empty-catalog");
2421
+ const provider = deps.providerStatus?.();
2422
+ if (provider !== void 0) {
2423
+ checks.push({
2424
+ id: "provider",
2425
+ ok: provider.registered,
2426
+ detail: provider.registered ? `registered (stage=${provider.stage})` : `not registered (stage=${provider.stage}${provider.error === void 0 ? "" : `; ${provider.error}`})`
2427
+ });
2428
+ if (!provider.registered) hints.add("provider-not-registered");
2429
+ }
2385
2430
  checks.push({
2386
2431
  id: "usage",
2387
2432
  ok: deps.usage !== void 0,
@@ -3850,9 +3895,25 @@ async function apply(ctx, rawConfig) {
3850
3895
  }
3851
3896
  return summarizeClaims(results);
3852
3897
  };
3898
+ /**
3899
+ * 启动引导的进度(issue #19)。
3900
+ *
3901
+ * 「插件 HTTP 面全活、模型选择器里却没有 CodeArts」是宿主上真实出现过的分裂状态;
3902
+ * 那一刻唯一能区分「shim 没起来 / 注册被首轮发现拖住 / 注册抛错」的证据就在这里,
3903
+ * 由 /api/codearts/doctor 的 `provider` 一项读出去。
3904
+ */
3905
+ const startup = {
3906
+ stage: "shim",
3907
+ registered: false
3908
+ };
3853
3909
  ctx.inject(["webServer"], (webCtx) => registerCodeArtsStatusRoute(webCtx, {
3854
3910
  store,
3855
3911
  models: () => catalog.current(),
3912
+ providerStatus: () => ({
3913
+ registered: startup.registered,
3914
+ stage: startup.stage,
3915
+ ...startup.error === void 0 ? {} : { error: startup.error }
3916
+ }),
3856
3917
  enabledModels,
3857
3918
  setEnabledModels,
3858
3919
  contextWindowOverrides: () => current().contextWindowOverrides,
@@ -4112,10 +4173,10 @@ async function apply(ctx, rawConfig) {
4112
4173
  keepAliveLoop();
4113
4174
  armAutoClaim();
4114
4175
  armKeepAliveDaemon();
4115
- await discover(AbortSignal.any([abort.signal, AbortSignal.timeout(STARTUP_DISCOVERY_MS)]));
4116
- if (stopped) return;
4176
+ startup.stage = "register";
4117
4177
  const incompatible = await probePiAiCompat();
4118
4178
  if (incompatible !== void 0) ctx.logger.error(`dsh-codearts: ${incompatible}`);
4179
+ writeDebugLog?.(`bootstrap: shim ready, registering provider (catalog=${catalog.current().length})`);
4119
4180
  const codearts = createCodeArtsAdapter({
4120
4181
  shim,
4121
4182
  catalog,
@@ -4134,6 +4195,11 @@ async function apply(ctx, rawConfig) {
4134
4195
  settingsPath: [],
4135
4196
  declared: false
4136
4197
  }]);
4198
+ startup.registered = true;
4199
+ writeDebugLog?.("bootstrap: provider registered");
4200
+ } catch (error) {
4201
+ startup.error = error instanceof Error ? error.message : String(error);
4202
+ throw error;
4137
4203
  } finally {
4138
4204
  if (releaseAdapter === void 0 || releaseDirectory === void 0) {
4139
4205
  releaseAdapter?.();
@@ -4149,14 +4215,25 @@ async function apply(ctx, rawConfig) {
4149
4215
  releaseAdapter?.();
4150
4216
  releaseDirectory?.();
4151
4217
  }
4218
+ startup.stage = "discovery";
4219
+ await discover(AbortSignal.any([abort.signal, AbortSignal.timeout(STARTUP_DISCOVERY_MS)]));
4220
+ if (stopped) return;
4152
4221
  if (catalog.current().length === 0) ctx.logger.warn("dsh-codearts: CodeArts provider registered with an empty model catalog; models stay unavailable until discovery succeeds");
4222
+ startup.stage = "ready";
4223
+ writeDebugLog?.(`bootstrap: ready (catalog=${catalog.current().length})`);
4153
4224
  if (!stopped) scheduleDiscovery(nextDiscoveryDelay());
4154
4225
  }).catch((error) => {
4226
+ startup.error = error instanceof Error ? error.message : String(error);
4155
4227
  ctx.logger.error("dsh-codearts: loopback shim failed to start; provider not registered", error);
4156
4228
  });
4229
+ let startupTimedOut = false;
4157
4230
  await Promise.race([settled, new Promise((resolve) => {
4158
- setTimeout(resolve, STARTUP_WAIT_MS).unref?.();
4231
+ setTimeout(() => {
4232
+ startupTimedOut = true;
4233
+ resolve();
4234
+ }, STARTUP_WAIT_MS).unref?.();
4159
4235
  })]);
4236
+ if (startupTimedOut) ctx.logger.warn(`dsh-codearts: 启动等待超时(阶段 ${startup.stage},provider ${startup.registered ? "已注册" : "尚未注册"}),引导链继续在后台执行;可打开设置卡片查看体检,或读取 /api/codearts/doctor 自查`);
4160
4237
  }
4161
4238
  //#endregion
4162
4239
  export { BENEFIT_GATEWAY_HOST, CODEARTS_PROVIDER, CODEARTS_SETTINGS_NS, CodeArtsAccountPool, CodeArtsAccountStore, CodeArtsCatalog, CodeArtsCredentialStore, CodeArtsCreditCache, CodeArtsUsageTracker, Config, FALLBACK_CODEARTS_MODELS, SNAP_HOST, apply, canonicalModel, chatStream, codeartsAccountsPath, codeartsAuthPath, codeartsUsagePath, createCodeArtsAdapter, createCodeArtsShim, discoverModels, fetchCredits, fetchModels, filterEnabledModels, inject, maxTokensCeilingFor, name, parseCreditStatistics, parseTokenBalance, prepareChatBody, refreshCatalog };
@@ -1,4 +1,4 @@
1
- import { d as refreshLockPath, f as withRefreshLock, h as refreshToken, i as codeartsAccountsPath, l as readAccountDocument, m as defaultLoginConfig, p as OAuthTokenError, u as writeJsonAtomic } from "./auth-D-RmpxN3.mjs";
1
+ import { d as refreshLockPath, f as withRefreshLock, h as refreshToken, i as codeartsAccountsPath, l as readAccountDocument, m as defaultLoginConfig, p as OAuthTokenError, u as writeJsonAtomic } from "./auth-fN1w-DqH.mjs";
2
2
  import { _ as writeKeeperState, a as clearKeeperState, c as keeperLogPath, d as keeperStatePath, f as keeperStats, g as writeKeeperHandoff, h as stopRequested, i as clearKeeperHandoff, o as isDshInstallerTempDir, r as KEEPER_TICK_MS, t as KEEPER_HEARTBEAT_MS } from "./keeper-BWHQDFAh.mjs";
3
3
  import { appendFileSync, existsSync, unlinkSync, watch } from "node:fs";
4
4
  import { dirname, join } from "node:path";
@@ -545,6 +545,7 @@ function signRequest(req, body, cred) {
545
545
  var upstream_exports = /* @__PURE__ */ __exportAll({
546
546
  BENEFIT_MISSING_CODE: () => BENEFIT_MISSING_CODE,
547
547
  CONCURRENCY_CAP_CODE: () => CONCURRENCY_CAP_CODE,
548
+ CREDIT_EXHAUSTED_CODE: () => CREDIT_EXHAUSTED_CODE,
548
549
  MAX_TOKENS_CEILING: () => MAX_TOKENS_CEILING,
549
550
  MAX_TOKENS_FLOOR: () => MAX_TOKENS_FLOOR,
550
551
  PARAM_INVALID_CODE: () => PARAM_INVALID_CODE,
@@ -568,6 +569,7 @@ var upstream_exports = /* @__PURE__ */ __exportAll({
568
569
  isBenefitMissing: () => isBenefitMissing,
569
570
  isConcurrencyCap: () => isConcurrencyCap,
570
571
  isContextOverflowText: () => isContextOverflowText,
572
+ isCreditExhausted: () => isCreditExhausted,
571
573
  isIamTokenError: () => isIamTokenError,
572
574
  isModelNotAccessible: () => isModelNotAccessible,
573
575
  isNotMultimodal: () => isNotMultimodal,
@@ -1246,12 +1248,27 @@ function upstreamErrorMessage(message, status = 0) {
1246
1248
  return `${inner === "" ? "上游提示请求量较大、需要排队。" : inner} 插件已在本地排队重试,仍未轮到,请稍后重试或临时切换模型。`;
1247
1249
  }
1248
1250
  if (isIamTokenError(message)) return "上游判定本次登录凭据(IAM token)已失效。插件已尝试自动续期;若反复出现,请到设置卡片重新登录。";
1251
+ if (isCreditExhausted(message)) return "该账号的 CodeArts 积分已耗尽(上游 TM.00001050)。积分按账号独立计算、不能跨号挪用:多账号时到这个号的冷却结束或暂停它即可,积分周期刷新/领取活动积分后自动恢复。";
1249
1252
  if (isModelNotAccessible(message)) return "上游说这个模型不存在或当前账号没有权限(可能已下线或改名)。请刷新模型列表后换一个模型;换号没有用,这是模型级的限制。";
1250
1253
  if (isNotMultimodal(message)) return "这个模型不支持图片输入(上游 406)。请移除消息里的图片,或改用支持识图的模型。";
1251
1254
  if (message.toLowerCase().includes("model is not registered")) return "上游没有注册这个模型,它可能已经下线;请刷新模型列表后重选。";
1252
1255
  return `codearts 上游错误 (http ${status}): ${message.slice(0, 400)}`;
1253
1256
  }
1254
1257
  /**
1258
+ * 「这个账号的套餐积分已耗尽」。
1259
+ *
1260
+ * 2026-11-25 实测(issue #20):上游回 HTTP 400 + body
1261
+ * `{"text":"[DONE]","error_code":"TM.00001050","error_msg":"您的积分已耗尽…"}`;
1262
+ * 同一错误也可能以**流内首帧**(HTTP 200)出现,所以两条路都要认。
1263
+ *
1264
+ * 它是**确定不可恢复的单号属性**:积分是账号级的,不能跨号挪用,重发同一个号
1265
+ * 只会再撞一次。处置和 iam_stale 一样 —— 换下一个号,并把这个号冷却足够久。
1266
+ */
1267
+ const CREDIT_EXHAUSTED_CODE = "TM.00001050";
1268
+ function isCreditExhausted(text) {
1269
+ return text.includes("TM.00001050") || text.includes("积分已耗尽");
1270
+ }
1271
+ /**
1255
1272
  * 「这个账号当前没有该模型的限时福利权益」。2026-10-21 实测:上游回 HTTP 200,
1256
1273
  * 错误在**流内帧**里(不在状态码上),所以它既不走 retry 也不走换号,用户看到的
1257
1274
  * 就是正文里裸裸一句 `benefit not found`。
@@ -1336,6 +1353,7 @@ function classify(status, message) {
1336
1353
  if (isResignRefusal(message)) return "client";
1337
1354
  if (isIamTokenError(message)) return "iam_stale";
1338
1355
  if (isModelNotAccessible(message)) return "not_found";
1356
+ if (isCreditExhausted(message)) return "hard_credit";
1339
1357
  if (status === 401 || status === 403) return "session_dead";
1340
1358
  if (status === 402) return "hard_credit";
1341
1359
  if (status === 429) return "soft_rate";
@@ -2270,4 +2288,4 @@ async function claimDailyWelfare(credential, signal) {
2270
2288
  };
2271
2289
  }
2272
2290
  //#endregion
2273
- export { withContextWindowOverride as $, pickDailyWelfareCampaign as A, FALLBACK_CODEARTS_MODELS as B, isTpmLimit as C, maxTokensCeilingFor as D, learnedContextWindowFor as E, setMaxTokenOverrides as F, forgetModelUnavailable as G, clearBenefitBlocked as H, signedGet as I, markModelUnavailable as J, isBenefitBlocked as K, upstreamErrorMessage as L, queueFrame as M, rateLimitFrame as N, modelUnavailableReasonText as O, setMaxTokenOverride as P, setDiscoveredBenefitModels as Q, upstream_exports as R, isQueueableRate as S, learnContextWindow as T, creditRatioLabel as U, carryKnownWindows as V, filterEnabledModels as W, modelDisplayName as X, mergeModelLists as Y, modelUnavailableReason as Z, isModelNotAccessible as _, claimDailyWelfare as a, isQueueReject as b, degradeTokenCeiling as c, fetchQueueStatus as d, withMaxTokensOverride as et, fetchWelfareCampaigns as f, isIamTokenError as g, isContextOverflowText as h, chatStream as i, prepareChatBody as j, overrideValueFor as k, fetchCallerIdentity as l, isConcurrencyCap as m, SNAP_HOST as n, clearQueueStatus as o, firstFrameError as p, isBenefitModel as q, canonicalModel as r, contextWindowOverrideFor as s, MAX_TOKENS_FLOOR as t, fetchModels as u, isNotMultimodal as v, isWelfareClaimedStatus as w, isQueueRejectText as x, isParamInvalidFrame as y, CodeArtsCatalog as z };
2291
+ export { setDiscoveredBenefitModels as $, overrideValueFor as A, CodeArtsCatalog as B, isQueueableRate as C, learnedContextWindowFor as D, learnContextWindow as E, setMaxTokenOverride as F, filterEnabledModels as G, carryKnownWindows as H, setMaxTokenOverrides as I, isBenefitModel as J, forgetModelUnavailable as K, signedGet as L, prepareChatBody as M, queueFrame as N, maxTokensCeilingFor as O, rateLimitFrame as P, modelUnavailableReason as Q, upstreamErrorMessage as R, isQueueRejectText as S, isWelfareClaimedStatus as T, clearBenefitBlocked as U, FALLBACK_CODEARTS_MODELS as V, creditRatioLabel as W, mergeModelLists as X, markModelUnavailable as Y, modelDisplayName as Z, isIamTokenError as _, claimDailyWelfare as a, isParamInvalidFrame as b, degradeTokenCeiling as c, fetchQueueStatus as d, withContextWindowOverride as et, fetchWelfareCampaigns as f, isCreditExhausted as g, isContextOverflowText as h, chatStream as i, pickDailyWelfareCampaign as j, modelUnavailableReasonText as k, fetchCallerIdentity as l, isConcurrencyCap as m, SNAP_HOST as n, clearQueueStatus as o, firstFrameError as p, isBenefitBlocked as q, canonicalModel as r, contextWindowOverrideFor as s, MAX_TOKENS_FLOOR as t, withMaxTokensOverride as tt, fetchModels as u, isModelNotAccessible as v, isTpmLimit as w, isQueueReject as x, isNotMultimodal as y, upstream_exports as z };
@@ -1,5 +1,5 @@
1
- import { u as writeJsonAtomic } from "./auth-D-RmpxN3.mjs";
2
- import { Q as setDiscoveredBenefitModels, V as carryKnownWindows, X as modelDisplayName, Y as mergeModelLists, q as isBenefitModel, u as fetchModels } from "./upstream-DeRNnZdN.mjs";
1
+ import { u as writeJsonAtomic } from "./auth-fN1w-DqH.mjs";
2
+ import { $ as setDiscoveredBenefitModels, H as carryKnownWindows, J as isBenefitModel, X as mergeModelLists, Z as modelDisplayName, u as fetchModels } from "./upstream-DA3AC1mv.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { homedir } from "node:os";
@@ -536,6 +536,6 @@ function percentileOf(buckets, ratio) {
536
536
  }
537
537
  //#endregion
538
538
  //#region src/version.ts
539
- const CODEARTS_VERSION = "1.4.12";
539
+ const CODEARTS_VERSION = "1.4.14";
540
540
  //#endregion
541
541
  export { refreshCatalog as a, discoverModels as i, CodeArtsUsageTracker as n, codeartsUsagePath as r, CODEARTS_VERSION as t };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-codearts",
3
3
  "displayName": "DSH CodeArts Connect",
4
4
  "description": "把华为云 CodeArts 接入 DeepSeek Harness —— 内置 OAuth2 登录(PKCE + DPoP),登录后即可在 DSH 对话窗口使用 CodeArts 的模型。",
5
- "version": "1.4.12",
5
+ "version": "1.4.14",
6
6
  "packageManager": "pnpm@11.24.0",
7
7
  "author": "elegant01",
8
8
  "keywords": [