dsh-model-extension 1.2.3-alpha.1 → 1.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/README.md +7 -3
- package/lib/client.js +14 -6
- package/lib/client.js.map +1 -1
- package/lib/index.js +17 -47
- package/lib/index.js.map +1 -1
- package/package.json +9 -10
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# dsh-model-extension
|
|
2
2
|
> 基于 deepseek-harness 的模型扩展插件
|
|
3
3
|
|
|
4
|
-
[](./LICENSE) [](https://www.npmjs.com/package/dsh-model-extension) [](./LICENSE) [](https://www.npmjs.com/package/dsh-model-extension) [](https://github.com/deepseek-ai/deepseek-harness)
|
|
5
5
|
|
|
6
6
|
| 供应商 | 模型 |
|
|
7
7
|
| --- | --- |
|
|
@@ -44,11 +44,15 @@ npm install
|
|
|
44
44
|
npm run build
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
插件不自行做版本门:能否装载由宿主按 `package.json` 的 `peerDependencies`(`@deepseek-ai/dsh*`)判定,跟随宿主版本时只改这一处。宿主自身的 settings schema 校验与 revision fence 保证不兼容的写入会被拒绝而非损坏数据。
|
|
48
48
|
|
|
49
49
|
## 版本历史
|
|
50
50
|
|
|
51
|
-
- **1.2.
|
|
51
|
+
- **1.2.3**
|
|
52
|
+
- 🐛移除已作废的 dsh.adapter 逻辑
|
|
53
|
+
- npm publish
|
|
54
|
+
- **1.2.3-alpha.2**
|
|
55
|
+
- 💪适配deepseek harness 0.1.7-alpha.1
|
|
52
56
|
- **1.2.3-alpha.1**
|
|
53
57
|
- 🐛修复 llm-deepseek 获取模型错误的问题
|
|
54
58
|
- **1.2.1**
|
package/lib/client.js
CHANGED
|
@@ -471,6 +471,11 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
471
471
|
}
|
|
472
472
|
//#endregion
|
|
473
473
|
//#region src/client/extension-meta.ts
|
|
474
|
+
/**
|
|
475
|
+
* Shared extension metadata: enums pinned to the host release this extension
|
|
476
|
+
* was last verified against, and the extra locale keys the extension adds on
|
|
477
|
+
* top of the official Models page dictionaries.
|
|
478
|
+
*/
|
|
474
479
|
/** Thinking levels offered by llm-pi-ai (THINKING_LEVEL_GATE @ 0.1.2-alpha.4). Only `off` may carry an empty wire value. */
|
|
475
480
|
const THINKING_LEVELS = [
|
|
476
481
|
"off",
|
|
@@ -502,7 +507,7 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
502
507
|
* copying pi-ai's catalog `compat` across verbatim would fail resolution on
|
|
503
508
|
* the withheld fields it also records (routing preferences, session affinity,
|
|
504
509
|
* deferred tools, grammar tools). Re-check against the host's COMPAT_GATES on
|
|
505
|
-
* every
|
|
510
|
+
* every host upgrade — the same drift gate the host keeps for itself.
|
|
506
511
|
*/
|
|
507
512
|
const COMPAT_FIELDS = {
|
|
508
513
|
"openai-completions": [
|
|
@@ -2358,8 +2363,11 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2358
2363
|
* never delete fields outside the card.
|
|
2359
2364
|
*/
|
|
2360
2365
|
/** The official DeepSeek roots, chosen by the profile's resolved protocol.
|
|
2361
|
-
*
|
|
2362
|
-
*
|
|
2366
|
+
* Host @ 0.1.6-alpha.2 kept both keys (deepSeekChatBaseUrl / deepSeekMessagesBaseUrl)
|
|
2367
|
+
* with Messages as the default; @ 0.1.7-alpha.1 it collapsed to a single
|
|
2368
|
+
* deepSeekBaseUrl (https://api.deepseek.com/anthropic) with an Anthropic-only
|
|
2369
|
+
* hint. We keep the protocol-aware pair so a chat-protocol route still prefills
|
|
2370
|
+
* the bare root — prefill only, the saved draft is whatever the user set. */
|
|
2363
2371
|
const DEEPSEEK_CHAT_BASE_URL = "https://api.deepseek.com";
|
|
2364
2372
|
const DEEPSEEK_MESSAGES_BASE_URL = "https://api.deepseek.com/anthropic";
|
|
2365
2373
|
/** The editor layout the owning namespace selects. */
|
|
@@ -3521,7 +3529,7 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
3521
3529
|
//#region src/client/index-extension.ts
|
|
3522
3530
|
/** Cordis service name (distinct from the npm package name). */
|
|
3523
3531
|
const name = "model-extension-client";
|
|
3524
|
-
/** Required services — mirrors the upstream Models section registration @ 0.1.
|
|
3532
|
+
/** Required services — mirrors the upstream Models section registration @ 0.1.7-rc.1. */
|
|
3525
3533
|
const inject = [
|
|
3526
3534
|
"slots",
|
|
3527
3535
|
"locale",
|
|
@@ -3529,7 +3537,7 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
3529
3537
|
"remote.credentials",
|
|
3530
3538
|
"remote.llm",
|
|
3531
3539
|
"remote.settings",
|
|
3532
|
-
"
|
|
3540
|
+
"configForms",
|
|
3533
3541
|
"settingsSchema"
|
|
3534
3542
|
];
|
|
3535
3543
|
/** Refetch the page snapshot only after its first load (upstream helper, inlined). */
|
|
@@ -3549,7 +3557,7 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
3549
3557
|
}), "dsh-model-extension: copy dictionaries");
|
|
3550
3558
|
const schema = createSettingsSchemaOperations(ctx.settingsSchema);
|
|
3551
3559
|
const operations = createModelsOperations(ctx);
|
|
3552
|
-
const controller = new ModelsSettingsStore(ctx, schema, ctx.
|
|
3560
|
+
const controller = new ModelsSettingsStore(ctx, schema, ctx.configForms.describe());
|
|
3553
3561
|
const t = ctx.locale.bind(NS);
|
|
3554
3562
|
const injected = () => ({
|
|
3555
3563
|
controller,
|