dsh-codearts 1.4.9 → 1.4.11

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,22 @@
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.11] - 2026-11-23
7
+
8
+ ### 修复
9
+
10
+ - 模型行 `▾` 按钮收起弹层时不提交草稿(#15):清空窗口或输出上限后点 `▾`
11
+ 收起,改动不生效、徽标停在旧值;只有点弹层外面或按 Esc 才会提交。现在三种
12
+ 收起方式共用同一条提交路径;从 A 模型直接切到 B 时,也会先提交 A 的草稿。
13
+
14
+ ## [1.4.10] - 2026-11-23
15
+
16
+ ### 修复
17
+
18
+ - 只设了「输出上限」、没设窗口的模型,模型行右侧 `▾` 按钮也显示已设覆盖的描边
19
+ (#15)。之前描边只判窗口覆盖,于是同样「已自定义」的模型里,只有设了窗口的
20
+ 才有蓝框。
21
+
6
22
  ## [1.4.9] - 2026-11-23
7
23
 
8
24
  ### 新增
package/lib/bin.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { i as codeartsAccountsPath, t as CodeArtsAccountStore } from "./auth-BaxN0iKC.mjs";
3
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";
4
+ import { i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-D4fJX342.mjs";
5
5
  import { existsSync, statSync } from "node:fs";
6
6
  //#region src/bin.ts
7
7
  /**
@@ -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
- "heatHourCell": "xoziZG_heatHourCell",
198
- "balanceUnit": "xoziZG_balanceUnit",
199
- "skeletonRow": "xoziZG_skeletonRow",
197
+ "updated": "xoziZG_updated",
198
+ "expiryLabel": "xoziZG_expiryLabel",
199
+ "creditHint": "xoziZG_creditHint",
200
+ "modelName": "xoziZG_modelName",
201
+ "concurrencyButton": "xoziZG_concurrencyButton",
202
+ "usageFill": "xoziZG_usageFill",
203
+ "error": "xoziZG_error",
204
+ "usageTipSep": "xoziZG_usageTipSep",
200
205
  "accountMenuAnchor": "xoziZG_accountMenuAnchor",
201
- "meta": "xoziZG_meta",
202
- "balance": "xoziZG_balance",
206
+ "heatCell": "xoziZG_heatCell",
207
+ "trendTip": "xoziZG_trendTip",
208
+ "desc": "xoziZG_desc",
209
+ "groupHeadFirst": "xoziZG_groupHeadFirst",
210
+ "claimAllRow": "xoziZG_claimAllRow",
211
+ "sectionLabel": "xoziZG_sectionLabel",
212
+ "windowRange": "xoziZG_windowRange",
213
+ "accountConcurrencyInline": "xoziZG_accountConcurrencyInline",
214
+ "choiceRow": "xoziZG_choiceRow",
215
+ "usageTip": "xoziZG_usageTip",
216
+ "doctorRow": "xoziZG_doctorRow",
217
+ "skeleton": "xoziZG_skeleton",
218
+ "usageBar": "xoziZG_usageBar",
219
+ "statLabel": "xoziZG_statLabel",
220
+ "modelChart": "xoziZG_modelChart",
221
+ "bar": "xoziZG_bar",
222
+ "section": "xoziZG_section",
223
+ "card": "xoziZG_card",
224
+ "creditRow": "xoziZG_creditRow",
225
+ "statusLine": "xoziZG_statusLine",
226
+ "accountConcurrencyLabel": "xoziZG_accountConcurrencyLabel",
227
+ "windowButtonOpen": "xoziZG_windowButtonOpen",
228
+ "accountNameRow": "xoziZG_accountNameRow",
229
+ "headText": "xoziZG_headText",
230
+ "usageTipRow": "xoziZG_usageTipRow",
231
+ "header": "xoziZG_header",
232
+ "accountClearHint": "xoziZG_accountClearHint",
233
+ "accountRow": "xoziZG_accountRow",
234
+ "modelShare": "xoziZG_modelShare",
235
+ "heatGrid": "xoziZG_heatGrid",
203
236
  "heatAxisSlot": "xoziZG_heatAxisSlot",
237
+ "modelRow": "xoziZG_modelRow",
204
238
  "statCard": "xoziZG_statCard",
239
+ "windowInput": "xoziZG_windowInput",
240
+ "balanceMeta": "xoziZG_balanceMeta",
205
241
  "actions": "xoziZG_actions",
206
- "statusLine": "xoziZG_statusLine",
207
- "usageBar": "xoziZG_usageBar",
208
- "name": "xoziZG_name",
209
- "barFill": "xoziZG_barFill",
210
- "creditFooter": "xoziZG_creditFooter",
211
- "modelTrack": "xoziZG_modelTrack",
212
- "statSub": "xoziZG_statSub",
213
- "windowPopoverRow": "xoziZG_windowPopoverRow",
214
242
  "windowInputSet": "xoziZG_windowInputSet",
215
- "modelName": "xoziZG_modelName",
216
- "manual": "xoziZG_manual",
217
- "header": "xoziZG_header",
218
- "modelCheck": "xoziZG_modelCheck",
219
- "creditLink": "xoziZG_creditLink",
220
- "manualSummary": "xoziZG_manualSummary",
221
- "accountEntry": "xoziZG_accountEntry",
243
+ "concurrencyStepper": "xoziZG_concurrencyStepper",
244
+ "skeletonRow": "xoziZG_skeletonRow",
222
245
  "statValue": "xoziZG_statValue",
223
- "area": "xoziZG_area",
224
- "modelRequests": "xoziZG_modelRequests",
246
+ "modelCheck": "xoziZG_modelCheck",
247
+ "balanceRow": "xoziZG_balanceRow",
248
+ "body": "xoziZG_body",
249
+ "creditFooter": "xoziZG_creditFooter",
225
250
  "accountToggle": "xoziZG_accountToggle",
226
- "desc": "xoziZG_desc",
227
- "tabs": "xoziZG_tabs",
251
+ "hint": "xoziZG_hint",
252
+ "name": "xoziZG_name",
253
+ "modelTrack": "xoziZG_modelTrack",
254
+ "windowCaret": "xoziZG_windowCaret",
255
+ "modelMeta": "xoziZG_modelMeta",
228
256
  "usageTipName": "xoziZG_usageTipName",
229
- "heatWeekday": "xoziZG_heatWeekday",
230
- "expiryRow": "xoziZG_expiryRow",
231
- "windowAnchor": "xoziZG_windowAnchor",
232
- "accountInfo": "xoziZG_accountInfo",
233
- "concurrencyButton": "xoziZG_concurrencyButton",
234
- "modelChart": "xoziZG_modelChart",
235
- "headText": "xoziZG_headText",
236
- "usageTipSep": "xoziZG_usageTipSep",
237
- "accountName": "xoziZG_accountName",
238
- "heatLegendChip": "xoziZG_heatLegendChip",
239
- "choiceTail": "xoziZG_choiceTail",
240
- "windowButtonSet": "xoziZG_windowButtonSet",
241
- "choiceRow": "xoziZG_choiceRow",
242
- "heatGrid": "xoziZG_heatGrid",
243
- "creditHint": "xoziZG_creditHint",
244
- "statGrid": "xoziZG_statGrid",
245
- "skeleton": "xoziZG_skeleton",
246
- "skeletonBreath": "xoziZG_skeletonBreath",
247
- "accountClear": "xoziZG_accountClear",
257
+ "windowButton": "xoziZG_windowButton",
258
+ "windowHint": "xoziZG_windowHint",
259
+ "modelRequests": "xoziZG_modelRequests",
260
+ "heatAxis": "xoziZG_heatAxis",
248
261
  "avatar": "xoziZG_avatar",
249
- "doctorRow": "xoziZG_doctorRow",
250
- "groupHead": "xoziZG_groupHead",
251
- "body": "xoziZG_body",
252
- "usageTipRow": "xoziZG_usageTipRow",
253
- "heatCell": "xoziZG_heatCell",
254
- "accountConcurrencyLabel": "xoziZG_accountConcurrencyLabel",
255
- "creditBlock": "xoziZG_creditBlock",
256
- "concurrencyValue": "xoziZG_concurrencyValue",
262
+ "accountName": "xoziZG_accountName",
257
263
  "count": "xoziZG_count",
258
- "modelShare": "xoziZG_modelShare",
264
+ "choices": "xoziZG_choices",
265
+ "manualForm": "xoziZG_manualForm",
266
+ "area": "xoziZG_area",
267
+ "windowPopoverHead": "xoziZG_windowPopoverHead",
268
+ "balanceUnit": "xoziZG_balanceUnit",
269
+ "accountInfo": "xoziZG_accountInfo",
270
+ "expiryRow": "xoziZG_expiryRow",
271
+ "windowPopoverRow": "xoziZG_windowPopoverRow",
272
+ "modelSpec": "xoziZG_modelSpec",
273
+ "statSub": "xoziZG_statSub",
274
+ "check": "xoziZG_check",
275
+ "accountMenu": "xoziZG_accountMenu",
276
+ "field": "xoziZG_field",
259
277
  "windowUnit": "xoziZG_windowUnit",
260
- "windowPopoverValue": "xoziZG_windowPopoverValue",
261
- "card": "xoziZG_card",
262
- "concurrencyStepper": "xoziZG_concurrencyStepper",
278
+ "sectionHead": "xoziZG_sectionHead",
279
+ "accountCard": "xoziZG_accountCard",
280
+ "heatHourCell": "xoziZG_heatHourCell",
281
+ "accountEntry": "xoziZG_accountEntry",
282
+ "accountClear": "xoziZG_accountClear",
283
+ "choiceTail": "xoziZG_choiceTail",
284
+ "doctorName": "xoziZG_doctorName",
285
+ "manual": "xoziZG_manual",
286
+ "manualSummary": "xoziZG_manualSummary",
287
+ "fieldLabel": "xoziZG_fieldLabel",
288
+ "creditBlock": "xoziZG_creditBlock",
263
289
  "modelTokens": "xoziZG_modelTokens",
264
- "accountRow": "xoziZG_accountRow",
265
- "accountHint": "xoziZG_accountHint",
266
- "choices": "xoziZG_choices",
267
- "creditRow": "xoziZG_creditRow",
290
+ "windowAnchor": "xoziZG_windowAnchor",
291
+ "windowSection": "xoziZG_windowSection",
292
+ "windowPopover": "xoziZG_windowPopover",
293
+ "accountGrid": "xoziZG_accountGrid",
294
+ "heatWeekday": "xoziZG_heatWeekday",
268
295
  "heatHours": "xoziZG_heatHours",
269
- "balanceMeta": "xoziZG_balanceMeta",
270
- "accountToolbar": "xoziZG_accountToolbar",
271
- "section": "xoziZG_section",
272
- "tabPanel": "xoziZG_tabPanel",
273
- "modelMeta": "xoziZG_modelMeta",
274
- "sectionLabel": "xoziZG_sectionLabel",
275
- "fieldLabel": "xoziZG_fieldLabel",
276
- "doctorList": "xoziZG_doctorList",
277
- "windowCaret": "xoziZG_windowCaret",
278
- "link": "xoziZG_link",
279
- "expiryLabel": "xoziZG_expiryLabel",
280
- "heatAxis": "xoziZG_heatAxis",
281
- "accountClearHint": "xoziZG_accountClearHint",
296
+ "windowButtonSet": "xoziZG_windowButtonSet",
297
+ "groupHead": "xoziZG_groupHead",
298
+ "heatLegendChip": "xoziZG_heatLegendChip",
299
+ "balance": "xoziZG_balance",
282
300
  "accountMenuItem": "xoziZG_accountMenuItem",
283
- "hint": "xoziZG_hint",
284
- "bar": "xoziZG_bar",
285
- "modelFill": "xoziZG_modelFill",
286
301
  "heatLegend": "xoziZG_heatLegend",
287
- "windowPopoverHead": "xoziZG_windowPopoverHead",
288
- "manualForm": "xoziZG_manualForm",
289
- "accountCard": "xoziZG_accountCard",
290
- "modelRow": "xoziZG_modelRow",
291
- "windowPopover": "xoziZG_windowPopover",
292
- "windowRange": "xoziZG_windowRange",
293
- "windowButtonOpen": "xoziZG_windowButtonOpen",
294
- "usageTip": "xoziZG_usageTip",
295
- "trendTip": "xoziZG_trendTip",
296
- "modelSpec": "xoziZG_modelSpec",
302
+ "link": "xoziZG_link",
303
+ "accountToolbar": "xoziZG_accountToolbar",
304
+ "statGrid": "xoziZG_statGrid",
297
305
  "danger": "xoziZG_danger",
306
+ "tabPanel": "xoziZG_tabPanel",
307
+ "modelFill": "xoziZG_modelFill",
308
+ "concurrencyValue": "xoziZG_concurrencyValue",
309
+ "creditRows": "xoziZG_creditRows",
310
+ "meta": "xoziZG_meta",
311
+ "skeletonBreath": "xoziZG_skeletonBreath",
312
+ "windowPopoverValue": "xoziZG_windowPopoverValue",
298
313
  "groupLabel": "xoziZG_groupLabel",
299
- "error": "xoziZG_error",
300
- "doctorName": "xoziZG_doctorName",
301
- "accountNameRow": "xoziZG_accountNameRow",
302
- "check": "xoziZG_check",
303
- "accountConcurrencyInline": "xoziZG_accountConcurrencyInline",
304
- "accountGrid": "xoziZG_accountGrid",
305
- "windowButton": "xoziZG_windowButton",
306
- "statLabel": "xoziZG_statLabel",
307
- "updated": "xoziZG_updated",
308
- "sectionHead": "xoziZG_sectionHead",
309
- "windowInput": "xoziZG_windowInput",
310
- "claimAllRow": "xoziZG_claimAllRow",
311
- "groupHeadFirst": "xoziZG_groupHeadFirst",
312
- "accountMenu": "xoziZG_accountMenu",
313
- "balanceRow": "xoziZG_balanceRow",
314
- "windowSection": "xoziZG_windowSection",
314
+ "tabs": "xoziZG_tabs",
315
315
  "accountRowActions": "xoziZG_accountRowActions",
316
- "field": "xoziZG_field",
317
- "creditRows": "xoziZG_creditRows",
318
- "windowHint": "xoziZG_windowHint",
319
- "usageFill": "xoziZG_usageFill"
316
+ "doctorList": "xoziZG_doctorList",
317
+ "accountHint": "xoziZG_accountHint",
318
+ "creditLink": "xoziZG_creditLink",
319
+ "barFill": "xoziZG_barFill"
320
320
  };
321
321
  //#endregion
322
322
  //#region src/client/CodeArtsPluginCard.tsx
@@ -2444,7 +2444,7 @@ function CodeArtsPluginCard({ t }) {
2444
2444
  className: [
2445
2445
  CodeArtsPluginCard_module_css_default.windowButton,
2446
2446
  windowOpenFor === choice.id ? CodeArtsPluginCard_module_css_default.windowButtonOpen : "",
2447
- choice.contextWindowOverride === void 0 ? "" : CodeArtsPluginCard_module_css_default.windowButtonSet
2447
+ choice.contextWindowOverride === void 0 && choice.maxTokensOverride === void 0 ? "" : CodeArtsPluginCard_module_css_default.windowButtonSet
2448
2448
  ].filter(Boolean).join(" "),
2449
2449
  "aria-expanded": windowOpenFor === choice.id,
2450
2450
  "aria-label": t("modelWindowLabel", { model: modelName(choice) }),
@@ -2452,7 +2452,14 @@ function CodeArtsPluginCard({ t }) {
2452
2452
  model: modelName(choice),
2453
2453
  value: formatWindow(choice.contextWindowDiscovered ?? choice.contextWindow)
2454
2454
  }),
2455
- onClick: () => setWindowOpenFor((current) => current === choice.id ? null : choice.id),
2455
+ onClick: () => {
2456
+ if (windowOpenFor === choice.id) {
2457
+ closeWindow();
2458
+ return;
2459
+ }
2460
+ if (windowOpenFor !== null) closeWindow();
2461
+ setWindowOpenFor(choice.id);
2462
+ },
2456
2463
  children: [t("modelSpec", {
2457
2464
  context: formatWindow(windowNumberValue(choice)),
2458
2465
  output: formatWindow(choice.maxTokens)
@@ -3623,14 +3630,14 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
3623
3630
  document.head.appendChild(tag);
3624
3631
  }
3625
3632
  var CodeArtsPanel_module_css_default = {
3626
- "back": "Z66cgG_back",
3627
- "icon": "Z66cgG_icon",
3628
- "desc": "Z66cgG_desc",
3629
3633
  "head": "Z66cgG_head",
3630
- "title": "Z66cgG_title",
3631
- "page": "Z66cgG_page",
3634
+ "body": "Z66cgG_body",
3632
3635
  "backCaret": "Z66cgG_backCaret",
3633
- "body": "Z66cgG_body"
3636
+ "desc": "Z66cgG_desc",
3637
+ "icon": "Z66cgG_icon",
3638
+ "page": "Z66cgG_page",
3639
+ "title": "Z66cgG_title",
3640
+ "back": "Z66cgG_back"
3634
3641
  };
3635
3642
  //#endregion
3636
3643
  //#region src/client/CodeArtsPanel.tsx
package/lib/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
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-BaxN0iKC.mjs";
2
2
  import { $ as withMaxTokensOverride, A as prepareChatBody, C as isWelfareClaimedStatus, D as modelUnavailableReasonText, E as maxTokensCeilingFor, F as signedGet, G as isBenefitBlocked, H as creditRatioLabel, I as upstreamErrorMessage, K as isBenefitModel, M as rateLimitFrame, N as setMaxTokenOverride, O as overrideValueFor, P as setMaxTokenOverrides, Q as withContextWindowOverride, R as CodeArtsCatalog, S as isTpmLimit, T as learnedContextWindowFor, U as filterEnabledModels, V as clearBenefitBlocked, W as forgetModelUnavailable, X as modelUnavailableReason, _ as isNotMultimodal, a as claimDailyWelfare, b as isQueueRejectText, c as degradeTokenCeiling, d as fetchQueueStatus, f as fetchWelfareCampaigns, g as isModelNotAccessible, h as isIamTokenError, i as chatStream, j as queueFrame, k as pickDailyWelfareCampaign, l as fetchCallerIdentity, m as isConcurrencyCap, n as SNAP_HOST, o as clearQueueStatus, p as firstFrameError, q as markModelUnavailable, r as canonicalModel, s as contextWindowOverrideFor, t as MAX_TOKENS_FLOOR, u as fetchModels, v as isParamInvalidFrame, w as learnContextWindow, x as isQueueableRate, y as isQueueReject, z as FALLBACK_CODEARTS_MODELS } from "./upstream-BX6-klXI.mjs";
3
- import { a as refreshCatalog, i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-1elDzsw0.mjs";
3
+ import { a as refreshCatalog, i as discoverModels, n as CodeArtsUsageTracker, r as codeartsUsagePath, t as CODEARTS_VERSION } from "./version-D4fJX342.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";
@@ -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.9";
539
+ const CODEARTS_VERSION = "1.4.11";
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.9",
5
+ "version": "1.4.11",
6
6
  "packageManager": "pnpm@11.24.0",
7
7
  "author": "elegant01",
8
8
  "keywords": [