dsh-qoder-plugin 0.6.3 → 0.6.4

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/lib/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { B as QoderCredentialStore, D as qoderCatalogPath, E as QoderCatalogStore, H as qoderCredentialIdentity, O as FALLBACK_QODER_MODELS, b as createQoderTransport, f as QODER_CONNECT_VERSION, i as variantFor, l as qoderHostHeartbeatPath, m as QoderUpstreamClient, r as QODER_VARIANTS, s as isHeartbeatProcessAlive, t as CHINA_VARIANT, u as readHostHeartbeat, y as validateApiKey } from "./variants-CATiqb4o.js";
2
+ import { B as QoderCredentialStore, D as qoderCatalogPath, E as QoderCatalogStore, H as qoderCredentialIdentity, O as FALLBACK_QODER_MODELS, b as createQoderTransport, f as QODER_CONNECT_VERSION, i as variantFor, l as qoderHostHeartbeatPath, m as QoderUpstreamClient, r as QODER_VARIANTS, s as isHeartbeatProcessAlive, t as CHINA_VARIANT, u as readHostHeartbeat, y as validateApiKey } from "./variants--jTtaG59.js";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import { realpathSync } from "node:fs";
5
5
  import { fileURLToPath } from "node:url";
package/lib/client.js CHANGED
@@ -469,9 +469,7 @@ window.__ModuleLoader__.load({
469
469
  const efforts = (model.reasoningEfforts ?? []).filter((id) => id !== "");
470
470
  if (efforts.length === 0) return t("effortsUnsupported");
471
471
  const nameOf = (id) => id === "low" ? t("effortLow") : id === "medium" ? t("effortMedium") : id === "high" ? t("effortHigh") : id === "xhigh" ? t("effortXhigh") : id === "max" ? t("effortMax") : id === "minimal" ? t("effortMinimal") : id;
472
- const levels = efforts.map(nameOf).join(" · ");
473
- const fallback = model.defaultReasoningEffort !== void 0 && efforts.includes(model.defaultReasoningEffort) ? ` (${t("modelEffortsDefault", { name: nameOf(model.defaultReasoningEffort) })})` : "";
474
- return t("modelEfforts", { levels }) + fallback;
472
+ return efforts.map(nameOf).join(" · ") + (model.defaultReasoningEffort !== void 0 && efforts.includes(model.defaultReasoningEffort) ? ` (${t("modelEffortsDefault", { name: nameOf(model.defaultReasoningEffort) })})` : "");
475
473
  }
476
474
  /** Round an axis end up to a clean K/M boundary so tick labels stay readable. */
477
475
  function roundUpAxis(value) {
@@ -608,6 +606,7 @@ window.__ModuleLoader__.load({
608
606
  children: [
609
607
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true" }),
610
608
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("modelNameColumn") }),
609
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("effortsHeading") }),
611
610
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("contextHeading") })
612
611
  ]
613
612
  }), list.map((model) => {
@@ -648,10 +647,13 @@ window.__ModuleLoader__.load({
648
647
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
649
648
  className: "qdp-modelMeta",
650
649
  children: model.id
651
- }),
652
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QdpTag, { children: effortsText })
650
+ })
653
651
  ]
654
652
  }),
653
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
654
+ className: "qdp-modelEfforts",
655
+ children: effortsText
656
+ }),
655
657
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
656
658
  className: "qdp-modelAxis",
657
659
  children: current === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -2135,6 +2137,36 @@ window.__ModuleLoader__.load({
2135
2137
  })
2136
2138
  })]
2137
2139
  }),
2140
+ settings.status === "unavailable" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2141
+ className: "qdp-row",
2142
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2143
+ className: "qdp-rowText",
2144
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2145
+ className: "qdp-rowTitle",
2146
+ children: t("quotaPollLabel")
2147
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2148
+ className: "qdp-rowDesc",
2149
+ children: t("quotaPollHint")
2150
+ })]
2151
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2152
+ className: "qdp-rowControl",
2153
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(QdpInput, {
2154
+ className: "qdp-inputShort",
2155
+ type: "number",
2156
+ min: 1,
2157
+ step: 1,
2158
+ value: pollMinutes,
2159
+ "aria-label": t("quotaPollLabel"),
2160
+ onChange: (event) => {
2161
+ const minutes = Number.parseInt(event.target.value, 10);
2162
+ if (Number.isFinite(minutes) && minutes >= 1) writePollMinutes(minutes);
2163
+ }
2164
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2165
+ className: "qdp-caption",
2166
+ children: t("quotaPollUnit")
2167
+ })]
2168
+ })]
2169
+ }),
2138
2170
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2139
2171
  className: "qdp-row",
