dsh-vendor-quick-switch 1.0.0 → 1.0.2
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 +16 -0
- package/client.js +10 -6
- package/package.json +78 -78
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
- Revert the 1.0.1 attempt to bound the shipped menu. That change shortened the
|
|
6
|
+
host's default model list, which is the host's to decide. The plugin now only
|
|
7
|
+
bounds its own vendor column to the viewport and leaves the shipped menu's
|
|
8
|
+
height, offset, and list length untouched even when it renders past the window.
|
|
9
|
+
|
|
10
|
+
## 1.0.1
|
|
11
|
+
|
|
12
|
+
- Keep the shipped menu, and with it the vendor index and the model list, inside
|
|
13
|
+
the safe band. Renderers without CSS anchor positioning place that menu at the
|
|
14
|
+
top-left corner and let it grow with its content, so a long model list ran past
|
|
15
|
+
the bottom of the window; the menu now receives a bounded height and sits above
|
|
16
|
+
the composer tool row, keeping its own internal scrolling. A menu that already
|
|
17
|
+
fits is left untouched, and the original inline styles are restored on close.
|
|
18
|
+
|
|
3
19
|
## 1.0.0
|
|
4
20
|
|
|
5
21
|
First public release.
|
package/client.js
CHANGED
|
@@ -281,6 +281,12 @@ window.__ModuleLoader__.load({
|
|
|
281
281
|
const columnRef = React.useRef(null);
|
|
282
282
|
const { state: catalog } = useDirectory(getModels, state.sessionId);
|
|
283
283
|
|
|
284
|
+
/**
|
|
285
|
+
* The shipped menu is the host's: never touch its height, offset, or
|
|
286
|
+
* length. Only this column is bounded to the viewport, so the vendor
|
|
287
|
+
* index can never be the thing that spills past the window edge.
|
|
288
|
+
*/
|
|
289
|
+
|
|
284
290
|
/* Follow the shipped menu every frame; a no-op frame writes no state. */
|
|
285
291
|
React.useEffect(() => {
|
|
286
292
|
if (!state.open || state.surface === null) {
|
|
@@ -350,12 +356,10 @@ window.__ModuleLoader__.load({
|
|
|
350
356
|
const viewportHeight = window.innerHeight;
|
|
351
357
|
const floor = viewportHeight - COLUMN_FLOOR;
|
|
352
358
|
const ceiling = COLUMN_INSET;
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
);
|
|
357
|
-
const menuBottom = Math.min(rect.bottom, floor);
|
|
358
|
-
const top = Math.max(ceiling, menuBottom - columnHeight);
|
|
359
|
+
/* Bound this column to the viewport only. The shipped menu keeps its own
|
|
360
|
+
* height and length untouched, even when it renders past the window. */
|
|
361
|
+
const columnHeight = Math.max(120, Math.min(COLUMN_MAX_HEIGHT, floor - ceiling));
|
|
362
|
+
const top = clamp(rect.top, ceiling, Math.max(ceiling, floor - columnHeight));
|
|
359
363
|
|
|
360
364
|
const rightRoom = viewportWidth - COLUMN_INSET - (rect.right + COLUMN_GAP);
|
|
361
365
|
const left = rightRoom >= COLUMN_WIDTH
|
package/package.json
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-vendor-quick-switch",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Vendor-first quick model switching for DeepSeek Harness: a side index beside the shipped model menu, plus an in-menu drill-down mode. · DSH 厂商快速切换:模型菜单旁常驻厂商索引,点厂商直接跳转,不改造原插件。",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.js",
|
|
9
|
-
"./client": "./client.js",
|
|
10
|
-
"./locale/*.json": "./locale/*.json",
|
|
11
|
-
"./icon": "./icon.svg",
|
|
12
|
-
"./package.json": "./package.json"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"index.js",
|
|
16
|
-
"client.js",
|
|
17
|
-
"cordis.patch.yml",
|
|
18
|
-
"locale/*.json",
|
|
19
|
-
"icon.svg",
|
|
20
|
-
"README.md",
|
|
21
|
-
"CHANGELOG.md",
|
|
22
|
-
"LICENSE"
|
|
23
|
-
],
|
|
24
|
-
"keywords": [
|
|
25
|
-
"dsh",
|
|
26
|
-
"dsh-plugin",
|
|
27
|
-
"deepseek-harness",
|
|
28
|
-
"deepseek",
|
|
29
|
-
"plugin",
|
|
30
|
-
"harness",
|
|
31
|
-
"cordis",
|
|
32
|
-
"web-ui",
|
|
33
|
-
"ui",
|
|
34
|
-
"model",
|
|
35
|
-
"model-switcher",
|
|
36
|
-
"model-selector",
|
|
37
|
-
"provider",
|
|
38
|
-
"composer",
|
|
39
|
-
"menu"
|
|
40
|
-
],
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"author": {
|
|
43
|
-
"name": "raysnows"
|
|
44
|
-
},
|
|
45
|
-
"repository": {
|
|
46
|
-
"type": "git",
|
|
47
|
-
"url": "git+https://github.com/1250589385/dsh-vendor-quick-switch.git"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://github.com/1250589385/dsh-vendor-quick-switch#readme",
|
|
50
|
-
"bugs": {
|
|
51
|
-
"url": "https://github.com/1250589385/dsh-vendor-quick-switch/issues"
|
|
52
|
-
},
|
|
53
|
-
"engines": {
|
|
54
|
-
"node": "^22.19.0 || >=24.0.0",
|
|
55
|
-
"dsh": ">=0.2.2-rc.3 <0.3.0-0"
|
|
56
|
-
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"test": "node test/client.test.cjs && node test/render.test.cjs",
|
|
59
|
-
"check": "node --check index.js && node --check client.js && node test/client.test.cjs && node test/render.test.cjs"
|
|
60
|
-
},
|
|
61
|
-
"dsh": {
|
|
62
|
-
"bundle": {
|
|
63
|
-
"patch": "./cordis.patch.yml"
|
|
64
|
-
},
|
|
65
|
-
"client": {
|
|
66
|
-
"platform": "web",
|
|
67
|
-
"immediately": true,
|
|
68
|
-
"inject": [
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-conversation",
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
71
|
-
"@deepseek-ai/dsh-client-locale"
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
"compatibility": {
|
|
75
|
-
"dsh": ">=0.2.2-rc.3"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-vendor-quick-switch",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Vendor-first quick model switching for DeepSeek Harness: a side index beside the shipped model menu, plus an in-menu drill-down mode. · DSH 厂商快速切换:模型菜单旁常驻厂商索引,点厂商直接跳转,不改造原插件。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./client": "./client.js",
|
|
10
|
+
"./locale/*.json": "./locale/*.json",
|
|
11
|
+
"./icon": "./icon.svg",
|
|
12
|
+
"./package.json": "./package.json"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"index.js",
|
|
16
|
+
"client.js",
|
|
17
|
+
"cordis.patch.yml",
|
|
18
|
+
"locale/*.json",
|
|
19
|
+
"icon.svg",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
"LICENSE"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"dsh",
|
|
26
|
+
"dsh-plugin",
|
|
27
|
+
"deepseek-harness",
|
|
28
|
+
"deepseek",
|
|
29
|
+
"plugin",
|
|
30
|
+
"harness",
|
|
31
|
+
"cordis",
|
|
32
|
+
"web-ui",
|
|
33
|
+
"ui",
|
|
34
|
+
"model",
|
|
35
|
+
"model-switcher",
|
|
36
|
+
"model-selector",
|
|
37
|
+
"provider",
|
|
38
|
+
"composer",
|
|
39
|
+
"menu"
|
|
40
|
+
],
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"author": {
|
|
43
|
+
"name": "raysnows"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/1250589385/dsh-vendor-quick-switch.git"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/1250589385/dsh-vendor-quick-switch#readme",
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/1250589385/dsh-vendor-quick-switch/issues"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": "^22.19.0 || >=24.0.0",
|
|
55
|
+
"dsh": ">=0.2.2-rc.3 <0.3.0-0"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"test": "node test/client.test.cjs && node test/render.test.cjs",
|
|
59
|
+
"check": "node --check index.js && node --check client.js && node test/client.test.cjs && node test/render.test.cjs"
|
|
60
|
+
},
|
|
61
|
+
"dsh": {
|
|
62
|
+
"bundle": {
|
|
63
|
+
"patch": "./cordis.patch.yml"
|
|
64
|
+
},
|
|
65
|
+
"client": {
|
|
66
|
+
"platform": "web",
|
|
67
|
+
"immediately": true,
|
|
68
|
+
"inject": [
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
71
|
+
"@deepseek-ai/dsh-client-locale"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"compatibility": {
|
|
75
|
+
"dsh": ">=0.2.2-rc.3"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|