dsh-model-think-level 1.1.3 → 1.1.5
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 +30 -8
- package/docs/image.png +0 -0
- package/docs/image2.png +0 -0
- package/docs/image3.png +0 -0
- package/docs/image4.png +0 -0
- package/docs/image5.png +0 -0
- package/lib/client/ComposerSlider.d.ts +3 -0
- package/lib/client/EffortEditor.d.ts +2 -57
- package/lib/client/configured-inputs.d.ts +12 -0
- package/lib/client/injection/autofill-run.d.ts +2 -0
- package/lib/client/injection/composer-menu.d.ts +3 -0
- package/lib/client/injection/models-page-editor.d.ts +5 -14
- package/lib/client/locales.d.ts +0 -18
- package/lib/client/ops.d.ts +0 -1
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/types.d.ts +5 -21
- package/lib/client.js +7 -314
- package/lib/client.js.map +4 -4
- package/lib/index.js +224 -112
- package/lib/index.js.map +3 -3
- package/lib/key-index.d.ts +4 -3
- package/lib/knowledge.d.ts +15 -2
- package/package.json +19 -4
package/lib/key-index.d.ts
CHANGED
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* The file holds no secrets: references and labels only, which is what makes it
|
|
15
15
|
* safe to keep in plain text and easy for a user to inspect or repair by hand.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Existing unreadable or malformed files fail closed, so a mutation cannot
|
|
17
|
+
* replace lost metadata with a fresh index. Every write is atomic (`write` to a
|
|
18
|
+
* sibling temp file, then `rename`), so a
|
|
18
19
|
* crash mid-write cannot leave a half-parsed index behind.
|
|
19
20
|
*
|
|
20
21
|
* All of it is synchronous on purpose: the host is single-threaded, so a
|
|
@@ -50,7 +51,7 @@ export declare function keyIndexFilePath(home?: string): string;
|
|
|
50
51
|
* @returns a well-formed document.
|
|
51
52
|
*/
|
|
52
53
|
export declare function parseKeyIndex(raw: unknown): KeyIndexDocument;
|
|
53
|
-
/** Read the index
|
|
54
|
+
/** Read the index; only an absent file means a fresh, empty document. */
|
|
54
55
|
export declare function readKeyIndex(file?: string): KeyIndexDocument;
|
|
55
56
|
/** Write the index at one path, atomically. */
|
|
56
57
|
export declare function writeKeyIndex(document: KeyIndexDocument, file?: string): void;
|
package/lib/knowledge.d.ts
CHANGED
|
@@ -70,8 +70,15 @@ export interface CompatSuggestion {
|
|
|
70
70
|
thinkingTokenBudgetField?: ThinkingTokenBudgetField;
|
|
71
71
|
supportsThinkingTokenBudget?: boolean;
|
|
72
72
|
vllmPriority?: number;
|
|
73
|
-
supportsMaxOutputTokens?: boolean;
|
|
74
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Compat keys a kernel older than their introduction does not know, so an
|
|
76
|
+
* autofill patch carrying one is stripped before the downgrade retry.
|
|
77
|
+
*
|
|
78
|
+
* `supportsMaxOutputTokens` is RETIRED -- the row editor no longer offers the
|
|
79
|
+
* control -- but a profile written by an earlier version still carries the key,
|
|
80
|
+
* and that stored value rides an autofill patch, so it stays on this list.
|
|
81
|
+
*/
|
|
75
82
|
export declare const NEW_COMPAT_KEYS: readonly ["thinkingTokenBudgetField", "vllmPriority", "supportsMaxOutputTokens"];
|
|
76
83
|
/** One knowledge-base entry: which model families it matches and what to declare. */
|
|
77
84
|
export interface KnowledgeEntry {
|
|
@@ -240,7 +247,13 @@ export declare function matchKnowledgeBase(modelId: string, displayName?: string
|
|
|
240
247
|
export declare function inferProtocol(route: RouteFacts): string;
|
|
241
248
|
/** Whether a baseURL names a self-hosted endpoint (loopback, private LAN, .local, custom port). */
|
|
242
249
|
export declare function isSelfHostedEndpoint(baseURL: string | undefined): boolean;
|
|
243
|
-
/**
|
|
250
|
+
/**
|
|
251
|
+
* Drop catalog-withheld keys pi-ai never accepts from a profile (defensive).
|
|
252
|
+
*
|
|
253
|
+
* openai-responses now falls through to `undefined`: the plugin suggests no
|
|
254
|
+
* compat field on that gate since its max_output_tokens control was retired, so
|
|
255
|
+
* such a profile keeps exactly what it already stores.
|
|
256
|
+
*/
|
|
244
257
|
export declare function sanitizeCompatForProtocol(compat: CompatSuggestion, api: string): CompatSuggestion | undefined;
|
|
245
258
|
/**
|
|
246
259
|
* Whether a route is a self-hosted relay whose upstreams cannot be assumed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-model-think-level",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "DSH 的第三方模型补齐思考等级:在官方 Models 页每个模型行注入 Thinking 开关和强度/模态编辑器,在输入框模型菜单加供应商→模型选择器、视觉徽章与等级行,并带搜索、拖拽排序、供应商启用开关;以及按路由接管请求头与 user-agent。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GaoHu1997 <gaohu9712@163.com>",
|
|
@@ -52,13 +52,15 @@
|
|
|
52
52
|
"lib/",
|
|
53
53
|
"cordis.patch.yml",
|
|
54
54
|
"README.md",
|
|
55
|
-
"README.zh.md",
|
|
56
55
|
"LICENSE",
|
|
57
56
|
"assets/",
|
|
58
|
-
"docs
|
|
57
|
+
"docs/image*.png",
|
|
59
58
|
"icon.svg",
|
|
60
59
|
"locale/*.json"
|
|
61
60
|
],
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"registry": "https://registry.npmjs.org/"
|
|
63
|
+
},
|
|
62
64
|
"icon": "./icon.svg",
|
|
63
65
|
"dsh": {
|
|
64
66
|
"bundle": {
|
|
@@ -72,6 +74,8 @@
|
|
|
72
74
|
"build": "npm run build:clean && npm run build:host && npm run build:client && npm run build:types",
|
|
73
75
|
"build:clean": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\"",
|
|
74
76
|
"check:styles": "node scripts/check-styles.mjs",
|
|
77
|
+
"check:package": "npm pack --dry-run --ignore-scripts --json > .tmp-pack-manifest.json && node scripts/check-package.mjs .tmp-pack-manifest.json",
|
|
78
|
+
"docs:models": "node scripts/generate-models-doc.mjs",
|
|
75
79
|
"build:client": "npm run check:styles && node scripts/build-client.mjs",
|
|
76
80
|
"test": "vitest run",
|
|
77
81
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
@@ -83,10 +87,21 @@
|
|
|
83
87
|
"node": "^22.19.0 || >=24"
|
|
84
88
|
},
|
|
85
89
|
"peerDependencies": {
|
|
90
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
91
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.5-alpha.1 || ^0.1.6-alpha.1 || ^0.1.7-alpha.1 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
92
|
+
"@deepseek-ai/dsh-client-ui-model-selection": "^0.1.5-alpha.1 || ^0.1.6-alpha.1 || ^0.1.7-alpha.1 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
93
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.5-alpha.1 || ^0.1.6-alpha.1 || ^0.1.7-alpha.1 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
86
94
|
"@deepseek-ai/dsh-api-remotes": "^0.1.5-alpha.1 || ^0.1.6-alpha.1 || ^0.1.7-alpha.1 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
87
95
|
"@deepseek-ai/dsh-settings": "^0.1.5-alpha.1 || ^0.1.6-alpha.1 || ^0.1.7-alpha.1 || ^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
88
96
|
"@deepseek-ai/schemastery": "^3.18.0",
|
|
89
|
-
"react": "^18.2.0 || ^19.0.0"
|
|
97
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
98
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
99
|
+
},
|
|
100
|
+
"peerDependenciesMeta": {
|
|
101
|
+
"@deepseek-ai/cordis": { "optional": true },
|
|
102
|
+
"@deepseek-ai/dsh-api-session-controller": { "optional": true },
|
|
103
|
+
"@deepseek-ai/dsh-client-ui-model-selection": { "optional": true },
|
|
104
|
+
"@deepseek-ai/dsh-client-ui-slots": { "optional": true }
|
|
90
105
|
},
|
|
91
106
|
"devDependencies": {
|
|
92
107
|
"@deepseek-ai/cordis": "4.0.3",
|