2140
2172
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -2177,36 +2209,6 @@ window.__ModuleLoader__.load({
2177
2209
  })
2178
2210
  })]
2179
2211
  }),
2180
- settings.status === "unavailable" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2181
- className: "qdp-row",
2182
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2183
- className: "qdp-rowText",
2184
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2185
- className: "qdp-rowTitle",
2186
- children: t("quotaPollLabel")
2187
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2188
- className: "qdp-rowDesc",
2189
- children: t("quotaPollHint")
2190
- })]
2191
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2192
- className: "qdp-rowControl",
2193
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(QdpInput, {
2194
- className: "qdp-inputShort",
2195
- type: "number",
2196
- min: 1,
2197
- step: 1,
2198
- value: pollMinutes,
2199
- "aria-label": t("quotaPollLabel"),
2200
- onChange: (event) => {
2201
- const minutes = Number.parseInt(event.target.value, 10);
2202
- if (Number.isFinite(minutes) && minutes >= 1) writePollMinutes(minutes);
2203
- }
2204
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2205
- className: "qdp-caption",
2206
- children: t("quotaPollUnit")
2207
- })]
2208
- })]
2209
- }),
2210
2212
  settings.status === "ready" && !settings.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2211
2213
  className: "qdp-error",
2212
2214
  children: t("quotaSettingsSaveFailed")
