dsh-workbuddy-bridge 0.3.1 → 0.4.0
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/README.md +13 -10
- package/README_en.md +17 -14
- package/lib/bin.js +1 -1
- package/lib/client.js +70 -70
- package/lib/{heartbeat-DihKwwFX.js → heartbeat-CP6YM98x.js} +1 -1
- package/lib/index.js +87 -6
- package/package.json +14 -13
- package/locale/README.md +0 -10
package/README.md
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
<img src="icon.svg" alt="dsh-workbuddy-bridge" width="80" height="80">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
<h1 align="center">dsh-workbuddy-bridge</h1>
|
|
7
|
-
</p>
|
|
5
|
+
<h1 align="center">dsh-workbuddy-bridge</h1>
|
|
8
6
|
|
|
9
7
|
<div align="center">
|
|
10
8
|
<p><strong>把 WorkBuddy 桌面 App 的模型接进 DSH 对话窗口</strong></p>
|
|
@@ -46,8 +44,10 @@
|
|
|
46
44
|
- **开箱即用** —— 装完启用,模型分组自己出现。
|
|
47
45
|
- **两版隔离** —— 国内版与国际版各自分组,模型、账号、积分互不混用,只跟随各自 App 的登录状态。
|
|
48
46
|
- **推理档位** —— 上游声明了档位的模型直接可选;没声明的可在插件页**手动检测**。
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
- **推理档位** —— 上游声明了档位的模型直接可选;没声明的可在插件页**手动检测**。
|
|
48
|
+
灯泡表示能切档位;上游已声明的模型也亮着,只是不需要检测。
|
|
49
|
+
能切档位的模型会带一个**默认档位**(上游声明了就按声明,否则取 `high`),因此选择器里不再出现「Default」这一项。
|
|
50
|
+
- **积分可见** —— 每条回复下方显示本次消耗,模型选择器旁常驻剩余积分。拿不到数字时不显示。
|
|
51
51
|
- **模型显隐** —— 卡片「模型」标签里勾选哪些模型出现在选择器里,按登录账号分别保存。
|
|
52
52
|
- **图片输入** —— 多数模型可直接粘贴或拖入图片;纯文字模型会明确说明。
|
|
53
53
|
- **三种界面** —— Web / Desktop / TUI;仅 TUI 无手动检测。
|
|
@@ -73,8 +73,8 @@ dsh plugin --profile web add dsh-workbuddy-bridge
|
|
|
73
73
|
dsh web
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Desktop 与 TUI 把 `--profile web` 换成 `desktop` / `dsh-tui`(TUI
|
|
77
|
-
`@deepseek-harness-tui/dsh-tui
|
|
76
|
+
Desktop 与 TUI 把 `--profile web` 换成 `desktop` / `dsh-tui`(TUI 需较新版本的终端插件
|
|
77
|
+
`@deepseek-harness-tui/dsh-tui`,版本要求见其文档)。
|
|
78
78
|
|
|
79
79
|
也可以从源码安装:
|
|
80
80
|
|
|
@@ -85,6 +85,9 @@ pnpm install && pnpm build
|
|
|
85
85
|
dsh plugin --profile web add "$PWD"
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
⚠️ 上面那步 `pnpm install` 不能省:按路径挂载时依赖要由仓库自己装好(见[本地开发装法](docs/PUBLISHING.md)),
|
|
89
|
+
漏装则插件显示「未运行」(`ERR_MODULE_NOT_FOUND`)。
|
|
90
|
+
|
|
88
91
|
## 插件页
|
|
89
92
|
|
|
90
93
|
侧边栏 **插件(Plugins)** → 已安装 → 点 **DSH WorkBuddy Bridge**。配置区在描述下面,保存即生效:
|
|
@@ -107,7 +110,7 @@ dsh plugin --profile web add "$PWD"
|
|
|
107
110
|
|
|
108
111
|
## 为什么是手动检测
|
|
109
112
|
|
|
110
|
-
|
|
113
|
+
WorkBuddy 接口不保证档位信息可靠——有的模型**接受** `reasoning_effort` 却忽略未知值。
|
|
111
114
|
所以插件不猜:按需对单个模型发少量真实请求确认;结果只表示**上游当前接受该档位**,
|
|
112
115
|
不承诺它改变推理行为。已声明档位的模型跳过这一步,直接用声明值。
|
|
113
116
|
机制与取舍见 [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)。
|
|
@@ -120,7 +123,7 @@ dsh plugin --profile web add "$PWD"
|
|
|
120
123
|
|
|
121
124
|
## 兼容与限制
|
|
122
125
|
|
|
123
|
-
|
|
126
|
+
无凭据的分组不显示。宿主版本下限、平台支持、模型清单从哪来与已知缺口
|
|
124
127
|
→ [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md)。
|
|
125
128
|
|
|
126
129
|
设计取舍 → [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md);发版流程 → [docs/PUBLISHING.md](docs/PUBLISHING.md);
|
|
@@ -128,7 +131,7 @@ dsh plugin --profile web add "$PWD"
|
|
|
128
131
|
|
|
129
132
|
## 免责声明
|
|
130
133
|
|
|
131
|
-
- 本项目**仅供个人学习和研究使用**,仅驱动使用者自己的 WorkBuddy
|
|
134
|
+
- 本项目**仅供个人学习和研究使用**,仅驱动使用者自己的 WorkBuddy 账号在本机调用,请勿用于商业用途。
|
|
132
135
|
- 使用者需遵守 WorkBuddy 的服务条款;因使用本项目产生的任何后果,由使用者自行承担。
|
|
133
136
|
- 本项目与腾讯、WorkBuddy、DeepSeek 均无关联,未获其授权或认可;文中出现的名称仅用于描述兼容关系,其商标权利归各自所有。
|
|
134
137
|
|
package/README_en.md
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
<img src="icon.svg" alt="dsh-workbuddy-bridge" width="80" height="80">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
<h1 align="center">dsh-workbuddy-bridge</h1>
|
|
7
|
-
</p>
|
|
5
|
+
<h1 align="center">dsh-workbuddy-bridge</h1>
|
|
8
6
|
|
|
9
7
|
<div align="center">
|
|
10
8
|
<p><strong>WorkBuddy desktop models in DeepSeek Harness</strong></p>
|
|
9
|
+
<p><em>把 WorkBuddy 桌面 App 的模型接进 DSH 对话窗口</em></p>
|
|
11
10
|
|
|
12
11
|
<p>
|
|
13
12
|
<a href="https://www.npmjs.com/package/dsh-workbuddy-bridge"><img src="https://img.shields.io/npm/v/dsh-workbuddy-bridge?style=flat" alt="npm"></a>
|
|
@@ -29,8 +28,7 @@
|
|
|
29
28
|
|
|
30
29
|
> [!NOTE]
|
|
31
30
|
> **Credentials never leave this machine**: sign-in state is read from the WorkBuddy desktop app's own
|
|
32
|
-
> credential file and kept as one encrypted local copy; the browser half never sees a token, and none
|
|
33
|
-
> ever appears in the UI.
|
|
31
|
+
> credential file and kept as one encrypted local copy; the browser half never sees a token, and none ever appears in the UI.
|
|
34
32
|
|
|
35
33
|
The CN **WorkBuddy** and the international **WorkBuddy AI** coexist: install one app and its model group
|
|
36
34
|
appears; install both and the two groups sit side by side, each with its own account and credit. The
|
|
@@ -49,10 +47,11 @@ models appear directly in the DSH model picker — no separate provider to confi
|
|
|
49
47
|
- **Two isolated versions** — "WorkBuddy" (CN) and "WorkBuddy AI" (international) each form their own group;
|
|
50
48
|
models, accounts and credit never mix, and each follows only its own app's sign-in.
|
|
51
49
|
- **Reasoning levels** — models that declare levels expose them directly; the rest can be **checked manually**
|
|
52
|
-
on the plugin page. The bulb means "this model can switch levels"
|
|
53
|
-
model
|
|
50
|
+
on the plugin page. The bulb means "this model can switch levels"; a declared model shows it too, it just
|
|
51
|
+
has nothing to detect. A switchable model also carries a **default level** (the upstream's own declaration
|
|
52
|
+
when it has one, otherwise `high`), so the picker no longer offers "Default".
|
|
54
53
|
- **Credit in view** — each reply shows what it consumed, and remaining credit sits beside the model picker.
|
|
55
|
-
Nothing renders when a figure
|
|
54
|
+
Nothing renders when a figure is unavailable.
|
|
56
55
|
- **Model visibility** — tick which models appear in the picker on the card's "Models" tab, saved per
|
|
57
56
|
signed-in account.
|
|
58
57
|
- **Image input** — most models accept pasted or dropped images; text-only models say so explicitly.
|
|
@@ -81,8 +80,8 @@ dsh plugin --profile web add dsh-workbuddy-bridge
|
|
|
81
80
|
dsh web
|
|
82
81
|
```
|
|
83
82
|
|
|
84
|
-
For Desktop and TUI swap `--profile web` for `desktop` / `dsh-tui` (the TUI needs
|
|
85
|
-
`@deepseek-harness-tui/dsh-tui`
|
|
83
|
+
For Desktop and TUI swap `--profile web` for `desktop` / `dsh-tui` (the TUI needs a recent version of
|
|
84
|
+
the terminal plugin `@deepseek-harness-tui/dsh-tui` — see its docs).
|
|
86
85
|
|
|
87
86
|
Or from source:
|
|
88
87
|
|
|
@@ -93,6 +92,10 @@ pnpm install && pnpm build
|
|
|
93
92
|
dsh plugin --profile web add "$PWD"
|
|
94
93
|
```
|
|
95
94
|
|
|
95
|
+
⚠️ The `pnpm install` above is not optional: under a path install the repository has to supply
|
|
96
|
+
its own dependencies (see [local development setup](docs/PUBLISHING.md)) — skip it and the
|
|
97
|
+
plugin shows as "not running" (`ERR_MODULE_NOT_FOUND`).
|
|
98
|
+
|
|
96
99
|
## The plugin page
|
|
97
100
|
|
|
98
101
|
Sidebar **Plugins** → installed → click **DSH WorkBuddy Bridge**. The configuration area sits right under
|
|
@@ -117,7 +120,7 @@ the description and takes effect on save:
|
|
|
117
120
|
|
|
118
121
|
## Why detection is manual
|
|
119
122
|
|
|
120
|
-
The
|
|
123
|
+
The WorkBuddy API does not guarantee that level information is reliable — some models were observed to
|
|
121
124
|
**accept** `reasoning_effort` while silently ignoring unknown values. So the plugin does not guess: it
|
|
122
125
|
confirms one model at a time with a few real requests on demand, and a result only means **the upstream
|
|
123
126
|
currently accepts that level** — it does not promise any change in behaviour. Models that declare their
|
|
@@ -132,8 +135,8 @@ Mechanism and trade-offs in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
|
|
132
135
|
|
|
133
136
|
## Compatibility and limits
|
|
134
137
|
|
|
135
|
-
A group without credentials does not appear. The host version floor, platform support,
|
|
136
|
-
known gaps
|
|
138
|
+
A group without credentials does not appear. The host version floor, platform support, where the model
|
|
139
|
+
catalog comes from and known gaps
|
|
137
140
|
→ [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
|
|
138
141
|
|
|
139
142
|
Design notes → [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md); release process → [docs/PUBLISHING.md](docs/PUBLISHING.md);
|
|
@@ -142,7 +145,7 @@ maintainer map → [AGENTS.md](AGENTS.md).
|
|
|
142
145
|
## Disclaimer
|
|
143
146
|
|
|
144
147
|
- This project is **for personal study and research only**; it drives your own WorkBuddy account on your own
|
|
145
|
-
machine. Do not use it commercially
|
|
148
|
+
machine. Do not use it commercially.
|
|
146
149
|
- You must comply with WorkBuddy's terms of service; any consequences are your own responsibility.
|
|
147
150
|
- Not affiliated with, nor endorsed by, Tencent, WorkBuddy, or DeepSeek; names appear only to describe
|
|
148
151
|
compatibility, and trademarks belong to their owners.
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as variantFor, D as WorkBuddyUpstreamClient, S as WORKBUDDY_VARIANTS, Y as resolveAppVersion, a as readHostHeartbeat, c as WORKBUDDY_BRIDGE_VERSION, l as FALLBACK_WORKBUDDY_AI_MODELS, m as WorkBuddyCredentialStore, o as workbuddyHostHeartbeatPath, r as isHeartbeatProcessAlive, u as FALLBACK_WORKBUDDY_MODELS, x as CN_VARIANT } from "./heartbeat-
|
|
2
|
+
import { C as variantFor, D as WorkBuddyUpstreamClient, S as WORKBUDDY_VARIANTS, Y as resolveAppVersion, a as readHostHeartbeat, c as WORKBUDDY_BRIDGE_VERSION, l as FALLBACK_WORKBUDDY_AI_MODELS, m as WorkBuddyCredentialStore, o as workbuddyHostHeartbeatPath, r as isHeartbeatProcessAlive, u as FALLBACK_WORKBUDDY_MODELS, x as CN_VARIANT } from "./heartbeat-CP6YM98x.js";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
//#region src/cli/bin.ts
|
package/lib/client.js
CHANGED
|
@@ -55,8 +55,8 @@ window.__ModuleLoader__.load({
|
|
|
55
55
|
return credit.toFixed(2).replace(/\.?0+$/u, "");
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region \0workbuddy-css
|
|
59
|
-
const css$4 = ".
|
|
58
|
+
//#region \0workbuddy-css:D:\ProjectSomething\dsh-plugins\dsh-workbuddy-bridge\src\client\workbuddy.module.css.js
|
|
59
|
+
const css$4 = "._1kHyqG_page,._1kHyqG_cards{flex-direction:column;gap:12px;display:flex}._1kHyqG_toggleRow{border-top:.5px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);justify-content:space-between;align-items:flex-start;gap:16px;padding:12px 0;font-size:13px;line-height:1.5;display:flex}._1kHyqG_toggleLabel{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}._1kHyqG_toggleHint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5}._1kHyqG_body{flex-direction:column;gap:12px;padding:4px 0 12px;display:flex}._1kHyqG_section{flex-direction:column;display:flex}._1kHyqG_section>*+*{margin-top:12px}._1kHyqG_cardActions{align-items:center;gap:8px;display:flex}._1kHyqG_field{flex-direction:column;gap:6px;display:flex}._1kHyqG_head{align-items:center;gap:8px;display:flex}._1kHyqG_main{flex-wrap:wrap;flex:1;align-items:baseline;gap:8px;min-width:0;display:flex}._1kHyqG_action{flex:none;align-items:center;gap:8px;display:inline-flex}._1kHyqG_note{flex-wrap:wrap;align-items:baseline;gap:8px;min-width:0;display:flex}._1kHyqG_part{flex-wrap:wrap;align-items:baseline;gap:8px;min-width:0;font-size:13px;line-height:1.5;display:inline-flex}._1kHyqG_caption{color:var(--dsw-alias-label-tertiary)}._1kHyqG_figure{min-width:0;color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;align-items:baseline;gap:6px;font-weight:500;display:inline-flex}._1kHyqG_sectionActions{border-top:.5px solid var(--dsw-alias-border-l2);justify-content:flex-end;gap:8px;padding-top:10px;display:flex}._1kHyqG_title{color:var(--dsw-alias-label-primary);margin:0;font-size:13px;font-weight:500;line-height:1.5}._1kHyqG_summaryRow{flex-wrap:wrap;gap:4px;height:auto;min-height:28px}._1kHyqG_summaryTitle{flex:1;min-width:0}._1kHyqG_statusLine{color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;font-size:12px;line-height:1.5;display:inline-flex}._1kHyqG_text{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:1.5}._1kHyqG_dim{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._1kHyqG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}._1kHyqG_package{flex-direction:column;gap:8px;padding:8px 0;display:flex}._1kHyqG_package+._1kHyqG_package{border-top:.5px solid var(--dsw-alias-border-l2)}._1kHyqG_packageLabel{justify-content:space-between;align-items:baseline;gap:8px;font-size:13px;line-height:1.5;display:flex}._1kHyqG_track{corner-shape:round;background:var(--dsw-alias-border-l3);border-radius:999px;height:8px;overflow:hidden}._1kHyqG_fill{border-radius:inherit;background:var(--dsw-alias-brand-primary);height:100%}._1kHyqG_panel{flex-direction:column;gap:12px;height:380px;display:flex}._1kHyqG_panel>*{flex:none}._1kHyqG_list{border:.5px solid var(--dsw-alias-border-l1);border-radius:10px;gap:0;min-width:0;margin:0;padding:6px 14px;display:grid;overflow:auto}._1kHyqG_panel>._1kHyqG_list{flex:auto;min-height:0}._1kHyqG_listHeader{border-bottom:.5px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);margin:0;padding:6px 0 8px;font-size:12px;line-height:1.5}._1kHyqG_modelRow{justify-content:space-between;align-items:center;gap:8px;padding:8px 0;display:flex}._1kHyqG_modelRow+._1kHyqG_modelRow{border-top:.5px solid var(--dsw-alias-border-l2)}._1kHyqG_modelMain{align-items:center;gap:8px;min-width:0;display:flex}._1kHyqG_modelCheck{font-size:13px;line-height:1.5}._1kHyqG_modelStack{flex-direction:column;gap:2px;min-width:0;display:flex}._1kHyqG_name{color:var(--dsw-alias-label-primary);font-size:13px;line-height:1.5}._1kHyqG_modelEnd{text-align:right;color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex-direction:column;gap:2px;font-size:12px;line-height:1.5;display:flex}._1kHyqG_meta{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5}._1kHyqG_badges{flex-wrap:wrap;align-items:center;gap:6px;display:flex}._1kHyqG_probeRow{justify-content:space-between;align-items:center;gap:8px;padding:8px 0;display:flex}._1kHyqG_modelStack+._1kHyqG_modelStack{border-top:.5px solid var(--dsw-alias-border-l2)}._1kHyqG_probeEnd{flex:none;align-items:center;gap:8px;display:inline-flex}._1kHyqG_assist{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:8px;padding:12px;display:flex}._1kHyqG_prompt{min-width:0;color:var(--dsw-alias-label-secondary);white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;flex:220px;margin:0;font-size:12px;line-height:1.6}._1kHyqG_promptRow{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-3);flex-wrap:wrap;align-items:flex-start;gap:8px;padding:8px 9px 8px 11px;display:flex}";
|
|
60
60
|
const tagId$4 = "dsh-workbuddy-bridge/workbuddy.module.css";
|
|
61
61
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
62
62
|
const tag = document.createElement("style");
|
|
@@ -66,50 +66,50 @@ window.__ModuleLoader__.load({
|
|
|
66
66
|
document.head.appendChild(tag);
|
|
67
67
|
}
|
|
68
68
|
var workbuddy_module_css_default = {
|
|
69
|
-
"action": "
|
|
70
|
-
"assist": "
|
|
71
|
-
"badges": "
|
|
72
|
-
"body": "
|
|
73
|
-
"caption": "
|
|
74
|
-
"cardActions": "
|
|
75
|
-
"cards": "
|
|
76
|
-
"dim": "
|
|
77
|
-
"error": "
|
|
78
|
-
"field": "
|
|
79
|
-
"figure": "
|
|
80
|
-
"fill": "
|
|
81
|
-
"head": "
|
|
82
|
-
"list": "
|
|
83
|
-
"listHeader": "
|
|
84
|
-
"main": "
|
|
85
|
-
"meta": "
|
|
86
|
-
"modelCheck": "
|
|
87
|
-
"modelEnd": "
|
|
88
|
-
"modelMain": "
|
|
89
|
-
"modelRow": "
|
|
90
|
-
"modelStack": "
|
|
91
|
-
"name": "
|
|
92
|
-
"note": "
|
|
93
|
-
"package": "
|
|
94
|
-
"packageLabel": "
|
|
95
|
-
"page": "
|
|
96
|
-
"panel": "
|
|
97
|
-
"part": "
|
|
98
|
-
"probeEnd": "
|
|
99
|
-
"probeRow": "
|
|
100
|
-
"prompt": "
|
|
101
|
-
"promptRow": "
|
|
102
|
-
"section": "
|
|
103
|
-
"sectionActions": "
|
|
104
|
-
"statusLine": "
|
|
105
|
-
"summaryRow": "
|
|
106
|
-
"summaryTitle": "
|
|
107
|
-
"text": "
|
|
108
|
-
"title": "
|
|
109
|
-
"toggleHint": "
|
|
110
|
-
"toggleLabel": "
|
|
111
|
-
"toggleRow": "
|
|
112
|
-
"track": "
|
|
69
|
+
"action": "_1kHyqG_action",
|
|
70
|
+
"assist": "_1kHyqG_assist",
|
|
71
|
+
"badges": "_1kHyqG_badges",
|
|
72
|
+
"body": "_1kHyqG_body",
|
|
73
|
+
"caption": "_1kHyqG_caption",
|
|
74
|
+
"cardActions": "_1kHyqG_cardActions",
|
|
75
|
+
"cards": "_1kHyqG_cards",
|
|
76
|
+
"dim": "_1kHyqG_dim",
|
|
77
|
+
"error": "_1kHyqG_error",
|
|
78
|
+
"field": "_1kHyqG_field",
|
|
79
|
+
"figure": "_1kHyqG_figure",
|
|
80
|
+
"fill": "_1kHyqG_fill",
|
|
81
|
+
"head": "_1kHyqG_head",
|
|
82
|
+
"list": "_1kHyqG_list",
|
|
83
|
+
"listHeader": "_1kHyqG_listHeader",
|
|
84
|
+
"main": "_1kHyqG_main",
|
|
85
|
+
"meta": "_1kHyqG_meta",
|
|
86
|
+
"modelCheck": "_1kHyqG_modelCheck",
|
|
87
|
+
"modelEnd": "_1kHyqG_modelEnd",
|
|
88
|
+
"modelMain": "_1kHyqG_modelMain",
|
|
89
|
+
"modelRow": "_1kHyqG_modelRow",
|
|
90
|
+
"modelStack": "_1kHyqG_modelStack",
|
|
91
|
+
"name": "_1kHyqG_name",
|
|
92
|
+
"note": "_1kHyqG_note",
|
|
93
|
+
"package": "_1kHyqG_package",
|
|
94
|
+
"packageLabel": "_1kHyqG_packageLabel",
|
|
95
|
+
"page": "_1kHyqG_page",
|
|
96
|
+
"panel": "_1kHyqG_panel",
|
|
97
|
+
"part": "_1kHyqG_part",
|
|
98
|
+
"probeEnd": "_1kHyqG_probeEnd",
|
|
99
|
+
"probeRow": "_1kHyqG_probeRow",
|
|
100
|
+
"prompt": "_1kHyqG_prompt",
|
|
101
|
+
"promptRow": "_1kHyqG_promptRow",
|
|
102
|
+
"section": "_1kHyqG_section",
|
|
103
|
+
"sectionActions": "_1kHyqG_sectionActions",
|
|
104
|
+
"statusLine": "_1kHyqG_statusLine",
|
|
105
|
+
"summaryRow": "_1kHyqG_summaryRow",
|
|
106
|
+
"summaryTitle": "_1kHyqG_summaryTitle",
|
|
107
|
+
"text": "_1kHyqG_text",
|
|
108
|
+
"title": "_1kHyqG_title",
|
|
109
|
+
"toggleHint": "_1kHyqG_toggleHint",
|
|
110
|
+
"toggleLabel": "_1kHyqG_toggleLabel",
|
|
111
|
+
"toggleRow": "_1kHyqG_toggleRow",
|
|
112
|
+
"track": "_1kHyqG_track"
|
|
113
113
|
};
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/client/field.tsx
|
|
@@ -663,8 +663,8 @@ window.__ModuleLoader__.load({
|
|
|
663
663
|
}
|
|
664
664
|
};
|
|
665
665
|
//#endregion
|
|
666
|
-
//#region \0workbuddy-css
|
|
667
|
-
const css$3 = ".
|
|
666
|
+
//#region \0workbuddy-css:D:\ProjectSomething\dsh-plugins\dsh-workbuddy-bridge\src\client\coin-glyph.module.css.js
|
|
667
|
+
const css$3 = ".sapSKa_glyph{flex:none;align-self:center}";
|
|
668
668
|
const tagId$3 = "dsh-workbuddy-bridge/coin-glyph.module.css";
|
|
669
669
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
670
670
|
const tag = document.createElement("style");
|
|
@@ -673,7 +673,7 @@ window.__ModuleLoader__.load({
|
|
|
673
673
|
tag.textContent = css$3;
|
|
674
674
|
document.head.appendChild(tag);
|
|
675
675
|
}
|
|
676
|
-
var coin_glyph_module_css_default = { "glyph": "
|
|
676
|
+
var coin_glyph_module_css_default = { "glyph": "sapSKa_glyph" };
|
|
677
677
|
//#endregion
|
|
678
678
|
//#region src/client/coin-glyph.tsx
|
|
679
679
|
/** Render the coin-stack glyph. Decorative: the caller supplies the accessible name. */
|
|
@@ -1663,8 +1663,8 @@ window.__ModuleLoader__.load({
|
|
|
1663
1663
|
});
|
|
1664
1664
|
}
|
|
1665
1665
|
//#endregion
|
|
1666
|
-
//#region \0workbuddy-css
|
|
1667
|
-
const css$2 = ".
|
|
1666
|
+
//#region \0workbuddy-css:D:\ProjectSomething\dsh-plugins\dsh-workbuddy-bridge\src\client\probe-control.module.css.js
|
|
1667
|
+
const css$2 = ".Ivd5xG_wrapper{align-items:center;display:inline-flex;position:relative}.Ivd5xG_trigger{corner-shape:round;cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:999px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}.Ivd5xG_trigger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.Ivd5xG_trigger:disabled{cursor:default;color:var(--dsw-alias-label-dimmed)}.Ivd5xG_trigger:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}.Ivd5xG_panel{isolation:isolate;z-index:1100;box-sizing:border-box;border-radius:var(--dsw-radius-lg);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);width:max-content;min-width:min(280px,100vw - 24px);max-width:min(360px,100vw - 24px);box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-secondary);cursor:default;border:0;padding:12px;font-size:12px;line-height:1.5;position:fixed}.Ivd5xG_panel:before{z-index:-1;border-radius:inherit;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);content:\"\";pointer-events:none;position:absolute;inset:0}.Ivd5xG_panelTitle{color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:13px;font-weight:500;line-height:1.5;display:flex}.Ivd5xG_panelTitleIcon{color:var(--dsw-alias-label-secondary);flex:none;align-items:center;display:inline-flex}.Ivd5xG_panelTitleText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Ivd5xG_titleRule{border-top:.5px solid var(--dsw-alias-border-l2);margin:8px 0 10px}.Ivd5xG_levelsLabel{color:var(--dsw-alias-label-tertiary);margin:0 0 2px;font-size:12px;line-height:1.5}.Ivd5xG_levels{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;margin:0;font-size:13px;font-weight:500;line-height:1.5}.Ivd5xG_note,.Ivd5xG_dim{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:1.6}.Ivd5xG_dim{margin-top:2px}.Ivd5xG_panelActions{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}";
|
|
1668
1668
|
const tagId$2 = "dsh-workbuddy-bridge/probe-control.module.css";
|
|
1669
1669
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
1670
1670
|
const tag = document.createElement("style");
|
|
@@ -1674,18 +1674,18 @@ window.__ModuleLoader__.load({
|
|
|
1674
1674
|
document.head.appendChild(tag);
|
|
1675
1675
|
}
|
|
1676
1676
|
var probe_control_module_css_default = {
|
|
1677
|
-
"dim": "
|
|
1678
|
-
"levels": "
|
|
1679
|
-
"levelsLabel": "
|
|
1680
|
-
"note": "
|
|
1681
|
-
"panel": "
|
|
1682
|
-
"panelActions": "
|
|
1683
|
-
"panelTitle": "
|
|
1684
|
-
"panelTitleIcon": "
|
|
1685
|
-
"panelTitleText": "
|
|
1686
|
-
"titleRule": "
|
|
1687
|
-
"trigger": "
|
|
1688
|
-
"wrapper": "
|
|
1677
|
+
"dim": "Ivd5xG_dim",
|
|
1678
|
+
"levels": "Ivd5xG_levels",
|
|
1679
|
+
"levelsLabel": "Ivd5xG_levelsLabel",
|
|
1680
|
+
"note": "Ivd5xG_note",
|
|
1681
|
+
"panel": "Ivd5xG_panel",
|
|
1682
|
+
"panelActions": "Ivd5xG_panelActions",
|
|
1683
|
+
"panelTitle": "Ivd5xG_panelTitle",
|
|
1684
|
+
"panelTitleIcon": "Ivd5xG_panelTitleIcon",
|
|
1685
|
+
"panelTitleText": "Ivd5xG_panelTitleText",
|
|
1686
|
+
"titleRule": "Ivd5xG_titleRule",
|
|
1687
|
+
"trigger": "Ivd5xG_trigger",
|
|
1688
|
+
"wrapper": "Ivd5xG_wrapper"
|
|
1689
1689
|
};
|
|
1690
1690
|
//#endregion
|
|
1691
1691
|
//#region src/client/probe-control.tsx
|
|
@@ -2217,8 +2217,8 @@ window.__ModuleLoader__.load({
|
|
|
2217
2217
|
return { credits };
|
|
2218
2218
|
}
|
|
2219
2219
|
//#endregion
|
|
2220
|
-
//#region \0workbuddy-css
|
|
2221
|
-
const css$1 = ".
|
|
2220
|
+
//#region \0workbuddy-css:D:\ProjectSomething\dsh-plugins\dsh-workbuddy-bridge\src\client\credit-label.module.css.js
|
|
2221
|
+
const css$1 = ".VopAXG_label{white-space:nowrap;font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);color:var(--dsw-alias-label-tertiary);padding-left:4px;line-height:1}";
|
|
2222
2222
|
const tagId$1 = "dsh-workbuddy-bridge/credit-label.module.css";
|
|
2223
2223
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
2224
2224
|
const tag = document.createElement("style");
|
|
@@ -2227,7 +2227,7 @@ window.__ModuleLoader__.load({
|
|
|
2227
2227
|
tag.textContent = css$1;
|
|
2228
2228
|
document.head.appendChild(tag);
|
|
2229
2229
|
}
|
|
2230
|
-
var credit_label_module_css_default = { "label": "
|
|
2230
|
+
var credit_label_module_css_default = { "label": "VopAXG_label" };
|
|
2231
2231
|
//#endregion
|
|
2232
2232
|
//#region src/client/credit-label.tsx
|
|
2233
2233
|
/**
|
|
@@ -2275,8 +2275,8 @@ window.__ModuleLoader__.load({
|
|
|
2275
2275
|
});
|
|
2276
2276
|
}
|
|
2277
2277
|
//#endregion
|
|
2278
|
-
//#region \0workbuddy-css
|
|
2279
|
-
const css = ".
|
|
2278
|
+
//#region \0workbuddy-css:D:\ProjectSomething\dsh-plugins\dsh-workbuddy-bridge\src\client\credit-balance.module.css.js
|
|
2279
|
+
const css = ".zUqKXG_readout{white-space:nowrap;height:28px;color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;display:inline-flex}.zUqKXG_amount{font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);font-variant-numeric:tabular-nums;line-height:1}";
|
|
2280
2280
|
const tagId = "dsh-workbuddy-bridge/credit-balance.module.css";
|
|
2281
2281
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
2282
2282
|
const tag = document.createElement("style");
|
|
@@ -2286,8 +2286,8 @@ window.__ModuleLoader__.load({
|
|
|
2286
2286
|
document.head.appendChild(tag);
|
|
2287
2287
|
}
|
|
2288
2288
|
var credit_balance_module_css_default = {
|
|
2289
|
-
"amount": "
|
|
2290
|
-
"readout": "
|
|
2289
|
+
"amount": "zUqKXG_amount",
|
|
2290
|
+
"readout": "zUqKXG_readout"
|
|
2291
2291
|
};
|
|
2292
2292
|
//#endregion
|
|
2293
2293
|
//#region src/client/credit-balance.tsx
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as parseModelCatalog, B as chatUserAgent, C as variantFor, D as WorkBuddyUpstreamClient, F as probeModel, G as WORKBUDDY_APP_VERSION_FILENAME, H as readCliVersion, I as randomSentinel, J as readBundleVersion, K as appUserAgent, L as classifyUpstreamError, M as prepareInternationalChatBody, N as regionOf, O as modelWithCurrentPromotion, P as PROBE_EFFORT_CANDIDATES, R as CN_APP_VERSION_FILENAME, S as WORKBUDDY_VARIANTS, U as resolveChatIdentity, V as fallbackChatIdentity, W as validCliVersion, X as validAppVersion, Y as resolveAppVersion, _ as desktopAuthCandidatesFor, a as readHostHeartbeat, b as AI_VARIANT, c as WORKBUDDY_BRIDGE_VERSION, d as WorkBuddyCatalog, f as WORKBUDDY_AUTH_FILENAME, g as defaultDesktopAuthPath, h as defaultDesktopAuthCandidates, i as processStartTimeMs, j as prepareChatBody, k as normalizeCredits, l as FALLBACK_WORKBUDDY_AI_MODELS, m as WorkBuddyCredentialStore, n as clearHostHeartbeat, o as workbuddyHostHeartbeatPath, p as WORKBUDDY_AUTH_FILE_ENV, q as installedAppVersion, r as isHeartbeatProcessAlive, s as writeHostHeartbeat, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, u as FALLBACK_WORKBUDDY_MODELS, v as parseWorkBuddyAuth, w as WORKBUDDY_CREDIT_PATH, x as CN_VARIANT, y as workbuddyOwnAuthPath, z as FALLBACK_CN_APP_VERSION } from "./heartbeat-
|
|
1
|
+
import { A as parseModelCatalog, B as chatUserAgent, C as variantFor, D as WorkBuddyUpstreamClient, F as probeModel, G as WORKBUDDY_APP_VERSION_FILENAME, H as readCliVersion, I as randomSentinel, J as readBundleVersion, K as appUserAgent, L as classifyUpstreamError, M as prepareInternationalChatBody, N as regionOf, O as modelWithCurrentPromotion, P as PROBE_EFFORT_CANDIDATES, R as CN_APP_VERSION_FILENAME, S as WORKBUDDY_VARIANTS, U as resolveChatIdentity, V as fallbackChatIdentity, W as validCliVersion, X as validAppVersion, Y as resolveAppVersion, _ as desktopAuthCandidatesFor, a as readHostHeartbeat, b as AI_VARIANT, c as WORKBUDDY_BRIDGE_VERSION, d as WorkBuddyCatalog, f as WORKBUDDY_AUTH_FILENAME, g as defaultDesktopAuthPath, h as defaultDesktopAuthCandidates, i as processStartTimeMs, j as prepareChatBody, k as normalizeCredits, l as FALLBACK_WORKBUDDY_AI_MODELS, m as WorkBuddyCredentialStore, n as clearHostHeartbeat, o as workbuddyHostHeartbeatPath, p as WORKBUDDY_AUTH_FILE_ENV, q as installedAppVersion, r as isHeartbeatProcessAlive, s as writeHostHeartbeat, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, u as FALLBACK_WORKBUDDY_MODELS, v as parseWorkBuddyAuth, w as WORKBUDDY_CREDIT_PATH, x as CN_VARIANT, y as workbuddyOwnAuthPath, z as FALLBACK_CN_APP_VERSION } from "./heartbeat-CP6YM98x.js";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { dirname, join, resolve } from "node:path";
|
|
4
4
|
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
@@ -6,7 +6,7 @@ import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
|
|
|
6
6
|
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { createProvider } from "@earendil-works/pi-ai";
|
|
8
8
|
import { openAICompletionsApi } from "@earendil-works/pi-ai/api/openai-completions.lazy";
|
|
9
|
-
import { resolveRetryPolicy } from "@deepseek-ai/dsh-llm";
|
|
9
|
+
import { ReasoningEffortId, resolveRetryPolicy } from "@deepseek-ai/dsh-llm";
|
|
10
10
|
import { PiAiAdapter } from "@deepseek-ai/dsh-llm-pi-ai";
|
|
11
11
|
import { createServer } from "node:http";
|
|
12
12
|
import { Readable } from "node:stream";
|
|
@@ -303,6 +303,39 @@ function resolveEfforts(info, observed) {
|
|
|
303
303
|
canDisable: false
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* The level a switchable model defaults to, or undefined when it has no switch.
|
|
308
|
+
*
|
|
309
|
+
* **Why this is not simply the upstream's `defaultEffort`.** The host's model
|
|
310
|
+
* picker adds a "Default" item — "follow whatever the provider does" — exactly
|
|
311
|
+
* when a model reports no default; reporting one is what removes that item. The
|
|
312
|
+
* upstream's own answer is used whenever it names a level the offered set
|
|
313
|
+
* contains, because that is the only defensible source: it is what the provider
|
|
314
|
+
* itself would do with no `reasoning_effort` on the wire.
|
|
315
|
+
*
|
|
316
|
+
* `high` backs it up otherwise, and the asymmetry is deliberate. A row can
|
|
317
|
+
* declare a set while naming no default, and a stale `defaultEffort` can name a
|
|
318
|
+
* level a narrower declared set no longer offers (`defaultEffort: 'low'` beside
|
|
319
|
+
* `supportedEfforts: ['high']`). Both leave the level unpinned, and the chosen
|
|
320
|
+
* behaviour is to pin it anyway: a wrong-but-explicit level is a one-click fix
|
|
321
|
+
* in the picker, while a silent "follow the provider" is not even visible.
|
|
322
|
+
*
|
|
323
|
+
* The fallback therefore never strays outside the offered set. A model whose set
|
|
324
|
+
* excludes `high` falls back to its first offered level — naming a level the
|
|
325
|
+
* model cannot accept would make every request that omits an effort fail
|
|
326
|
+
* `UNSUPPORTED_REASONING_EFFORT`, which is the failure the `reasoning-merge`
|
|
327
|
+
* specs exist to prevent.
|
|
328
|
+
*
|
|
329
|
+
* @param info - the catalog row, whose `reasoning.defaultEffort` may name one.
|
|
330
|
+
* @param offered - the offered levels, in order; the answer is always a member.
|
|
331
|
+
* @returns a member of `offered`, or undefined when nothing is offered.
|
|
332
|
+
*/
|
|
333
|
+
function resolveDefaultEffort(info, offered) {
|
|
334
|
+
if (offered.length === 0) return void 0;
|
|
335
|
+
const declared = info.reasoning?.defaultEffort;
|
|
336
|
+
if (declared !== void 0 && offered.includes(declared)) return declared;
|
|
337
|
+
return offered.includes("high") ? "high" : offered[0];
|
|
338
|
+
}
|
|
306
339
|
//#endregion
|
|
307
340
|
//#region src/llm/adapter.ts
|
|
308
341
|
/**
|
|
@@ -498,7 +531,7 @@ function createWorkBuddyAdapter(options) {
|
|
|
498
531
|
};
|
|
499
532
|
let profiles = /* @__PURE__ */ new Map([[providerId, profile]]);
|
|
500
533
|
return {
|
|
501
|
-
adapter: new WorkBuddyPiAiAdapter(catalog, hidden ?? (() => []), {
|
|
534
|
+
adapter: new WorkBuddyPiAiAdapter(catalog, hidden ?? (() => []), observe ?? (() => void 0), {
|
|
502
535
|
profiles: () => profiles,
|
|
503
536
|
auth: INERT_AUTH,
|
|
504
537
|
resolveApiKey: async () => shim.token(),
|
|
@@ -520,6 +553,14 @@ function createWorkBuddyAdapter(options) {
|
|
|
520
553
|
* capability resolution, and effort mapping stay exactly as `dsh-llm-pi-ai`
|
|
521
554
|
* implements them.
|
|
522
555
|
*
|
|
556
|
+
* `resolveModel()` and `prepareCall()` additionally answer the *default*
|
|
557
|
+
* thinking level. `dsh-llm-pi-ai` can only report a default from a whole-route
|
|
558
|
+
* profile field (`profile.reasoning`), which cannot express one level per
|
|
559
|
+
* model, so the per-model answer has to be attached here. Two call sites are
|
|
560
|
+
* required rather than one: the picker reads `resolveModel()`, while the
|
|
561
|
+
* request path reads `prepareCall()`, and a default present on only one of them
|
|
562
|
+
* would show the user a level the wire does not actually send.
|
|
563
|
+
*
|
|
523
564
|
* A model missing from the catalog (an id the shim would serve but the last
|
|
524
565
|
* upstream refresh did not list) falls through with its name untouched rather
|
|
525
566
|
* than being dropped: catalog membership is advisory, and the seam tolerates
|
|
@@ -528,15 +569,48 @@ function createWorkBuddyAdapter(options) {
|
|
|
528
569
|
var WorkBuddyPiAiAdapter = class extends PiAiAdapter {
|
|
529
570
|
catalog;
|
|
530
571
|
hidden;
|
|
531
|
-
|
|
572
|
+
observe;
|
|
573
|
+
constructor(catalog, hidden, observe, options) {
|
|
532
574
|
super(options);
|
|
533
575
|
this.catalog = catalog;
|
|
534
576
|
this.hidden = hidden;
|
|
577
|
+
this.observe = observe;
|
|
535
578
|
}
|
|
536
579
|
/** Catalog entry for one model id, or undefined when the catalog omits it. */
|
|
537
580
|
infoFor(model) {
|
|
538
581
|
return this.catalog.current().find((entry) => entry.id === model);
|
|
539
582
|
}
|
|
583
|
+
/**
|
|
584
|
+
* The default level for one model, or undefined when it has no switch.
|
|
585
|
+
*
|
|
586
|
+
* Derived from the *same* switch the picker is built from — `resolveEfforts`
|
|
587
|
+
* with the same observation the adapter passes to `reasoningFields` — so the
|
|
588
|
+
* default can never name a level this model does not offer.
|
|
589
|
+
*/
|
|
590
|
+
defaultEffortFor(model) {
|
|
591
|
+
const info = this.infoFor(model);
|
|
592
|
+
if (info === void 0) return void 0;
|
|
593
|
+
const effort = resolveDefaultEffort(info, resolveEfforts(info, this.observe(model)).efforts);
|
|
594
|
+
return effort === void 0 ? void 0 : ReasoningEffortId(effort);
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Attach the per-model default to an already-resolved model answer.
|
|
598
|
+
*
|
|
599
|
+
* Written as a rewrite of `reasoning` rather than a spread of the whole
|
|
600
|
+
* answer: `reasoning.defaultEffort` must stay absent — not `undefined` — on a
|
|
601
|
+
* model with no switch, because the host reads absence as "offer Default".
|
|
602
|
+
*/
|
|
603
|
+
withDefaultEffort(resolved) {
|
|
604
|
+
const effort = this.defaultEffortFor(resolved.id);
|
|
605
|
+
if (effort === void 0 || resolved.reasoning === void 0) return resolved;
|
|
606
|
+
return {
|
|
607
|
+
...resolved,
|
|
608
|
+
reasoning: {
|
|
609
|
+
...resolved.reasoning,
|
|
610
|
+
defaultEffort: effort
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
}
|
|
540
614
|
async listModels(provider) {
|
|
541
615
|
const models = await super.listModels(provider);
|
|
542
616
|
const hidden = new Set(this.hidden());
|
|
@@ -553,11 +627,18 @@ var WorkBuddyPiAiAdapter = class extends PiAiAdapter {
|
|
|
553
627
|
async resolveModel(provider, model, signal) {
|
|
554
628
|
const resolved = await super.resolveModel(provider, model, signal);
|
|
555
629
|
const info = this.infoFor(model);
|
|
556
|
-
|
|
557
|
-
return {
|
|
630
|
+
const named = info === void 0 ? resolved : {
|
|
558
631
|
...resolved,
|
|
559
632
|
name: withCatalogDisplay(resolved.name, info)
|
|
560
633
|
};
|
|
634
|
+
return this.withDefaultEffort(named);
|
|
635
|
+
}
|
|
636
|
+
async prepareCall(provider, model, signal) {
|
|
637
|
+
const prepared = await super.prepareCall(provider, model, signal);
|
|
638
|
+
return {
|
|
639
|
+
...prepared,
|
|
640
|
+
model: this.withDefaultEffort(prepared.model)
|
|
641
|
+
};
|
|
561
642
|
}
|
|
562
643
|
};
|
|
563
644
|
//#endregion
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-workbuddy-bridge",
|
|
3
3
|
"displayName": "DSH WorkBuddy Bridge",
|
|
4
4
|
"description": "将 WorkBuddy 桌面 App 包含的模型自动接入 DeepSeek Harness — bring WorkBuddy desktop app models into DeepSeek Harness with zero configuration.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"author": "zlZayn",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"dsh",
|
|
@@ -24,6 +24,17 @@
|
|
|
24
24
|
"bin": {
|
|
25
25
|
"dsh-workbuddy-bridge": "lib/bin.js"
|
|
26
26
|
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prepack": "node node_modules/tsdown/dist/run.mjs",
|
|
29
|
+
"build": "tsdown",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"lint": "eslint .",
|
|
32
|
+
"format": "prettier --write .",
|
|
33
|
+
"format:check": "prettier --check .",
|
|
34
|
+
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
|
|
35
|
+
"check:release": "node scripts/check-release.mjs",
|
|
36
|
+
"check": "pnpm run typecheck && pnpm run build && pnpm run test"
|
|
37
|
+
},
|
|
27
38
|
"exports": {
|
|
28
39
|
".": {
|
|
29
40
|
"types": "./lib/index.d.ts",
|
|
@@ -135,7 +146,7 @@
|
|
|
135
146
|
"eslint-config-prettier": "^10.1.8",
|
|
136
147
|
"globals": "^17.12.0",
|
|
137
148
|
"immer": "^11.1.18",
|
|
138
|
-
"katex": "^0.
|
|
149
|
+
"katex": "^0.18.2",
|
|
139
150
|
"lightningcss": "^1.33.0",
|
|
140
151
|
"mdast-util-from-markdown": "^2.0.3",
|
|
141
152
|
"mdast-util-gfm": "^3.1.0",
|
|
@@ -160,15 +171,5 @@
|
|
|
160
171
|
"unrun": "^0.3.1",
|
|
161
172
|
"vitest": "^4.1.11",
|
|
162
173
|
"zustand": "^5.0.15"
|
|
163
|
-
},
|
|
164
|
-
"scripts": {
|
|
165
|
-
"build": "tsdown",
|
|
166
|
-
"test": "vitest run",
|
|
167
|
-
"lint": "eslint .",
|
|
168
|
-
"format": "prettier --write .",
|
|
169
|
-
"format:check": "prettier --check .",
|
|
170
|
-
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
|
|
171
|
-
"check:release": "node scripts/check-release.mjs",
|
|
172
|
-
"check": "pnpm run typecheck && pnpm run build && pnpm run test"
|
|
173
174
|
}
|
|
174
|
-
}
|
|
175
|
+
}
|
package/locale/README.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# locale/ — 包展示元数据
|
|
2
|
-
|
|
3
|
-
- 职责:宿主直读的**包展示元数据**(插件页上的标题与一句话说明)。
|
|
4
|
-
不是插件界面文案 —— 那在 [../src/client/locales.ts](../src/client/locales.ts),运行时经 `ctx.locale` 注册。
|
|
5
|
-
- `en.json`:`meta.title` + `meta.description` 的英文。宿主先解析这一份,它不在就不会读其他语言文件。
|
|
6
|
-
- `zh.json`:同一键集的中文。
|
|
7
|
-
- 生效条件:随包发布(`package.json` 的 `files` 收了 `locale/*.json`),宿主从 `<包名>/locale/<语言>.json` 读;
|
|
8
|
-
不进 `lib/`,本仓代码一个字节都不读它。
|
|
9
|
-
- 被谁依赖:宿主插件页;发布面断言在 [../scripts/check-release.mjs](../scripts/check-release.mjs)。
|
|
10
|
-
- 回落链、字段形状、改动波及面(规则层)→ 见 [AGENTS.md](AGENTS.md)
|