dsh-connect-workbuddy 5.2.2 → 5.2.3
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 +19 -0
- package/lib/bin.js +1 -1
- package/lib/client.js +12 -1
- package/lib/{host-heartbeat-r1M_OXJI.js → host-heartbeat-CgYyUwpM.js} +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.2.3 (2026-10-22)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- **「一键测速启用模型」按钮永远点不动(5.2.0 引入,截图发现)** —— 那个按钮的 `disabled` 条件里写的是 `tpsProbing !== undefined`,而 `tpsProbing` 是 `useState<Record<string, boolean>>({})`:**一个永远是对象的记录,永远不会 `undefined`**。于是比较恒为真,按钮永久禁用,整个测速功能从界面上根本进不去,而且没有任何提示说明为什么。
|
|
8
|
+
- **为什么会写错**:旁边两个可用性按钮比较的是 `sweeping !== undefined`,在那个变量上是对的 —— `sweeping` 真的是 `{done,total} | undefined`,`undefined` 确实表示「没在跑」。我照抄了那个表达式的形状,却没带上让它成立的事实:不同的状态变量,可取的值集合不同。**对一个 map 来说,「忙」是「有键」,不是「已定义」。**
|
|
9
|
+
- 修法:新增派生的 `tpsBusy = Object.keys(tpsProbing).length > 0`,用它替代恒真的比较。
|
|
10
|
+
|
|
11
|
+
### Tests
|
|
12
|
+
|
|
13
|
+
- `tests/card-tps-button.spec.tsx`(5 条,新增):**断言的是 DOM 上真实的 `disabled` 布尔值,不是 JSX 文本** —— bug 就住在那条表达式里,文本级断言会和它一起说谎。
|
|
14
|
+
- 有启用模型且没在跑时**不可禁用**(这一条在修复前必红)
|
|
15
|
+
- 点击后真的发出请求,且只测启用的模型
|
|
16
|
+
- **一次只测一个模型**(路由的上限,防止一次点击变成对整份名册的无账花费)
|
|
17
|
+
- **一个都没启用时确实禁用**(防止修复把按钮变成无条件可点)
|
|
18
|
+
- 点击后**行上真的出现数字**(只发请求不渲染的按钮会骗过前四条)
|
|
19
|
+
- 已验证:把修复临时撤回,其中 4 条立刻转红。
|
|
20
|
+
- 全量:**112 文件 / 1812 条全绿**;两个 tsconfig 均 exit 0;build 成功。
|
|
21
|
+
|
|
3
22
|
## 5.2.2 (2026-10-22)
|
|
4
23
|
|
|
5
24
|
### Fixes
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as defaultDesktopAuthCandidates, Ct as findWorkbuddyAppExecutableWithSource, L as WorkBuddyUpstreamClient, M as workbuddyOwnAuthPath, _t as WORKBUDDY_APP_EXECUTABLE_ENV, a as readHostHeartbeat, b as WorkBuddyCredentialStore, c as WORKBUDDY_CONNECT_VERSION, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, jt as hostPeersInfo, k as legacyWorkbuddyOwnAuthPath, l as piAiRuntimeInfo, o as workbuddyHostHeartbeatPath, r as isHeartbeatProcessAlive, u as FALLBACK_WORKBUDDY_MODELS, w as defaultDesktopAuthDirs, y as WORKBUDDY_AUTH_FILE_ENV } from "./host-heartbeat-
|
|
2
|
+
import { C as defaultDesktopAuthCandidates, Ct as findWorkbuddyAppExecutableWithSource, L as WorkBuddyUpstreamClient, M as workbuddyOwnAuthPath, _t as WORKBUDDY_APP_EXECUTABLE_ENV, a as readHostHeartbeat, b as WorkBuddyCredentialStore, c as WORKBUDDY_CONNECT_VERSION, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, jt as hostPeersInfo, k as legacyWorkbuddyOwnAuthPath, l as piAiRuntimeInfo, o as workbuddyHostHeartbeatPath, r as isHeartbeatProcessAlive, u as FALLBACK_WORKBUDDY_MODELS, w as defaultDesktopAuthDirs, y as WORKBUDDY_AUTH_FILE_ENV } from "./host-heartbeat-CgYyUwpM.js";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
//#region src/bin.ts
|
package/lib/client.js
CHANGED
|
@@ -6139,6 +6139,17 @@ window.__ModuleLoader__.load({
|
|
|
6139
6139
|
}
|
|
6140
6140
|
};
|
|
6141
6141
|
/**
|
|
6142
|
+
* Whether ANY speed run is in flight, for the sweep button's disabled state.
|
|
6143
|
+
*
|
|
6144
|
+
* NOT `tpsProbing !== undefined`. `tpsProbing` is a record that is ALWAYS an
|
|
6145
|
+
* object, so that comparison is permanently true and the button was
|
|
6146
|
+
* permanently disabled — the defect this corrects. The other two sweep buttons
|
|
6147
|
+
* compare `sweeping !== undefined` because `sweeping` really is an
|
|
6148
|
+
* `{done,total} | undefined` pair; this map has no such absent state, so the
|
|
6149
|
+
* emptiness of its keys is what "busy" means.
|
|
6150
|
+
*/
|
|
6151
|
+
const tpsBusy = Object.keys(tpsProbing).length > 0;
|
|
6152
|
+
/**
|
|
6142
6153
|
* Sweep speed for the models this region has ENABLED.
|
|
6143
6154
|
*
|
|
6144
6155
|
* Enabled-only rather than the whole catalog: a speed run is three real
|
|
@@ -6614,7 +6625,7 @@ window.__ModuleLoader__.load({
|
|
|
6614
6625
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6615
6626
|
type: "button",
|
|
6616
6627
|
className: "dsm-btn dsm-btn-outline dsm-workbuddy-models-sweep",
|
|
6617
|
-
disabled: busy || tpsSweeping !== void 0 ||
|
|
6628
|
+
disabled: busy || tpsSweeping !== void 0 || tpsBusy || activeEnabledIds.size === 0,
|
|
6618
6629
|
title: t("row.tpsSweepEnabledHint"),
|
|
6619
6630
|
onClick: sweepTpsEnabledModels,
|
|
6620
6631
|
children: tpsSweeping === void 0 ? t("row.tpsSweepEnabled") : t("row.tpsTesting", {
|
|
@@ -5861,7 +5861,7 @@ function generationOf(version) {
|
|
|
5861
5861
|
//#endregion
|
|
5862
5862
|
//#region src/version.ts
|
|
5863
5863
|
/** The npm package version this build was produced from. */
|
|
5864
|
-
const WORKBUDDY_CONNECT_VERSION = "5.2.
|
|
5864
|
+
const WORKBUDDY_CONNECT_VERSION = "5.2.3";
|
|
5865
5865
|
//#endregion
|
|
5866
5866
|
//#region src/host-heartbeat.ts
|
|
5867
5867
|
/**
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as regionOf, A as parseWorkBuddyAuth, At as workbuddyAppExecutableCandidates, B as forceNeutralHead, C as defaultDesktopAuthCandidates, D as isEncryptedCredentialError, Dt as macosNestedAppBundles, E as hasEncryptedCredentialFields, Et as macosBundleExecutable, F as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, G as knownRegionOf, H as isConversationIdGateBody, I as WorkBuddyCredentialRejectedError, J as parseCreditMultiplier, K as modelIdOfBody, L as WorkBuddyUpstreamClient, M as workbuddyOwnAuthPath, Mt as resolveDshHome, N as CONTEXT_OVERFLOW_MARKER, Nt as withFileLock, O as isVaultAccountId, Ot as openEncryptedField, P as CREDENTIAL_REJECTED_CODE, Pt as writeFileAtomic, Q as prepareChatBody, R as classifyUpstreamError, S as authFileName, St as findWorkbuddyAppExecutable, T as defaultDesktopAuthPath, Tt as isWorkbuddyBundle, U as isCredentialRejectedError, V as isContextTooLongBody, W as isFirstMessageGateBody, X as parseUpstreamModel, Y as parseReasoning, Z as perturbChannelFingerprints, _ as ENCRYPTED_CREDENTIAL_CODE, _t as WORKBUDDY_APP_EXECUTABLE_ENV, a as readHostHeartbeat, at as offDefaultFor, b as WorkBuddyCredentialStore, bt as deriveAtRestKeyId, c as WORKBUDDY_CONNECT_VERSION, ct as withEffectiveOff, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, dt as pickImageModel, et as attachBusyLevels, f as WorkBuddyCatalog, ft as parseQueueAnswer, g as withoutRouters, gt as nativeModalityOf, h as fallbackModelsFor, ht as imageDefaultFor, i as processStartTimeMs, it as lastRefusalFor, j as workbuddyAccountId, k as legacyWorkbuddyOwnAuthPath, kt as readAtRestKey, l as piAiRuntimeInfo, lt as DEFAULT_IMAGE_SIZE, m as deriveCatalog, mt as NATIVE_MODALITY_BY_MODEL_ID, n as clearHostHeartbeat, nt as REFUSES_OFF_MODEL_IDS, o as workbuddyHostHeartbeatPath, ot as offRefused, p as applyContextBudgets, pt as queueNoticeText, q as openingEvidenceOfBody, r as isHeartbeatProcessAlive, rt as defaultOffModelIds, s as writeHostHeartbeat, st as recordRefusal, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tt as busyDisplaySuffix, u as FALLBACK_WORKBUDDY_MODELS, ut as WorkBuddyImageError, v as WORKBUDDY_AUTH_FILENAME, vt as clearAtRestKeyCache, w as defaultDesktopAuthDirs, wt as isEncryptedFieldWrapper, x as WorkBuddyEncryptedCredentialError, xt as fetchAtRestKeyPayload, y as WORKBUDDY_AUTH_FILE_ENV, yt as deriveAtRestKey, z as declaredTools } from "./host-heartbeat-
|
|
1
|
+
import { $ as regionOf, A as parseWorkBuddyAuth, At as workbuddyAppExecutableCandidates, B as forceNeutralHead, C as defaultDesktopAuthCandidates, D as isEncryptedCredentialError, Dt as macosNestedAppBundles, E as hasEncryptedCredentialFields, Et as macosBundleExecutable, F as WORKBUDDY_FALLBACK_SYSTEM_PROMPT, G as knownRegionOf, H as isConversationIdGateBody, I as WorkBuddyCredentialRejectedError, J as parseCreditMultiplier, K as modelIdOfBody, L as WorkBuddyUpstreamClient, M as workbuddyOwnAuthPath, Mt as resolveDshHome, N as CONTEXT_OVERFLOW_MARKER, Nt as withFileLock, O as isVaultAccountId, Ot as openEncryptedField, P as CREDENTIAL_REJECTED_CODE, Pt as writeFileAtomic, Q as prepareChatBody, R as classifyUpstreamError, S as authFileName, St as findWorkbuddyAppExecutable, T as defaultDesktopAuthPath, Tt as isWorkbuddyBundle, U as isCredentialRejectedError, V as isContextTooLongBody, W as isFirstMessageGateBody, X as parseUpstreamModel, Y as parseReasoning, Z as perturbChannelFingerprints, _ as ENCRYPTED_CREDENTIAL_CODE, _t as WORKBUDDY_APP_EXECUTABLE_ENV, a as readHostHeartbeat, at as offDefaultFor, b as WorkBuddyCredentialStore, bt as deriveAtRestKeyId, c as WORKBUDDY_CONNECT_VERSION, ct as withEffectiveOff, d as FALLBACK_WORKBUDDY_MODELS_GLOBAL, dt as pickImageModel, et as attachBusyLevels, f as WorkBuddyCatalog, ft as parseQueueAnswer, g as withoutRouters, gt as nativeModalityOf, h as fallbackModelsFor, ht as imageDefaultFor, i as processStartTimeMs, it as lastRefusalFor, j as workbuddyAccountId, k as legacyWorkbuddyOwnAuthPath, kt as readAtRestKey, l as piAiRuntimeInfo, lt as DEFAULT_IMAGE_SIZE, m as deriveCatalog, mt as NATIVE_MODALITY_BY_MODEL_ID, n as clearHostHeartbeat, nt as REFUSES_OFF_MODEL_IDS, o as workbuddyHostHeartbeatPath, ot as offRefused, p as applyContextBudgets, pt as queueNoticeText, q as openingEvidenceOfBody, r as isHeartbeatProcessAlive, rt as defaultOffModelIds, s as writeHostHeartbeat, st as recordRefusal, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, tt as busyDisplaySuffix, u as FALLBACK_WORKBUDDY_MODELS, ut as WorkBuddyImageError, v as WORKBUDDY_AUTH_FILENAME, vt as clearAtRestKeyCache, w as defaultDesktopAuthDirs, wt as isEncryptedFieldWrapper, x as WorkBuddyEncryptedCredentialError, xt as fetchAtRestKeyPayload, y as WORKBUDDY_AUTH_FILE_ENV, yt as deriveAtRestKey, z as declaredTools } from "./host-heartbeat-CgYyUwpM.js";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import { randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-connect-workbuddy",
|
|
3
3
|
"displayName": "DSH Connect WorkBuddy",
|
|
4
4
|
"description": "把本机登录的 WorkBuddy 模型(国内版与国际版)接入 DeepSeek Harness:每次刷新按上游目录自动读取每个模型的积分倍率,支持逐模型图片输入开关、多账号切换与账号池自动换号,并提供每日签到、卡片与输入框里的胶囊积分读数等只读积分概览。",
|
|
5
|
-
"version": "5.2.
|
|
5
|
+
"version": "5.2.3",
|
|
6
6
|
"author": "dingminhua",
|
|
7
7
|
"copyright": "Copyright (c) 2026 LaoDing",
|
|
8
8
|
"license": "MIT",
|