@@ -3699,7 +3701,11 @@ window.__ModuleLoader__.load({
3699
3701
 
3700
3702
  .qdp-modelScroll {
3701
3703
  max-height: 420px;
3704
+ /* Vertical scrolling only: a horizontal bar under the roster was pure noise,
3705
+ and the extra right padding keeps the scrollbar off the context slider. */
3706
+ overflow-x: hidden;
3702
3707
  overflow-y: auto;
3708
+ padding-right: 12px;
3703
3709
  overscroll-behavior: contain;
3704
3710
  }
3705
3711
  .qdp-modelColumns {
@@ -3707,8 +3713,8 @@ window.__ModuleLoader__.load({
3707
3713
  top: 0;
3708
3714
  z-index: 1;
3709
3715
  display: grid;
3710
- grid-template-columns: auto minmax(0, 1fr) 232px;
3711
- gap: 10px;
3716
+ grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.15fr) 232px;
3717
+ gap: 12px;
3712
3718
  align-items: center;
3713
3719
  padding: 4px 0 4px;
3714
3720
  border-bottom: 0.5px solid var(--dsw-alias-border-l2);
@@ -3718,8 +3724,8 @@ window.__ModuleLoader__.load({
3718
3724
  }
3719
3725
  .qdp-modelRow {
3720
3726
  display: grid;
3721
- grid-template-columns: auto minmax(0, 1fr) 232px;
3722
- gap: 10px;
3727
+ grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.15fr) 232px;
3728
+ gap: 12px;
3723
3729
  align-items: center;
3724
3730
  min-height: 44px;
3725
3731
  padding: 6px 0;
@@ -3766,6 +3772,15 @@ window.__ModuleLoader__.load({
3766
3772
  color: var(--dsw-alias-label-caption);
3767
3773
  font-variant-numeric: tabular-nums;
3768
3774
  }
3775
+ /* The effort column: the tiers themselves, no "Efforts:" prefix — the column
3776
+ header says what they are. */
3777
+ .qdp-modelEfforts {
3778
+ min-width: 0;
3779
+ font: var(--dsw-font-xxs-12);
3780
+ color: var(--dsw-alias-label-secondary);
3781
+ font-variant-numeric: tabular-nums;
3782
+ overflow-wrap: anywhere;
3783
+ }
3769
3784
  .qdp-modelAxis {
3770
3785
  min-width: 0;
3771
3786
  }
@@ -3787,14 +3802,14 @@ window.__ModuleLoader__.load({
3787
3802
  position: absolute;
3788
3803
  top: 50%;
3789
3804
  width: 1px;
3790
- height: 6px;
3805
+ height: 7px;
3791
3806
  border-radius: 999px;
3792
- background: var(--dsw-alias-border-l2);
3807
+ background: var(--dsw-alias-label-caption);
3793
3808
  transform: translate(-50%, -50%);
3794
3809
  }
3795
3810
  .qdp-windowTickMarkMajor {
3796
- height: 8px;
3797
- background: var(--dsw-alias-border-l3);
3811
+ height: 10px;
3812
+ background: var(--dsw-alias-label-tertiary);
3798
3813
  }
3799
3814
  /* Tier labels sit on the field colour so the ruler passes behind them. */
3800
3815
  .qdp-windowTick {
@@ -4195,6 +4210,7 @@ window.__ModuleLoader__.load({
4195
4210
  modelsNoModels: "No models available.",
4196
4211
  modelsNoMatch: "No models matching \"{query}\".",
4197
4212
  modelNameColumn: "Model name",
4213
+ effortsHeading: "Reasoning effort",
4198
4214
  contextHeading: "Context window",
4199
4215
  contextUpTo: "up to {size}",
4200
4216
  contextDefault: "default {size}",
@@ -4239,17 +4255,17 @@ window.__ModuleLoader__.load({
4239
4255
  quotaToggleHint: "Show this account’s remaining credit in the sidebar footer.",
4240
4256
  autoCheckInCN: "Qoder (China) daily auto check-in (100 Credits)",
4241
4257
  autoCheckInGlobal: "Qoder Global (International) daily auto check-in",
4242
- autoCheckInHintCN: "Automatically check in daily to claim 100 Credits for the China account.",
4243
- autoCheckInHintGlobal: "Automatically check in daily to claim available perks for the Global account.",
4244
- checkInTimeHint: "The moment the automatic check-in runs each day, in UTC+8.",
4258
+ autoCheckInHintCN: "Check in automatically every day; during campaigns this earns 100 Credits of compute for the China and Global accounts.",
4259
+ autoCheckInHintGlobal: "Check in automatically every day; during campaigns this earns 100 Credits of compute for the China and Global accounts.",
4260
+ checkInTimeHint: "The time the automatic check-in runs each day, Beijing time (UTC+8), refreshing at 10:00 daily.",
4245
4261
  autoCheckInStatusClaimed: "Checked in today (+{amount} Credits)",
4246
4262
  autoCheckInStatusAlready: "Already checked in today",
4247
4263
  autoCheckInStatusNoCampaign: "No active benefit campaign today",
4248
4264
  checkInNeedsClient: "Qoder's daily campaign needs the Qoder desktop app on this machine: the international service only serves it to requests carrying a client-minted device identity. Install Qoder and try again.",
4249
4265
  autoCheckInStatusError: "Auto check-in error: {message}",
4250
4266
  quotaSignInRequired: "Save a PAT for this variant first to enable this card.",
4251
- quotaPollLabel: "Refresh interval",
4252
- quotaPollHint: "Applies to both quota cards. Longer is kinder to the billing endpoint.",
4267
+ quotaPollLabel: "Credit refresh interval",
4268
+ quotaPollHint: "How often the remaining-credit label refreshes; a longer interval is kinder to the billing endpoint.",
4253
4269
  quotaPollUnit: "min",
4254
4270
  quotaSettingsSave: "Save",
4255
4271
  quotaSettingsSaving: "Saving…",
@@ -4294,10 +4310,9 @@ window.__ModuleLoader__.load({
4294
4310
  modelsSaveFailed: "Save failed: {message}",
4295
4311
  contextWindowAria: "Context window size",
4296
4312
  variantSwitcherAria: "Qoder version",
4297
- quotaReadoutEnabledLabel: "Show credits in the composer",
4298
- quotaReadoutEnabledDesc: "A remaining-credit chip in the composer toolbar; click it to open the details panel.",
4313
+ quotaReadoutEnabledLabel: "Credits in the dialog",
4314
+ quotaReadoutEnabledDesc: "Show the remaining credits on the composer toolbar; click to expand the details panel.",
4299
4315
  checkInTime: "Check-in time",
4300
- modelEfforts: "Efforts: {levels}",
4301
4316
  modelEffortsDefault: "default {name}",
4302
4317
  effortMinimal: "minimal",
4303
4318
  effortLow: "low",
@@ -4407,6 +4422,7 @@ window.__ModuleLoader__.load({
4407
4422
  modelsNoModels: "暂无可配置的模型。",
4408
4423
  modelsNoMatch: "未找到匹配“{query}”的模型。",
4409
4424
  modelNameColumn: "模型名称",
4425
+ effortsHeading: "思考强度",
4410
4426
  contextHeading: "上下文窗口",
4411
4427
  contextUpTo: "最高 {size}",
4412
4428
  contextDefault: "默认 {size}",
@@ -4451,17 +4467,17 @@ window.__ModuleLoader__.load({
4451
4467
  quotaToggleHint: "在侧栏底部展示该账号的剩余额度。",
4452
4468
  autoCheckInCN: "Qoder(国内版)每日自动签到",
4453
4469
  autoCheckInGlobal: "Qoder Global(国际版)每日自动签到",
4454
- autoCheckInHintCN: "每天自动签到,为国内版账号领取 100 Credits 算力额度。",
4455
- autoCheckInHintGlobal: "每天自动签到,为国际版账号领取可用福利额度。",
4456
- checkInTimeHint: "每天执行自动签到的时刻,按北京时间(UTC+8)。",
4470
+ autoCheckInHintCN: "每天自动签到,活动期间为国内版和国际版账号领取 100 Credits 算力额度。",
4471
+ autoCheckInHintGlobal: "每天自动签到,活动期间为国内版和国际版账号领取 100 Credits 算力额度。",
4472
+ checkInTimeHint: "每天执行自动签到的时刻,按北京时间(UTC+8)于每日 10:00 刷新。",
4457
4473
  autoCheckInStatusClaimed: "今日已自动签到(+{amount} Credits)",
4458
4474
  autoCheckInStatusAlready: "今日已完成签到",
4459
4475
  autoCheckInStatusNoCampaign: "今日无可用签到福利活动",
4460
4476
  checkInNeedsClient: "每日签到需要本机安装 Qoder 桌面客户端:国际版只对携带客户端设备身份的请求下发该活动。安装 Qoder 后重试即可。",
4461
4477
  autoCheckInStatusError: "自动签到出错:{message}",
4462
4478
  quotaSignInRequired: "请先为该变体保存 PAT,再开启此开关。",
4463
- quotaPollLabel: "刷新间隔",
4464
- quotaPollHint: "对两张额度卡片同时生效。间隔越长对计费接口越友好。",
4479
+ quotaPollLabel: "积分刷新间隔",
4480
+ quotaPollHint: "剩余积分标签的刷新频率,间隔越长对计费接口越友好。",
4465
4481
  quotaPollUnit: "分钟",
4466
4482
  quotaSettingsSave: "保存",
4467
4483
  quotaSettingsSaving: "保存中…",
@@ -4506,10 +4522,9 @@ window.__ModuleLoader__.load({
4506
4522
  modelsSaveFailed: "保存失败:{message}",
4507
4523
  contextWindowAria: "上下文窗口大小",
4508
4524
  variantSwitcherAria: "Qoder 版本",
4509
- quotaReadoutEnabledLabel: "在对话框显示积分",
4510
- quotaReadoutEnabledDesc: "在输入框工具条上显示剩余积分标签,点击可展开明细面板。",
4525
+ quotaReadoutEnabledLabel: "对话框显示积分",
4526
+ quotaReadoutEnabledDesc: "在输入框工具条上展示剩余积分,点击可展开明细面板。",
4511
4527
  checkInTime: "签到时间",
4512
- modelEfforts: "Efforts: {levels}",
4513
4528
  modelEffortsDefault: "default {name}",
4514
4529
  effortMinimal: "minimal",
4515
4530
  effortLow: "low",
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as QODER_AUTH_PATH, B as QoderCredentialStore, C as PROBE_EFFORT_CANDIDATES, D as qoderCatalogPath, E as QoderCatalogStore, F as QODER_SETTINGS_FACE_PATH, G as QODER_DATA_DIR_NAME, H as qoderCredentialIdentity, I as QODER_STATUS_PATH, J as qoderStateDir, K as qoderMachineIdPath, L as QODER_AUTH_FILENAME, M as QODER_GLOBAL_PROBE_PATH, N as QODER_GLOBAL_STATUS_PATH, O as FALLBACK_QODER_MODELS, P as QODER_PROBE_PATH, R as QODER_PAT_ENV_CN, S as getMachineId, T as randomSentinel, U as qoderOwnAuthPath, V as patTail, W as QODER_DATA_DIR_ENV, _ as modelInfoOf, a as QODER_HOST_HEARTBEAT_FILENAME, b as createQoderTransport, c as processStartTimeMs, d as writeHostHeartbeat, f as QODER_CONNECT_VERSION, g as kindFromQoderFailure, h as classifyUpstreamError, i as variantFor, j as QODER_GLOBAL_AUTH_PATH, k as QoderCatalog, l as qoderHostHeartbeatPath, m as QoderUpstreamClient, n as GLOBAL_VARIANT, o as clearHostHeartbeat, p as KIND_STATUS, q as qoderPluginDataDir, r as QODER_VARIANTS, s as isHeartbeatProcessAlive, t as CHINA_VARIANT, u as readHostHeartbeat, v as normalizeCredits, w as probeModel, x as getClaimWindowDateString, y as validateApiKey, z as QODER_PAT_ENV_GLOBAL } from "./variants-CATiqb4o.js";
1
+ import { A as QODER_AUTH_PATH, B as QoderCredentialStore, C as PROBE_EFFORT_CANDIDATES, D as qoderCatalogPath, E as QoderCatalogStore, F as QODER_SETTINGS_FACE_PATH, G as QODER_DATA_DIR_NAME, H as qoderCredentialIdentity, I as QODER_STATUS_PATH, J as qoderStateDir, K as qoderMachineIdPath, L as QODER_AUTH_FILENAME, M as QODER_GLOBAL_PROBE_PATH, N as QODER_GLOBAL_STATUS_PATH, O as FALLBACK_QODER_MODELS, P as QODER_PROBE_PATH, R as QODER_PAT_ENV_CN, S as getMachineId, T as randomSentinel, U as qoderOwnAuthPath, V as patTail, W as QODER_DATA_DIR_ENV, _ as modelInfoOf, a as QODER_HOST_HEARTBEAT_FILENAME, b as createQoderTransport, c as processStartTimeMs, d as writeHostHeartbeat, f as QODER_CONNECT_VERSION, g as kindFromQoderFailure, h as classifyUpstreamError, i as variantFor, j as QODER_GLOBAL_AUTH_PATH, k as QoderCatalog, l as qoderHostHeartbeatPath, m as QoderUpstreamClient, n as GLOBAL_VARIANT, o as clearHostHeartbeat, p as KIND_STATUS, q as qoderPluginDataDir, r as QODER_VARIANTS, s as isHeartbeatProcessAlive, t as CHINA_VARIANT, u as readHostHeartbeat, v as normalizeCredits, w as probeModel, x as getClaimWindowDateString, y as validateApiKey, z as QODER_PAT_ENV_GLOBAL } from "./variants--jTtaG59.js";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
4
4
  import { dirname, join, resolve } from "node:path";
@@ -4767,7 +4767,7 @@ const DEFAULT_MAX_TOKENS = 32768;
4767
4767
  const DEFAULT_CONTEXT_WINDOW = 18e4;
4768
4768
  //#endregion
4769
4769
  //#region src/version.ts
4770
- const QODER_CONNECT_VERSION = "0.6.3";
4770
+ const QODER_CONNECT_VERSION = "0.6.4";
4771
4771
  //#endregion
4772
4772
  //#region src/host-heartbeat.ts
4773
4773
  /**
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-qoder-plugin",
3
3
  "displayName": "dsh-qoder-plugin",
4
4
  "description": "把 Qoder 模型接入 DeepSeek Harness:用 PAT 调用与 Qoder CLI 同源的模型服务,支持国内版 / 国际版双区域、模型开关、上下文窗口与每日签到,并提供只读的额度概览。",
5
- "version": "0.6.3",
5
+ "version": "0.6.4",
6
6
  "author": "corrinehu",
7
7
  "keywords": [
8
8
  "dsh-plugin",